Ignore:
Timestamp:
18/06/07 15:10:48 (13 years ago)
Author:
domlowe
Message:

temporal and spatial subsetting basics working for wcs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/csml_wcs.py

    r2593 r2600  
    1414from ows_server.controllers.csml_api import get_csml_doc 
    1515from ows_server.lib.decorators import * 
     16import ows_server.lib.validators as V 
    1617 
    1718from elementtree import ElementTree as ET 
     
    100101    @parameter('Version', possibleValues=['1.1.0'], required=True) 
    101102    @parameter('Identifier', required=True) 
    102     @parameter('BoundingBox') 
    103     @parameter('TimeSequence') 
     103    @parameter('BoundingBox', required=True, validator=V.bbox_2d) 
     104    @parameter('TimeSequence',required=True)  #TODO, need validator to handle iso8601 time strings 
    104105    @parameter('Format', possibleValues=['image/netcdf'], required=True) 
    105106     
    106107    #TODO some more parameter to add here 
    107108    # Dimension parameters Time, Elevation, etc. are handled separately 
    108     def GetCoverage(self, file, version, format, identifier, boundingBox=None, timeSequence=None): 
     109    def GetCoverage(self, file, version, format, identifier, boundingbox, timesequence): 
    109110         
    110111        # Retrieve dataset and selected feature 
     
    115116 
    116117        #set bounding box TODO 
    117         sel = dict(time=('1905-04-15T00:00:00.0' ,'1905-12-15T00:00:00.0'), longitude = (-1,10), latitude=(30,45)) 
    118         if boundingBox is not None: 
    119             sel = dict(latitude=(boundingBox[1], boundingBox[3]), longitude=(boundingBox[0], boundingBox[2])) 
     118        sel = dict(latitude=(boundingbox[1], boundingbox[3]), longitude=(boundingbox[0], boundingbox[2])) 
     119        sel['time']=timesequence #needs validating 
     120         
    120121        # Extract via CSML.subsetToGridSeries() 
    121122        filename = extractToNetCDF(feature, sel) 
Note: See TracChangeset for help on using the changeset viewer.