PostGIS  2.3.7dev-r@@SVN_REVISION@@
double lwcompound_length_2d ( const LWCOMPOUND comp)

Definition at line 74 of file lwcompound.c.

References LWCOMPOUND::geoms, lwgeom_is_empty(), lwgeom_length_2d(), and LWCOMPOUND::ngeoms.

Referenced by lwcompound_length(), and lwgeom_length_2d().

75 {
76  int i;
77  double length = 0.0;
78  if ( lwgeom_is_empty((LWGEOM*)comp) )
79  return 0.0;
80 
81  for (i = 0; i < comp->ngeoms; i++)
82  {
83  length += lwgeom_length_2d(comp->geoms[i]);
84  }
85  return length;
86 }
LWGEOM ** geoms
Definition: liblwgeom.h:521
double lwgeom_length_2d(const LWGEOM *geom)
Definition: lwgeom.c:1681
int ngeoms
Definition: liblwgeom.h:519
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members) ...
Definition: lwgeom.c:1310

Here is the call graph for this function:

Here is the caller graph for this function: