Bug report #21160

Protocol - two by geojson

Added by Phil Wyatt about 5 years ago. Updated about 5 years ago.

Status:Closed
Priority:Normal
Assignee:Richard Duivenvoorde
Category:GUI
Affected QGIS version:3.4.4 Regression?:No
Operating System: Easy fix?:Yes
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28978

Description

When adding a file by geojson protocol I noticed geojson listed twice in the dropdown Pic attached). Is there some difference? Should one be removed?

Geojsonx2.png (187 KB) Phil Wyatt, 2019-02-04 10:22 AM

Associated revisions

Revision 7757ffc5
Added by Richard Duivenvoorde about 5 years ago

Fix #21160: fix geojson in protocol and file twice

GDAL/OGR has two geojson related drivers now: GeoJSON and
GeoJSONSeq, see https://www.gdal.org/drv_geojsonseq.html

This commit makes it possible to open GeoJSONSeq (geojsonl and
geojsons and json) files as protocols/streams. And write them
as *.json.

History

#1 Updated by Giovanni Manghi about 5 years ago

  • Category changed from Vectors to GUI

#2 Updated by Richard Duivenvoorde about 5 years ago

Confirmed here on Linux too

#3 Updated by Giovanni Manghi about 5 years ago

  • Operating System deleted (Windows 10)

#4 Updated by Richard Duivenvoorde about 5 years ago

  • Pull Request or Patch supplied changed from No to Yes
  • Easy fix? changed from No to Yes
  • Assignee set to Richard Duivenvoorde

I had a look, and it seems that there is a 'newer' geojson format provided by OGR:
https://www.gdal.org/drv_geojsonseq.html
These are geojson files where every features is separated with a newline character, to make it possible to send/write/read features sequentially. Having file extension .geojsonl or .geojsons

Seems like an easy fix. Will provide a PR today

#5 Updated by Richard Duivenvoorde about 5 years ago

See: https://github.com/qgis/QGIS/pull/9138 for geojsonseq examples or to test

#6 Updated by Richard Duivenvoorde about 5 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF