diff --git a/knime_extension/geospatial_env.yml b/knime_extension/geospatial_env.yml index 5e6aeb3b..43642e95 100644 --- a/knime_extension/geospatial_env.yml +++ b/knime_extension/geospatial_env.yml @@ -21,6 +21,7 @@ dependencies: - mgwr=2.1.2 - numpy=1.23.5 #required to fix problem with latest version of numpy - osmnx=1.3.0 + - polyline 2.0.0 - pulp=2.7.0 - pyproj=3.5.0 - pysal=23.1 diff --git a/knime_extension/src/nodes/spatialnetwork.py b/knime_extension/src/nodes/spatialnetwork.py index c2e35cd8..3019640f 100644 --- a/knime_extension/src/nodes/spatialnetwork.py +++ b/knime_extension/src/nodes/spatialnetwork.py @@ -606,7 +606,7 @@ def update_part(self, model: _OSRMResultModel, df, ns, ne): if data["code"] == "Ok": if model.append_distance(): dfr = pd.DataFrame(data["routes"][0]["legs"])[ - [_COL_DURATION, _COL_DISTANCE] + ["duration", "distance"] ].iloc[::2] # convert seconds to minutes dfr.duration /= 60 diff --git a/knime_extension/src/util/knime_utils.py b/knime_extension/src/util/knime_utils.py index 588e2d6b..eb069217 100644 --- a/knime_extension/src/util/knime_utils.py +++ b/knime_extension/src/util/knime_utils.py @@ -51,6 +51,9 @@ __CELL_TYPE_MULTI_LINE = "GeoMultiLineCell" __CELL_TYPE_MULTI_POLYGON = "GeoMultiPolygonCell" +# The default request header to use in all nodes that perform a web request +WEB_REQUEST_HEADER = {"User-Agent": "KNIME-Geospatial/1.1"} + def geo_point_col_parameter( label: str = __DEF_GEO_COL_LABEL,