VROOM-Project / vroom-express

Out of the box Node-express server to use VROOM as a web API.
BSD 2-Clause "Simplified" License
70 stars 60 forks source link

Incomplete data #69

Closed itsazzad closed 3 years ago

itsazzad commented 3 years ago

Why am I getting like this?

➜ ~ curl --header "Content-Type:application/json" --data '{"vehicles":[{"id":0,"start":[2.3526,48.8604],"end":[2.3526,48.8604]}],"jobs":[{"id":0,"location":[2.3691,48.8532]},{"id":1,"location":[2.2911,48.8566]}],"options":{"g":true}}' http://localhost:3000

`{"code":0,"summary":{"cost":0,"unassigned":0,"service":0,"duration":0,"waiting_time":0,"priority":0,"distance":0,"computing_times":{"loading":8,"solving":0,"routing":6}},"unassigned":[],"routes":[{"vehicle":0,"cost":0,"service":0,"duration":0,"waiting_time":0,"priority":0,"distance":0,"steps":[{"type":"start","location":[2.3526,48.8604],"arrival":0,"duration":0,"distance":0},{"type":"job","location":[2.2911,48.8566],"id":1,"service":0,"waiting_time":0,"job":1,"arrival":0,"duration":0,"distance":0},{"type":"job","location":[2.3691,48.8532],"id":0,"service":0,"waiting_time":0,"job":0,"arrival":0,"duration":0,"distance":0},{"type":"end","location":[2.3526,48.8604],"arrival":0,"duration":0,"distance":0}],"geometry":"gk{~HezynA??????"}]}

`

jcoupey commented 3 years ago

This is probably because the coordinates in this example are outside the map data extract you're using. If you use OSRM, it will snap coordinates to the nearest existing edges. If you're outside the OSM extract you setup, this will lead to all points being snapped to the same location, hence 0 durations.

jcoupey commented 3 years ago

Closing as (supposedly) solved.