321{
322 uint32_t p, i;
325 {
327 .num_items_found = 0,
328 .items_found_size = 0
329 };
331
332 if (in_a_cluster_ret)
333 {
334 char* in_a_cluster =
lwalloc(num_geoms *
sizeof(
char));
335 for (i = 0; i < num_geoms; i++)
337 *in_a_cluster_ret = in_a_cluster;
338 }
339
340 if (num_geoms <= 1)
342
344 if (tree.tree == NULL)
345 {
348 }
349
350 for (p = 0; p < num_geoms; p++)
351 {
354 continue;
355
358 {
361 }
363 {
365
367 {
369 if (mindist == FLT_MAX)
370 {
372 break;
373 }
374
375 if (mindist <= eps)
377 }
378 }
379 }
380
383
385
386 return success;
387}
void * lwalloc(size_t size)
double lwgeom_mindistance2d_tolerance(const LWGEOM *lw1, const LWGEOM *lw2, double tolerance)
Function handling min distance calculations and dwithin calculations.
#define LW_TRUE
Return types for functions with status returns.
static int dbscan_update_context(GEOSSTRtree *tree, struct QueryContext *cxt, LWGEOM **geoms, uint32_t p, double eps)
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.
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
uint32_t UF_find(UNIONFIND *uf, uint32_t i)
void UF_union(UNIONFIND *uf, uint32_t i, uint32_t j)