Hello,
using OWSLib's WebMapService, one may browse the details of a WMS
layer (see [1]).
I notice that the <MetadataURL> element is not supported (see [2])
whereas it is defined as an optional child element of <Layer> in the
WMS GetCapabilities specifications.
The attached patch adds the support of MetadataURL. Would it be useful
to create a ticket and join this patch? If yes, what is the procedure
to do so?
Best regards,
Alexandre
[1] http://gispython.org/owslib/docs/en/trunk/#wms
[2] http://trac.gispython.org/lab/browser/OWSLib/trunk/owslib/wms.py#L303
Index: owslib/wms.py
===================================================================
--- owslib/wms.py (revision 1734)
+++ owslib/wms.py (working copy)
@@ -424,6 +424,16 @@
if extent.attrib.get("name").lower() =='time':
self.timepositions=extent.text.split(',')
break
+
+ # MetadataURLs
+ self.metadataUrls = []
+ for m in elem.findall('MetadataURL'):
+ metadataUrl = {
+ 'type': m.attrib['type'],
+ 'format': m.find('Format').text.strip(),
+ 'url': m.find('OnlineResource').attrib['{http://www.w3.org/1999/xlink}href']
+ }
+ self.metadataUrls.append(metadataUrl)
self.layers = []
for child in elem.findall('Layer'):
_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community