PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ lwcompound_length_2d()

double lwcompound_length_2d ( const LWCOMPOUND comp)

Definition at line 117 of file lwcompound.c.

118 {
119  uint32_t i;
120  double length = 0.0;
121  if ( lwgeom_is_empty((LWGEOM*)comp) )
122  return 0.0;
123 
124  for (i = 0; i < comp->ngeoms; i++)
125  {
126  length += lwgeom_length_2d(comp->geoms[i]);
127  }
128  return length;
129 }
double lwgeom_length_2d(const LWGEOM *geom)
Definition: lwgeom.c:2060
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
Definition: lwinline.h:199

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

Referenced by lwcompound_length(), and lwgeom_length_2d().

Here is the call graph for this function:
Here is the caller graph for this function: