[gdal-dev] Adding WRITE_ID creation option for GeoJSON

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Adding WRITE_ID creation option for GeoJSON

jratike80

Hi,

 

Am I right that there is no option to force the writing of ”id” member to GeoJSON features? I have noticed that if I run ogr2ogr with –preserve_fid option then the “id” member is added

{ "type": "Feature", "id": 0, "properties":

 

However, if I don’t use –preserve_fid I have not discovered any way to get “id” into GeoJSON. If I am right, would it make sense to add the WRITE_ID option like the existing WRITE_NAME http://www.gdal.org/drv_geojson.html?

 

-Jukka Rahkonen-


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Adding WRITE_ID creation option for GeoJSON

Even Rouault-2
On vendredi 23 mars 2018 10:59:02 CEST Rahkonen Jukka (MML) wrote:

> Hi,
>
> Am I right that there is no option to force the writing of "id" member to
> GeoJSON features? I have noticed that if I run ogr2ogr with -preserve_fid
> option then the "id" member is added { "type": "Feature", "id": 0,
> "properties":
>
> However, if I don't use -preserve_fid I have not discovered any way to get
> "id" into GeoJSON. If I am right, would it make sense to add the WRITE_ID
> option like the existing WRITE_NAME http://www.gdal.org/drv_geojson.html?
>

ID_FIELD and ID_TYPE layer creation options added per
https://github.com/OSGeo/gdal/commit/812a6eea6ef36462531bfa98ff74ca21b361d1b7

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev