From 35970763f3ec85676cf9fcc14f41fee25c7de198 Mon Sep 17 00:00:00 2001 From: An Tran Date: Tue, 14 Jul 2020 18:51:12 +0800 Subject: [PATCH 1/2] relaxing the 'GDAL==2.4.0' requirement --- environment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index 111aaa7..38b68ec 100644 --- a/environment.yml +++ b/environment.yml @@ -11,11 +11,11 @@ dependencies: - geopandas=0.5.0 - opencv=3.4.4 - numpy=1.16.3 - - gdal=2.4.0 - rtree=0.8.3 - networkx=2.3 - rasterio=1.0.22 - scipy=1.2.1 - scikit-image=0.15.0 - pip: - - affine==2.2.2 \ No newline at end of file + - affine==2.2.2 + - GDAL>=2.2.0 From d7c219e455523b73b79cc56b9aa5333d396b6f3f Mon Sep 17 00:00:00 2001 From: An Tran Date: Tue, 14 Jul 2020 18:54:49 +0800 Subject: [PATCH 2/2] changing G_.node -> G_.nodes for apls working in networkx>=2.4 --- apls/apls_utils.py | 2 +- environment.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apls/apls_utils.py b/apls/apls_utils.py index 5b920e4..f02f151 100644 --- a/apls/apls_utils.py +++ b/apls/apls_utils.py @@ -192,7 +192,7 @@ def G_to_kdtree(G_, x_coord='x', y_coord='y', verbose=False): # populate node array t1 = time.time() for i, n in enumerate(G_.nodes()): - n_props = G_.node[n] + n_props = G_.nodes[n] if x_coord == 'lon': lat, lon = n_props['lat'], n_props['lon'] x, y = lon, lat diff --git a/environment.yml b/environment.yml index 38b68ec..239c040 100644 --- a/environment.yml +++ b/environment.yml @@ -12,10 +12,10 @@ dependencies: - opencv=3.4.4 - numpy=1.16.3 - rtree=0.8.3 - - networkx=2.3 - rasterio=1.0.22 - scipy=1.2.1 - scikit-image=0.15.0 - pip: - affine==2.2.2 - GDAL>=2.2.0 + - networkx>=2.4