Ignore:
Timestamp:
08/01/09 16:03:06 (11 years ago)
Author:
domlowe
Message:

adding support for z dimension in WCS requests - axisdescriptions currently stubs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows/trunk/cows/pylons/wcs_controller.py

    r4769 r4772  
    167167            raise InvalidParameterValue('Layer %s does not support SRS %s' % (layerName, srs)) 
    168168        times= self.getOwsParam('time') 
     169         
     170        kwargs={} 
     171        for axis in layerObj.axisDescriptions: #TODO - axisDescriptions attribute 
     172            log.debug('axis: %s'%axis.name) 
     173            axisvalues=self.getOwsParam(axis.name, default=None) 
     174            log.debug('values: %s'%axisvalues) 
     175            if axisvalues: 
     176                values=tuple(float(x) for x in axisvalues.split(',')) 
     177                if len(values)==1: 
     178                    values=(values[0], values[0],) #set min and max to be equal if single value 
     179                kwargs[axis.name]=values     
     180         
    169181#                 
    170         filepath = layerObj.getCvg(bbox, time=times) #TODO, refactor so is more flexible (e.g. not just netcdf) 
     182        filepath = layerObj.getCvg(bbox, time=times, **kwargs) #TODO, refactor so is more flexible (e.g. not just netcdf) 
    171183        fileToReturn=open(filepath, 'r') 
    172184        mType='application/cf-netcdf' 
Note: See TracChangeset for help on using the changeset viewer.