PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ lwpoly_count_vertices()

uint32_t lwpoly_count_vertices ( LWPOLY poly)

Definition at line 425 of file lwpoly.c.

References POINTARRAY::npoints, LWPOLY::nrings, and LWPOLY::rings.

Referenced by lwgeom_count_vertices().

426 {
427  uint32_t i = 0;
428  uint32_t v = 0; /* vertices */
429  assert(poly);
430  for ( i = 0; i < poly->nrings; i ++ )
431  {
432  v += poly->rings[i]->npoints;
433  }
434  return v;
435 }
uint32_t nrings
Definition: liblwgeom.h:454
unsigned int uint32_t
Definition: uthash.h:78
POINTARRAY ** rings
Definition: liblwgeom.h:456
uint32_t npoints
Definition: liblwgeom.h:370
Here is the caller graph for this function: