[Qgis-user] ogr2ogr, osm, and spatialite

Even Rouault even.rouault at spatialys.com
Sun Aug 31 12:53:50 PDT 2014


Le dimanche 31 août 2014 21:50:31, Jukka Rahkonen a écrit :
> Thomas Endres <endres.thomas at ...> writes:
> > I have downloaded north-america-latest.osm.pbf from geofabrik and am
> 
> struggling trying set this up for use in QGIS.
> 
> > My hope is to create a spatialite db but I receive the following error
> 
> repeated over a dozen times using the following command:
> > ogr2ogr -f SQLite -dsco spatialite=yes -gt 20000 --config
> 
> OGR_SQLITESYNCRONOUS OFF north-america.sqlite north-america-latest.osm.pbf
> 
> > Warning 1: organizePolygons() received an unexpected geometry.
> > Either a polygon with interior rings, or a polygon with less than 4
> 
> points, or a non-Polygon geometry. Return arguments as a collection.
> 
> > My search for a fix has proven fruitless after having the same outcome
> 
> from a few attempts.
> 
> > I am left with a 33.1GB file which Spatialite GUI can see but everything
> 
> hangs when trying to do anything with GIS.
> 
> Hi,
> 
> Add -skipfailures to your command and have a new try. If that does not work
> try to do import layer by layer and add -sql "select * from multipolygons
> where IsValid(geometry)=1".

Actually, this warning is just a warning, and not a critical error that will 
stop conversion. When this occurs, the way/relation will be skipped. Due to 
the way the OSM database is done, it is possible to have non-valid polygons, 
and indeed there are such polygons.
So you can safely ignore those warnings about organizePolygons()

> 
> 
> -Jukka Rahkonen-
> 
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com



More information about the Qgis-user mailing list