PostGIS  3.0.6dev-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 118 of file lwiterator.c.

119 {
120  int i;
121  LWCOLLECTION* c;
122 
123  if (!s->geoms)
124  {
125  return;
126  }
127 
128  c = (LWCOLLECTION*) s->geoms->item;
129  s->geoms = pop_node(s->geoms);
130 
131  for (i = c->ngeoms - 1; i >= 0; i--)
132  {
133  LWGEOM* g = lwcollection_getsubgeom(c, i);
134 
136  }
137 }
char * s
Definition: cu_in_wkt.c:23
LWGEOM * lwcollection_getsubgeom(LWCOLLECTION *col, int gnum)
Definition: lwcollection.c:114
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:566

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: