- cascaded_union() method will be deprecated in Shapely 1.8 in favor of unary_union; replaced the usage of cascaded_union with unary_union in all the app

This commit is contained in:
Marius Stanciu
2020-10-21 13:55:41 +03:00
committed by Marius
parent 265028de76
commit 66a3e36701
26 changed files with 116 additions and 115 deletions

View File

@@ -11,7 +11,7 @@ from appGUI.GUIElements import FCEntry
from shapely.ops import nearest_points
from shapely.geometry import Point, MultiPolygon
from shapely.ops import cascaded_union
from shapely.ops import unary_union
import math
import logging
@@ -113,12 +113,12 @@ class DistanceMin(AppTool):
try:
selected_objs[0].solid_geometry = MultiPolygon(selected_objs[0].solid_geometry)
except Exception:
selected_objs[0].solid_geometry = cascaded_union(selected_objs[0].solid_geometry)
selected_objs[0].solid_geometry = unary_union(selected_objs[0].solid_geometry)
try:
selected_objs[1].solid_geometry = MultiPolygon(selected_objs[1].solid_geometry)
except Exception:
selected_objs[1].solid_geometry = cascaded_union(selected_objs[1].solid_geometry)
selected_objs[1].solid_geometry = unary_union(selected_objs[1].solid_geometry)
first_pos, last_pos = nearest_points(selected_objs[0].solid_geometry, selected_objs[1].solid_geometry)