Changeset 5820 for cows


Ignore:
Timestamp:
07/10/09 16:32:18 (10 years ago)
Author:
domlowe
Message:

change to support csml lat lon only grids without time dimensions

Location:
cows/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cows/trunk/cows/pylons/project_templates/cows_server/+package+/controllers/catalogue.py_tmpl

    r5756 r5820  
    1111    def index(self): 
    1212        c.featureCollections = globalCSMLConnector.list() 
    13                 c.wfsonly=globalCSMLConnector.listwfsonly() 
     13        c.wfsonly=globalCSMLConnector.listwfsonly() 
    1414        t = templateLoader.load('catalogue.xml') 
    1515        return t.generate(c=c).render() 
  • cows/trunk/cows/pylons/templates/wcs_capabilities_1_0_0.xml

    r5029 r5820  
    4545        <gml:pos>${'%.2f'%bb.lowerCorner[0]} ${'%.2f'%bb.lowerCorner[1]}</gml:pos> 
    4646        <gml:pos>${'%.2f'%bb.upperCorner[0]} ${'%.2f'%bb.upperCorner[1]}</gml:pos> 
    47         <gml:timePosition>${str(ds.timeLimits[0]) + 'Z'}</gml:timePosition> 
    48         <gml:timePosition>${str(ds.timeLimits[1]) + 'Z'}</gml:timePosition> 
     47        <gml:timePosition>${str(ds.timeLimits[0])}</gml:timePosition> 
     48        <gml:timePosition>${str(ds.timeLimits[1])}</gml:timePosition> 
    4949      </lonLatEnvelope> 
    5050    </py:for> 
  • cows/trunk/cows/pylons/wcs_controller.py

    r5399 r5820  
    173173        if srs not in layerObj.crss: 
    174174            raise InvalidParameterValue('Layer %s does not support SRS %s' % (layerName, srs)) 
    175         times= self.getOwsParam('time') 
    176          
    177         #process times parameter so it is either a single string (one time) or a tuple (range):         
    178         if len(times.split(',')) >1: 
    179             times=tuple(times.split(',')) 
     175        times= self.getOwsParam('time', default=None) 
     176         
     177        #process times parameter so it is either a single string (one time) or a tuple (range) (OR None)         
     178        if times is not None: 
     179            if len(times.split(',')) >1: 
     180                times=tuple(times.split(',')) 
    180181         
    181182        kwargs={} 
     
    190191                kwargs[axis.name]=values     
    191192         
    192 #                 
     193#      
    193194        filepath = layerObj.getCvg(bbox, time=times, **kwargs) #TODO, refactor so is more flexible (e.g. not just netcdf) 
    194195        fileToReturn=open(filepath, 'r') 
  • cows/trunk/cows/service/imps/csmlbackend/wcs_csmllayer.py

    r5002 r5820  
    4646        domain = feature.getDomain() 
    4747        tax= feature.getTimeAxis() 
    48         timepositions=domain[tax] 
    49         timelimits=[domain[tax][0],domain[tax][len(domain[tax])-1]]   
     48        try: 
     49            timepositions=domain[tax] 
     50            timelimits=[domain[tax][0]+'Z',domain[tax][len(domain[tax])-1]+'Z'] 
     51        except: #no time available, return empty strings 
     52            timepositions=[''] 
     53            timelimits=['','']  
    5054        crs=feature.getNativeCRS() 
    5155        log.debug('crs %s'%crs) 
  • cows/trunk/setup.py

    r5769 r5820  
    33setup( 
    44    name='cows', 
    5     version='0.3.6', 
     5    version='0.3.7', 
    66     
    77    description='CEDA OGC Web Services Framework (COWS).  A framework for creatining integrated OGC web services using Pylons', 
Note: See TracChangeset for help on using the changeset viewer.