Changeset 2864 for TI05-delivery


Ignore:
Timestamp:
31/08/07 14:52:26 (12 years ago)
Author:
domlowe
Message:

temporal domain handling

Location:
TI05-delivery/ows_framework/trunk/ows_server/ows_server
Files:
3 edited

Legend:

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

    r2861 r2864  
    112112        cvgDescription=feature.description.CONTENT 
    113113        cvgAbstract=[feature.description.CONTENT] 
    114         bbox=c.dataset.getBoundingBox()  #TODO, use the bounding box of the feature not the dataset. 
     114        csmlbbox=feature.getCSMLBoundingBox() 
     115        if csmlbbox is not None: 
     116            bbox=csmlbbox.getBox()         
     117        else: 
     118            csmlbbox=c.dataset.getCSMLBoundingBox() 
     119            bbox=csmlbbox.getBox() 
    115120        crslist=['ndgcrs1', 'ndgcrs2'] #TODO, get these crs from the csml features 
    116121        return WcsDatasetSummary(identifier=feature.id, 
     
    130135        ds = WcsDatasetSummary(titles=['Root Dataset'], datasetSummaries=[], CRSs=['CRS:84']) 
    131136        # Add a DatasetSummary for each feature 
    132  
    133137        for f_n in c.dataset.getFeatureList(): 
    134138            feature_ds = self._loadFeatureSummary(c.dataset.getFeature(f_n)) 
     
    140144        """ builds a collection of CoverageDescription objects - used for DescribeCoverage """ 
    141145        CoverageDescriptions=[] 
    142         for f in self.features: 
    143           feature = self.features[f] 
    144           bbox=c.dataset.getBoundingBox()  #TODO, use the bounding box of the feature not the dataset. 
    145           cd=CoverageDescription(identifier=f,titles=feature.name.CONTENT, keywords=None, abstracts=feature.description.CONTENT, boundingBoxes=[BoundingBox([bbox[0],bbox[1]], [bbox[2],bbox[3]], crs='CRS:84')]) 
    146           CoverageDescriptions.append(cd) 
     146        csmlbbox=c.dataset.getCSMLBoundingBox() 
     147        dsbbox=csmlbbox.getBox() 
     148        dstimes=csmlbbox.getTimeLimits() 
     149        dscrs=csmlbbox.getCRSName() 
     150        for f in self.features: 
     151            feature = self.features[f] 
     152            csmlbbox=feature.getCSMLBoundingBox() 
     153            if csmlbbox is None: #use the bounding box of the feature not the dataset. 
     154                bbox=dsbbox   
     155                timeLimits=dstimes 
     156                crsname=dscrs 
     157            else: #use the feature's bounding box info 
     158                bbox=csmlbbox.getBox() 
     159                timeLimits=csmlbbox.getTimeLimits() 
     160                crsname=csmlbbox.getCRSName()                 
     161            cd=CoverageDescription(identifier=f,titles=feature.name.CONTENT, keywords=None, abstracts=feature.description.CONTENT, boundingBoxes=[BoundingBox([bbox[0],bbox[1]], [bbox[2],bbox[3]], crs=crsname)], timeDomain=timeLimits) 
     162            CoverageDescriptions.append(cd) 
    147163        return CoverageDescriptions 
    148164 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/wcs_CoverageDescription.py

    r2726 r2864  
    99    Extends DatasetSummary from ows common 
    1010    """ 
    11     def __init__(self, identifier, **kw): 
     11    def __init__(self, identifier, timeDomain, **kw): 
    1212        super(CoverageDescription, self).__init__(**kw) 
    1313        self.identifier=identifier 
     14        self.timeLimits=timeDomain 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/wcs_DescribeCoverageResponse.kid

    r2729 r2864  
    2525            </SpatialDomain> 
    2626            <TemporalDomain> 
     27                <TimePeriod> 
     28                    <beginTime>${cd.timeLimits[0]}</beginTime> 
     29                    <endTime>${cd.timeLimits[1]}</endTime> 
     30                </TimePeriod> 
    2731            </TemporalDomain> 
    2832        </Domain> 
Note: See TracChangeset for help on using the changeset viewer.