Changeset 1034

Show
Ignore:
Timestamp:
01/24/08 08:52:15
Author:
domlowe
Message:

Added timepositions property to wcs 1.0.0. Still to do for 1.1.0

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • OWSLib/branches/wcstemp/owslib/coverage/wcs100.py

    r1028 r1034  
    271271         
    272272        self.boundingBoxWGS84 = None 
    273         b = elem.find(ns('lonLatEnvelope')) 
     273        b = elem.find(ns('lonLatEnvelope'))  
    274274        if b is not None: 
    275275            gmlpositions=b.findall('{http://www.opengis.net/gml}pos') 
     
    281281                    ) 
    282282             
     283             
     284     #timelimits are the start/end times, timepositions are all timepoints. WCS servers can declare one or both or neither of these. 
    283285    def _getTimeLimits(self): 
    284         timelimits=[] 
     286        timepoints, timelimits=[],[] 
    285287        b=self._elem.find(ns('lonLatEnvelope')) 
    286288        if b is not None: 
     
    289291            #have to make a describeCoverage request... 
    290292            descCov=self._service.getDescribeCoverage(self.id) 
    291             for pos in self._elem.findall(ns('CoverageOffering/')+ns('domainSet/')+ns('temporalDomain/')+'{http://www.opengis.net/gml}timePosition'): 
     293            for pos in descCov.findall(ns('CoverageOffering/')+ns('domainSet/')+ns('temporalDomain/')+'{http://www.opengis.net/gml}timePosition'): 
    292294                timepoints.append(pos) 
    293295        if timepoints: 
     
    297299     
    298300    def _getTimePositions(self): 
    299         #TODO 
    300         return [] 
     301        timepositions=[] 
     302        descCov=self._service.getDescribeCoverage(self.id) 
     303        for pos in descCov.findall(ns('CoverageOffering/')+ns('domainSet/')+ns('temporalDomain/')+'{http://www.opengis.net/gml}timePosition'): 
     304                timepositions.append(pos.text) 
     305        return timepositions 
    301306    timepositions=property(_getTimePositions, None) 
    302307            
  • OWSLib/branches/wcstemp/owslib/coverage/wcs110.py

    r1030 r1034  
    344344    timelimits=property(_getTimeLimits, None) 
    345345     
     346    #TODO timepositions property 
     347     
    346348    def _checkChildAndParent(self, path): 
    347349        ''' checks child coverage  summary, and if item not found checks higher level coverage summary'''