This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

what are nodes in nearest endpoint results

0

I'm new to OSRM and I need to clarify the following output. Given the following "nearest/v1/driving/79.862839,6.916330?number=5"" Please explain why 2 nodeIDs are given? If so how can a nodeID be 0 in the second array element below.

 {
    "distance": 16.449379,
    "hint": "hVIAgP___38IAAAAWgAAAAcAAAAAAAAACAAAAFoAAAAHAAAAAAAAADAAAADpm8IEaIlpADecwgTqiGkAAQCvA_-mldo=",
    "location": [
        79.862761,
        6.916456
    ],
    "name": " ",
    "nodes": [
        1346377747,
        4009185293
    ]
},
{
    "distance": 20.219594,
    "hint": "hVIAgP___38HAAAABwAAAAAAAABaAAAABwAAAAcAAAAAAAAAWgAAADAAAACOm8IEMIlpADecwgTqiGkAAACvA_-mldo=",
    "location": [
        79.86267,
        6.9164
    ],
    "name": "Srimath Anagarika Dharmapala Mawatha",
    "nodes": [
        0,
        1346377747
    ]
},

Also is there any possibility to get the distance between two nodes if NodeIDs are provided?

asked 09 Feb '18, 15:46

KlausD94's gravatar image

KlausD94
21334
accept rate: 0%

edited 09 Feb '18, 16:44

scai's gravatar image

scai ♦
33.3k21309459

Source code available on GitHub .