PostGIS  3.0.0dev-r@@SVN_REVISION@@

◆ linemerge()

Datum linemerge ( PG_FUNCTION_ARGS  )

Definition at line 3030 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().

3031 {
3032  GSERIALIZED *geom1;
3033  GSERIALIZED *result;
3034  LWGEOM *lwgeom1, *lwresult ;
3035 
3036  geom1 = PG_GETARG_GSERIALIZED_P(0);
3037 
3038 
3039  lwgeom1 = lwgeom_from_gserialized(geom1) ;
3040 
3041  lwresult = lwgeom_linemerge(lwgeom1);
3042  result = geometry_serialize(lwresult) ;
3043 
3044  lwgeom_free(lwgeom1) ;
3045  lwgeom_free(lwresult) ;
3046 
3047  PG_FREE_IF_COPY(geom1, 0);
3048 
3049  PG_RETURN_POINTER(result);
3050 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1128
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: