Ignore:
Timestamp:
13/01/10 14:12:42 (10 years ago)
Author:
domlowe
Message:

Changes to wfs backend to support point series subsetting in wfs interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows/trunk/cows/service/imps/csmlbackend/wfs_csmllayer.py

    r6138 r6305  
    132132        query=StoredQuery(qid, title='ExtractPointFromPointSeries', abstract = 'Extract a csml:PointFeature for a single time instance from a csml:PointSeriesFeature', queryExpressionText = qet, parameter=[pex1, pex2]) 
    133133        self.queries[qid]=(query, CSMLQueries.query_extractPointFromPointSeries) 
     134 
     135        #query to extract a PointSeriesFeature from a PointSeriesFeature 
     136        qid='urn-x:wfs:StoredQueryId:badc.nerc.ac.uk:extractPointSeriesFromPointSeries' 
     137        qet=QueryExpressionText('csml:PointSeriesFeature') 
     138        pex1=ParameterExpression('featureid', 'xsd:anyURI') 
     139        pex2=ParameterExpression('mintime', 'gml:TimePositionUnion') 
     140        pex3=ParameterExpression('maxtime', 'gml:TimePositionUnion') 
     141        query=StoredQuery(qid, title='ExtractPointSeriesFromPointSeries', abstract = 'Extract a csml:PointSeriesFeature for a range of times from a csml:PointSeriesFeature', queryExpressionText = qet, parameter=[pex1, pex2, pex3]) 
     142        self.queries[qid]=(query, CSMLQueries.query_extractPointSeriesFromPointSeries) 
    134143 
    135144        #query to extract a GridSeriesFeature from a GridSeriesFeature 
     
    264273            if hasattr(self._feature.value, att): 
    265274                domain=getattr(self._feature.value,att) 
    266                 for ordinate in listify(domain.coordTransformTable.gridOrdinates): 
    267                     #insertedExtract is the 'hidden' resolved xlink data, expose inline 
    268                     if hasattr(ordinate.coordAxisValues, 'insertedExtract'): 
    269                         ordinate.coordAxisValues.CONTENT=cleanString2(str(ordinate.coordAxisValues.insertedExtract.getData()[0].tolist()))                             
     275                if hasattr(domain, 'coordTransformTable'): 
     276                    for ordinate in listify(domain.coordTransformTable.gridOrdinates): 
     277                        #insertedExtract is the 'hidden' resolved xlink data, expose inline 
     278                        if hasattr(ordinate.coordAxisValues, 'insertedExtract'): 
     279                            ordinate.coordAxisValues.CONTENT=cleanString2(str(ordinate.coordAxisValues.insertedExtract.getData()[0].tolist()))                             
    270280     
    271281    def toGML(self): 
Note: See TracChangeset for help on using the changeset viewer.