PostGIS  2.1.10dev-r@@SVN_REVISION@@
Datum LWGEOM_perimeter_poly ( PG_FUNCTION_ARGS  )

Definition at line 306 of file lwgeom_functions_basic.c.

References lwgeom_from_gserialized(), and lwgeom_perimeter().

307 {
308  GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
309  LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
310  double perimeter = 0.0;
311 
312  perimeter = lwgeom_perimeter(lwgeom);
313  PG_FREE_IF_COPY(geom, 0);
314  PG_RETURN_FLOAT8(perimeter);
315 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
double lwgeom_perimeter(const LWGEOM *geom)
Definition: lwgeom.c:1522
LWGEOM * geom

Here is the call graph for this function: