4141import cartopy .mpl .patch as cpatch
4242from cartopy .mpl .slippy_image_artist import SlippyImageArtist
4343from cartopy .vector_transform import vector_scalar_to_grid
44+ from cartopy .io import Downloader
4445
4546
4647assert mpl .__version__ >= '1.5.1' , ('Cartopy is only supported with '
@@ -1005,11 +1006,13 @@ def stock_img(self, name='ne_shaded'):
10051006 """
10061007 Add a standard image to the map.
10071008
1008- Currently, there are 2 options.
1009- 1: 'ne_shaded'(default) a downsampled version of the Natural Earth shaded relief raster.
1010- 2: 'etopo1' a downsampled version of global relief model of Earth's surface that
1011- integrates land topography and ocean bathymetry. This option is the same as the etopo1
1012- from Basemap.
1009+ Currently, there are 2 options:
1010+
1011+ 1. 'ne_shaded'(default) a downsampled version of the Natural Earth
1012+ shaded relief raster.
1013+ 2. 'etopo' a downsampled version of global relief model of Earth's
1014+ surface that integrates land topography and ocean bathymetry. This
1015+ option is the same as the etopo from Basemap.
10131016 """
10141017 if name == 'ne_shaded' :
10151018 import os
@@ -1021,11 +1024,15 @@ def stock_img(self, name='ne_shaded'):
10211024 return self .imshow (imread (fname ), origin = 'upper' ,
10221025 transform = source_proj ,
10231026 extent = [- 180 , 180 , - 90 , 90 ])
1024- elif name == 'etopo1 ' :
1027+ elif name == 'etopo ' :
10251028 import os
10261029 source_proj = ccrs .PlateCarree ()
1027- fname = os .path .join (config ["repo_data_dir" ],
1028- 'raster' , 'etopo1.jpg' )
1030+
1031+ url_template = 'https://www.ngdc.noaa.gov/mgg/image/{name}.jpg'
1032+ target_path_template = os .path .join (config ["data_dir" ],
1033+ 'raster' , '{name}.jpg' )
1034+ d = Downloader (url_template , target_path_template )
1035+ fname = d .path ({'name' : 'color_etopo1_ice_low' })
10291036
10301037 return self .imshow (imread (fname ), origin = 'upper' ,
10311038 transform = source_proj ,
0 commit comments