Skip to content

Commit f9c9dab

Browse files
authored
Merge pull request #538 from guziy/fix-drawcoastlines
This pull request fixes drawcoastlines issue #512 by discarding empty coastline segments.
2 parents 31181e2 + 774b4d1 commit f9c9dab

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/basemap/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
basemap_data >= 1.3, < 1.4
1+
basemap_data >= 1.3.2, < 1.4
22

33
numpy >= 1.11, < 1.12; python_version == "2.6"
44
numpy >= 1.16, < 1.17; python_version == "2.7"

packages/basemap/src/mpl_toolkits/basemap/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,7 @@ def __init__(self, llcrnrlon=None, llcrnrlat=None,
11301130
# replace coastsegs with line segments (instead of polygons)
11311131
self.coastsegs, types =\
11321132
self._readboundarydata('gshhs',as_polygons=False)
1133+
self.coastsegs = [sg for sg in self.coastsegs if len(sg) > 0]
11331134
# create geos Polygon structures for land areas.
11341135
# currently only used in is_land method.
11351136
self.landpolygons=[]

0 commit comments

Comments
 (0)