PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ linemerge()

Datum linemerge ( PG_FUNCTION_ARGS  )

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

3566 {
3567  GSERIALIZED *geom1;
3568  GSERIALIZED *result;
3569  LWGEOM *lwgeom1, *lwresult ;
3570 
3571  geom1 = PG_GETARG_GSERIALIZED_P(0);
3572 
3573 
3574  lwgeom1 = lwgeom_from_gserialized(geom1) ;
3575 
3576  lwresult = lwgeom_linemerge(lwgeom1);
3577  result = geometry_serialize(lwresult) ;
3578 
3579  lwgeom_free(lwgeom1) ;
3580  lwgeom_free(lwresult) ;
3581 
3582  PG_FREE_IF_COPY(geom1, 0);
3583 
3584  PG_RETURN_POINTER(result);
3585 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1050
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: