PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ unroll_collection()

static void unroll_collection ( LWPOINTITERATOR s)
static

Remove an LWCOLLECTION from the iterator stack, and add the components of the LWCOLLECTIONs to the stack.

Definition at line 120 of file lwiterator.c.

121 {
122  int i;
123  LWCOLLECTION* c;
124 
125  if (!s->geoms)
126  {
127  return;
128  }
129 
130  c = (LWCOLLECTION*) s->geoms->item;
131  s->geoms = pop_node(s->geoms);
132 
133  for (i = c->ngeoms - 1; i >= 0; i--)
134  {
135  LWGEOM* g = lwcollection_getsubgeom(c, i);
136 
138  }
139 }
char * s
Definition: cu_in_wkt.c:23
LWGEOM * lwcollection_getsubgeom(LWCOLLECTION *col, int gnum)
Definition: lwcollection.c:113
static int add_lwgeom_to_stack(LWPOINTITERATOR *s, LWGEOM *g)
Definition: lwiterator.c:71
static LISTNODE * pop_node(LISTNODE *i)
Definition: lwiterator.c:63
uint32_t ngeoms
Definition: liblwgeom.h:510

References add_lwgeom_to_stack(), lwcollection_getsubgeom(), LWCOLLECTION::ngeoms, pop_node(), and s.

Referenced by unroll_collections().

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