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) of Bicycle-based routing and the physical slope (%) of thse road, a penalty calculated from the height difference is added to each horizontal metre.

The 1:2 penalty assigns a cost factor of 2.0 to a 3% incline. Consequently, a 1 km uphill segment (cost 2.0) is weighed equally to a 2 km flat segment, but is preferred over any flat detour exceeding 2 km.

Tables and charts of penalties bicycle routing:

OptionIncline:<1%<3%<7%<13%<25%>=25%
Disabled/Any (the shortest but hardest)------
Flat (the longest but easy)1:21:121:301:501:74
Less hilly (default, balanced)1:21:81:161:321:48
Hilly (more difficult)1:611:19.71:7.51:31:0.51:0.3

Chart Bicycle Incline

OptionDecline:<17%<35%<60%>=60%
Disabled/Any (the shortest but hardest)----
Flat (the longest but easy)1:6.41:251:25impossible
Less hilly (default, balanced)1:6.41:251:25impossible
Hilly (more difficult)1:6.41:251:25impossible

Chart Bicycle Decline

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

Tables and charts of penalties pedestrian routing:

OptionIncline:<1%<3%<7%<13%<25%>=25%
Disabled/Any (the shortest but hardest)------
Flat (the longest but easy)1:21:121:301:501:74
Less hilly (default, balanced)1:11:41:81:101:15
Hilly (more difficult)1:611:201:71: 31:0.51:0.3

Chart Pedestrian Incline

OptionDecline:<9%<17%<35%<60%>=60%
Disabled/Any (the shortest but hardest)-----
Flat (the longest but easy)1:51:101:171:251:40
Less hilly (default, balanced)1:51:101:171:251:40
Hilly (more difficult)1:51:101:171:251:40

Chart Pedestrian Decline