Opened 8 years ago

Closed 8 years ago

#6632 closed defect (duplicate)

ogrinfo not including all features in valid geojson file

Reported by: skorasaurus Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 2.0.3
Severity: normal Keywords: geojson
Cc:

Description (last modified by skorasaurus)

I apologize for the somewhat vague title, I haven't found a specific, unique characteristic in my test file, which I have attached to this ticket.

My test file - last edited in qgis - is marked as valid geojson according to geojsonlint.org ; when I upload this file to github; all three features are displayed on the map (see https://github.com/skorasaurus/quiencle/commit/583cdcf7ce3ec06dd105d3298b79e607c5ed2896 for example); when I upload this file to geojson.io; geojson.io too also displays all 3 features.

However, when I run ogrinfo -al testcase.geojson on the file, only 2 features are reported as existing.

I have GDAL 2.1.0, released 2016/04/25

Attachments (1)

testcase.geojson (30.6 KB ) - added by skorasaurus 8 years ago.

Download all attachments as: .zip

Change History (3)

by skorasaurus, 8 years ago

Attachment: testcase.geojson added

comment:1 by skorasaurus, 8 years ago

Description: modified (diff)

comment:2 by Even Rouault, 8 years ago

Resolution: duplicate
Status: newclosed

With latest state of the 2.1 branch,

I get:

$ ogrinfo -ro -al ../../trunk/gdal/testcase.geojson -geom=summary -fields=no -q
Warning 1: Several features with id = 85871819 have been found. Altering it to be unique. This warning will not be emitted for this layer

Layer name: OGRGeoJSON
OGRFeature(OGRGeoJSON):1
  POLYGON : 479 points

OGRFeature(OGRGeoJSON):85802993
  POLYGON : 128 points

OGRFeature(OGRGeoJSON):85871819
  POLYGON : 479 points

This has been fixed per #6538 in GDAL 2.1.1, so closing as a duplicate

Note: See TracTickets for help on using tickets.