290 WindowObject win_obj = PG_WINDOW_OBJECT();
291 uint32_t row = WinGetCurrentPosition(win_obj);
292 uint32_t ngeoms = WinGetPartitionRowCount(win_obj);
298 uint32_t* result_ids;
299 GEOSGeometry** geoms =
lwalloc(ngeoms *
sizeof(GEOSGeometry*));
306 for (i = 0; i < ngeoms; i++)
314 lwpgerror(
"Error reading geometry.");
322 for (i = 0; i < ngeoms; i++)
324 GEOSGeom_destroy(geoms[i]);
331 lwpgerror(
"Error during clustering");
336 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]