PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ ST_BuildArea()

Datum ST_BuildArea ( PG_FUNCTION_ARGS  )

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

3241 {
3243  GSERIALIZED *geom;
3244  LWGEOM *lwgeom_in, *lwgeom_out;
3245 
3246  geom = PG_GETARG_GSERIALIZED_P(0);
3247  lwgeom_in = lwgeom_from_gserialized(geom);
3248 
3249  lwgeom_out = lwgeom_buildarea(lwgeom_in);
3250  lwgeom_free(lwgeom_in) ;
3251 
3252  if ( ! lwgeom_out )
3253  {
3254  PG_FREE_IF_COPY(geom, 0);
3255  PG_RETURN_NULL();
3256  }
3257 
3258  result = geometry_serialize(lwgeom_out) ;
3259  lwgeom_free(lwgeom_out) ;
3260 
3261  PG_FREE_IF_COPY(geom, 0);
3262  PG_RETURN_POINTER(result);
3263 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:262
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: