Ignore:
Timestamp:
22/10/08 10:44:34 (11 years ago)
Author:
domlowe
Message:

various small changes to csml backend

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows/trunk/cows/service/imps/csmlbackend/csmlcommon.py

    r4289 r4351  
    99import ConfigParser 
    1010log = logging.getLogger(__name__) 
     11from cows.bbox_util import union 
    1112  
    1213try: 
     
    2930        self.connector=CSMLConnector() 
    3031     
    31     def _getInfo(self, feature): 
     32    def getInfo(self, feature): 
    3233        ''' given a csml feature, return basic info about the layer/feature 
    3334        @return:   title, abstract''' 
     
    5152        pass 
    5253     
    53     def get_csml_doc(self, fileoruri): 
     54    def getCsmlDoc(self, fileoruri): 
    5455        """ 
    5556        Gets a csml document from file or exist when passed a file name or uri          
     
    8687     
    8788class BboxAggregator(object): 
    88     """ class to handle aggregations of bounding boxes (in the same crs)""" 
     89    """ class to handle aggregations of bounding boxes (in the same crs) and store state for further comparisons""" 
    8990    def __init__(self, initialbbox): 
    9091        """  
     
    99100#        log.debug('Comparing new bbox %s with old bbox %s'%(newbbox, self.bbox)) 
    100101        #compare new box with old. 
    101         if newbbox[0] < self.bbox[0]: 
    102             self.bbox[0]=newbbox[0] 
    103         if newbbox[1] < self.bbox[1]: 
    104             self.bbox[1]=newbbox[1] 
    105         if newbbox[2] > self.bbox[2]: 
    106             self.bbox[2]=newbbox[2] 
    107         if newbbox[3] > self.bbox[3]: 
    108             self.bbox[3]=newbbox[3] 
    109         return self.bbox 
     102        return union(self.bbox, newbbox) 
Note: See TracChangeset for help on using the changeset viewer.