PostGIS  2.5.0dev-r@@SVN_REVISION@@
double lwpoly_perimeter ( const LWPOLY poly)

Compute the sum of polygon rings length.

Could use a more numerically stable calculator...

Definition at line 472 of file lwpoly.c.

References LWDEBUGF, LWPOLY::nrings, ptarray_length(), and LWPOLY::rings.

Referenced by lwgeom_perimeter().

473 {
474  double result=0.0;
475  uint32_t i;
477  LWDEBUGF(2, "in lwgeom_polygon_perimeter (%d rings)", poly->nrings);
479  for (i=0; i<poly->nrings; i++)
480  result += ptarray_length(poly->rings[i]);
482  return result;
483 }
double ptarray_length(const POINTARRAY *pts)
Find the 3d/2d length of the given POINTARRAY (depending on its dimensionality)
Definition: ptarray.c:1710
uint32_t nrings
Definition: liblwgeom.h:454
unsigned int uint32_t
Definition: uthash.h:78
Definition: liblwgeom.h:456
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88

Here is the call graph for this function:

Here is the caller graph for this function: