PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ count_points_using_iterator()

static uint32_t count_points_using_iterator ( LWGEOM g)

Definition at line 46 of file cu_iterator.c.

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

Referenced by test_point_count().

47 {
48  POINT4D p;
49  uint32_t count = 0;
52  while (lwpointiterator_has_next(it))
53  {
54  CU_ASSERT_TRUE(lwpointiterator_next(it, &p));
55  count++;
56  }
60  return count;
61 }
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
LWPOINTITERATOR * lwpointiterator_create(const LWGEOM *g)
Create a new LWPOINTITERATOR over supplied LWGEOM*.
Definition: lwiterator.c:244
int lwpointiterator_has_next(LWPOINTITERATOR *s)
Returns LW_TRUE if there is another point available in the iterator.
Definition: lwiterator.c:204
void lwpointiterator_destroy(LWPOINTITERATOR *s)
Free all memory associated with the iterator.
Definition: lwiterator.c:269
int count
Here is the call graph for this function:
Here is the caller graph for this function: