From 21f090477254dc40aea339c07a1266c09e6f4ac5 Mon Sep 17 00:00:00 2001 From: Sonja Tripkovic Date: Tue, 13 Apr 2021 15:52:18 +0200 Subject: [PATCH] in geospatial.py: get_geoseries_blockages: #Polygon needs at least 3 nodes --- measprocess/geospatial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/measprocess/geospatial.py b/measprocess/geospatial.py index 90e851b..d426cc6 100644 --- a/measprocess/geospatial.py +++ b/measprocess/geospatial.py @@ -86,7 +86,7 @@ def get_geoseries_blockages(measurement_coords : gpd.GeoSeries, retries : int = blockages = gpd.GeoSeries( Polygon( - ((node.lon, node.lat) for node in way.nodes) + ((node.lon, node.lat) for node in way.nodes if len(way.nodes)>2) # Polygon needs at least 3 nodes ) for way in result.ways ).set_crs("EPSG:4326") -- 2.22.0