Definition at line 219 of file cu_iterator.c.
References iterator_suite_setup(), LW_PARSER_CHECK_NONE, LW_SUCCESS, lwgeom_free(), lwgeom_from_wkt(), lwpointiterator_create(), lwpointiterator_destroy(), lwpointiterator_has_next(), lwpointiterator_next(), POINT2D::x, POINT4D::x, POINT2D::y, and POINT4D::y.
Referenced by iterator_suite_setup().
222 LWGEOM* g =
lwgeom_from_wkt(
"GEOMETRYCOLLECTION (POLYGON ((0 0, 0 10, 10 10, 0 10, 0 0), (1 1, 1 2, 2 2, 2 1, 1 1)), MULTIPOINT((4 4), (3 3)))",
LW_PARSER_CHECK_NONE);
224 POINT2D points[] = { {.
x = 0, .y = 0},
244 CU_ASSERT_EQUAL(p.
x, points[i].
x);
245 CU_ASSERT_EQUAL(p.
y, points[i].
y);
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...
void lwgeom_free(LWGEOM *geom)
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
LWPOINTITERATOR * lwpointiterator_create(const LWGEOM *g)
Create a new LWPOINTITERATOR over supplied LWGEOM*.
#define LW_PARSER_CHECK_NONE
int lwpointiterator_has_next(LWPOINTITERATOR *s)
Returns LW_TRUE if there is another point available in the iterator.
void lwpointiterator_destroy(LWPOINTITERATOR *s)
Free all memory associated with the iterator.