locationtech / locationtech/spatial4j

Something funny with polygon dateline wrapping

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

Nobody has claimed this yet.

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

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

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.

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.