max-mapper / max-mapper/geojson-js-utils

pointInPolygon does not work if polygon contains pole

Open
#28 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
402
Forks
54
PR merge metrics
No merged PRs in 30d

Description

I don't know if the project is developed any more, but anyway:
If polygon contains pole pointInPolygon does not work.

  1. founding bounding box does not work either
  2. even if we ignore bounding box check it still does not work (always returns false)

I think that polygons crossing 180th meridian may also not work.

Contributor guide

No contributing guide indexed for this repository

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

Start at the pointInPolygon entry point and reproduce the reported case with a polygon containing a pole. Inspect the bounding-box check first, then the main containment logic and a polygon crossing the 180th meridian. Done means containment results are correct for these cases and existing behavior remains intact.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.