duckdb / duckdb/duckdb-spatial

ST_CoverageClean_Agg aggregate function

Open
#813 0 comments 0 reactions 0 assignees View on GitHub
roadmap
Dominant language
C
Stars
708
Forks
96
Avg merge
1d 21h
Merged PRs (30d)
5

Description

The scalar `ST_CoverageClean()` added in #810 operates on a `GEOMETRY[]` array.
An aggregate companion `ST_CoverageClean_Agg()` was listed as a future nice-to-have
in the original #683 PR but was not included.

This would complete the coverage aggregate family alongside the existing
`ST_CoverageSimplify_Agg`, `ST_CoverageUnion_Agg`, and `ST_CoverageInvalidEdges_Agg`,
and allow cleaning a polygon coverage directly from rows without manually wrapping
with `array_agg()`:

```sql
-- current workaround
SELECT ST_CoverageClean(array_agg(geom), 0.5) FROM polygons;

-- desired
SELECT ST_CoverageClean_Agg(geom, 0.5) FROM polygons;
```

Variants to match the scalar signatures:
- `ST_CoverageClean_Agg(geom GEOMETRY)`
- `ST_CoverageClean_Agg(geom GEOMETRY, snapDistance DOUBLE)`
- `ST_CoverageClean_Agg(geom GEOMETRY, snapDistance DOUBLE, maxWidth DOUBLE)`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.