Skip to content

Commit 06ade30

Browse files
committed
Discard empty coastline segments
1 parent cbbc2e4 commit 06ade30

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)