-
Notifications
You must be signed in to change notification settings - Fork 30
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
Comments
The sample shapes that are populated when one navigates to "Polygon" and "MultiPolygon" are also affected. |
It would be nice to be able to turn it on or off, or to be able to specify which standard to use. |
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 |
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
The text was updated successfully, but these errors were encountered: