Doen't seem to support GeometryCollection
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 202
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
Leaflet-pip does not seem to find polygons inside of a GeometryCollection. If I get it right then not only mush layers be iterated, if the layer contains a GeometryCollection then all items within that must also be subjected to isPoly(l), but that probably require a bit of refactoring to process GeoJSON objects rather than layers.
So currently a Polygon as the one the below will never be found.
`
{
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"properties": {
"class": "LYRESTAD"
},
"geometry": {
"type": "GeometryCollection",
"geometries": [{
"type": "Polygon",
"coordinates": [
[
[14.00881897363853, 58.759130043177166],
[13.928815204319006, 58.93581644468062],
[14.120750873038237, 58.8843341034047],
[14.121862332723687, 58.88126014491872],
[14.174039271588722, 58.78656397216331],
[14.145110948923927, 58.767173887639935],
[14.12508839353722, 58.758541330342304],
[14.11335950201629, 58.76108407639584],
[14.06140521182085, 58.77226018822536],
[14.00881897363853, 58.759130043177166]
]
]
}]
}
}
`
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 at the layer iteration and isPoly(l) path mentioned in the issue, then trace how GeoJSON objects are processed. Reproduce the supplied FeatureCollection with a GeometryCollection containing a Polygon; done means the nested Polygon is found by leaflet-pip.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100