Skip to content

ors.engine.profiles.<profile>.build

Properties beneath ors.engine.profiles.<profile>.build are used to define the parameters for building the routing graphs for the specified profile.

keytypedescriptiondefault value
source_filestringThe OSM file to be used, supported formats are .osm, .osm.gz, .osm.zip and .pbfors-api/src/test/files/heidelberg.test.pbf
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
maximum_speed_lower_boundnumberSpecifies the threshold for the query parameter maximum_speed, required when calculating preparation data for the Core-ALT algorithm80

| encoder_flags_size | number | The number of bytes used for FlagEncoders | 8 | | location_index_resolution | number | The 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_iterations | number | The 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 | | gtfs_file | string | Only for public-transport profile: location of GTFS data; can either be a zip-file or the unzipped folder | NA | | encoder_options | string | For details see encoder_options below | | | preparation | object | Preparation settings for building the routing graphs | | | ext_storages | object | External storages for returning extra information | |

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

ext_storages

It can be defined for each profile which auxiliary metadata should be included in the graph. This information is made 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, Wheelchair and HeavyVehicle).

WARNING

In addition to providing the information in query response, data from WayCategory and Tollways storages is being used to filter out certain roads via the options.avoid_features query parameter, and Borders is necessary for the functionality behind options.avoid_borders and options.avoid_countries query parameters. Options from options.profile_params.restrictions require HeavyVehicle or Wheelchair storages being enabled. Furthermore, hgv profile-specific access restrictions specified in options.vehicle_type parameter rely on the HeavyVehicle storage.

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

keytypedescriptionexample value
WayCategoryobjectReturns the way category in the route response, compatible with any profile type
WaySurfaceTypeobjectReturns the way surface in the route response, compatible with any profile type
TollwaysobjectReturns way tolls in the route response, compatible with driving profiles
BordersobjectBorders allows the restriction of routes to not cross country borders, compatible with any profile typeBorders
RoadAccessRestrictionsobjectInformation on restriction of roads to certain vehicles or circumstances, e.g. access=destinationRoadAccessRestrictions
HeavyVehicleobjectHeavy vehicle-specific storage compatible only with that profile; it contains weight and size limits as well as vehicle-type access restrictionsHeavyVehicle
HillIndexobjectReturns the ascent/descent in the route response, compatible with any profile type
TrailDifficultyobjectReturns the trail difficulty in the route response, compatible with walking and cycling profiles
WheelchairobjectWheelchair-specific attributes compatible only with that profileWheelchair
OsmIdobjectReturns the OsmId of the way, compatible only with wheelchair profile

Check this table for extra info availability. The following table summarizes which storages are enabled for which profile by default.

WayCategoryWaySurfaceTypeTollwaysBordersRoadAccessRestrictionsHeavyVehicleHillIndexTrailDifficultyWheelchairOsmId
driving-carxxxx
driving-hgvxxxx
cycling-*xxxx
foot-*xxxx
wheelchairxxxx

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 with any profile type.

keytypedescriptionexample value
boundariesstringThe path to a geojson file containing polygons representing country bordersborders.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

HeavyVehicle

keytypedescriptionexample value
restrictionsbooleanEncode certain size and weight limits such as ones contained in maxheight, maxlength, maxwidth, maxweight and maxaxleload OSM way tags. Includes also access restrictions for vehicles carrying hazardous materials as provided by the hazmat tag.true