166 .num_items_found = 0,
167 .items_found_size = 0
175 if (tree.tree == NULL)
181 for (p = 0; p < num_geoms; p++)
183 const GEOSPreparedGeometry* prep = NULL;
185 if (!geoms[p] || GEOSisEmpty(geoms[p]))
197 int geos_type = GEOSGeomTypeId(geoms[p]);
204 if (geos_type != GEOS_POINT && geos_type != GEOS_MULTIPOINT)
209 prep = GEOSPrepare(geoms[p]);
211 geos_result = GEOSPreparedIntersects(prep, geoms[q]);
215 geos_result = GEOSIntersects(geoms[p], geoms[q]);
222 else if (geos_result)
230 GEOSPreparedGeom_destroy(prep);
static void query_accumulate(void *item, void *userdata)
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.
uint32_t UF_find(UNIONFIND *uf, uint32_t i)
void UF_union(UNIONFIND *uf, uint32_t i, uint32_t j)