From 94930dde48bedcc492758e933a98e67f449a0cb2 Mon Sep 17 00:00:00 2001 From: nmatsuda Date: Wed, 23 Aug 2023 17:00:00 -0700 Subject: [PATCH] fixed shapely MultiLineString version issue see https://gis.stackexchange.com/questions/456266/error-of-multilinestring-object-is-not-iterable --- mapconverter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mapconverter.py b/mapconverter.py index d407474..5e7983a 100644 --- a/mapconverter.py +++ b/mapconverter.py @@ -38,7 +38,7 @@ def extractLines(shapefile, tolerance): elif(simplified.geom_type == "MultiPolygon" or simplified.geom_type == "Polygon"): if(simplified.boundary.geom_type == "MultiLineString"): - for boundary in simplified.boundary: + for boundary in simplified.boundary.geoms: outlist.extend(convertLinestring(boundary)) else: outlist.extend(convertLinestring(simplified.boundary))