PostGIS  2.5.2dev-r@@SVN_REVISION@@

◆ ST_BuildArea()

Datum ST_BuildArea ( PG_FUNCTION_ARGS  )

Definition at line 3061 of file postgis/lwgeom_geos.c.

References dumpnode::geom, geometry_serialize(), lwgeom_buildarea(), lwgeom_free(), lwgeom_from_gserialized(), PG_FUNCTION_INFO_V1(), and ST_DelaunayTriangles().

Referenced by linemerge().

3062 {
3063  GSERIALIZED *result;
3064  GSERIALIZED *geom;
3065  LWGEOM *lwgeom_in, *lwgeom_out;
3066 
3067  geom = PG_GETARG_GSERIALIZED_P(0);
3068  lwgeom_in = lwgeom_from_gserialized(geom);
3069 
3070  lwgeom_out = lwgeom_buildarea(lwgeom_in);
3071  lwgeom_free(lwgeom_in) ;
3072 
3073  if ( ! lwgeom_out )
3074  {
3075  PG_FREE_IF_COPY(geom, 0);
3076  PG_RETURN_NULL();
3077  }
3078 
3079  result = geometry_serialize(lwgeom_out) ;
3080  lwgeom_free(lwgeom_out) ;
3081 
3082  PG_FREE_IF_COPY(geom, 0);
3083  PG_RETURN_POINTER(result);
3084 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
LWGEOM * geom
LWGEOM * lwgeom_buildarea(const LWGEOM *geom)
Take a geometry and return an areal geometry (Polygon or MultiPolygon).
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
Here is the call graph for this function:
Here is the caller graph for this function: