Closed espoal closed 11 months ago
i have the same issue,
these 3 shows different result, for the same input.
URL(input): /route/v1/driving/39.9625,32.6795;40.0170,32.8974
@espoal Your input coordinates are swapped. You've provided <lat>,<lon>
of 52.52000659999999,13.404954 in your request, which OSRM is interpreting as <lon>,<lat>
and trying to route from here:
On the public server router.project-osrm.org
, the global map is available, so it's calculating the route from Yemen.
On your map, it appears you've only imported Germany. OSRM will snap to the "nearest edge", which from your coordinate in the ocean, appears to be 13.084443,47.618354 (<lon>,<lat>
).
OSRM takes <lon>,<lat>
order in the request URL. Flip your coordinates around and things should make a lot more sense.
@espoal Your input coordinates are swapped. You've provided
<lat>,<lon>
of 52.52000659999999,13.404954 in your request, which OSRM is interpreting as<lon>,<lat>
and trying to route from here:On the public server
router.project-osrm.org
, the global map is available, so it's calculating the route from Yemen.On your map, it appears you've only imported Germany. OSRM will snap to the "nearest edge", which from your coordinate in the ocean, appears to be 13.084443,47.618354 (
<lon>,<lat>
).OSRM takes
<lon>,<lat>
order in the request URL. Flip your coordinates around and things should make a lot more sense.
I flipped the numbers, now i am having same result with very slight difference. i got the numbers from openstreetmap's web site; it doesnt tell which is lon. and which is lat. so i took them as it is.
it works now. Thank you.
I'm writing automatic tests to compare OSRM with other similar products (google maps, GraphHopper, HereMaps, ....) but for now it seems to work also for me. We can close the ticket and I will eventually update it / open a new one if I find any major discrepancies in the tests.
Thanks @danpat
I'm trying to test OSRM as a distance calculation tool for my project, but I get very strange results. Let's take the distance between Berlin and Hamburg:
${OSRM_URL}/table/v1/driving/52.52000659999999,13.404954;53.5488282,9.987170299999999?sources=0&destinations=1
From
http://router.project-osrm.org/
I get:From my local instance I get:
Why is my local instance route me through
Roßfeldstraße
, which is completely out of the way, hence giving me a different result? Why do I get different distances when trying the online demo?