Avoid_polygons not working with Matrix API for multiple locations

Hello,

I’m trying to use the OpenRouteService Matrix API to calculate travel times between multiple locations, but I’m running into an issue with avoid_polygons. My goal is to avoid congestion charged areas in the UK, but it seems that the polygons are being ignored in the matrix calculations.

  1. Does the Matrix API fully support avoid_polygons?
  2. Are there any specific requirements for the polygons (e.g., minimum size, full road coverage)?
  3. Is there a recommended approach for avoiding multiple areas when calculating a matrix which I can then pass in the matrices parameters for vroom routing optimization?

Hey,

no, the matrix API currently does not support avoid_polygons.
We are looking into changing that, but it will take some time.

I fear that you’d have to create your own matrix using the directions endpoint if you want to avoid certain areas.

Best regards

Sounds good.

I am trying to install ORS on my EC2 server. I have changed the ors-config.yml and ors-config.env files to use uk-full.osm.pbf file. But whenever I do docker compose up, I can only see this is being built on top of the defaul OSM file. Any ideas?

It simply says this if I try to search for directions

Would really appreciate some help on how to setup docker with UK map

Hey,

check our backend information on running your own docker instance here:

Information on how to configure ors can be found here:

Note, that afaik any relative path you provide in the configuration is relative to where you start the ors from, so you have to make sure these are correct.

Best regards

Hi,

Thanks a lot for your reply.

I managed to make it work by putting the file inside the ors-docker/files folder, configuring the ors-docker/config/ors-config.yml file to use the UK OSM file. Then simply deleted the graphs, elevation_cache, logs folders and started the docker container again. This made it to use the UK map rather than the test map and the graphs generated fine.

Thank you very much once again.

1 Like

Hi,

Would it be possible to know the timeframe when the matrix API would support avoid_polygons?

Thanks a lot!

Hi,

Is there any update on this?

Would it be possible to know the timeframe when the matrix API would support avoid_polygons?

Thanks a lot!

Hey,

according to our internal roadmap, unfortunately this probably won’t happen until next year.

Best regards

1 Like