Skip to content

Commit 15a8a21

Browse files
koebiMichaelsJP
andauthored
feat: add intersections parameter to isochrones (#74)
Co-authored-by: Julian Psotta <[email protected]>
1 parent d5f3610 commit 15a8a21

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Unreleased
22

3+
- add 'intersections'-parameter to isochrones
4+
35
## 2.2.0
46

57
- restrict optimize_waypoints parameter to not trigger when options or 'shortest' is used

openrouteservice/isochrones.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def isochrones(
2828
intervals=None,
2929
segments=None,
3030
interval=None,
31+
intersections=None,
3132
units=None,
3233
location_type=None,
3334
options=None,
@@ -68,6 +69,9 @@ def isochrones(
6869
In meters or seconds.
6970
:type interval: integer
7071
72+
:param intersections: Specifies whether to return intersecting polygons.
73+
:type intersections: boolean
74+
7175
:param units: Specifies the unit system to use when displaying results.
7276
One of ["m", "km", "m"]. Default "m".
7377
:type units: string
@@ -127,6 +131,9 @@ def isochrones(
127131
if units: # pragma: no cover
128132
params["units"] = units
129133

134+
if intersections:
135+
params["intersections"] = intersections
136+
130137
if location_type: # pragma: no cover
131138
params["location_type"] = location_type
132139

test/test_helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"location_type": "destination",
5353
"attributes": ["area", "reachfactor"],
5454
"interval": [PARAM_INT_SMALL],
55+
"intersections": "true",
5556
"options": {"avoid_features": ["highways", "tollways"]},
5657
},
5758
"distance_matrix": {

0 commit comments

Comments
 (0)