enable shapely speedups
@@ -3,9 +3,14 @@ from itertools import chain
import matplotlib.pyplot as plt
from matplotlib.patches import PathPatch
from matplotlib.path import Path
+from shapely import speedups
from shapely.geometry import LineString, Polygon
+if speedups.available:
+ speedups.enable()
+
+
def clean_geometry(geometry):
"""
if the given geometry is a Polygon and invalid, try to make it valid if it results in a Polygon (not MultiPolygon)
