Project-OSRM / osrm-backend

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

"exclude" flag not working in Node API #6316

Open pankajrandhe opened 1 year ago

pankajrandhe commented 1 year ago

I am trying to use exclude flag to exclude classes like ferry, motorway, toll while calculating the shortest path using /table API.

I created data using osrm-backend v5.25.0 and setup OSRM native API and OSRM Node APIs. Exclude flag is working in the native API but not in the Node API.

SiarheiFedartsou commented 1 year ago

Could you provide example of request when it doesn't work?

There is even test for this case as I can see: https://github.com/Project-OSRM/osrm-backend/blob/624fea6d333245d90506e346cacdcd2479616415/test/nodejs/table.js#L245

pankajrandhe commented 1 year ago

@SiarheiFedartsou

Request body for one of the examples I tried for the /table endpoint is following.

{ "coordinates": [ [139.694457, 35.583716], [139.48790, 35.93879] ], "exclude": ["motorway"] }

The dataset I used for test is for Kanto region of Japan. https://download.geofabrik.de/asia/japan.html

SiarheiFedartsou commented 1 year ago

@pankajrandhe how do you understand that it works in native API, but not in Node? Do you have concrete example? I am looking into code and don't see any issues: we seem to handle exclude parameter for Node properly.

github-actions[bot] commented 3 weeks ago

This issue seems to be stale. It will be closed in 30 days if no further activity occurs.