enable shapely speedups
This commit is contained in:
parent
d2c53e0c3d
commit
f1aab8b1e4
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue