[gdal-dev] How to override WGS84 obligation with IETF GeoJSON?

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Wed Oct 21 07:03:37 PDT 2020


Hi,

We want to use GeoJSON with national coordinate systems like EPSG:3067, EPSG:3046 etc. We can write such GeoJSON with GDAL by using the default GeoJSON 2008 mode. However, in the RFC 7946 specification the rules about the winding order of polygons were clarified and some GeoJSON parsers complain about the polygons (in addition to coordinates).  So we would like to write polygons as in RFC 7946 and make the a prior arrangement as in the RFC 7946 text and use EPSG:3067 coordinates. I mean this text:
"However, where all involved parties have a prior arrangement, alternative coordinate reference systems can be used without risk of data being misinterpreted."

At the moment the GeoJSON driver is missing the option for making this a prior arrangement because it interprets the standard strictly https://gdal.org/drivers/vector/geojson.html
"Coordinates must be geographic over the WGS 84 ellipsoid, hence if the spatial reference system specified at layer creation time is not EPSG:4326, on-the-fly reprojection will be done by the driver."

I guess that there is no hidden switch to override this. What I would like to find is something like "-lco a_prior_arrangement=YES". But would it break anything if the GeoJSON 2008 part of the driver is modified to write the polygons also with counterclockwise external rings, clockwise internal rings?

-Jukka Rahkonen-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20201021/f541ae39/attachment.html>


More information about the gdal-dev mailing list