Aggregation and multipolygons
Open
Nobody has claimed this yet.
method: aggregation 🔢
- Dominant language
- Python
- Stars
- 394
- Forks
- 95
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 7
Description
We need to handle how multipolygons interact with the aggergation functions. In particular:
- having multipolygons in
byandvalues. Notice that aShapesGeoDataFramecould contain some rows that arePolygonand other that areMultipolygons, as discussed here: https://github.com/scverse/spatialdata/issues/214 -
sjoin()could returnPolygons, but alsoMultipolygons; this happens when a polygon is intersecting the same shape in multiple parts that are disjoints. Notice that when the same polygon intersects multiple polygons, this does not return aMultipolygon, but multiple rows (that can be polygons or multipolygons), this case is discussed here: https://github.com/scverse/spatialdata/issues/211
We need to add tests for the above cases.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the aggregation functions and the sjoin() entry point, then review how Polygon and Multipolygon rows are handled in by, values, and spatial-join results. Add tests covering mixed Polygon/Multipolygon inputs and disjoint intersections, including the cases described in issues 211 and 214; done means these cases are handled and the tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100