locationtech / locationtech/spatial4j
unwrapDateline on a polygon with a hole
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 961
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Description
Why does this check in unwrapDateline() require the exterior ring of a polygon to contains() any interior rings? Doesn't contains() on two LineStrings require one to be a subset of the other? If so, you wouldn't be able to have polygons that contain holes and cross the dateline, which is the problem I'm running into.
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 src/main/java/org/locationtech/spatial4j/shape/jts/JtsGeometry.java#L492 and inspect the contains() check in unwrapDateline() for polygons with interior rings. Reproduce the reported polygon-with-hole case, then clarify or correct the dateline-unwrapping behavior so valid holes are handled consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100