4 releases (breaking)

0.4.0 Mar 31, 2022
0.3.0 Apr 26, 2021
0.2.0 Oct 20, 2016
0.1.0 Oct 19, 2016

#71 in Geospatial

Download history 11/week @ 2022-11-28 17/week @ 2022-12-05 22/week @ 2022-12-12 13/week @ 2022-12-19 10/week @ 2022-12-26 6/week @ 2023-01-02 15/week @ 2023-01-09 10/week @ 2023-01-16 23/week @ 2023-01-23 30/week @ 2023-01-30 11/week @ 2023-02-06 18/week @ 2023-02-13 32/week @ 2023-02-20 4/week @ 2023-02-27 18/week @ 2023-03-06 9/week @ 2023-03-13

68 downloads per month
Used in roads-from-nd

MIT license

24KB
585 lines

osm4routing2

This project is a rewrite in rust from https://github.com/Tristramg/osm4routing

It converts an OpenStreetMap file (in the .pbf format) into a CSV file.

Build

Get a rust distribution with cargo: https://www.rust-lang.org/en-US/downloads.html

Run cargo install osm4routing

You can now use osm4routing <some_osmfile.pbf> to generate the nodes.csv and edges.csv that represent the road network.

If you prefer running the application from the sources, and not installing it, you run

cargo run --release -- <path_to_your_osmfile.pbf>

The identifiers for nodes and edges are from OpenStreetMap. That means that edges id can be duplicated.

Importing in a database

If you prefer having the files in database, you can run the very basic import_postgres.sh script.

It supposes that a database osm4routing exists (otherwise modify it to your needs).

Dependencies

~6MB
~126K SLoC