PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches
lwiterator.c File Reference
#include "liblwgeom.h"
#include "lwgeom_log.h"
Include dependency graph for lwiterator.c:

Go to the source code of this file.

Data Structures

struct  LISTNODE
 
struct  LWPOINTITERATOR
 

Typedefs

typedef struct LISTNODE LISTNODE
 

Functions

static LISTNODEprepend_node (const void *g, LISTNODE *front)
 
static LISTNODEpop_node (LISTNODE *i)
 
static int add_lwgeom_to_stack (LWPOINTITERATOR *s, const LWGEOM *g)
 
static LISTNODEextract_pointarrays_from_lwgeom (const LWGEOM *g)
 Return a pointer to the first of one or more LISTNODEs holding the POINTARRAYs of a geometry.
 
static void unroll_collection (LWPOINTITERATOR *s)
 Remove an LWCOLLECTION from the iterator stack, and add the components of the LWCOLLECTIONs to the stack.
 
static void unroll_collections (LWPOINTITERATOR *s)
 Unroll LWCOLLECTIONs from the top of the stack, as necessary, until the element at the top of the stack is not a LWCOLLECTION.
 
static int lwpointiterator_advance (LWPOINTITERATOR *s)
 
int lwpointiterator_peek (LWPOINTITERATOR *s, POINT4D *p)
 Attempts to assigns the next point in the iterator to p.
 
int lwpointiterator_has_next (LWPOINTITERATOR *s)
 Returns LW_TRUE if there is another point available in the iterator.
 
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.
 
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 point.
 
LWPOINTITERATORlwpointiterator_create (const LWGEOM *g)
 Create a new LWPOINTITERATOR over supplied LWGEOM*.
 
LWPOINTITERATORlwpointiterator_create_rw (LWGEOM *g)
 Create a new LWPOINTITERATOR over supplied LWGEOM* Supports modification of coordinates during iteration.
 
void lwpointiterator_destroy (LWPOINTITERATOR *s)
 Free all memory associated with the iterator.