Update of "spatialite_osm_map"
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: ad80449184efafd1b7032123576434420fed6ffa
Page Name:spatialite_osm_map
Date: 2012-05-03 11:59:08
Original User: sandro
Parent: 5a9f22859036a5a493e5b5c956392959b213f0f0 (diff)
Next d0888389243cbad0e06d266b7bbdb65239d235f0
Content

back to the OSM tools main page

spatialite_osm_map

Syntax:
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


Example:
$ spatialite_osm_map -o my_country.osm.pbf -d my_country.sqlite
SQLite version: 3.7.11
SpatiaLite version: 3.1.0
UNRESOLVED-NODE 114601792
...
UNRESOLVED-WAY 39764802
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 ...

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

osm-map.png
... 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