joey: thuban/Extensions/wms layer.py,1.1,1.2

cvs@intevation.de cvs at intevation.de
Thu Apr 15 09:40:34 CEST 2004


Author: joey

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

Modified Files:
	layer.py 
Log Message:
Added more documentation

Index: layer.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/wms/layer.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- layer.py	15 Apr 2004 07:13:31 -0000	1.1
+++ layer.py	15 Apr 2004 07:40:32 -0000	1.2
@@ -23,6 +23,13 @@
 class WMSLayer:
     __init__()
 
+    LatLongBoundingBox()
+    BoundingBox()
+
+    getFormat(format)
+    calcFormat(formats)
+
+    GetMapImg(width, height, bbox)
 
 Requirements:
     - PyOGCLib <http://www.sourceforge.net/projects/pyogclib>
@@ -66,6 +73,12 @@
 
 
 class WMSLayer(BaseLayer):
+    """
+    WMS Layer
+
+    This layer incorporates all methods from the Thuban BaseLayer and
+    adds specific methods for operating with a WMS server.
+    """
 
     def __init__(self, title, url):
         """Initializes the WMSLayer.
@@ -147,12 +160,15 @@
 
 
     def LatLongBoundingBox(self):
-        """Return the layer's bounding box in lat-lon.
+        """
+        Return the layer's bounding box in lat-lon
         """
         return self.latlonbbox
 
+
     def BoundingBox(self):
-        """Return the layer's bounding box in the intrinsic coordinate system.
+        """
+        Return the layer's bounding box in the intrinsic coordinate system
         """
         return self.bbox
 
@@ -163,7 +179,11 @@
 
         format -- format as returned by the WMS server
 
-        If no mapping was found, None is returned
+        If no mapping was found, None is returned.
+
+        This routine uses a simple heuristic in order to find the
+        broken down image format to be used with the internal render
+        engine.
 
         An exception rule is implemented in order to not accept
         image/wbmp or WBMP which refers to WAP bitmap format and is
@@ -212,6 +232,16 @@
         
 
     def GetMapImg(self, width, height, bbox):
+        """
+        Retrieve a new map from the WMS server and return it
+
+        width -- width in pixel of the desired image
+        height -- height in pixel of the desired image
+        bbox -- array of min(x,y) max(x,y) in the given SRS
+
+        SRS and used image format will be retrieved from within the
+        layer itself.
+        """
         bbox_dict = { 'minx': bbox[0], 'miny': bbox[1],
                       'maxx': bbox[2], 'maxy': bbox[3] }
 





More information about the Thuban-devel mailing list

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