Avoid border option on /optimization

I’m trying to limit optimization service to work only in one country - do not cross any borders.
I tried adding [{“avoid_borders”:“all”}] to “options” but no luck there.

Any ideas?

Hi @kovkus,

it unfortunately isn’t possible to do optimization with avoid countries (or any of the avoidables currently) as it uses the matrix calculation to determine the optimal routes, which is based on an algorithm which cannot take those things into account.

If you want to only do the calculations in a single country, your best option would be to get a local installation of ors running with just that country, and a self-hosted instance of Vroom (the service we use for optimization) to call it.