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

Parameter for Polygon-Based Area Avoidance in OSRM table Method #6953

Open TiagoDelatorre opened 5 months ago

TiagoDelatorre commented 5 months ago

Description: I am interested in using the OSRM API's table method to calculate distance or time matrices. Currently, I need to exclude specific areas defined by polygons from these calculations. However, I couldn't find a parameter that allows me to do this directly.

Request: Could you consider adding a parameter to the table method that allows specifying polygons to exclude from the calculations? This would enable users to define complex geographic restrictions more effectively, enhancing the utility of the OSRM API for diverse routing scenarios.

Use Case: For instance, I would like to calculate travel matrices between multiple points while excluding areas such as parks or construction sites. Being able to define exclusion zones using polygons would greatly benefit my application's routing capabilities.

Expected Outcome: The ability to specify exclusion areas via polygons in the table method would streamline routing calculations, making the OSRM API more versatile and applicable to a wider range of spatial analysis tasks.

Thank you for considering this feature request. Please let me know if further clarification or examples would be helpful.

jcoupey commented 5 months ago

This is essentially a duplicate of #892 (still open). Several other tickets touching on that subject have been closed in favor of the later. Following links to those will also provide some good insights on why that topic is far from trivial given the routing algorithms implemented in OSRM: targeting efficiency and very fast response times often comes with the price of a lower flexibility.