Opened 13 years ago
Closed 13 years ago
#3374 closed bug (fixed)
Lose "id" field when saving vector in GeoJSON
Reported by: | alexbruy | Owned by: | nobody |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | Version 1.7.0 |
Component: | Data Provider | Version: | |
Keywords: | vector, geojson | Cc: | dr, gislab, alexbruy |
Must Fix for Release: | No | Platform: | All |
Platform Version: | Awaiting user input: | no |
Description
When saving vector in GeojSON with "id" field this field is removed from output file. To reproduce:
- open any vector in GeojSON format with "id" field (sample layer attached)
- save this layer with "Save as..." from context menu in GeojSON format
- Open created file and find that "id" field is removed
GeojSON specification says that "If a feature has a commonly used identifier, that identifier should be included as a member of the feature object with the name "id"."
Attachments (1)
Change History (6)
by , 13 years ago
Attachment: | test.geojson added |
---|
comment:1 by , 13 years ago
Confirm. I have a lot of GeoJSON files with "id" member and it is too inconvenient to lose this property while editing file.
comment:2 by , 13 years ago
Resolution: | → upstream |
---|---|
Status: | new → closed |
This seems to be a restriction of OGR's GeoJSON driver.
comment:3 by , 13 years ago
I have just removed the limitation from the OGR GeoJSON driver ( http://trac.osgeo.org/gdal/changeset/21350 ). Will available in GDAL/OGR 1.8.0. Don't hesitate to report bugs/enhancement requests to GDAL/OGR trac when appropriate
comment:4 by , 13 years ago
Resolution: | upstream |
---|---|
Status: | closed → reopened |
Problem still present in QGIS built with GDAL/OGR 1.8.0, r15107
Sample layer