PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ linemerge()

Datum linemerge ( PG_FUNCTION_ARGS  )

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

3262 {
3263  GSERIALIZED *geom1;
3264  GSERIALIZED *result;
3265  LWGEOM *lwgeom1, *lwresult ;
3266 
3267  geom1 = PG_GETARG_GSERIALIZED_P(0);
3268 
3269 
3270  lwgeom1 = lwgeom_from_gserialized(geom1) ;
3271 
3272  lwresult = lwgeom_linemerge(lwgeom1);
3273  result = geometry_serialize(lwresult) ;
3274 
3275  lwgeom_free(lwgeom1) ;
3276  lwgeom_free(lwresult) ;
3277 
3278  PG_FREE_IF_COPY(geom1, 0);
3279 
3280  PG_RETURN_POINTER(result);
3281 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1063
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: