Skip to main content

Routing Configuration - .routing.xml

🚧 This article is incomplete

This article is incomplete & needs to be reviewed. You can help by creating a pull request.

Routing.xml is a configuration file that stores multiple routing profiles. Each profile is independent and has only base OsmAnd profile as a reference that's why it's not possible to create a hierarchy of profiles and you will need to copy all rule sections. Each is fully configurable via routing.xml, it means there is no any constants in the code and all penalties are calculated using this configuration.

In the application you can use multiple custom routing.xml files and profiles you can select them in Settings -> Profile -> Navigation Settings -> Routing Settings.

Please check the documentation inside routing.xml:

Penalties of Elevation data​

Depending on the selected mode (Less hilly, Flat, Hilly) and the physical slope (%) of thse road, a penalty calculated from the height difference is added to each horizontal metre.

Explaination given as 3% 1:2 means that route with flat 2 km will be preferred over route with 3% 1 km though 3% 1km route will be preferred over route flat 2.5 km.

Table of penalties bicycle routing:

OptionIncline:<1%<3%<7%<13%<25%>=25%Decline:<17%<35%<60%>=60%
Disabled/Any (the shortest but hardest)----------
Less hilly (default, balanced)1:21:81:161:321:481:6.41:251:25impossible
Flat (the longest but easy)1:21:121:301:501:741:6.41:251:25impossible
Hilly (more difficult)1:611:19.71:7.51:31:0.51:0.31:6.41:251:25impossible

Depending on the selected mode (Less hilly, Flat, Hilly) and the physical slope (%) of the road, a penalty calculated from the height difference is added to each horizontal metre.

Table of penalties pedestrian routing:

OptionIncline:<1%<3%<7%<13%<25%>=25%Decline:<9%<17%<35%<60%>=60%
Disabled/Any (the shortest but hardest)-----------
Less hilly (default, balanced)1:11:41:81:101:151:51:101:171:251:40
Flat (the longest but easy)1:21:121:301:501:741:51:101:171:251:40
Hilly (more difficult)1:611:201:71: 31:0.51:0.31:51:101:171:251:40