Feature request #10884

OSM data loaded with "Add Vector layer" can be incomplete

Added by Andre Joost almost 10 years ago. Updated about 7 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Vectors
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:19252

Description

Attached is a sample of a real island with landuse polygon downloaded from the OSM API, or rather from http://gis.stackexchange.com/questions/104599/osm2pgsql-missing-coordinates. It gets loaded with the OSM plugin, but incomplete using "Add Vector Layer", as shown in the attached screenshot.

The reason is that the nodes are not sorted in the input file. No error message is given in the protocol, some nodes are silently dropped.
If I transform the file with ogr2ogr, I get the message "ERROR 1: Non increasing node id. Use OSM_USE_CUSTOM_INDEXING=NO" If I use that as environment variable (not -lco!), it works for ogr2ogr. But QGIS does not offer that method in an easy way.

So I suggest to set this variable internally when using the GDAL osm driver.

According to OSM expert Paul Norman in http://gis.stackexchange.com/questions/103547/how-to-complete-the-roads-output-of-postgis/103599#103599 the OSM API does not guarantee the nodes in an ordered way, so QGIS has to take care on its own about it.

osmpolygons.osm - OSM polygon data (4.81 KB) Andre Joost, 2014-07-12 06:14 AM

osmpolygons.png - QGIS screenshot:: violet OSM plugin, blue Add Vector Layer (6.88 KB) Andre Joost, 2014-07-12 06:14 AM

History

#1 Updated by Giovanni Manghi almost 10 years ago

  • Category set to Vectors
  • OS version deleted (7)
  • Operating System deleted (Windows)
  • Target version deleted (Future Release - High Priority)
  • Status changed from Open to Feedback
  • Crashes QGIS or corrupts data changed from Yes to No

is tis related with this

#8878

and this

#8037

?

#2 Updated by Andre Joost almost 10 years ago

Giovanni Manghi wrote:

is this related with this

#8878

and this

#8037 ?

No, those are pitfalls for the OSM plugin. My test case fails for the Add Vector Layer data provider, based on the GDAL OSM driver.

#3 Updated by Giovanni Manghi over 9 years ago

  • Status changed from Feedback to Open
  • Tracker changed from Bug report to Feature request

#4 Updated by Giovanni Manghi about 7 years ago

  • Easy fix? set to No

Also available in: Atom PDF