[gdal-dev] Motion: adopt RFC 65: IETF RFC7946 GeoJSON

Even Rouault even.rouault at spatialys.com
Sat Oct 29 14:22:07 PDT 2016


Le samedi 29 octobre 2016 23:15:31, jratike80 a écrit :
> Conditional +1
> 
> Do I understand right that M must be dropped when writing geometries which
> include measure into RFC 7946 variant? This is not mentioned in GDAL RFC
> 65, how about in the code?

There was nothing particular to do regarding this, as only 2D and XYZ were 
supported by the existing driver. I've just added a note in the RFC about that

$ cat test.csv
id,WKT
1,"POINT ZM(1 2 3 4)"

$ ogr2ogr -f geojson /vsistdout/ test.csv -select id
{
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "properties": { "id": "1" }, "geometry": { "type": 
"Point", "coordinates": [ 1.0, 2.0, 3.0 ] } }
]
}

$ ogr2ogr -f geojson /vsistdout/ test.csv -select id -lco RFC7946=YES \
   -a_srs EPSG:4326
{
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "properties": { "id": "1" }, "geometry": { "type": 
"Point", "coordinates": [ 1.0, 2.0, 3.0 ] } }
]
}

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list