PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ ST_BuildArea()

Datum ST_BuildArea ( PG_FUNCTION_ARGS  )

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

3292 {
3293  GSERIALIZED *result;
3294  GSERIALIZED *geom;
3295  LWGEOM *lwgeom_in, *lwgeom_out;
3296 
3297  geom = PG_GETARG_GSERIALIZED_P(0);
3298  lwgeom_in = lwgeom_from_gserialized(geom);
3299 
3300  lwgeom_out = lwgeom_buildarea(lwgeom_in);
3301  lwgeom_free(lwgeom_in) ;
3302 
3303  if ( ! lwgeom_out )
3304  {
3305  PG_FREE_IF_COPY(geom, 0);
3306  PG_RETURN_NULL();
3307  }
3308 
3309  result = geometry_serialize(lwgeom_out) ;
3310  lwgeom_free(lwgeom_out) ;
3311 
3312  PG_FREE_IF_COPY(geom, 0);
3313  PG_RETURN_POINTER(result);
3314 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1063
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: