Skip to content
Snippets Groups Projects
Commit 32706cd9 authored by Rudolf, Michael's avatar Rudolf, Michael
Browse files

Added exception for shape parameter calculation

parent b4fd29a0
No related branches found
No related tags found
No related merge requests found
......@@ -1233,10 +1233,14 @@ def flattening(shapes: gp.GeoDataFrame) -> list:
success = ellipse.estimate(xy)
if success:
_, _, a, b, theta = ellipse.params
aa.append(round(a, 2))
bb.append(round(b, 2))
tt.append(round(theta, 1))
try:
flattn.append(round((a - b) / a, 1))
except ZeroDivisionError:
flattn.append(0)
return (aa, bb, tt, flattn)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment