Python 将ArcGIS静止图像拉入cartopy
有没有办法把美国地质调查局网站上的图片输入到cartopy中 四处窥探,我想Python 将ArcGIS静止图像拉入cartopy,python,arcgis,cartopy,Python,Arcgis,Cartopy,有没有办法把美国地质调查局网站上的图片输入到cartopy中 四处窥探,我想 ax.add_wms( wms='https://services.nationalmap.gov/arcgis/services/USGSNAIPImagery/ImageServer/WMSServer?request=GetCapabilities&service=WMS', layers=[ '0' ], ) 将抓取图像层。但我有以下例外 /home/yosuke/minicond
ax.add_wms(
wms='https://services.nationalmap.gov/arcgis/services/USGSNAIPImagery/ImageServer/WMSServer?request=GetCapabilities&service=WMS',
layers=[ '0' ],
)
将抓取图像层。但我有以下例外
/home/yosuke/miniconda3/envs/plotter/lib/python3.9/site-packages/cartopy/mpl/slippy_image_artist.py in draw(self, renderer, *args, **kwargs)
57 [x1, y1], [x2, y2] = ax.viewLim.get_points()
58 if not self.user_is_interacting:
---> 59 located_images = self.raster_source.fetch_raster(
60 ax.projection, extent=[x1, x2, y1, y2],
61 target_resolution=(window_extent.width, window_extent.height))
/home/yosuke/miniconda3/envs/plotter/lib/python3.9/site-packages/cartopy/io/ogc_clients.py in fetch_raster(self, projection, extent, target_resolution)
307 located_images = []
308 for wms_extent in wms_extents:
--> 309 located_images.append(self._image_and_extent(wms_proj, wms_srs,
310 wms_extent,
311 projection, extent,
/home/yosuke/miniconda3/envs/plotter/lib/python3.9/site-packages/cartopy/io/ogc_clients.py in _image_and_extent(self, wms_proj, wms_srs, wms_extent, output_proj, output_extent, target_resolution)
278 output_extent, target_resolution):
279 min_x, max_x, min_y, max_y = wms_extent
--> 280 wms_image = self.service.getmap(layers=self.layers,
281 srs=wms_srs,
282 bbox=(min_x, min_y, max_x, max_y),
/home/yosuke/miniconda3/envs/plotter/lib/python3.9/site-packages/owslib/map/wms111.py in getmap(self, layers, styles, srs, bbox, format, size, time, transparent, bgcolor, exceptions, method, timeout, **kwargs)
260 self.request = bind_url(base_url) + data
261
--> 262 u = openURL(base_url, data, method, timeout=timeout or self.timeout, auth=self.auth)
263
264 # check for service exceptions, and return
/home/yosuke/miniconda3/envs/plotter/lib/python3.9/site-packages/owslib/util.py in openURL(url_base, data, method, cookies, username, password, timeout, headers, verify, cert, auth)
233 if serviceException is not None:
234 # and we need to deal with some message nesting
--> 235 raise ServiceException('\n'.join([t.strip() for t in serviceException.itertext() if t.strip()]))
236
237 return ResponseWrapper(req)
ServiceException: Parameter 'srs' contains unacceptable value.
我以为服务器不能使用我使用的投影,但我使用的是WebMercator投影,我认为应该没有问题
fig.add_subplot( *pos, projection=ccrs.Mercator.GOOGLE)
添加wms是否合适?或者其他我应该用的东西
多谢各位