Skip to content

Commit

Permalink
Workaround for newer GEOS versions.
Browse files Browse the repository at this point in the history
See also #484
  • Loading branch information
joernu76 committed Aug 4, 2020
1 parent 0216074 commit a9c274e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/mpl_toolkits/basemap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,10 @@ def _readboundarydata(self,name,as_polygons=False):
# convert polygons to line segments
poly = _geoslib.LineString(poly.boundary)
else:
# this is a workaround to avoid
# GEOS_ERROR: CGAlgorithmsDD::orientationIndex encountered NaN/Inf numbers
b[np.isposinf(b)] = 1e20
b[np.isneginf(b)] = -1e20
poly = Shape(b)
# this is a workaround to avoid
# "GEOS_ERROR: TopologyException:
Expand Down

0 comments on commit a9c274e

Please sign in to comment.