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

Definition at line 325 of file lwgeom_functions_basic.c.

References lwgeom_from_gserialized(), and lwgeom_perimeter_2d().

326 {
327  GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
328  LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
329  double perimeter = 0.0;
330 
331  perimeter = lwgeom_perimeter_2d(lwgeom);
332  PG_FREE_IF_COPY(geom, 0);
333  PG_RETURN_FLOAT8(perimeter);
334 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
LWGEOM * geom
double lwgeom_perimeter_2d(const LWGEOM *geom)
Definition: lwgeom.c:1544

Here is the call graph for this function: