PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ linemerge()

Datum linemerge ( PG_FUNCTION_ARGS  )

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

3333 {
3334  GSERIALIZED *geom1;
3335  GSERIALIZED *result;
3336  LWGEOM *lwgeom1, *lwresult ;
3337 
3338  geom1 = PG_GETARG_GSERIALIZED_P(0);
3339 
3340 
3341  lwgeom1 = lwgeom_from_gserialized(geom1) ;
3342 
3343  lwresult = lwgeom_linemerge(lwgeom1);
3344  result = geometry_serialize(lwresult) ;
3345 
3346  lwgeom_free(lwgeom1) ;
3347  lwgeom_free(lwresult) ;
3348 
3349  PG_FREE_IF_COPY(geom1, 0);
3350 
3351  PG_RETURN_POINTER(result);
3352 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1099
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: