cartopy.io.ogc_clients.WMTSRasterSource#

class cartopy.io.ogc_clients.WMTSRasterSource(wmts, layer_name, gettile_extra_kwargs=None)[源代码]#

一个WMTS图像检索器,可以添加到地图。

使用切片缓存进行快速重复的地图检索。

备注

需要owslib和Pillow才能工作。

参数:
  • wmts -- WMSG或owslib.wmts. WebMapTilService实例的URL。

  • layer_name -- 要使用的图层的名称。

  • gettile_extra_kwargs (dict, optional) -- 传递到服务的gettile方法的额外关键字(例如时间)。

fetch_raster(projection, extent, target_resolution)[源代码]#

返回带有范围的图像序列,并给定一些约束信息。

参数:
  • projection (cartopy.crs.Projection) -- 所需的图像投影。

  • extent (iterable of length 4) -- 所请求图像在投影坐标中的范围。生成的图像可能没有由这些范围精确定义,因此也会返回生成的图像的范围。范围必须以以下形式定义 (min_x, max_x, min_y, max_y) .

  • target_resolution (iterable of length 2) -- 图像的所需分辨率为 (width, height) 以像素为单位。

返回:

images --一系列 LocatedImage 实例.

layer#

要获取的层。

validate_projection(projection)[源代码]#

如果此格栅源无法提供指定投影中的图像,则引发错误。

参数:

projection (cartopy.crs.Projection) -- 所需的图像投影。

wmts#

OWSLib WebMapTilService实例。