Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.42k stars 3.4k forks source link

osrm match returning invalid node id #6482

Open rob-harrison opened 1 year ago

rob-harrison commented 1 year ago

using: hosted osrm backend v5.22.0 running on linux ec2 m5.4xlarge asia_japan map 20221208010231 extracted with v5.22.0

command: curl 'https://<our-internal-server>/match/v1/driving/137.5324417,34.9262617;137.5323933,34.9262683;137.5323467,34.926275;137.5322983,34.9262833;137.53225,34.92629;137.5322017,34.9262967;137.5321533,34.9263033?geometries=geojson&annotations=true'

results contain a reference to a non-existent node 412790441 (It doesn't appear in our extracted data nor it seems globally -> see https://www.openstreetmap.org/node/412790441)

{"code":"Ok","matchings":[{"confidence":0.981892,"geometry":{"coordinates":[[137.532436,34.926234],[137.532387,34.926242],[137.532341,34.926248],[137.532292,34.926256],[137.532244,34.926263],[137.532196,34.92627],[137.532147,34.926277]],"type":"LineString"},"legs":[{"annotation":{"metadata":{"datasource_names":["lua profile"]},"nodes":[4001310715,4392608956],"datasources":[0],"speed":[22.8],"weight":[0.2],"duration":[0.2],"distance":[4.556205]},"steps":[],"distance":4.6,"duration":0.2,"summary":"","weight":0.2},{"annotation":{"metadata":{"datasource_names":["lua profile"]},"nodes":[4001310715,4392608956],"datasources":[0],"speed":[21.2],"weight":[0.2],"duration":[0.2],"distance":[4.247644]},"steps":[],"distance":4.2,"duration":0.2,"summary":"","weight":0.2},{"annotation":{"metadata":{"datasource_names":["lua profile"]},"nodes":[4001310715,4392608956],"datasources":[0],"speed":[45.6],"weight":[0.1],"duration":[0.1],"distance":[4.556204]},"steps":[],"distance":4.6,"duration":0.1,"summary":"","weight":0.1},{"annotation":{"metadata":{"datasource_names":["lua profile"]},"nodes":[4001310715,4392608956,412790441],"datasources":[0,0],"speed":[1.8,42.7],"weight":[0.1,0.1],"duration":[0.1,0.1],"distance":[0.182387,4.266533]},"steps":[],"distance":4.4,"duration":0.2,"summary":"","weight":0.2},{"annotation":{"metadata":{"datasource_names":["lua profile"]},"nodes":[4392608956,412790441],"datasources":[0],"speed":[22.2],"weight":[0.2],"duration":[0.2],"distance":[4.445981]},"steps":[],"distance":4.4,"duration":0.2,"summary":"","weight":0.2},{"annotation":{"metadata":{"datasource_names":["lua profile"]},"nodes":[4392608956,412790441],"datasources":[0],"speed":[22.7],"weight":[0.2],"duration":[0.2],"distance":[4.535793]},"steps":[],"distance":4.5,"duration":0.2,"summary":"","weight":0.2}],"distance":26.7,"duration":1.1,"weight_name":"routability","weight":1.1}],"tracepoints":[{"alternatives_count":0,"waypoint_index":0,"matchings_index":0,"location":[137.532436,34.926234],"name":"新東名高速道路","distance":3.154224,"hint":"JNPrgP___39aAAAAYAAAAAUAAABHAAAAX6hjQ7f9WEFRyUZBDyAxQ1oAAABgAAAABQAAAEcAAAA9CQAAFJQyCJruFAIalDIItu4UAgEAjxGltY23"},{"alternatives_count":0,"waypoint_index":1,"matchings_index":0,"location":[137.532387,34.926242],"name":"新東名高速道路","distance":2.935982,"hint":"JNPrgP___39cAAAAYAAAAAUAAABHAAAAsThoQ_D4D0FRyUZBDyAxQ1wAAABgAAAABQAAAEcAAAA9CQAA45MyCKLuFALpkzIIvO4UAgEAjxGltY23"},{"alternatives_count":0,"waypoint_index":2,"matchings_index":0,"location":[137.532341,34.926248],"name":"新東名高速道路","distance":3.045037,"hint":"JNPrgP___39eAAAAYAAAAAUAAABHAAAA3XlsQ0HNl0BRyUZBDyAxQ14AAABgAAAABQAAAEcAAAA9CQAAtZMyCKjuFAK7kzIIw-4UAgEAjxGltY23"},{"alternatives_count":0,"waypoint_index":3,"matchings_index":0,"location":[137.532292,34.926256],"name":"新東名高速道路","distance":3.045037,"hint":"JNPrgP___39fAAAAYAAAAAUAAABHAAAALgpxQwciOz5RyUZBDyAxQ18AAABgAAAABQAAAEcAAAA9CQAAhJMyCLDuFAKKkzIIy-4UAgEAjxGltY23"},{"alternatives_count":0,"waypoint_index":4,"matchings_index":0,"location":[137.532244,34.926263],"name":"新東名高速道路","distance":3.045037,"hint":"JNPrgP___38BAAAARwAAAGUAAAAAAAAAL8eIQNnZLEPNpH1DAAAAAAEAAABHAAAAZQAAAAAAAAA9CQAAVJMyCLfuFAJakzII0u4UAgIAjxGltY23"},{"alternatives_count":0,"waypoint_index":5,"matchings_index":0,"location":[137.532196,34.92627],"name":"新東名高速道路","distance":3.045037,"hint":"JNPrgP___38DAAAARwAAAGUAAAAAAAAAhacLQZdlKEPNpH1DAAAAAAMAAABHAAAAZQAAAAAAAAA9CQAAJJMyCL7uFAIqkzII2e4UAgIAjxGltY23"},{"alternatives_count":1,"waypoint_index":6,"matchings_index":0,"location":[137.532147,34.926277],"name":"新東名高速道路","distance":2.935982,"hint":"JNPrgP___38FAAAARwAAAGUAAAAAAAAAB1xUQU_aI0PNpH1DAAAAAAUAAABHAAAAZQAAAAAAAAA9CQAA85IyCMXuFAL5kjII3-4UAgIAjxGltY23"}]}

the same command using external project-osrm server returns a different (valid) node 9002725033 curl 'http://router.project-osrm.org/match/v1/driving/137.5324417,34.9262617;137.5323933,34.9262683;137.5323467,34.926275;137.5322983,34.9262833;137.53225,34.92629;137.5322017,34.9262967;137.5321533,34.9263033?geometries=geojson&annotations=true'

project-osrm-match.txt

SiarheiFedartsou commented 1 year ago

What osm.pbf was used to generate data?

rob-harrison commented 1 year ago

It would have been this one from 01/12/22 -> https://download.geofabrik.de/asia/japan-221201.osm.pbf