PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ ST_Area()

Datum ST_Area ( PG_FUNCTION_ARGS  )

Definition at line 278 of file lwgeom_functions_basic.c.

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

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

Here is the call graph for this function: