The Open Source Routing Machine bindings for NodeJS
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Build Status Greenkeeper badge

Extract and contract OSRM graph using NodeJS.


npm i osrm osrm-bindings


Extract and contract OSRM graph

const path = require("path");
const { extract, contract } = require("osrm-bindings");

const extractPath = path.join(__dirname, "data.osm");
const profileName = "car";

const options = {
  stdoutStream: process.stdout,
  stderrStream: process.stderr

extract(extractPath, profileName, options).then(graphPath =>
  contract(graphPath, options)