我正在尝试使用Cartopy offline绘制地图。我找到了这篇文章:Location of stored offline data for cartopy然而,在将下载文件所在的cartopy.config['data_dir']更改为'C:/...'后,当我尝试绘制海岸线时,它仍然想要下载地图。
cartopy.config['data_dir'] = '.../CartopyMaps'
ax = plt.axes(projection=ccrs.PlateCarree())
ax.coastlines()控制台显示:
Downloading:
http://naciscdn.org/naturalearth/110m/physical/ne_110m_coastline.zip但是,我在.../CartopyMaps/shapefiles/natural_earth/physical/中有ne_110m_coastline dbf、shp和shx文件
为什么Cartopy看不到我的本地地图,我该如何帮助它?
发布于 2020-04-02 00:51:25
尝试使用"pre_existing_data_dir“路径而不是"data_dir”。
from os.path import expanduser
import cartopy
cartopy.config['pre_existing_data_dir'] = expanduser('~/cartopy-data/')https://stackoverflow.com/questions/55114417
复制相似问题