Skip to content

Difference in distance when using route and table #5151

@rgugliel

Description

@rgugliel

Hi,
I'm playing a bit with the table service and the distance it can now return (thanks for that, it is awesome!).

I noticed that there exists pairs of coordinates that are such that the distance returned by the table service is different that the one returned by the route service although the durations are the same.

As an example, I took the Lyon map (http://download.bbbike.org/osm/bbbike/Lyon/), and ran the following two queries on a local instance:

curl "http://localhost:5051/route/v1/driving/4.827889,45.759704;4.842888,45.755310"
curl "http://localhost:5051/table/v1/driving/4.827889,45.759704;4.842888,45.755310?sources=0&destinations=1&annotations=distance,duration"

What I get are the following two:

{"code":"Ok","routes":[{"geometry":"emhvGi}m\\`A}Ej@mAVD~FtGnBgInCeVh@k@~AoKQa@aGcD[?lFkW|C_MBk@","legs":[{"steps":[],"distance":1691.9,"duration":237.6,"summary":"","weight":237.6}],"distance":1691.9,"duration":237.6,"weight_name":"routability","weight":237.6}],"waypoints":[{"hint":"NxUAgP___38UAAAAGAAAADIAAAAAAAAAZ7JhQaCeAUCSwwVCAAAAABQAAAAYAAAAMgAAAAAAAAAIAQAA8apJANo8ugLxqkkA2Dy6AgEAbwXhRjDc","name":"Avenue Adolphe Max","location":[4.827889

{"code":"Ok","sources":[{"hint":"NxUAgP___38UAAAAGAAAADIAAAAAAAAAZ7JhQaCeAUCSwwVCAAAAABQAAAAYAAAAMgAAAAAAAAAIAQAA8apJANo8ugLxqkkA2Dy6AgEAbwXhRjDc","name":"Avenue Adolphe Max","location":[4.827889,45.759706]}],"destinations":[{"hint":"GRIAgP___38GAAAACgAAAAkAAAADAAAAIY7sQMoEdECQgxlBEv3JQAYAAAAKAAAACQAAAAMAAAAIAQAAiOVJAK4rugKI5UkAriu6AgIAvwXhRjDc","name":"Cours Gambetta","location":[4.842888,45.75531]}],"durations":[[237.6]],"distances":[[1694.2]]}%      

The two durations are the same, 237.6 but the distances differ. I found other examples on other maps, too.

Is that normal?

Thanks a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions