Bug report #21160

Protocol - two by geojson

Added by Phil Wyatt almost 6 years ago. Updated almost 6 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 almost 6 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 almost 6 years ago

  • Category changed from Vectors to GUI

#2 Updated by Richard Duivenvoorde almost 6 years ago

Confirmed here on Linux too

#3 Updated by Giovanni Manghi almost 6 years ago

  • Operating System deleted (Windows 10)

#4 Updated by Richard Duivenvoorde almost 6 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 almost 6 years ago

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

#6 Updated by Richard Duivenvoorde almost 6 years ago

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

Also available in: Atom PDF