[OSRM-talk] Plotting position in time using OSRM
S R
sriram_ott at yahoo.com
Wed Dec 3 14:58:52 UTC 2014
I would like to create a simple simulation of a trip using OSRM.
I believe the steps would be as follows (my questions are in parenthesis below)
a. Load OSM map of a city into OSRMb. Choose a random begin, end location that falls within the city lat/long (how to find lat/long limits of the loaded map?)c. Compute the distance (in time) between start, end using OSRMd. Also compute a path between start, end using OSRM (are the node vertices mentioned in route the same as in the OSM map?)e. The difficult part:
-- start the simulation by displaying the map along with position marker (Leaflet?) -- As time progresses, determine the location along the OSRM route computed above (how can this be done?) and adjust the position marker.
An OSRM route looks like this:"route_instructions": [
[
"10", <-------------------- what is this id and how to convert it to lat/long
"Schulstraße",
126,
0,
18,
"126m",
"SE",
116
],
[
"7", <---------------- how to find elapsed time to this point from previous one
"Am Rahmtor",
57,
2,
11,
"57m",
"NE",
38
]
Given a start and end lat/long, a network distance (time) can be obtained as follows:
"distance_table": [
[
0,
26084
],
[
26084,
0
]
This would be useful if the route way-points above could be converted into time units.
Would appreciate any help with the above questions,
Sriram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20141203/918348e8/attachment.html>
More information about the OSRM-talk
mailing list