The configuration of your own openrouteservice instance is read from the ors-config.json file. For a quick start with the default values, the ors-config-sample.json can be copied to that location and adjusted as needed.
ors
The top level element.
key
type
description
example value
info
object
the topmost element to provide basic information about the service for signing and information purposes
Enables or disables reading ele tags for nodes. Default value is false. If enabled, GH’s elevation lookup is prevented and all nodes without ele tag will default to 0. Experimental, for use with the ORS preprocessor
Defines a list of active routing profiles. The element name XXX must correspond to a notation “profile-XXX”, which is used in the following sections. Can be one or many of "car", "hgv", "bike-regular", "bike-mountain", "bike-road", "bike-electric", "walking", "hiking" or "wheelchair"
["car", "bike-regular"]
default_params
object
Set parameters that is applied to every profile by default
The name of an elevation provider. Possible values are multi, cgiar or srtm
"multi"
elevation_cache_path
string
The path to a directory in which SRTM tiles will be stored
"elevation_cache"
elevation_cache_clear
boolean
keep elevation data once it has been downloaded
false
elevation_smoothing
boolean
smooth out elevation data
false
instructions
boolean
Specifies whether way names will be stored during the import or not
true
maximum_distance
number
The maximum allowed total distance of a route
100000
maximum_segment_distance_ with_dynamic_weights
number
The maximum allowed distance between two way points when dynamic weights are used
50000
maximum_waypoints
number
The maximum number of way points in a request
50
maximum_snapping_radius
number
Maximum distance around a given coordinate to find connectable edges
100
maximum_distance_round_trip_routes
number
The maximum allowed total distance of a route for the round trip algo
100000
maximum_distance_alternative_routes
number
The maximum allowed total distance of a route for the alternative route algo
100000
maximum_alternative_routes
number
The maximum number of alternative routes in a request
3
maximum_avoid_polygon_area
number
The maximum allowed total area of a polygon in square kilometers, optional
200000000
maximum_avoid_polygon_extent
number
The maximum extent (i.e. envelope side length) of a polygon in kilometers, optional
20000
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 (default)
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 (default)
maximum_speed_lower_bound
number
Specifies the threshold for the query parameter maximum_speed.
For wheelchair profile only! Travel speeds on edges classified as problematic for wheelchair users are multiplied by this factor, use to set slow traveling speeds on such ways
problematic_speed_factor=0.7
preferred_speed_factor
number
For wheelchair profile only! Travel speeds on edges classified as preferrable for wheelchair users are multiplied by this factor, use to set faster traveling speeds on such ways
Returns the way category in the route response, Compatible for any profile type
{}
WaySurfaceType
object
Returns the way surface in the route response, Compatible for any profile type
{}
HillIndex
object
Returns the ascent/descent in the route response, Compatible for any profile type
{}
TrailDifficulty
object
Returns the trail difficulty in the route response, Compatible for profile-hiking
{}
RoadAccessRestrictions
object
RoadAccessRestrictions are where roads are restricted to certain vehicles to certain circumstances, e.g. access=destination. The use_for_warnings parameter tells the ors that this storage can be used for generating warning messages in the route response. For RoadAccessRestrictions, this means that whenever a route goes over a way which has some restrictions, a warning message will be delivered with the response and the roadaccessrestrictions extra info automatically added.
{ use_for_warnings: true }
Wheelchair
object
Compatible for wheelchair
{ KerbsOnCrossings: "true" }
OsmId
object
Returns the OsmId of the way, Compatible for wheelchair
{}
Borders
object
Borders allows the restriction of routes to not cross country borders, compatible for any profile type
Can be either DEBUG_LOGGING.json or PRODUCTION_LOGGING.json
"DEBUG_LOGGING.json"
location
string
Location of the logs
"/var/log/ors"
stdout
boolean
true
ors.system_message
Array of message objects where each has
key
type
description
example value
active
boolean
Enables or disables this message
true
text
string
The message text
"The message text"
condition
object
omittable; may contain any of the conditions from the table below
condition
value
description
time_before
ISO 8601 datetime string
message sent if server local time is before given point in time
time_after
ISO 8601 datetime string
message sent if server local time is after given point in time
api_version
1 or 2
message sent if API version requested through matches value
api_format
String with output formats (“json”, “geojson”, “gpx”), comma separated
message sent if requested output format matches value
request_service
String with service names (“routing”, “matrix”, “isochrones”), comma separated
message sent if requested service matches one of the given names
request_profile
String with profile names, comma separated
message sent if requested profile matches one of the given names
request_preference
String with preference (weightings for routing, metrics for matrix, rangetype for isochrones) names, comma separated
message sent if requested preference matches one of the given names
Example:
system_message: [
{
active: true,
text: "This message would be sent with every routing bike fastest request. E.g. 'The fastest weighting for cycling profiles is deprecated, use recommended weighting instead. API will be kept for compatibility until release of version 7.0.'",
condition: {
"request_service": "routing",
"request_profile": "cycling-regular,cycling-mountain,cycling-road,cycling-electric",
"request_preference": "fastest"
}
},
{
active: true,
text: "This message would be sent with every request for geojson response.",
condition: {
"api_format": "geojson"
}
},
{
active: true,
text: "This message would be sent with every request on API v1 from January 2020 until June 2050. E.g. 'The V1 API is deprecated. You should switch to using the V2 API.'",
condition: {
"api_version": "1",
"time_after": "2020-01-01T00:00:00Z",
"time_before": "2050-06-01T00:00:00Z"
}
},
{
active: true,
text: "This message would be sent with every request. E.g. 'Scheduled downtime due to version upgrade on March 15th 2020, 12:00 AM CET for approx. 3 hours.'"
}
]