Changeset 2326


Ignore:
Timestamp:
26/03/07 13:00:05 (12 years ago)
Author:
domlowe
Message:

fixed beginPosition and endPosition in envelope

Location:
TI02-CSML/trunk/csml
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/csml/csmllibs/csmlextra.py

    r2215 r2326  
    2828        self.maxX=self.envelope.upperCorner.CONTENT.split()[0] 
    2929        self.maxY=self.envelope.upperCorner.CONTENT.split()[1] 
    30         self.t1= strToDate(self.envelope.timePosition[0].CONTENT) 
    31         self.t2= strToDate(self.envelope.timePosition[1].CONTENT) 
     30        self.t1= strToDate(self.envelope.beginPosition.CONTENT) 
     31        self.t2= strToDate(self.envelope.endPosition.CONTENT) 
    3232  
    3333    def _compareLowerCorners(self,lowerCorner): 
     
    6767            self._compareLowerCorners(envtocheck.lowerCorner) 
    6868            self._compareUpperCorners(envtocheck.upperCorner) 
    69             self._compareLowerTimes(envtocheck.timePosition[0].CONTENT) 
    70             self._compareUpperTimes(envtocheck.timePosition[1].CONTENT) 
     69            self._compareLowerTimes(envtocheck.beginPosition.CONTENT) 
     70            self._compareUpperTimes(envtocheck.endPosition.CONTENT) 
    7171     
    7272    def getAggregatedEnvelope(self): 
    73         self.envelope.timePosition=[csml.parser.csString(str(self.t1)), csml.parser.csString(str(self.t2))] #convert from datetime types 
     73        self.envelope.beginPosition=csml.parser.csString(str(self.t1)) #convert from datetime types 
     74        self.envelope.endPosition=csml.parser.csString(str(self.t2))  
    7475        return self.envelope 
    7576 
     
    189190        env.lowerCorner=csml.parser.csString(minlon + ' ' + minlat) 
    190191        env.upperCorner=csml.parser.csString(maxlon + ' ' + maxlat) 
    191         env.timePosition=[csml.parser.csString(tmin), csml.parser.csString(tmax)] 
     192        env.beginPosition=csml.parser.csString(tmin) 
     193        env.endPosition= csml.parser.csString(tmax) 
    192194        env.srsName='srs tba' 
    193195        if aggregator is None: 
  • TI02-CSML/trunk/csml/parser.py

    r2217 r2326  
    340340    def __init__(self, **kwargs): 
    341341        Envelope.__init__(self,**kwargs) 
    342         children={'timePosition':[GML('timePosition'), 'csString']} 
     342        children={'beginPosition':[GML('beginPosition'), 'csString'], 'endPosition':[GML('endPosition'), 'csString']} 
    343343        addchildren(self,children) 
    344344        csElement.__init__(self,**kwargs) 
Note: See TracChangeset for help on using the changeset viewer.