291 WindowObject win_obj = PG_WINDOW_OBJECT();
292 uint32_t row = WinGetCurrentPosition(win_obj);
293 uint32_t ngeoms = WinGetPartitionRowCount(win_obj);
299 uint32_t* result_ids;
300 GEOSGeometry** geoms =
lwalloc(ngeoms *
sizeof(GEOSGeometry*));
307 for (i = 0; i < ngeoms; i++)
315 lwpgerror(
"Error reading geometry.");
323 for (i = 0; i < ngeoms; i++)
325 GEOSGeom_destroy(geoms[i]);
332 lwpgerror(
"Error during clustering");
337 for (i = 0; i < ngeoms; i++)
void lwgeom_geos_error(const char *fmt,...)
int union_intersecting_pairs(GEOSGeometry **geoms, uint32_t num_geoms, UNIONFIND *uf)
void * lwalloc(size_t size)
#define LW_TRUE
Return types for functions with status returns.
static GEOSGeometry * read_geos_from_partition(WindowObject win_obj, uint32_t i, bool *is_null)
static cluster_context * fetch_cluster_context(WindowObject win_obj, uint32_t ngeoms)
uint32_t * UF_get_collapsed_cluster_ids(UNIONFIND *uf, const char *is_in_cluster)
void UF_destroy(UNIONFIND *uf)
UNIONFIND * UF_create(uint32_t N)
cluster_entry clusters[1]