-
Notifications
You must be signed in to change notification settings - Fork 9
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
Extend docs for GeoJSON format #40
Comments
Yyjsonr should probably parse/write this correctly. This is my fault for only having test cases with WGS84! If you/anyone know of sets of test cases around crs that would be a helpful |
I have no idea, but we can ask on Mastodon 😄 If we don't find anything, we can adapt the first example. |
I think this can be used as a minimum file: {
"type": "FeatureCollection",
"name": "crs_test",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::3857" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 0.0, 0.0 ] } }
]
} |
I have added your initial test case with
|
According to GeoJSON RFC 7946, https://datatracker.ietf.org/doc/html/rfc7946#section-4 , coord reference system should only be WGS84. Also discussed here: https://code.whatever.social/exchange/gis/questions/203439/how-to-identify-the-co-ordinate-system-crs-srs-of-a-geojson-file Support for other CRSs seems out-of-spec. So, I might do as you originally suggested and document that "WGS84 is the assumed CRS - in accordance with the RFC".
|
BTW: For GDAL and RFC7946 compatibility, you may also consider saving only 7 decimal digits by default, which will reduce the file size a bit (https://gdal.org/drivers/vector/geojson.html#rfc-7946-write-support). |
I think we should include in the docs explicitly that saving and loading GeoJSON assumes WGS 84 coordinate reference system (EPSG:4326).
The text was updated successfully, but these errors were encountered: