Changeset 2602 for TI02-CSML


Ignore:
Timestamp:
18/06/07 15:34:56 (12 years ago)
Author:
domlowe
Message:

getBoundingBox method added to csml.parser.Dataset

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/csml/API/ops_Dataset.py

    r2431 r2602  
    7575def getBoundingBox(self): 
    7676    ''' get boundingBox, returns the boundingBox of the CSMLFeatureCollection (assumes there is only one...)''' 
    77     print self.CSMLFeatureCollection.boundedBy 
     77    try: 
     78        lower1=eval(self.featureCollection.boundedBy.lowerCorner.CONTENT.split()[0]) 
     79        lower2=eval(self.featureCollection.boundedBy.lowerCorner.CONTENT.split()[1]) 
     80        upper1=eval(self.featureCollection.boundedBy.upperCorner.CONTENT.split()[0]) 
     81        upper2=eval(self.featureCollection.boundedBy.upperCorner.CONTENT.split()[1]) 
     82        return [lower1,lower2,upper1,upper2] 
     83    except: 
     84        return [] 
Note: See TracChangeset for help on using the changeset viewer.