A simple command line tool for importing OpenStreetMap PBF or XML files into a SQLite database.
Usage:
pbf2sqlite DATABASE [OPTION ...]
Main options:
read FILE Reads FILE (.osm.pbf or .osm) into the database
index Add basic indexes
rtree Add R*Tree indexes
addr Add address tables
graph Add graph table
Show data:
node ID Show node data
way ID Show way data
relation ID Show relation data
vaddr LON1 LAT1 LON2 LAT2 HTMLFILE Visualize address data
vgraph LON1 LAT1 LON2 LAT2 HTMLFILE Visualize graph data
sql STATEMENT Execute SQL statement
Find shortest way:
route LON_START LAT_START LON_DEST LAT_DEST PERMIT FILE
(PERMIT: 'foot', 'bike' or 'car')
The command
pbf2sqlite test.db read country.osm.pbf
reads the OSM PBF file country.osm.pbf and creates in the database test.db the tables.
The tables created are described in the documentation.
OSM data can be obtained from a provider such as Geofabrik.
The vgraph option creates a zoomable map of the graph:
The vaddr option creates a zoomable map of the addresses:
The SQLite and the readosm libraries are used for this program.
See also notes on compilation.
| Download the latest version |
|---|

