PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ ST_Area()

Datum ST_Area ( PG_FUNCTION_ARGS  )

Definition at line 275 of file lwgeom_functions_basic.c.

276 {
277  GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
278  LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
279  double area = 0.0;
280 
281  area = lwgeom_area(lwgeom);
282 
283  lwgeom_free(lwgeom);
284  PG_FREE_IF_COPY(geom, 0);
285 
286  PG_RETURN_FLOAT8(area);
287 }
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
double lwgeom_area(const LWGEOM *geom)
Definition: lwgeom.c:1863

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

Here is the call graph for this function: