PostGIS  2.1.10dev-r@@SVN_REVISION@@
static GEOSGeometry* collectFacesWithEvenAncestors ( Face **  faces,
int  nfaces 
)
static

Definition at line 879 of file liblwgeom/lwgeom_geos.c.

References countParens(), Face_t::geom, lwalloc(), and lwfree().

Referenced by LWGEOM_GEOS_buildArea().

880 {
881  GEOSGeometry **geoms = lwalloc(sizeof(GEOSGeometry*)*nfaces);
882  GEOSGeometry *ret;
883  unsigned int ngeoms = 0;
884  int i;
885 
886  for (i=0; i<nfaces; ++i) {
887  Face *f = faces[i];
888  if ( countParens(f) % 2 ) continue; /* we skip odd parents geoms */
889  geoms[ngeoms++] = GEOSGeom_clone(f->geom);
890  }
891 
892  ret = GEOSGeom_createCollection(GEOS_MULTIPOLYGON, geoms, ngeoms);
893  lwfree(geoms);
894  return ret;
895 }
void lwfree(void *mem)
Definition: lwutil.c:190
const GEOSGeometry * geom
static unsigned int countParens(const Face *f)
void * lwalloc(size_t size)
Definition: lwutil.c:175

Here is the call graph for this function:

Here is the caller graph for this function: