Something funny with polygon dateline wrapping

Open
#108 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
Domain
backend

Research direction

No source files or tests are named. Start by reproducing normalization with the supplied polygon and trace the dateline-wrapping path; done means this input no longer produces the unexpected GeometryCollection result.

Written by the indexing model from the issue text.

Description

Somethign funky is happening with the polygon wrapping. When we send a polygon that is almost the bounds:

{"type":"Polygon","coordinates":[[[-179.992676,17.25],[-179.992676,68.68866],[180,68.68866],[180,17.25],[-179.992676,17.25]]]}

It gets normalized to:

{"type":"GeometryCollection","geometries":[{"type":"LineString","coordinates":[[180,68.68866],[180,17.25]]},{"type":"Polygon","coordinates":[[[-180,17.25],[-180,68.68866],[-179.992676,68.68866],[-179.992676,17.25],[-180,17.25]]]}]}

Somethign funky here

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

Contributor guide

Open the contributing guide

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.