Bug report #4380

geojson data not displayed when first feature geometry is null

Added by Claude Paroz over 12 years ago. Updated about 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Data Provider
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:14312

Description

I had a data set in geojson format where the geometry of the first feature is null. Apparently, this bothers QGIS at the point where no data can be displayed at all.

{"type": "FeatureCollection",
 "features": [
   {"geometry": null, "type": "Feature", "id": 983, "properties": {"NUMERO": 264 }},
   ...
},

test_geojson_null.geojson - GeoJSON file with first geometry as NULL (90.8 KB) Médéric RIBREUX, 2015-12-04 07:24 AM

History

#1 Updated by Paolo Cavallini over 12 years ago

  • Category set to Data Provider

#2 Updated by Giovanni Manghi over 12 years ago

  • Target version set to Version 1.7.4

#3 Updated by Paolo Cavallini almost 12 years ago

  • Crashes QGIS or corrupts data set to No
  • Target version changed from Version 1.7.4 to Version 1.8.0
  • Affected QGIS version set to master

#4 Updated by Paolo Cavallini over 11 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#5 Updated by Jürgen Fischer almost 10 years ago

  • Target version changed from Version 2.0.0 to Future Release - Lower Priority

#6 Updated by Médéric RIBREUX over 8 years ago

Hello, bug triage...

still the same for QGIS 2.13 master. Whenever the first feature's geometry is NULL, QGIS opens the layer as a table (with no geometric column).
This is not an OGR problem because ogrinfo is able to find the geometries. I've added a sample file to make further tests.

When the first feature has a valid geometry and the second feature has a NULL geometry, QGIS is able to detect the geometric type.

#7 Updated by Giovanni Manghi almost 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#8 Updated by Giovanni Manghi about 5 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF