162 .num_items_found = 0,
163 .items_found_size = 0
171 if (tree.tree == NULL)
177 for (p = 0; p < num_geoms; p++)
179 const GEOSPreparedGeometry* prep = NULL;
181 if (!geoms[p] || GEOSisEmpty(geoms[p]))
193 int geos_type = GEOSGeomTypeId(geoms[p]);
200 if (geos_type != GEOS_POINT && geos_type != GEOS_MULTIPOINT)
205 prep = GEOSPrepare(geoms[p]);
207 geos_result = GEOSPreparedIntersects(prep, geoms[q]);
211 geos_result = GEOSIntersects(geoms[p], geoms[q]);
218 else if (geos_result)
226 GEOSPreparedGeom_destroy(prep);
static void query_accumulate(void *item, void *userdata)
uint32_t UF_find(UNIONFIND *uf, uint32_t i)
static struct STRTree make_strtree(void **geoms, uint32_t num_geoms, char is_lwgeom)
Make a GEOSSTRtree that stores a pointer to a variable containing the array index of the input geoms...
static void destroy_strtree(struct STRTree *tree)
Clean up STRTree after use.
void UF_union(UNIONFIND *uf, uint32_t i, uint32_t j)