Skip to content

Routing Options

For advanced options formatted as json object. For structure refer to the examples. The available parameters are:

  • avoid_features : array of features to avoid. The available features are :

    FeatureAvailable for
    highwaysdriving-*
    tollwaysdriving-*
    ferriesdriving-*, cycling-*, foot-*, wheelchair
    fordsdriving-*, cycling-*, foot-*
    stepscycling-*, foot-*, wheelchair
  • avoid_borders : "all" for no border crossing. "controlled" to cross open borders but avoid controlled ones. Only for driving-* profiles.

  • avoid_countries : array of country ids to exclude from routing with driving-* profiles. Can be used together with "avoid_borders": "controlled". "[11,193]" would exclude Austria and Switzerland. List of countries and application examples can be found in the country list.

  • vehicle_type (for profile=driving-hgv only): hgv,bus,agricultural,delivery,forestry and goods. It is needed for vehicle restrictions to work.

  • profile_params : Specifies additional routing parameters.

    • weightings: Weightings will prioritize specified factors over the shortest path.

      • steepness_difficulty: Specifies the fitness level for cycling-* profiles.

        • level: 0 = Novice, 1 = Moderate, 2 = Amateur, 3 = Pro. The prefered gradient increases with level
      • green: Specifies the Green factor for foot-* profiles.

        • factor: Values range from 0 to 1. 0 equals normal routing. 1 will prefer ways through green areas over a shorter route.
      • quiet: Specifies the Quiet factor for foot-* profiles.

        • factor: Values range from 0 to 1. 0 equals normal routing. 1 will prefer quiet ways over a shorter route.
    • restrictions : Specifies restrictions for driving-hgv, wheelchair or cycling-* profiles.

      • for cycling-*:

        ParameterDescription
        gradientOnly for avoided hills or specified steepness_difficulty. Specifies the maximum route steepness in percent. Values range from 1 to 15. Routes with a higher gradient are avoided.
      • for driving-hgv: (you have to specify the vehicle_type in the options for these parameters)

        ParameterDescription
        lengthLength restriction in meters.
        widthWidth restriction in meters.
        heightHeight restriction in meters.
        axleloadAxleload restriction in tons.
        weightWeight restriction in tons.
        hazmatSpecifies whether to use appropriate routing for delivering hazardous goods and avoiding water protected areas. Default is false.
      • for wheelchair:

        ParameterDescription
        surface_typeSpecifies the minimum surface type. Default is "cobblestone:flattened".
        track_typeSpecifies the minimum grade of the route. Default is "grade1".
        smoothness_typeSpecifies the minimum smoothness of the route. Default is "good".
        maximum_sloped_kerbSpecifies the maximum height of the sloped kerb in meters. Values are 0.03, 0.06(default), 0.1 or any.
        maximum_inclineSpecifies the maximum incline as a percentage. 3, 6(default), 10, 15 or any.
        minimum_widthSpecifies the minimum width of a road in meters.
  • avoid_polygons : Comprises areas to be avoided for the route. Formatted as geojson polygon or geojson multipolygon.

URL Encoding

To use the curl command string you have to encode special characters. Values you need are shown in this table:

Character{|}"[]
Encoding%7B%7C%7D%22%5B%5D

Sometimes needs to be used for the options object.