Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

unwrapDateline on a polygon with a hole

Open
#220 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java

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.

Description

https://github.com/locationtech/spatial4j/blob/2926812ae302c6e0f24fb5995b1fd24be7fe0b56/src/main/java/org/locationtech/spatial4j/shape/jts/JtsGeometry.java#L492

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.

Dominant language
Java
Stars
961
Forks
173
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from locationtech/spatial4j

All issues in locationtech/spatial4j

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.