Test aggregation when shapes touch but not overlap
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in spatialdata/_core/operations/aggregate.py around line 427 and inspect the overlay() and sjoin() aggregation paths. Add coverage for squares that touch by a side or vertex without overlapping, verify the overlay warning is gone, and document the current sjoin() behavior through the tests.
Written by the indexing model from the issue text.
Description
Test the case when two squares (one in shapes and one in by) touch in a side or a vertex but not overlap.
For the overlay() case we will get the following warning:
/Users/macbook/embl/projects/basel/spatialdata/src/spatialdata/_core/operations/aggregate.py:427: UserWarning: `keep_geom_type=True` in overlay resulted in 1 dropped geometries of different geometry types than df1 has. Set `keep_geom_type=False` to retain all geometries
overlayed = gpd.overlay(by, values, how="intersection")
The solution is to set keep_geom_type=True in overlay (currently is None, which behaves like keep_geom_type=True but gives a warning).
We need to check what currently happens in the sjoin() case.
- Dominant language
- Python
- Stars
- 394
- Forks
- 95
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 5
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.
More from scverse/spatialdata
-
bug 🚨 element: labels 🏷️ method: aggregation 🔢 needs: triage priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
scverse/spatialdata#1249 ·
-
bug 🚨 element: images 🌌 element: labels 🏷️ needs: triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
scverse/spatialdata#1239 ·
-
bug 🚨 element: shapes ▲ models needs: triage priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
scverse/spatialdata#1234 ·
-
bug 🚨 element: labels 🏷️ method: aggregation 🔢 needs: triage priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
scverse/spatialdata#1230 ·
-
bug 🚨 element: labels 🏷️ element: table 📑 models needs: triage priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
scverse/spatialdata#1229 ·
All issues in scverse/spatialdata
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100