Skip to content

Commit 525b7fc

Browse files
authored
Merge pull request #222 from spatial-data-lab/main
Main to release
2 parents c092d95 + 2a1b8ef commit 525b7fc

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

knime_extension/geospatial_env.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ dependencies:
2121
- mgwr=2.1.2
2222
- numpy=1.23.5 #required to fix problem with latest version of numpy
2323
- osmnx=1.3.0
24+
- polyline 2.0.0
2425
- pulp=2.7.0
2526
- pyproj=3.5.0
2627
- pysal=23.1

knime_extension/src/nodes/spatialnetwork.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ def update_part(self, model: _OSRMResultModel, df, ns, ne):
606606
if data["code"] == "Ok":
607607
if model.append_distance():
608608
dfr = pd.DataFrame(data["routes"][0]["legs"])[
609-
[_COL_DURATION, _COL_DISTANCE]
609+
["duration", "distance"]
610610
].iloc[::2]
611611
# convert seconds to minutes
612612
dfr.duration /= 60

knime_extension/src/util/knime_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
__CELL_TYPE_MULTI_LINE = "GeoMultiLineCell"
5252
__CELL_TYPE_MULTI_POLYGON = "GeoMultiPolygonCell"
5353

54+
# The default request header to use in all nodes that perform a web request
55+
WEB_REQUEST_HEADER = {"User-Agent": "KNIME-Geospatial/1.1"}
56+
5457

5558
def geo_point_col_parameter(
5659
label: str = __DEF_GEO_COL_LABEL,

0 commit comments

Comments
 (0)