# Problem when constructing a route with the option avoid\_borders

**URL:** <https://ask.openrouteservice.org/t/problem-when-constructing-a-route-with-the-option-avoid-borders/3362>\
**Category:** openrouteservice\
**Created:** [November 29, 2021, 9:25am UTC](https://ask.openrouteservice.org/t/problem-when-constructing-a-route-with-the-option-avoid-borders/3362 "2021-11-29T09:25:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robotech7](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/robotech7/32/1373_2.png) [@Robotech7](https://ask.openrouteservice.org/u/Robotech7)\
**Post date:** [November 29, 2021, 9:25am UTC](https://ask.openrouteservice.org/t/problem-when-constructing-a-route-with-the-option-avoid-borders/3362/1 "2021-11-29T09:25:45Z")

</div>

Hello everyone!

Running on my serve in docker openrouteservice, there is a problem that while building a route for a car, the restrictions on movement between countries ({avoid\_borders: all} or {“avoid\_countries”: }) do not work.

At the moment, I am using .pbf of Russia + Kazakhstan merged using osmium. There is a loaded in the geojson movement profile with the specified Asian borders, and also ids.csv countries, and openborders.csv (almost empty, taken from the repository with the project).

```auto
"profile-hgv": {
            "profiles": "driving-hgv",
            "parameters": {
              "encoder_flags_size": 8,
              "encoder_options": "turn_costs=true|block_fords=false|use_acceleration=true",
              "maximum_distance": 10000000,
              "elevation": false,
              "preparation": {
                "min_network_size": 200,
                "min_one_way_network_size": 200,
                "methods": {
                  "ch": {
                    "enabled": true,
                    "threads": 1,
                    "weightings": "recommended"
                  },
                  "core": {
                    "enabled": true,
                    "threads": 1,
                    "weightings": "recommended,shortest",
                    "landmarks": 64,
                    "lmsets": "highways;allow_all"
                  }
                }
              },
              "execution": {
                "methods": {
                  "ch": {
                    "disabling_allowed": true
                  },
                  "core": {
                    "disabling_allowed": true,
                    "active_landmarks": 6
                  }
                }
              },
              "ext_storages": {
                "WayCategory": {},
                "HeavyVehicle": {
                  "restrictions": true
                },
                "WaySurfaceType": {},
                "Borders": {
                  "boundaries": "/ors-conf/world.geojson",
                  "ids": "/ors-conf/ids.csv",
                  "openborders": "/ors-conf/openborders.csv"
                }
              }
            }
          }

```

[https://github.com/GIScience/openrouteservice/blob/master/openrouteservice/src/main/files/borders/openborders.csv](https://github.com/GIScience/openrouteservice/blob/master/openrouteservice/src/main/files/borders/openborders.csv)

When constructing a route, no errors occur while generating graphs. Perhaps, the error is connected to the ids.csv file (the list of countries).

> <https://github.com/GIScience/openrouteservice/issues/195#issuecomment-396849429>
>
> It would streamline certain workflows if the APIs could be queried using standar…dized country codes, such as \[ISO 3166-1 alpha-2\](https://en.wikipedia.org/wiki/ISO\_3166-1) instead of the ORS-specific(?) numeric ids listed in https://github.com/GIScience/openrouteservice-docs#country-list. 
> 
> This doesn't need to be a breaking change because ISO\_3166-1 codes can be easily distinguished from the current numeric ids, so the API could allow either.
> 
> Note that ISO 3166-1 country codes are already \[used by Pelias gecoder\](https://github.com/pelias/documentation/blob/master/search.md#search-within-a-particular-country).

While generating graphs:  
 ![Снимок экрана от 2021-11-29 19-21-25](https://ask.openrouteservice.org/uploads/default/original/2X/c/c6f0f438c0c87d5a5a099a0bfb17caee0563fd1b.png)

 ![Снимок экрана от 2021-11-29 19-24-41](https://ask.openrouteservice.org/uploads/default/original/2X/4/4ca48480a63875db8fe811fb2536c4cf5ae10bba.png)

I need avoid\_borders: all parameter to work when building a route
