Cartopy wmts KeyError问题:TileMatrixLimits

问题描述 投票:0回答:1

一段时间以来,我正在使用cartopy的wmts函数,但是自上周以来,此函数无法正常工作,返回此错误:]

KeyError:'具有tileMatrix“ 1”的TileMatrixLimits已存在'

运行代码来自cartopy Web文档。

代码下方:

import matplotlib.pyplot as plt
import cartopy.crs as ccrs


def main():
    url = 'https://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi'
    layer = 'VIIRS_CityLights_2012'

    fig = plt.figure()
    ax = fig.add_subplot(1, 1, 1, projection=ccrs.PlateCarree())
    ax.add_wmts(url, layer)
    ax.set_extent([-15, 25, 35, 60], crs=ccrs.PlateCarree())

    ax.set_title('Suomi NPP Earth at night April/October 2012')
    plt.show()


if __name__ == '__main__':
    main()

我不明白怎么了。

感谢您的帮助。

一段时间以来,我正在使用cartopy的wmts函数,但是自上周以来该函数无法正常工作,返回此错误:KeyError:'TileMatrixLimits与tileMatrix“ 1”已存在'运行...

python-3.x matplotlib cartopy
1个回答
0
投票

您可以通过注释(您的Python目录)/Lib/site-packages/owslib/wmts.py

© www.soinside.com 2019 - 2024. All rights reserved.