Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You should update your instructions for usage! #25

Open
Dirk23 opened this issue May 17, 2017 · 4 comments
Open

You should update your instructions for usage! #25

Dirk23 opened this issue May 17, 2017 · 4 comments

Comments

@Dirk23
Copy link

Dirk23 commented May 17, 2017

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```
@YaroShkvorets
Copy link

YaroShkvorets commented Jan 20, 2018

  • 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

@s-chand
Copy link

s-chand commented May 8, 2018

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

@mvl22
Copy link

mvl22 commented Nov 15, 2018

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
Copy link

mvl22 commented Nov 15, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants