@@ -37,11 +37,13 @@ def directions(client,
37
37
geometry_simplify = None ,
38
38
instructions = None ,
39
39
instructions_format = None ,
40
+ alternative_routes = None ,
40
41
roundabout_exits = None ,
41
42
attributes = None ,
42
43
maneuvers = None ,
43
44
radiuses = None ,
44
45
bearings = None ,
46
+ skip_segments = None ,
45
47
continue_straight = None ,
46
48
elevation = None ,
47
49
extra_info = None ,
@@ -103,6 +105,12 @@ def directions(client,
103
105
One of ["text", "html"]. Default "text".
104
106
:type instructions_format: string
105
107
108
+ :param alternative_routes: Specifies whether alternative routes are computed,
109
+ and parameters for the algorithm determining suitable alternatives. Expects
110
+ 3 keys: share_factor (float), target_count (int), weight_factor (float).
111
+ More on https://openrouteservice.org/dev/#/api-docs/v2/directions/{profile}/geojson/post.
112
+ :type alternative_routes: dict[int|float]
113
+
106
114
:param roundabout_exits: Provides bearings of the entrance and all passed
107
115
roundabout exits. Adds the 'exit_bearings' array to the 'step' object
108
116
in the response. Default False.
@@ -137,6 +145,11 @@ def directions(client,
137
145
waypoint may be reached.
138
146
:type bearings: list or tuple or lists or tuples
139
147
148
+ :param skip_segments: Specifies the segments that should be skipped in the route calculation.
149
+ A segment is the connection between two given coordinates and the counting starts with 1
150
+ for the connection between the first and second coordinate.
151
+ :type skip_segments: list[int]
152
+
140
153
:param continue_straight: Forces the route to keep going straight at waypoints
141
154
restricting u-turns even if u-turns would be faster. This setting
142
155
will work for all profiles except for driving-*. In this case you will
@@ -159,7 +172,7 @@ def directions(client,
159
172
:param optimized: If set False, forces to not use Contraction Hierarchies.
160
173
:type optimized: bool
161
174
162
- :param options: Refer to https://go. openrouteservice.org/documentation for
175
+ :param options: Refer to https://openrouteservice.org/dev/#/api-docs/v2/directions/{profile}/geojson/post for
163
176
detailed documentation. Construct your own dict() following the example
164
177
of the minified options object. Will be converted to json automatically.
165
178
:type options: dict
@@ -222,6 +235,9 @@ def directions(client,
222
235
if instructions_format :
223
236
params ["instructions_format" ] = instructions_format
224
237
238
+ if alternative_routes :
239
+ params ["alternative_routes" ] = alternative_routes
240
+
225
241
if roundabout_exits is not None :
226
242
params ["roundabout_exits" ] = roundabout_exits
227
243
@@ -237,6 +253,9 @@ def directions(client,
237
253
if bearings :
238
254
params ["bearings" ] = bearings
239
255
256
+ if skip_segments :
257
+ params ["skip_segments" ] = skip_segments
258
+
240
259
if continue_straight is not None :
241
260
params ["continue_straight" ] = continue_straight
242
261
0 commit comments