Nice Paintings, Mondrian

    isochrone

    3.0.2 • Public • Published

    Isochrone

    npm version npm downloads Build Status

    Isochrone maps are commonly used to depict areas of equal travel time. Build isochrones using OSRM, Turf and concaveman.

    Screenshot

    Installation

    npm install -g isochrone
    

    Build graph

    wget https://s3.amazonaws.com/metro-extracts.mapzen.com/moscow_russia.osm.pbf
    ./node_modules/osrm/lib/binding/osrm-extract -p ./node_modules/osrm/profiles/foot.lua moscow_russia.osm.pbf
    ./node_modules/osrm/lib/binding/osrm-contract moscow_russia.osrm

    Usage

    const OSRM = require('osrm');
    const isochrone = require('isochrone');
     
    const osrm = new OSRM({ algorithm: 'CH', path: './moscow_russia.osrm' });
    const startPoint = [37.62, 55.75];
     
    const options = {
      osrm,
      radius: 2,
      cellSize: 0.1,
      intervals: [5, 10, 15]
    };
     
    isochrone(startPoint, options)
      .then((geojson) => {
        console.log(JSON.stringify(geojson, null, 2));
      })
      .catch((error) => {
        console.error(error);
      });
     

    See API for more info.

    Install

    npm i isochrone

    DownloadsWeekly Downloads

    3

    Version

    3.0.2

    License

    MIT

    Unpacked Size

    237 kB

    Total Files

    13

    Last publish

    Collaborators

    • boyur
    • device25
    • karmatsky
    • stepankuzmin