Skip to content

ors.engine.profiles

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

Available profiles are:

  • car
  • hgv
  • bike-regular
  • bike-mountain
  • bike-road
  • bike-electric
  • walking
  • hiking
  • wheelchair
  • public-transport

WARNING

If you specified profile_default settings they might not be taken into account! This will be fixed in the next patch release. As a workaround, you can move all profile_default settings to the specific profile where you need them to work.

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 nameNA
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 routing3
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