qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.5k stars 2.99k forks source link

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

Open qgib opened 10 years ago

qgib commented 10 years ago

Author Name: Andre Joost (Andre Joost) Original Redmine Issue: 10884

Redmine category:vectors


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.


qgib commented 10 years ago

Author Name: Giovanni Manghi (@gioman)


is tis related with this

17558

and this

16880

?


qgib commented 10 years ago

Author Name: Andre Joost (Andre Joost)


Giovanni Manghi wrote:

is this related with this

17558

and this

16880 ?

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.

qgib commented 10 years ago

Author Name: Giovanni Manghi (@gioman)


qgib commented 7 years ago

Author Name: Giovanni Manghi (@gioman)