PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwcompound_length_2d()

double lwcompound_length_2d ( const LWCOMPOUND comp)

Definition at line 74 of file lwcompound.c.

References lwgeom_is_empty(), and lwgeom_length_2d().

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 }
double lwgeom_length_2d(const LWGEOM *geom)
Definition: lwgeom.c:1712
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:1346
Here is the call graph for this function:
Here is the caller graph for this function: