Car distance too short, shorter than geodesic straight line distance

I set up a local openrouteservice instance with Germany as data, using the default settings. A look at the output of my program told me, that the ‘geodesic’ straight line distance, which I got from a widespread Python library, was 10-30% larger than the car distance, although this was only the case in around 1/3 of samples (I computed the distance matrices for N cities in Germany). Is this possible? Any idea what might be wrong? I am not sure what’s going on… Also I’m wondering that our research slides (just unimportant numbers and illustrations, but still though) are wrong because of this. Any hints would be much appreciated! :slight_smile:

Best regards,
Tobi

By its definition, the geodesic distance must always be shorter than the distance on the street network. So, what you are reporting, should not happen.

The first thing I would cross-check is whether the matrix contains distance or duration values (you can get both, independent of which one was used to find the optimal path).

Otherwise, I would cross-check the same requests with the public instance of ORS. If those still return wrong results, please post a complete request and response of a failing sample.

1 Like

After veeeery intense search, I found that I switched latitude and longitude in a complicated way. Advice to people: Don’t use tuples for latitude, longitude - use dictionaries or a small class!

1 Like

Hey,

great that you were able to sort it out :slight_smile:

Best regards