From 900defa07c72571ed7659152ae04ecb20e527950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20H=C3=B6rsch?= Date: Thu, 16 Aug 2018 22:12:30 +0200 Subject: [PATCH] fixup! base_network: Add underwater_fraction to links --- scripts/base_network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/base_network.py b/scripts/base_network.py index 93329f06..4c43a557 100644 --- a/scripts/base_network.py +++ b/scripts/base_network.py @@ -262,7 +262,7 @@ def _set_countries_and_substations(n): def _set_links_underwater_fraction(n): offshore_shape = gpd.read_file(snakemake.input.offshore_shapes).set_index('id').unary_union - links = gpd.GeoSeries(n.links.geometry.map(loads)) + links = gpd.GeoSeries(n.links.geometry.map(shapely.wkt.loads)) n.links['underwater_fraction'] = links.intersection(offshore_shape).length / links.length def base_network():