PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ 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:243
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:210
void lwpointiterator_destroy(LWPOINTITERATOR *s)
Free all memory associated with the iterator.
Definition lwiterator.c:268
int lwpointiterator_has_next(LWPOINTITERATOR *s)
Returns LW_TRUE if there is another point available in the iterator.
Definition lwiterator.c:202
int count
Definition genraster.py:57

References 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: