0

I was trying to print out Stamen map (Quickmap plugin) in very high quality. However, I was unable to do so, printed out results looks like chequer board or empty.

So, I was following the information from How to create high quality map with QGIS and Stamen tiles and https://anitagraser.com/2014/05/31/a-guide-to-googlemaps-like-maps-with-osm-in-qgis/

And I downloaded osm.pbf for asia from http://download.geofabrik.de/index.html here.

Problem is, OSGeo4W shell makes warning messages while I tried to transform pbf to db file:

C:\>ogr2ogr -f "SQLite" -dsco SPATIALITE=YES D:\QGIS_Korea\test2.db D:\QGIS_Korea\asia-latest.osm.pbf
0...10...20...30...40...50...60...70...80...90...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.
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.
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.
100 - done.
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.
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. 

Anyway it finished the conversion. But when I try to add them to my project via add layer -> Spatialite layer -> new -> choose file -> connect, it prints out following error message.

Spatial metadata check failed 
Failure getting table metadata... is ****.db file really a SpatiaLite database? 
table info on geometry_columns failed 
database is locked

How can I escape from this situation?

  • 1
    You are processing the entire Asian continent. Did you try to process only one country (i.e., South Korea subregion)? Also, you can try with the -explodecollections option, I would think that the problem can be a multipolygon relation: ogr2ogr -f "SQLite" -dsco SPATIALITE=YES -explodecollections D:\QGIS_Korea\test2.db D:\QGIS_Korea\asia-latest.osm.pbf – Gabriel De Luca Dec 25 '18 at 18:11
  • @GabrielDeLuca Thank you so much, I didn't know about country data. I will try explode collection option – exsonic01 Dec 27 '18 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.