PostGIS  3.0.0dev-r@@SVN_REVISION@@

◆ LWGEOM_perimeter_poly()

Datum LWGEOM_perimeter_poly ( PG_FUNCTION_ARGS  )

Definition at line 333 of file lwgeom_functions_basic.c.

References dumpnode::geom, lwgeom_from_gserialized(), lwgeom_perimeter(), LWGEOM_perimeter2d_poly(), and PG_FUNCTION_INFO_V1().

Referenced by LWGEOM_length_linestring().

334 {
335  GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
336  LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
337  double perimeter = 0.0;
338 
339  perimeter = lwgeom_perimeter(lwgeom);
340  PG_FREE_IF_COPY(geom, 0);
341  PG_RETURN_FLOAT8(perimeter);
342 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
double lwgeom_perimeter(const LWGEOM *geom)
Definition: lwgeom.c:1821
LWGEOM * geom
Here is the call graph for this function:
Here is the caller graph for this function: