PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwpointiterator_create_rw()

LWPOINTITERATOR* lwpointiterator_create_rw ( LWGEOM g)

Create a new LWPOINTITERATOR over supplied LWGEOM* Supports modification of coordinates during iteration.

Definition at line 253 of file lwiterator.c.

254 {
255  LWPOINTITERATOR* it = lwalloc(sizeof(LWPOINTITERATOR));
256 
257  it->geoms = NULL;
258  it->pointarrays = NULL;
259  it->i = 0;
261 
262  add_lwgeom_to_stack(it, g);
264 
265  return it;
266 }
void * lwalloc(size_t size)
Definition: lwutil.c:229
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:76
static int add_lwgeom_to_stack(LWPOINTITERATOR *s, LWGEOM *g)
Definition: lwiterator.c:71
static int lwpointiterator_advance(LWPOINTITERATOR *s)
Definition: lwiterator.c:154
LISTNODE * pointarrays
Definition: lwiterator.c:47
LISTNODE * geoms
Definition: lwiterator.c:46
uint32_t i
Definition: lwiterator.c:48
char allow_modification
Definition: lwiterator.c:49

References add_lwgeom_to_stack(), LWPOINTITERATOR::allow_modification, LWPOINTITERATOR::geoms, LWPOINTITERATOR::i, LW_TRUE, lwalloc(), lwpointiterator_advance(), and LWPOINTITERATOR::pointarrays.

Referenced by lwgeom_trim_bits_in_place(), lwpointiterator_create(), test_mixed_rw_access(), and test_modification().

Here is the call graph for this function:
Here is the caller graph for this function: