Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforcement of Polygon Right-Hand Rule #26

Open
rmh153 opened this issue Dec 14, 2016 · 3 comments
Open

Enforcement of Polygon Right-Hand Rule #26

rmh153 opened this issue Dec 14, 2016 · 3 comments

Comments

@rmh153
Copy link

rmh153 commented Dec 14, 2016

Hi Jason,
geojsonlint is a great tool for verifying geojson file geometry and displaying associated attributes. I've used it during the past year.
When I tested a new geojson file (and retested an older file that I used before), I noticed that you now enforce the polygon right-hand rule proposed in rfc7946.
https://tools.ietf.org/html/rfc7946#section-3.1.6
"A linear ring MUST follow the right-hand rule with respect to the
area it bounds, i.e., exterior rings are counterclockwise, and
holes are clockwise."
Unfortunately, enforcing this rule breaks the tool for all the key providers of GeoJSON files that I am working with. I'm writing to request you consider removing the constraint, or generalizing the code to support backward compatibility.
The specification notes the need for backward compatibility in this Note:
"Note: the [GJ2008] specification did not discuss linear ring winding
order. For backwards compatibility, parsers SHOULD NOT reject
Polygons that do not follow the right-hand rule."

Thanks for your consideration.
Rodd Halstead

@cbandy
Copy link

cbandy commented Mar 8, 2017

The sample shapes that are populated when one navigates to "Polygon" and "MultiPolygon" are also affected.

@relens
Copy link

relens commented Apr 3, 2017

It would be nice to be able to turn it on or off, or to be able to specify which standard to use.

@rlueder
Copy link

rlueder commented Aug 15, 2017

For those that landed here searching for a solution to the "Polygons and MultiPolygons should follow the right-hand rule" warning, this is actually enforced by geojsonhint.

One potential solution is to download and run locally a version of geojsonlint before the Nov 15 2015 commit that updated geojsonhint to v2.0.0 (anything from Nov 7 and earlier).

This app developed by mapbox fits my needs for quickly rendering geojson, (if needed you can validate via command line): geojson.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants