102 for (i = p->
nrings - 1; i >= 0; i--)
110 lwerror(
"Unsupported geometry type for lwpointiterator");
133 for (i = c->
ngeoms - 1; i >= 0; i--)
160 if (
s->pointarrays &&
s->i >= ((
POINTARRAY*)
s->pointarrays->item)->npoints)
206 if (
s->pointarrays &&
s->i < ((
POINTARRAY*)
s->pointarrays->item)->npoints)
231 if (!
s->allow_modification)
233 lwerror(
"Cannot write to read-only iterator");
271 while (
s->geoms != NULL)
276 while (
s->pointarrays != NULL)
LWLINE * lwgeom_as_lwline(const LWGEOM *lwgeom)
LWGEOM * lwcollection_getsubgeom(LWCOLLECTION *col, int gnum)
uint32_t lwgeom_get_type(const LWGEOM *geom)
Return LWTYPE number.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)
LWTRIANGLE * lwgeom_as_lwtriangle(const LWGEOM *lwgeom)
int lwgeom_is_collection(const LWGEOM *lwgeom)
Determine whether a LWGEOM can contain sub-geometries or not.
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
void * lwalloc(size_t size)
LWCIRCSTRING * lwgeom_as_lwcircstring(const LWGEOM *lwgeom)
#define LW_TRUE
Return types for functions with status returns.
LWPOLY * lwgeom_as_lwpoly(const LWGEOM *lwgeom)
void ptarray_set_point4d(POINTARRAY *pa, uint32_t n, const POINT4D *p4d)
This library is the generic geometry handling section of PostGIS.
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static void unroll_collection(LWPOINTITERATOR *s)
Remove an LWCOLLECTION from the iterator stack, and add the components of the LWCOLLECTIONs to the st...
static int add_lwgeom_to_stack(LWPOINTITERATOR *s, LWGEOM *g)
LWPOINTITERATOR * lwpointiterator_create(const LWGEOM *g)
Create a new LWPOINTITERATOR over supplied LWGEOM*.
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.
static int lwpointiterator_advance(LWPOINTITERATOR *s)
int lwpointiterator_peek(LWPOINTITERATOR *s, POINT4D *p)
Attempts to assigns the next point in the iterator to p.
void lwpointiterator_destroy(LWPOINTITERATOR *s)
Free all memory associated with the iterator.
int lwpointiterator_modify_next(LWPOINTITERATOR *s, const POINT4D *p)
Attempts to replace the next point int the iterator with p, and advances the iterator to the next poi...
LWPOINTITERATOR * lwpointiterator_create_rw(LWGEOM *g)
Create a new LWPOINTITERATOR over supplied LWGEOM* Supports modification of coordinates during iterat...
static LISTNODE * extract_pointarrays_from_lwgeom(LWGEOM *g)
Return a pointer to the first of one or more LISTNODEs holding the POINTARRAYs of a geometry.
int lwpointiterator_has_next(LWPOINTITERATOR *s)
Returns LW_TRUE if there is another point available in the iterator.
static void unroll_collections(LWPOINTITERATOR *s)
Unroll LWCOLLECTIONs from the top of the stack, as necessary, until the element at the top of the sta...
static LISTNODE * pop_node(LISTNODE *i)
static LISTNODE * prepend_node(void *g, LISTNODE *front)