PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ ST_BuildArea()

Datum ST_BuildArea ( PG_FUNCTION_ARGS  )

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

3131 {
3133  GSERIALIZED *geom;
3134  LWGEOM *lwgeom_in, *lwgeom_out;
3135 
3136  geom = PG_GETARG_GSERIALIZED_P(0);
3137  lwgeom_in = lwgeom_from_gserialized(geom);
3138 
3139  lwgeom_out = lwgeom_buildarea(lwgeom_in);
3140  lwgeom_free(lwgeom_in) ;
3141 
3142  if ( ! lwgeom_out )
3143  {
3144  PG_FREE_IF_COPY(geom, 0);
3145  PG_RETURN_NULL();
3146  }
3147 
3148  result = geometry_serialize(lwgeom_out) ;
3149  lwgeom_free(lwgeom_out) ;
3150 
3151  PG_FREE_IF_COPY(geom, 0);
3152  PG_RETURN_POINTER(result);
3153 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:267
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Definition: gserialized.c:239
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1155
LWGEOM * lwgeom_buildarea(const LWGEOM *geom)
Take a geometry and return an areal geometry (Polygon or MultiPolygon).

References lwgeom_buildarea(), lwgeom_free(), lwgeom_from_gserialized(), and result.

Here is the call graph for this function: