Skip to content

Calculate distance matrix of arbitrary size using The Open Source Routing Machine

License

Notifications You must be signed in to change notification settings

stepankuzmin/distance-matrix

Repository files navigation

OSRM distance matrix

Build Status

Warning: this is experimental.

Calculate large distance matrix using The Open Source Routing Machine

Installation

npm install distance-matrix

...or build from source

git clone https://github.com/stepankuzmin/distance-matrix.git
cd distance-matrix
npm install

Build

An osrm file is required for routing. This can be generated using included binaries. (Note: this will take a lot of processing power if you are planning to use the entire planet.osm file, for general use a regional OSM data extract is preferable. More info here)

# first download an osm file containing the area you need
./node_modules/distance-matrix/osrm/lib/binding/osrm-extract mydata.osm -p ./node_modules/distance-matrix/osrm/test/data/car.lua
./node_modules/distance-matrix/osrm/lib/binding/osrm-prepare mydata.osrm -p ./node_modules/distance-matrix/osrm/test/data/car.lua

Usage

See the API, examples/tsv/index.js and test/index.js for examples of calculating large distance matrices.

About

Calculate distance matrix of arbitrary size using The Open Source Routing Machine

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •