Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7194 closed defect (fixed)

ogr2ogr does not preserve fid in geojson when specify RFC7946=YES

Reported by: jingsam Owned by: warmerdam
Priority: normal Milestone: 2.2.4
Component: default Version: 2.2.3
Severity: normal Keywords:
Cc:

Description

I tried to covert a shapefile to geojson:

ogr2ogr -f GeoJSON a.geojson a.shp -preserve_fid -lco RFC7946=YES

In converted geojson, "id" is missing.

But I use following command, everthing works as expected.

ogr2ogr -f GeoJSON a.geojson a.shp -preserve_fid

RFC7946 says:

If a Feature has a commonly used identifier, that identifier
      SHOULD be included as a member of the Feature object with the name
      "id", and the value of this member is either a JSON string or
      number.

Change History (4)

comment:1 by Jukka Rahkonen, 6 years ago

This issue has some connection with #6538

comment:2 by Even Rouault, 6 years ago

Resolution: fixed
Status: newclosed

In 41191:

GeoJSON: fix writing of id with RFC7946=YES (fixes #7194)

comment:3 by Even Rouault, 6 years ago

In 41192:

GeoJSON: fix writing of id with RFC7946=YES (fixes #7194)

comment:4 by Even Rouault, 6 years ago

Milestone: 2.2.4
Note: See TracTickets for help on using tickets.