PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ ST_BuildArea()

Datum ST_BuildArea ( PG_FUNCTION_ARGS  )

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

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