source: TI02-CSML/trunk/csml/API/csmlbbox.py @ 2890

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI02-CSML/trunk/csml/API/csmlbbox.py@2890
Revision 2890, 733 bytes checked in by domlowe, 13 years ago (diff)

getNativeCRS() method added to feature

Line 
1
2class CSMLBoundingBox(object):
3    """ class to represent an EnvelopeWithTimePeriod Bounding Box """
4    def __init__(self, envelope):
5        self.envelope=envelope
6        self.minX=eval(self.envelope.lowerCorner.CONTENT.split()[0])
7        self.minY=eval(self.envelope.lowerCorner.CONTENT.split()[1])
8        self.maxX=eval(self.envelope.upperCorner.CONTENT.split()[0])
9        self.maxY=eval(self.envelope.upperCorner.CONTENT.split()[1])
10   
11    def getCRSName(self):
12        return self.envelope.srsName     
13     
14    def getBox(self):
15        return [self.minX, self.minY, self.maxX, self.maxY]
16   
17    def getTimeLimits(self):
18        return [self.envelope.beginPosition.CONTENT,self.envelope.endPosition.CONTENT]
19       
Note: See TracBrowser for help on using the repository browser.