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

◆ ST_BuildArea()

Datum ST_BuildArea ( PG_FUNCTION_ARGS  )

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

3067{
3068 GSERIALIZED *result;
3069 GSERIALIZED *geom;
3070 LWGEOM *lwgeom_in, *lwgeom_out;
3071
3072 geom = PG_GETARG_GSERIALIZED_P(0);
3073 lwgeom_in = lwgeom_from_gserialized(geom);
3074
3075 lwgeom_out = lwgeom_buildarea(lwgeom_in);
3076 lwgeom_free(lwgeom_in) ;
3077
3078 if ( ! lwgeom_out )
3079 {
3080 PG_FREE_IF_COPY(geom, 0);
3081 PG_RETURN_NULL();
3082 }
3083
3084 result = geometry_serialize(lwgeom_out) ;
3085 lwgeom_free(lwgeom_out) ;
3086
3087 PG_FREE_IF_COPY(geom, 0);
3088 PG_RETURN_POINTER(result);
3089}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
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).
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)

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

Here is the call graph for this function: