-
Notifications
You must be signed in to change notification settings - Fork 301
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
WKT axis order and CRS:84 #653
Comments
Major can of worms opening. Could you please elaborate a bit on three things:
|
Agreed -- can of worms. I only bring this up because this issue will not go away and I think it's in our interest to be up front about our handling.
At the end of the day, I think the best thing to do here is just declare what |
Thanks for the clarifications and links to docs on this issue. I'd welcome your proposed PR! |
…o add example that will emit SRID. Fixes r-spatial#653.
I hesitate to bring this up, but there's been some discussion of what the "right" thing to do is regarding axis order and use of EPSG:4326 with WKT geometry in a project I am taking part in.
Technically, when writing out WKT, if 4326 is included as the SRID, the axis order should reflect lat - lon. Practically, (and this is where I might get some 🔥) we should always use lon - lat axis order to avoid the confusion and misinterpretation introduced by the few clients that us the lat - lon order. I'm not going to suggest changing to y/x axis order for particular CRSs by default, but it would be nice to:
st_as_text()
andI'm not sure how this would work with the
SRID=####
approach used with the WKT insf
as there isn't an EPSG code for theurn:ogc:def:crs:OGC:1.3:CRS84
but it would be really nice if there were a way to emit the WKT string with an explicitely lon/lat axis order CRS. Maybe the approach taken in GeoSPARQL described here would be an option?so... some code to illustrate
This all works now:
This is not the current behavior, but illustrates what might be done:
That all said, I would be just as happy with the statement that the axis order of lat/lon CRSs is always lon - lat regardless of the SRID of the data. But a statement to that affect should probably be included in the doc for
st_as_text()
?The text was updated successfully, but these errors were encountered: