Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 771 Bytes

README.md

File metadata and controls

34 lines (23 loc) · 771 Bytes

osrm-bindings

Build Status

Extract and contract OSRM graph using NodeJS.

Installation

npm i osrm osrm-bindings

Usage

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)
);