PostGIS  3.2.2dev-r@@SVN_REVISION@@

◆ ST_BuildArea()

Datum ST_BuildArea ( PG_FUNCTION_ARGS  )

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

3156 {
3158  GSERIALIZED *geom;
3159  LWGEOM *lwgeom_in, *lwgeom_out;
3160 
3161  geom = PG_GETARG_GSERIALIZED_P(0);
3162  lwgeom_in = lwgeom_from_gserialized(geom);
3163 
3164  lwgeom_out = lwgeom_buildarea(lwgeom_in);
3165  lwgeom_free(lwgeom_in) ;
3166 
3167  if ( ! lwgeom_out )
3168  {
3169  PG_FREE_IF_COPY(geom, 0);
3170  PG_RETURN_NULL();
3171  }
3172 
3173  result = geometry_serialize(lwgeom_out) ;
3174  lwgeom_free(lwgeom_out) ;
3175 
3176  PG_FREE_IF_COPY(geom, 0);
3177  PG_RETURN_POINTER(result);
3178 }
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:1138
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: