PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ lwcompound_length_2d()

double lwcompound_length_2d ( const LWCOMPOUND comp)

Definition at line 61 of file lwcompound.c.

References lwgeom_is_empty(), and lwgeom_length_2d().

Referenced by lwcompound_length(), and lwgeom_length_2d().

62 {
63  int i;
64  double length = 0.0;
65  if ( lwgeom_is_empty((LWGEOM*)comp) )
66  return 0.0;
67 
68  for (i = 0; i < comp->ngeoms; i++)
69  {
70  length += lwgeom_length_2d(comp->geoms[i]);
71  }
72  return length;
73 }
double lwgeom_length_2d(const LWGEOM *geom)
Definition: lwgeom.c:1668
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:1297
Here is the call graph for this function:
Here is the caller graph for this function: