Skip to content

ors.engine.profiles

The profiles object contains key-object-pairs for each profile you are using.

There are some default profile keys in our standard ors-config.yml with flag encoders and recommended profile-specific settings predefined. These standard profiles are:

* in ors.engine.profiles.*flag encoder ors.engine.profiles.*.profile
cardriving-car
hgvdriving-hgv
bike-regularcycling-regular
bike-mountaincycling-mountain
bike-roadcycling-road
bike-electriccycling-electric
walkingfoot-car
hikingfoot-hgv
wheelchairwheelchair
public-transportpublic-transport

WARNING

The predefined settings override settings specified in the profile_default in your ors-config.yml or ors-config.env!
If you want to specify your own profile settings based on your specific profile_default values, you can work around this by naming your profile differently, e.g. custom-car instead of car. Note that the profile name can be chosen freely but cannot contain special characters that cannot be used for directory names on your operating system.

WARNING

In the directions endpoint, the profiles are addressed by their encoder name (e.g. driving-car)!

Properties for each (enabled) profile are set under ors.engine.profiles.<profile>, e.g.

  • ors.engine.profiles.car
  • ors.engine.profiles.hiking
keytypedescriptiondefault value
profilestringProfile name for the directions endpoint. Also used as specification for the flag encoder during graph building. Possible values are restricted to those in the second column in above table!NA
enabledbooleanEnables or disables the profile across openrouteservice endpointstrue
elevationbooleanSpecifies whether to use or not elevation datafalse
elevation_smoothingbooleanSmooth out elevation datafalse
trafficbooleanUse traffic data if availablefalse
interpolate_bridges_and_tunnelsbooleanToggle elevation interpolation of bridges and tunnels on and offtrue
instructionsbooleanSpecifies whether way names will be stored during the import or nottrue
optimizebooleanOptimize the sort order when contracting nodes for CH. This is rather expensive, but yields a better contraction hierarchy.false
graph_pathstringSubdirectory name under ors.engine.graphs_root_path. If left unset, the profile entry name on the profiles list is usedNA
encoder_optionsstringFor details see encoder_options below
preparationobjectPreparation settings for building the routing graphs
executionobjectExecution settings relevant when querying services
ext_storagesobjectExternal storages for returning extra information
maximum_distancenumberThe maximum allowed total distance of a route100000
maximum_distance_dynamic_weightsnumberThe maximum allowed distance between two way points when dynamic weights are used100000
maximum_distance_avoid_areasnumberThe maximum allowed distance between two way points when areas to be avoided are provided100000
maximum_distance_alternative_routesnumberThe maximum allowed total distance of a route for the alternative routes algorithm100000
maximum_distance_round_trip_routesnumberThe maximum allowed total distance of a route for the round trip algorithm100000
maximum_speed_lower_boundnumberSpecifies the threshold for the query parameter maximum_speed80
maximum_way_pointsnumberThe maximum number of way points in a request50
maximum_snapping_radiusnumberMaximum distance around a given coordinate to find connectable edges400
maximum_visited_nodesnumberMaximum allowed number of visited nodes in shortest path computation1000000
encoder_flags_sizenumberThe number of bytes used for FlagEncoders8
location_index_resolutionnumberThe minimum resolution in meters of tiles in the location index. Lower values yield faster queries at a cost of increased memory requirements. Reducing the resolution reduces the lookup radius which can be compensated by increasing location_index_search_iterations. Corresponds to GraphHopper's index.high_resolution configuration parameter.500
location_index_search_iterationsnumberThe maximum number of iterations performed in coordinates lookup. Higher values yield a broader search area, but might reduce query performance. It only affects the storage lookup but not its layout so changing this parameter does not require rebuilding the location index. Corresponds to GraphHopper's index.max_region_search configuration parameter.4
force_turn_costsbooleanShould turn restrictions be obeyedfalse
gtfs_filestringOnly for pt profile: location of GTFS data; can either be a zip-file or the unzipped folderNA

encoder_options

Properties beneath ors.engine.profiles.*.encoder_options:

keytypeprofilesdescriptionexample value
block_fordsboolean*Do not route through fordstrue
consider_elevationbooleanbike-*The maximum possible speed is the bike-type specific maximum downhill speed, which is higher than the usual maximum speedtrue
maximum_grade_levelnumbercar, hgvRelates to the quality of tracks as described in tracktype. Specifying e.g. maximum_grade_level=1 means that tracktype=grade2 and below won't be considered for routing. Setting maximum_grade_level=0 discards all tracks with a valid tracktype tag, while a negative value such as maximum_grade_level=-1 entirely disables routing on tracks.3
preferred_speed_factornumberwheelchairTravel speeds on edges classified as preferable for wheelchair users are multiplied by this factor, use to set faster traveling speeds on such ways1.2
problematic_speed_factornumberwheelchairTravel speeds on edges classified as problematic for wheelchair users are multiplied by this factor, use to set slow traveling speeds on such ways0.7
turn_costsbooleancar, hgv, bike-*Should turn restrictions be respectedtrue
use_accelerationbooleancar, hgvModels how a vehicle would accelerate on the road segment to the maximum allowed speed. In practice it reduces speed on shorter road segments such as ones between nearby intersections in a citytrue

preparation

Properties beneath ors.engine.profiles.*.preparation:

keytypedescriptiondefault value
min_network_sizenumberMinimum size (number of edges) of an independent routing subgraph200
methodsobjectsee below

methods.ch

Settings for preprocessing contraction hierarchies

Properties beneath ors.engine.profiles.*.preparation.methods.ch:

keytypedescriptionexample value
enabledbooleanEnables or disables the routing algorithmtrue
threadsnumberNumber of parallel threads for computing the preparation1
weightingsstringComma-separated list of weightingsrecommended,shortest

methods.lm

Settings for preprocessing A* with landmarks

Properties beneath ors.engine.profiles.*.preparation.methods.lm:

keytypedescriptiondefault value
enabledbooleanEnables or disables the routing algorithmtrue
threadsnumberNumber of parallel threads for computing the preparation1
weightingsstringComma-separated list of weightingsrecommended,shortest
landmarksnumberTotal number of precomputed landmarks; the subset used during the query is set in execution.methods.lm.active_landmarks16

methods.core

Settings for preprocessing core routing with landmarks

Properties beneath ors.engine.profiles.*.preparation.methods.core:

keytypedescriptionexample value
enabledbooleanEnables or disables the routing algorithmtrue
threadsnumberNumber of parallel threads for computing the preparation1
weightingsstringComma-separated list of weightingsrecommended,shortest
landmarksnumberTotal number of precomputed landmarks, the subset used during the query is set in execution.methods.core.active_landmarks32
lmsetsstringLandmark sets tailored for specific avoid-filters enabledhighways,tollways;highways;tollways;country_193;allow_all

execution

Properties beneath ors.engine.profiles.*.execution are relevant when querying services.

methods.astar

Parameters for beeline approximation in the A* routing algorithm.

Properties beneath ors.engine.profiles.*.execution.methods.astar:

keytypedescriptiondefault value
approximationstringMethod to use for distance approximation. Can be either the faster BeelineSimplification or the more precise but slower BeelineAccurateBeelineSimplification
epsilonnumberFactor to use for distance approximation1

methods.lm

Settings for using landmarks in routing.

Properties beneath ors.engine.profiles.*.execution.methods.lm:

keytypedescriptiondefault value
active_landmarksnumberNumber of landmarks used for computing the route8

methods.core

Settings for using landmarks in routing.

Properties beneath ors.engine.profiles.*.execution.methods.core:

keytypedescriptionexample value
active_landmarksnumberNumber of landmarks used for computing the route6

ext_storages

For each profile it can be defined which external storages for extra info should be included in the graph. This makes those information available as extra_info in a routing response.

To do so, add a key from the list below. Leave its value empty, unless you want to specify further options (currently only available for RoadAccessRestrictions, Borders and Wheelchair).

Properties beneath ors.engine.profiles.*.ext_storages:

keytypedescriptionexample value
WayCategoryobjectReturns the way category in the route response, Compatible for any profile type
WaySurfaceTypeobjectReturns the way surface in the route response, Compatible for any profile type
HillIndexobjectReturns the ascent/descent in the route response, Compatible for any profile type
TrailDifficultyobjectReturns the trail difficulty in the route response, Compatible for profile-hiking
RoadAccessRestrictionsobjectRoadAccessRestrictions are where roads are restricted to certain vehicles to certain circumstances, e.g. access=destination.RoadAccessRestrictions
WheelchairobjectCompatible for wheelchairWheelchair
OsmIdobjectReturns the OsmId of the way, Compatible for wheelchair
BordersobjectBorders allows the restriction of routes to not cross country borders, compatible for any profile typeBorders

Have a look at this table to check which external storages are enabled for the which profile by default.

RoadAccessRestrictions

The use_for_warnings parameter tells the ors that this storage can be used for generating warning messages in the route response.

keytypedescriptionexample value
use_for_warningsbooleanWhenever a route goes over a way which has some restrictions, a warning message will be delivered with the response and the roadaccessrestrictions extra info will be added automatically.true

Wheelchair

keytypedescriptionexample value
KerbsOnCrossingsbooleanKerb height is only parsed on crossings.true

Borders

Properties beneath ors.engine.profiles.*.ext_storages.Borders allows to define restriction of routes to not cross country borders, compatible for any profile type.:

keytypedescriptionexample value
boundariesstringThe path to a file containing geojson data representing the borders of countriesborders.geojson.tar.gz
idsstringPath to a csv file containing a unique id for each country, its local name and its English nameids.csv
openbordersstringPath to a csv file containing pairs of countries where the borders are open (i.e. Schengen borders)openborders.csv