Skip to content
/ nori Public

Estimate average daily traffic on a road network.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

b-r-u/nori

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NORI

Estimate average daily traffic on a road network by sampling a distribution of shortest paths.

An animation of the road network of Berlin

Installation

To compile this project you'll need an installation of Rust. It's recommended to install the latest stable release using rustup.

During runtime you'll also need an installation of the OSRM backend that serves as the routing engine.

Install OSRM Backend

See here for more details.

  • Install dependencies
sudo apt install build-essential git cmake pkg-config \
libbz2-dev libxml2-dev libzip-dev libboost-all-dev \
lua5.2 liblua5.2-dev libtbb-dev
  • Compile
git clone https://github.com/Project-OSRM/osrm-backend/
cd osrm-backend
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
  • Install
sudo cmake --build . --target install
  • Construct routing graph for area of interest

Geofabrik provides OpenStreetMap extracts for different regions as *.osm.pbf files (https://download.geofabrik.de/). These can be used by OSRM to build a routing graph.

# Download OSM extract
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf

# Build routing graph
osrm-extract -p /usr/local/share/osrm/profiles/car.lua berlin-latest.osm.pbf
osrm-partition berlin-latest.osrm
osrm-customize berlin-latest.osrm
  • Start OSRM backend server
osrm-routed --algorithm mld berlin-latest.osrm

Build this project

  • Install Rust (stable) with rustup.

  • Compile

git clone https://github.com/b-r-u/nori
cd nori
cargo build --release
  • Run this project

(Make sure the OSRM backend server is running and you have created an *.osrm file)

cargo run --release -- sample -n 1000 --osrm berlin-latest.osrm \
  --geojson berlin.geojson --routes berlin.routes --png berlin.png \
  --uniform2d --bounds 52.4422 13.2392 52.5738 13.5125 --max-dist 5000

# See all command line options
cargo run --release -- -h

TODO

  • Ensure a specific distribution of trip lengths, either log-normal or given by a histogram
  • Simplify the network's geometry, map edges to a ground truth and compare traffic values

About

Estimate average daily traffic on a road network.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages