Skip to content

Commit

Permalink
Catch GEOSException, as recommended in #66
Browse files Browse the repository at this point in the history
  • Loading branch information
tomalrussell committed Nov 13, 2023
1 parent a64af79 commit 51c779f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/snkit/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ def _intersects(
buf = geom
try:
return _intersects_gdf(buf, gdf)
except shapely.errors.TopologicalError:
except (shapely.errors.TopologicalError, shapely.errors.GEOSException):
# can exceptionally buffer to an invalid geometry, so try re-buffering
buf = buf.buffer(0)
return _intersects_gdf(buf, gdf)
Expand Down

0 comments on commit 51c779f

Please sign in to comment.