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

Coordinate order #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

csbrandt
Copy link

assume proper geojson coordinate order for input

@max-mapper
Copy link
Owner

when did geojson switch to x,y?

@csbrandt
Copy link
Author

@maxogden not sure if the order was ever changed, here is a quote from 2.1.1. Positions

The order of elements must follow x, y, z order
(easting, northing, altitude for coordinates in a projected coordinate reference system, or longitude, latitude, altitude for coordinates in a geographic
coordinate reference system).

e.g.
If I pass a set of LineString that have their coordinates ordered (longitude, latitude) into lineStringsIntersect() that adhere to the spec it is not necessary to reverse them. Currently the intersection does work but the set of intersection coordinates is returned in the wrong order (latitude, longitude) and is not valid GeoJSON

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

Successfully merging this pull request may close these issues.

2 participants