-
Notifications
You must be signed in to change notification settings - Fork 579
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
Polygons are in anticlockwise (D3js) #744
Comments
Here is an example with central park |
Hi @zhik, I am not sure I understand your issue, and the observable notebook you linked to is set to private. If you draw a polygon in geojson.io, its outer ring will be anticlockwise per the geojson spec. (geojson.io uses the geojson-rewind package to enforce this regardless of how the polygon was drawn.) If you're not getting the expected data out of geojson.io, let's dig into that. |
Here's another thread that explains how d3 does not follow the geojson spec and requires clockwise outer rings. https://stackoverflow.com/questions/64379885/d3-geopath-geojsonlint-cw-vs-ccw
Closing as we are not going to take action on this |
Hey,
I am having issues with importing geojson into d3.js. It seems to be related to how the json is structured d3/d3-geo#227
The json that is returned (example below) is anticlockwise which causes paths exported by the
d3.geoPath
function to span the full globe. Rewinding the coordinates orders seems to fix it.The text was updated successfully, but these errors were encountered: