osrm-isochrone icon indicating copy to clipboard operation
osrm-isochrone copied to clipboard

You should update your instructions for usage!

Open Dirk23 opened this issue 7 years ago • 4 comments

The path to the files: /node_modules/osrm-isochrone/osrm/lib/binding/osrm-extract /node_modules/osrm-isochrone/osrm/lib/binding/osrm-prepare are wrong and do not exist. I found similar files in:

/node_modules/osrm/lib/binding

but i cant find the osrm-prepare file!

I have a osrm file (and many other files from the OSRM Project. I changed the Path to the OSRM File in your Demofile. When i try to run the demo file i get Errors:

/home/user/node_modules/@turf/isolines/conrec.js:380
              temp1 = Math.min(d[i][j], d[i][j + 1]);
                                   ^

TypeError: Cannot read property '24' of undefined
    at Conrec.contour (/home/user/node_modules/@turf/isolines/conrec.js:380:36)
    at module.exports (/home/user/node_modules/@turf/isolines/index.js:80:7)
    at draw (/home/user/node_modules/osrm-isochrone/index.js:20:20)
    at /home/user/node_modules/osrm-isochrone/index.js:74:31```

Dirk23 avatar May 17 '17 06:05 Dirk23

  • osrm-prepare was changed to osrm-contract
  • as for property '24' error, make sure your location variable in your index.js is inside your osrm network. Perhaps you've mixed up long/lat or just forgot to change it to your own coordinates

YaroShkvorets avatar Jan 20 '18 00:01 YaroShkvorets

Seems the documentation is terrible. I can't seem to find a description explaining what resolution should be or what units it's expressed as. Sigh

s-chand avatar May 08 '18 09:05 s-chand

as for property '24' error, make sure your location variable in your index.js is inside your osrm network. Perhaps you've mixed up long/lat or just forgot to change it to your own coordinates

Indeed.

It looks like

self.draw(destinations);

will produce that error if there are no 'destinations', i.e. outputs from the GeoJSON, which happens if the line

var location = [-77.02926635742188,38.90011780426885];

is not changed to your own lng,lat pair representing a location within the network area of your data.

mvl22 avatar Nov 15 '18 13:11 mvl22

I can't seem to find a description explaining what resolution should be or what units it's expressed as.

The value is passed to the turf-isolines module here: https://github.com/Turfjs/turf/blob/v3.5.2/packages/turf-isolines/index.js#L20 where the parameter is defined as: "Resolution of the underlying grid"

Perhaps the example there will be of help.

mvl22 avatar Nov 15 '18 19:11 mvl22