Bug report #19735

geoJSON layer displays point shapes but not polygons

Added by peter larson over 4 years ago. Updated over 4 years ago.

Category:Data Provider/OGR
Affected QGIS version:3.2.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:27560


I have tried to add a geoJSON layer to a project using the following URL:


It contains two layers, the points layer displays, but the polygon layer does not display. I have tried a current project and a new (empty) project with the same result. Have also tried QGIS 2.18 and 3.2.2 with the same result. Looking at the JSON script, it does have both points and polygon data.

Not sure if it is the JSON, or a problem with the geoJSON handler.

majorIncidents-1.json - Sample JSON download (76 KB) peter larson, 2018-08-31 03:11 AM


#1 Updated by Giovanni Manghi over 4 years ago

  • Status changed from Open to Feedback
  • Operating System deleted (windows 7)
  • Category changed from Unknown to Data Provider/OGR

Very likely because OGR does not recognize the content as being polygons, is that a valid geojeon?

[email protected]:~/Downloads$ ogrinfo -so majorIncidents.json majorIncidents
INFO: Open of `majorIncidents.json'
using driver `GeoJSON' successful.

Layer name: majorIncidents
Geometry: Unknown (any)
Feature Count: 31
Extent: (146.578418, -36.849013) - (153.207028, -28.434733)
Layer SRS WKT:
SPHEROID["WGS 84",6378137,298.257223563,
title: String (0.0)
link: String (0.0)
category: String (0.0)
guid: String (0.0)
guid_isPermaLink: String (0.0)
pubDate: String (0.0)
description: String (0.0)

#2 Updated by peter larson over 4 years ago

According to the following, GeoJSON in QGIS has supported multiple types since 2015:


I've also used the following site to validate the JSON:


It says its valid, but I don't know how reliable it is. I've attached the geoJSON file from the site.

#3 Updated by Giovanni Manghi over 4 years ago

  • Resolution set to invalid
  • Status changed from Open to Closed

peter larson wrote:

According to the following, GeoJSON in QGIS has supported multiple types since 2015:

the geojson you posted does contains 2 layers, one point layer that can be loaded without issues in QGIS and one layer that is a geometry collection, not supported in QGIS (as in many other Desktop GIS packages). The "collection" the post refers are geojson files that contain multiple layers (that can be loaded individually without issues, given each one is a point/line/polygon layer), a geometry collection is a different thing, is a (1) layer that contains geometries of different types (points, line and polygons) mixed togeteher.

Also available in: Atom PDF