Ignore:
Timestamp:
03/07/07 12:14:23 (13 years ago)
Author:
domlowe
Message:

general commit -including 3d bbox validator

File:
1 edited

Legend:

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

    r2681 r2689  
    131131        #get doc from cache or disk: 
    132132        c.dataset = csmlCache[fileoruri] 
     133        if type(c.dataset) is str: 
     134            #If not a csml datset is some message from exist such as 'access denied'            
     135            return Response(c.dataset) 
    133136        return self._renderCapabilities('ows/wcs_capabilities') 
    134137 
     
    137140    @parameter('Version', possibleValues=['1.1.0'], required=True) 
    138141    @parameter('Identifier', required=True) 
    139     @parameter('BoundingBox', required=True, validator=V.bbox_2d) 
     142    @parameter('BoundingBox', required=True, validator=V.bbox_2or3d) 
    140143    @parameter('TimeSequence',required=True, validator=V.iso8601_time) 
    141144    @parameter('Format', possibleValues=['application/netcdf'], required=True) 
    142145    @parameter('Store', validator = V.boolean('Store')) 
    143146    @parameter('Status', validator = V.boolean('Status')) 
    144     #TODO some more parameter to add here 
     147    #TODO some more parameters to add here 
    145148    # Dimension parameters Time, Elevation, etc. are handled separately 
    146     def GetCoverage(self, file, version, format, identifier, boundingbox, timesequence, store=False, status=False): 
     149    def GetCoverage(self, fileoruri, version, format, identifier, boundingbox, timesequence, store=False, status=False): 
    147150        try: 
    148151                    # Retrieve dataset and selected feature 
    149152             
    150             dataset = get_csml_doc(file) 
     153            dataset = csmlCache[fileoruri] 
    151154            feature = dataset.getFeature(identifier) 
    152155            if feature is None: 
    153156                raise OWS_E.InvalidParameterValue('Coverage not found', 'identifier') 
    154      
     157             
     158                         
    155159            #set bounding box TODO 
    156160            sel = dict(latitude=(boundingbox[1], boundingbox[3]), longitude=(boundingbox[0], boundingbox[2]))            
     
    159163            # Extract via CSML.subsetToGridSeries() 
    160164            if store: 
    161                 filename = extractToNetCDF(feature, sel, publish=True) 
     165                #need to farm off to WPS 
     166                #but for now... 
     167                filename = extractToNetCDF(feature, sel, publish = True)  
    162168            else: 
    163169                filename = extractToNetCDF(feature, sel) 
    164              
    165             #use the randomly allocated filename as a basis for an identifier 
     170                 
     171            #use the randomly allocated filename as a basis for an identifier            
    166172            f=os.path.basename(filename) 
    167173            c.fileID=os.path.splitext(f)[0] 
Note: See TracChangeset for help on using the changeset viewer.