325 .num_items_found = 0,
326 .items_found_size = 0
330 if (in_a_cluster_ret)
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;
342 if (tree.tree == NULL)
348 for (p = 0; p < num_geoms; p++)
361 if (mindist == FLT_MAX)
double lwgeom_mindistance2d_tolerance(const LWGEOM *lw1, const LWGEOM *lw2, double tolerance)
Function handling min distance calculations and dwithin calculations.
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
void * lwalloc(size_t size)
#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.
uint32_t UF_find(UNIONFIND *uf, uint32_t i)
void UF_union(UNIONFIND *uf, uint32_t i, uint32_t j)