PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ ST_BuildArea()

Datum ST_BuildArea ( PG_FUNCTION_ARGS  )

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

2203 {
2205  GSERIALIZED *geom;
2206  LWGEOM *lwgeom_in, *lwgeom_out;
2207 
2208  geom = PG_GETARG_GSERIALIZED_P(0);
2209  lwgeom_in = lwgeom_from_gserialized(geom);
2210 
2211  lwgeom_out = lwgeom_buildarea(lwgeom_in);
2212  lwgeom_free(lwgeom_in) ;
2213 
2214  if ( ! lwgeom_out )
2215  {
2216  PG_FREE_IF_COPY(geom, 0);
2217  PG_RETURN_NULL();
2218  }
2219 
2220  result = geometry_serialize(lwgeom_out) ;
2221  lwgeom_free(lwgeom_out) ;
2222 
2223  PG_FREE_IF_COPY(geom, 0);
2224  PG_RETURN_POINTER(result);
2225 }
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:268
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1218
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: