Add Homogenize
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Start by reading the GeometryCollections methods and geometry type definitions in the repository; the issue does not name specific files or tests. Implement Homogenize() to follow the listed empty geometry, merging, and output ordering rules while keeping polygons separate. Done means those cases are covered by tests and the returned geometry types and ordering match the issue.
Written by the indexing model from the issue text.
Description
It would be similar to https://postgis.net/docs/ST_CollectionHomogenize.html
ST_CollectionHomogogenize has a bad characteristic that it can return invalid MultiPolygons. That's not a good idea... Instead, we would return Polygons separately.
It should be a new method Homogenize() Geometry on GeometryCollections. It should:
- Empty geometries inside the geometry collection should be ignored.
- If after ignoring empty geometries there is nothing left, then it should return an empty GC.
- If the GC contains a single geometry, it should return it as a single geometry.
- All points (whether from singular points or multipoints) will be merged into a single multipoint.
- All linestrings (whether from singular linestrings or multilinestrings) will be merged into a single multilinestring.
- Polygons and Multipolygons will NOT be merged, to avoid invalid MultiPolygons.
- If there is just a single multi geometry (i.e. multipoint, multilinetring) or areal geometry (polygon or multipolygon) then they can be returned on their own.
- But if there are multiple, they get returned in a new GC (multipolygons first, then polygons, then multilinestrings/linestring, then multipoint/point).
- Dominant language
- Go
- Stars
- 176
- Forks
- 27
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing 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 peterstace/simplefeatures
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
peterstace/simplefeatures#726 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
peterstace/simplefeatures#725 ·
-
cleanup
Difficulty 3/5 Half a day Newbie friendliness 72/100
peterstace/simplefeatures#729 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
peterstace/simplefeatures#724 ·
-
cleanup
Difficulty 3/5 1-2 days Newbie friendliness 35/100
peterstace/simplefeatures#722 ·
All issues in peterstace/simplefeatures
Similar issues
-
bug raised-by:reviewer
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
medici-finance/assay#7655 ·
Maintainers usually reply within 1 day
-
helm chart: make DaemonSet pod affinity configurable via values.yamlPossibly taken @Young-Zen claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
flannel-io/flannel#2632 ·
Maintainers usually reply within 6 days
-
go-vulnerability security-scan
Difficulty 1/5 Under an hour Newbie friendliness 72/100
teslashibe/agent-go#36 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nwverse/persona#15194 · 1 comment ·
Maintainers usually reply within 1 day
-
bug flaky-test
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rosskukulinski/tailworks#411 ·
Maintainers usually reply within 1 day