Not logged in

back to the OSM tools main page


usage: spatialite_osm_map ARGLIST
-h or --help                    print this help message
-o or --osm-path pathname       the OSM-XML file path
                 both OSM-XML (*.osm) and OSM-ProtoBuf
                 (*.osm.pbf) are indifferenctly supported.
-d or --db-path  pathname       the SpatiaLite DB path

you can specify the following options as well
-cs or --cache-size    num      DB cache size (how many pages)
-m or --in-memory               using IN-MEMORY database
-n or --no-spatial-index        suppress R*Trees generation
-jo or --journal-off            unsafe (but faster) mode

$ spatialite_osm_map -o my_country.osm.pbf -d my_country.sqlite
SQLite version: 3.7.11
SpatiaLite version: 3.1.0
VACUUMing the DB ... wait please ...
        All done: OSM map was succesfully loaded

the above shown command must be invoked from the shell:
Please note: sometimes you can notice many Unresolved-Node or Unresolved-Way warning messages: dont be too much worried.
This simply means that your OSM input file does actually contains several broken cross-references (i.e. invalid complex Map objects).
This one is a quite common situation, but it's rather innocuous (invalid objects will be simply ignored, fully preserving any other valid object).

Once the command succesfully completes its execution, you'll find a brand new DB-file just created ...

... you can explore this DB-file e.g. using spatialite_gui ...

... or you can connect the DB-file to a more conventional desktop GIS such as QGIS, so to immediately see your map appearing on the screen.

back to the OSM tools main page