| 1 |
>>> from owslib.wms import WebMapService |
| 2 |
>>> wms = WebMapService('http://geoserv.weichand.de:8080/geoserver/wms') |
| 3 |
|
| 4 |
>>> res1 = wms.getfeatureinfo(layers=['bvv:lkr_ex'], srs='EPSG:31468', bbox=(4500000,5500000,4500500,5500500), size=(500,500), format='image/jpeg', info_format="text/html", xy=(250,250)) |
| 5 |
>>> html_string1 = res1.read().decode("utf-8") |
| 6 |
>>> ('lkr_ex' in html_string1) |
| 7 |
True |
| 8 |
>>> ('gmd_ex' in html_string1) |
| 9 |
False |
| 10 |
|
| 11 |
>>> res2 = wms.getfeatureinfo(layers=['bvv:lkr_ex','bvv:gmd_ex'], srs='EPSG:31468', bbox=(4500000,5500000,4500500,5500500), size=(500,500), format='image/jpeg', info_format="text/html", xy=(250,250)) |
| 12 |
>>> html_string2 = res2.read().decode("utf-8") |
| 13 |
>>> ('lkr_ex' in html_string2) |
| 14 |
True |
| 15 |
>>> ('gmd_ex' in html_string2) |
| 16 |
True |
| 17 |
|
| 18 |
>>> res3 = wms.getfeatureinfo(layers=['bvv:lkr_ex','bvv:gmd_ex'], srs='EPSG:31468', bbox=(4500000,5500000,4500500,5500500), size=(500,500), format='image/jpeg', query_layers=['bvv:lkr_ex'], info_format="text/html", xy=(250,250)) |
| 19 |
>>> wms.request |
| 20 |
'http://geoserv.weichand.de:8080/geoserver/wms?SERVICE=WMS&layers=bvv%3Alkr_ex%2Cbvv%3Agmd_ex&styles=&feature_count=20&y=250&query_layers=bvv%3Alkr_ex&service=WMS&srs=EPSG%3A31468&format=image%2Fjpeg&request=GetFeatureInfo&bgcolor=0xFFFFFF&height=500&width=500&version=1.1.1&bbox=4500000%2C5500000%2C4500500%2C5500500&kwargs=%7B%7D&exceptions=application%2Fvnd.ogc.se_xml&x=250&info_format=text%2Fhtml&transparent=FALSE' |
| 21 |
>>> html_string3 = res3.read().decode("utf-8") |
| 22 |
>>> ('lkr_ex' in html_string3) |
| 23 |
True |
| 24 |
>>> ('gmd_ex' in html_string3) |
| 25 |
False |
| 26 |
|