PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ LWGEOM_area_polygon()

Datum LWGEOM_area_polygon ( PG_FUNCTION_ARGS  )

Definition at line 274 of file lwgeom_functions_basic.c.

275 {
276  GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
277  LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
278  double area = 0.0;
279 
280  POSTGIS_DEBUG(2, "in LWGEOM_area_polygon");
281 
282  area = lwgeom_area(lwgeom);
283 
284  lwgeom_free(lwgeom);
285  PG_FREE_IF_COPY(geom, 0);
286 
287  PG_RETURN_FLOAT8(area);
288 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
double lwgeom_area(const LWGEOM *geom)
Definition: lwgeom.c:1872
Datum area(PG_FUNCTION_ARGS)

References area(), lwgeom_area(), lwgeom_free(), and lwgeom_from_gserialized().

Here is the call graph for this function: