PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwcompound_length_2d()

double lwcompound_length_2d ( const LWCOMPOUND comp)

Definition at line 74 of file lwcompound.c.

75 {
76  uint32_t 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:1961
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:1393
unsigned int uint32_t
Definition: uthash.h:78

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: