A simple command-line tool that imports PBF or XML OpenStreetMap data into an SQLite database.
Usage:
pbf2sqlite <database> [OPTION ...]
Main options:
read <file> Reads an .osm.pbf or .osm file
index Add basic indexes
rtree Add R*Tree indexes
addr Add address tables
graph Add graph tables
Options for displaying data:
node <id> Show data of a node
way <id> Show data of a way
relation <id> Show data of a relation
vaddr <lon1> <lat1> <lon2> <lat2> <htmlfile> Generates a map of the addresses
vgraph <lon1> <lat1> <lon2> <lat2> <htmlfile> Generates a map of the graph
sql [<stmt>] Executes an SQL statement
Calculate shortest path (<permit> can be: foot bike roadbike car):
route <permit> <lon1> <lat1> <lon2> <lat2> [<lon3> <lat3> ...] <file>
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 |
|---|

