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