PostGIS  2.5.2dev-r@@SVN_REVISION@@

◆ linemerge()

Datum linemerge ( PG_FUNCTION_ARGS  )

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

3032 {
3033  GSERIALIZED *geom1;
3034  GSERIALIZED *result;
3035  LWGEOM *lwgeom1, *lwresult ;
3036 
3037  geom1 = PG_GETARG_GSERIALIZED_P(0);
3038 
3039 
3040  lwgeom1 = lwgeom_from_gserialized(geom1) ;
3041 
3042  lwresult = lwgeom_linemerge(lwgeom1);
3043  result = geometry_serialize(lwresult) ;
3044 
3045  lwgeom_free(lwgeom1) ;
3046  lwgeom_free(lwresult) ;
3047 
3048  PG_FREE_IF_COPY(geom1, 0);
3049 
3050  PG_RETURN_POINTER(result);
3051 }
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: