319{
320 uint32_t p, i;
323 {
325 .num_items_found = 0,
326 .items_found_size = 0
327 };
329
330 if (in_a_cluster_ret)
331 {
332 char* in_a_cluster =
lwalloc(num_geoms *
sizeof(
char));
333 for (i = 0; i < num_geoms; i++)
335 *in_a_cluster_ret = in_a_cluster;
336 }
337
338 if (num_geoms <= 1)
340
342 if (tree.tree == NULL)
343 {
346 }
347
348 for (p = 0; p < num_geoms; p++)
349 {
351 continue;
352
355 {
357
359 {
361 if (mindist == FLT_MAX)
362 {
364 break;
365 }
366
367 if (mindist <= eps)
369 }
370 }
371 }
372
375
377
378 return success;
379}
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)