PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ count_points_using_iterator()

static uint32_t count_points_using_iterator ( LWGEOM g)
static

Definition at line 46 of file cu_iterator.c.

47 {
48  POINT4D p;
49  uint32_t count = 0;
51 
52  while (lwpointiterator_has_next(it))
53  {
54  CU_ASSERT_TRUE(lwpointiterator_next(it, &p));
55  count++;
56  }
57 
59 
60  return count;
61 }
LWPOINTITERATOR * lwpointiterator_create(const LWGEOM *g)
Create a new LWPOINTITERATOR over supplied LWGEOM*.
Definition: lwiterator.c:244
int lwpointiterator_next(LWPOINTITERATOR *s, POINT4D *p)
Attempts to assign the next point in the iterator to p, and advances the iterator to the next point.
Definition: lwiterator.c:212
void lwpointiterator_destroy(LWPOINTITERATOR *s)
Free all memory associated with the iterator.
Definition: lwiterator.c:269
int lwpointiterator_has_next(LWPOINTITERATOR *s)
Returns LW_TRUE if there is another point available in the iterator.
Definition: lwiterator.c:204
int count
Definition: genraster.py:56
unsigned int uint32_t
Definition: uthash.h:78

References genraster::count, lwpointiterator_create(), lwpointiterator_destroy(), lwpointiterator_has_next(), and lwpointiterator_next().

Referenced by test_point_count().

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