本文整理汇总了Python中owslib.wms.WebMapService.getfeatureinfo方法的典型用法代码示例。如果您正苦于以下问题:Python WebMapService.getfeatureinfo方法的具体用法?Python WebMapService.getfeatureinfo怎么用?Python WebMapService.getfeatureinfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类owslib.wms.WebMapService
的用法示例。
在下文中一共展示了WebMapService.getfeatureinfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: WebMapService
# 需要导入模块: from owslib.wms import WebMapService [as 别名]
# 或者: from owslib.wms.WebMapService import getfeatureinfo [as 别名]
from owslib.wms import WebMapService
wms = WebMapService('http://212.26.144.110/geowebcache/service/wms', version='1.1.1')
wms.getfeatureinfo(layers='kadastr', query_layers='kadastr',styles='',
info_format='application/vnd.ogc.gml',srs='EPSG:900913')
示例2: WebMapService
# 需要导入模块: from owslib.wms import WebMapService [as 别名]
# 或者: from owslib.wms.WebMapService import getfeatureinfo [as 别名]
__author__ = 'Juergen Weichand'
from owslib.wms import WebMapService
wms = WebMapService('http://geoserv.weichand.de:8080/geoserver/wms')
# GetMap (image/jpeg)
response = wms.getmap(
layers=['bvv:gmd_ex'],
srs='EPSG:31468',
bbox=(4500000,5500000,4505000,5505000),
size=(500,500),
format='image/jpeg')
out = open('/tmp/getmap-response.jpeg', 'wb')
out.write(response.read())
out.close()
# GetFeatureInfo (text/html)
response = wms.getfeatureinfo(
layers=['bvv:gmd_ex'],
srs='EPSG:31468',
bbox=(4500000,5500000,4505000,5505000),
size=(500,500),
format='image/jpeg',
query_layers=['bvv:gmd_ex'],
info_format="text/html",
xy=(250,250))
out = open('/tmp/getfeatureinfo-response.html', 'wb')
out.write(response.read())
out.close()