joey: thuban/Extensions/wms parser.py,1.2,1.3

cvs@intevation.de cvs at intevation.de
Tue Mar 30 20:05:56 CEST 2004


Author: joey

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

Modified Files:
	parser.py 
Log Message:
Removed integrity test since it was only implemented due to a
misunderstanding.

Index: parser.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/wms/parser.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- parser.py	30 Mar 2004 17:25:20 -0000	1.2
+++ parser.py	30 Mar 2004 18:05:53 -0000	1.3
@@ -183,61 +183,10 @@
                 self.layers[index]['bbox'][srs][corner] \
                     = foo.attributes.get(corner).nodeValue
             
-        # Check for integrity
-        self.checkLayerSRS(index)
-
         # Traverse subsidiary layers
         sublayer = getElementsByName(top, 'Layer')
         for l in sublayer:
             self.peekLayers(l, index)
-
-
-    def checkLayerSRS(self, index):
-        """
-        Checks the integrity of the underlying XML data.
-
-        This is done by comparing the <SRS> elements with the
-        calculated list from the BoundingBox elements.
-
-        index -- position in the layers array to check
-        """
-
-        pivot = index
-        calculated = []
-        while pivot != -1:
-            if 'bbox' in self.layers[pivot]:
-                for srs in self.layers[pivot]['bbox'].keys():
-                    if srs not in calculated:
-                        calculated.append(srs)
-            pivot = self.layers[pivot]['parent']
-
-        pivot = index
-        specified = []
-        while pivot != -1:
-            if 'srs' in self.layers[pivot]:
-                for srs in self.layers[pivot]['srs']:
-                    if srs not in specified:
-                        specified.append(srs)
-            pivot = self.layers[pivot]['parent']
-
-        equal = True
-        # Check for same number of elements
-        if len(calculated) != len(specified):
-            equal = False
-
-        # Loop through all elements for existance
-        for elm in calculated:
-            if elm not in specified:
-                equal = False
-
-        if not equal:
-            if self.srs_discrepancies is None:
-                self.srs_discrepancies = []
-            if 'name' in self.layers[index]:
-                id = "name:%s" % self.layers[index]['name']
-            else:
-                id = "title:%s" % self.layers[index]['title']
-            self.srs_discrepancies.append(id)
 
 
     def getTitle(self):





More information about the Thuban-devel mailing list

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