Commit 7406132b authored by Kris Vanneste's avatar Kris Vanneste
Browse files

Added 'wms_version' property to WMSData.

Added print_info method to WMSData.

git-svn-id: 40b490c5-b4d9-47cb-8714-9bef99b524d5
parent 5370854f
...@@ -41,7 +41,28 @@ class WMSData(BasemapData): ...@@ -41,7 +41,28 @@ class WMSData(BasemapData):
:param url: :param url:
str, WMS server URL str, WMS server URL
""" """
def __init__(self, url, layers, verbose=False): def __init__(self, url, layers, wms_version=None, verbose=False):
self.url = url self.url = url
self.layers = layers self.layers = layers
self.wms_version = wms_version
self.verbose = verbose self.verbose = verbose
def print_info(self):
Print some useful information to test WMS service
from owslib.wms import WebMapService
wms = WebMapService(self.url)
print('id: %s, version: %s' %
print('title: %s, abstract: %s' %
print('available layers:')
if self.layers:
layer = self.layers[0]
layer = list(wms.contents)[0]
print('projection options:')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment