Skip to content

Profiles

Pablo Hoch edited this page Jan 8, 2024 · 9 revisions

Note:

  • If a value is missing in the profile, the default value is used.
  • All default values are subject to change at any time. If a specific value is required, it should be specified in the profile.
  • Default values for crossing factors and cost factors are not listed here, but exist (see search_profile.h). They are also subject to change at any time. It is strongly recommended to always specify all values in a profile.

Profile

Field Type Unit Default Description
walking_speed double m/s 1.4 Walking speed
duration_limit double s 3600 Maximum route duration
max_crossing_detour_primary int m 300 An unmarked crossing over a primary road can only be used if there is no alternative route to get to the other side of the road that is shorter than this detour value and that doesn't use unmarked crossings. This prevents using unmarked crossings next to marked crossings.
max_crossing_detour_secondary int m 200 Same as max_crossing_detour_primary, but for crossing secondary roads
max_crossing_detour_tertiary int m 200 Same as max_crossing_detour_primary, but for crossing tertiary roads
max_crossing_detour_residential int m 100 Same as max_crossing_detour_primary, but for crossing residential roads
max_crossing_detour_service int m 0 Same as max_crossing_detour_primary, but for crossing service roads
min_required_width double m 0 Minimum width. Ways, doors etc. can't be used if they have a known width smaller than this value. Set to 0 to disable. Maximum possible value is currently 2.55m.
min_allowed_incline int8 % -128 Ways that have a known incline value lower than this value can't be used.
max_allowed_incline int8 % 127 Ways that have a known incline value larger than this value can't be used.
wheelchair bool false Whether the user is using a wheelchair. If set to true, ways that are not wheelchair compatible can't be used.
stroller bool false Whether the user has a stroller. If set to true, ways that are not stroller compatible can't be used.
round_distance double m 0 If set to a value > 0, route distances are rounded to multiples of this value (i.e. round(distance / round_distance) * round_distance).
round_duration double s 0 If set to a value > 0, route durations are rounded to multiples of this value (i.e. round(duration / round_duration) * round_duration). E.g. with round_distance = 60, routes with a duration of 100s and 130s would both be rounded to 120s.
round_accessibility double 0 Same as round_duration, but for the accessibility value instead of the duration.
max_routes int 0 Maximum number of routes to return. Set to 0 to disable. If set to a value > 0, at least one of divisions_duration or divisions_accessibility has to be > 0.
divisions_duration int 0 Only used if max_routes > 0 and more routes than max_routes have been found. In that case, a duration_division is calculated for each route: The range of duration values of the result set is divided into divisions_duration equally sized ranges. The duration_division value in the result is the number of the division that the duration value of that route falls into. Example: Given a result set with durations 60s, 100s, 120s and divisions_duration = 2, the divisions would be 0, 1, 1 (range is 120-60 = 60, 2 divisions: 60-90, 90-120).
divisions_accessibility int 0 Same as divisions_duration, but for the accessibility value instead of the duration (accessibility_division).
crossing_primary Crossing Factor Crossing a primary street
crossing_secondary Crossing Factor Crossing a secondary street
crossing_tertiary Crossing Factor Crossing a tertiary street
crossing_residential Crossing Factor Crossing a residential street
crossing_service Crossing Factor Crossing a service street
crossing_rail Cost Factor Crossing railway tracks
crossing_tram Cost Factor Crossing tram tracks
stairs_up_cost Cost Factor Cost for using stairs without handrails or with no handrail information (up). The second and third entries are multiplied with the number of steps.
stairs_down_cost Cost Factor Cost for using stairs without handrails or with no handrail information (down). The second and third entries are multiplied with the number of steps.
stairs_with_handrail_up_cost Cost Factor Same as stairs_up_cost, but for stairs with handrails.
stairs_with_handrail_down_cost Cost Factor Same as stairs_down_cost, but for stairs with handrails.
elevator_cost Cost Factor Cost for using an elevator
escalator_cost Cost Factor Cost for using an escalator
moving_walkway_cost Cost Factor Cost for using a moving walkway
cycle_barrier_cost Cost Factor Cost for passing through a cycle barrier
elevation_up_cost Cost Factor Cost per meter of upwards elevation
elevation_down_cost Cost Factor Cost per meter of downwards elevation
door Door Type Factor Cost of passing through a door. If both door type and automatic door type information for a door is available, a component-wise minimum of the cost coefficients is used.
automatic_door Automatic Door Type Factor Cost of passing through an automatic door. See the door field for information on how this is used.

Crossing Factors

A crossing factor has the following fields:

Field Type Description
signals Cost Factor Crossing with traffic signals (for pedestrians) that don't have sound or vibration, or no information about sound/vibration.
blind_signals Cost Factor Crossing with traffic signals that have sound and/or vibration. Missing values in the cost factor are taken from the signals cost factor.
marked Cost Factor Marked crossing
island Cost Factor Crossing with a traffic island
unmarked Cost Factor Unmarked crossing

Cost Factors

A cost factor has the following fields:

Field Type Unit Default Description
duration Cost Coefficients s 0, 0, 0 Duration cost
accessibility Cost Coefficients 0, 0, 0 Accessibility cost
allowed string allowed One of:
- allowed (or true)
- penalized
- forbidden (or false)
duration_penalty double s 0 Duration penalty cost. Only used when allowed is set to penalized. This value is not added to the route duration, but only added to an internal penalized route duration (which also includes the regular duration) that is used for pareto dominance together with the penalized route accessibility.
accessibility_penalty double 0 Accessibility penalty cost. Only used when allowed is set to penalized. See duration_penalty.

Cost coefficients are given as an array with up to 3 double values. Missing entries are set to the default values.

  • The first entry is a constant that is added to the total route cost whenever a matching edge (e.g. an unmarked crossing over a primary road) is used.
  • The second entry is multiplied by a suitable cost value of the edge, usually the length in meters or the number of steps for stairs. If no suitable cost value exists (e.g. for doors), the given value is multiplied by 1. The resulting value is added to the total route cost.
  • The third entry is multiplied with the squared cost value of the edge and added to the total route cost.

Door Type Factors

A door type factor has the following fields (see the OSM door tag for more information on door types):

Field Type Description
yes Cost Factor Generic or unknown door
no Cost Factor An entrance without a door
hinged Cost Factor Swinging door
sliding Cost Factor Sliding door
revolving Cost Factor Revolving door
folding Cost Factor Folding door
trapdoor Cost Factor Trapdoor / hatch
overhead Cost Factor Door rolling from overhead

Automatic Door Type Factors

An automatic door type factor has the following fields (see the OSM automatic_door tag for more information on automatic door types):

Field Type Description
yes Cost Factor Door opens automatically, no further details known
no Cost Factor Door doesn't open automatically
button Cost Factor Button operated
motion Cost Factor Door with motion sensor
floor Cost Factor Door with pressure sensor on the floor
continuous Cost Factor Revolving door
slowdown_button Cost Factor Revolving door with button to slow down
Clone this wiki locally