joey: thuban/Extensions/wms capabilities.py,1.6,1.7

cvs@intevation.de cvs at intevation.de
Thu Apr 1 16:39:41 CEST 2004


Author: joey

Update of /thubanrepository/thuban/Extensions/wms
In directory doto:/tmp/cvs-serv23127

Modified Files:
	capabilities.py 
Log Message:
Export the used version of the GetCapabilities request, so we can use
it for subsequent calls, i.e. for GetMap requests.

Index: capabilities.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/wms/capabilities.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- capabilities.py	1 Apr 2004 10:17:00 -0000	1.6
+++ capabilities.py	1 Apr 2004 14:39:39 -0000	1.7
@@ -31,6 +31,8 @@
     loadCapabilities(filename)
     printCapabilities()
 
+    getVersion()
+
 Requirements:
     - PyOGCLib <http://www.sourceforge.net/projects/pyogclib>
 
@@ -122,6 +124,8 @@
         if not self.capabilities:
             self.wmsVersion = "1.0"
             self.capabilities = self.getCapabilities(resource, self.wmsVersion)
+            if not self.capabilities:
+                self.wmsVersion = None
 
         if self.capabilities:
             self.grok(self.capabilities)
@@ -158,6 +162,14 @@
 
         print self.capabilities
 
+
+    def getVersion(self):
+        """
+        Returns the WMS protocol version
+
+        If no capabilities could be fetched, None is returned.
+        """
+        return self.wmsVersion
 
 
 if __name__ == "__main__":





More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)