我一直在努力生成一个阴影浮雕来衬托我的 cartopy map 。这srtm_shading example从新区域下载数据非常慢。有什么方法可以改用阴影浮雕图像吗?
这image tiling看起来很有希望,但我无法弄清楚如何在灰度而不是地形中获得阴影浮雕。
最佳答案
我找到了一个 ESRI 阴影浮雕拼贴器并实现了一个调用拼贴器的类。我已提交拉 request ,但与此同时:
from cartopy.io.img_tiles import GoogleTiles
class ShadedReliefESRI(GoogleTiles):
# shaded relief
def _image_url(self, tile):
x, y, z = tile
url = ('https://server.arcgisonline.com/ArcGIS/rest/services/' \
'World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}.jpg').format(
z=z, y=y, x=x)
return url
举个例子:
import matplotlib.pyplot as plt
ax = plt.axes(projection=ShadedReliefESRI().crs)
ax.set_extent([-22, -15, 63, 65])
ax.add_image(ShadedReliefESRI(), 8)
请确保您遵守 ESRI use guidelines .
关于python - Cartopy 阴影浮雕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37423997/