Skip to content

Commit

Permalink
multioutline: only use valid geometries when using explain_validity
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Dec 8, 2024
1 parent 6107da3 commit a4e8443
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ def create(self, data, hwt_alt=0):
print_err(f"multioutline: can't create polygon from outline #{i} - {r}")
else:
try:
polygons.append(p)
r = explain_validity(p)
if r == "Valid Geometry":
polygons.append(p)
else:
print_err(f"multioutline: can't create polygon from outline #{i} - {r}")
except:
print_err(traceback.format_exc())
print_err(f"multioutline: can't create polygon from outline #{i}")
Expand Down

0 comments on commit a4e8443

Please sign in to comment.