PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ ST_Area()

Datum ST_Area ( PG_FUNCTION_ARGS  )

Definition at line 277 of file lwgeom_functions_basic.c.

278 {
279  GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
280  LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
281  double area = 0.0;
282 
283  area = lwgeom_area(lwgeom);
284 
285  lwgeom_free(lwgeom);
286  PG_FREE_IF_COPY(geom, 0);
287 
288  PG_RETURN_FLOAT8(area);
289 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Definition: gserialized.c:268
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1218
double lwgeom_area(const LWGEOM *geom)
Definition: lwgeom.c:1971

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

Here is the call graph for this function: