PostGIS  2.5.0beta1dev-r@@SVN_REVISION@@

◆ linemerge()

Datum linemerge ( PG_FUNCTION_ARGS  )

Definition at line 3032 of file postgis/lwgeom_geos.c.

References geometry_serialize(), lwgeom_free(), lwgeom_from_gserialized(), lwgeom_linemerge(), PG_FUNCTION_INFO_V1(), and ST_BuildArea().

Referenced by cluster_within_distance_garray().

3033 {
3034  GSERIALIZED *geom1;
3035  GSERIALIZED *result;
3036  LWGEOM *lwgeom1, *lwresult ;
3037 
3038  geom1 = PG_GETARG_GSERIALIZED_P(0);
3039 
3040 
3041  lwgeom1 = lwgeom_from_gserialized(geom1) ;
3042 
3043  lwresult = lwgeom_linemerge(lwgeom1);
3044  result = geometry_serialize(lwresult) ;
3045 
3046  lwgeom_free(lwgeom1) ;
3047  lwgeom_free(lwresult) ;
3048 
3049  PG_FREE_IF_COPY(geom1, 0);
3050 
3051  PG_RETURN_POINTER(result);
3052 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
LWGEOM * lwgeom_linemerge(const LWGEOM *geom1)
Here is the call graph for this function:
Here is the caller graph for this function: