PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ LWGEOM_perimeter2d_poly()

Datum LWGEOM_perimeter2d_poly ( PG_FUNCTION_ARGS  )

Definition at line 349 of file lwgeom_functions_basic.c.

References dumpnode::geom, LWGEOM_force_2d(), lwgeom_from_gserialized(), lwgeom_perimeter_2d(), and PG_FUNCTION_INFO_V1().

Referenced by LWGEOM_perimeter_poly().

350 {
351  GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
352  LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
353  double perimeter = 0.0;
354 
355  perimeter = lwgeom_perimeter_2d(lwgeom);
356  PG_FREE_IF_COPY(geom, 0);
357  PG_RETURN_FLOAT8(perimeter);
358 }
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:1637
Here is the call graph for this function:
Here is the caller graph for this function: