-
Notifications
You must be signed in to change notification settings - Fork 1
Speedprofile
(Note: this page is outdated. Profiles are now written as LUA scripts. For an example, see https://github.com/DennisOSRM/Project-OSRM/blob/master/profiles/testbot.lua)
The speed profile is not hardcoded in code, but can be set through an ini file. The first section of the file specifies the profile which is used. Consider the following example:
[bike]
trunk = 16
trunk_link = 16
primary = 16
primary_link = 16
secondary = 16
secondary_link = 16
tertiary = 16
unclassified = 16
residential = 16
living_street = 16
service = 16
track = 16
cycleway = 16
path = 16
ferry = 5
pier = 5
obeyPollards = no
obeyOneways = yes
useRestrictions = no
accessTags = bicycle,vehicle,access
accessRestrictionKeys = destination,private,delivery
accessForbiddenKeys = no,private,agricultural,forestery
accessForbiddenDefault = path
A list of highways is given with corresponding average speeds. Additionally, ferries and piers are also accessible. The next three options set if pollards are passable, if oneways should be treated as such and if turn restrictions should be obeyed. Note that this mostly refers to motorized vehicles.
The last four tags are related to handling of the access tags in OSM data. accessTags specifies which tags are of interest for the type of vehicle. Order is important, if multiple tags are found then the leftmost tag will be used to determine the access. accessRestrictionKeys and accessForbiddenKeys each contain a list of access values that indicate either restricted or no access on the way. Finally, accessForbiddenDefault sets the highway types where the vehicle has only access if an explicit access tag allows so. This may be a list as well.