Skip to content

Commit

Permalink
Merge pull request #222 from spatial-data-lab/main
Browse files Browse the repository at this point in the history
Main to release
  • Loading branch information
koettert committed May 23, 2023
2 parents c092d95 + 2a1b8ef commit 525b7fc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions knime_extension/geospatial_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion knime_extension/src/nodes/spatialnetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions knime_extension/src/util/knime_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 525b7fc

Please sign in to comment.