Changeset 4635 for cows


Ignore:
Timestamp:
15/12/08 11:51:42 (11 years ago)
Author:
domlowe
Message:

more merging - capabilities doc looking better.

Location:
cows/branches/wcsmerge/cows
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cows/branches/wcsmerge/cows/pylons/templates/wcs_capabilities_1_0_0.xml

    r4581 r4635  
    1313<!--! TODO: This currently looks like WMS, change to WCS based on old kid template --> 
    1414 
    15 <WCS_Capabilities xmlns:py="http://genshi.edgewall.org/" 
     15<WCS_Capabilities xmlns:py="http://genshi.edgewall.org/" xmlns:gml="http://www.opengis.net/gml" 
    1616                     version="1.0.0"> 
    1717 
     
    4141  ?> 
    4242 
    43   <Coverage py:def="markupLayer(ds)"> 
     43  <CoverageOfferingBrief py:def="markupLayer(ds)"> 
    4444    <Name py:content="ds.identifier"/> 
    45     <Title py:content="ds.titles[0]"/> 
     45    <label py:content="ds.titles[0]"/> 
    4646    <Abstract py:if="len(ds.abstracts)>0" py:content="ds.abstracts[0]"/> 
    4747    <SRS py:for="crs in ds.CRSs" py:content="crs"/> 
    4848    <py:for each="bb in ds.boundingBoxes"> 
    49       <BoundingBox SRS="${bb.crs}" 
    50                    minx="${'%.2f'%bb.lowerCorner[0]}" 
    51                    miny="${'%.2f'%bb.lowerCorner[1]}" 
    52                    maxx="${'%.2f'%bb.upperCorner[0]}" 
    53                    maxy="${'%.2f'%bb.upperCorner[1]}"/> 
     49          <lonLatEnvelope> 
     50                  <gml:pos>${'%.2f'%bb.lowerCorner[0]} ${'%.2f'%bb.lowerCorner[1]}</gml:pos> 
     51                  <gml:pos>${'%.2f'%bb.upperCorner[0]} ${'%.2f'%bb.upperCorner[1]}</gml:pos> 
     52                  <gml:timePosition>${ds.timeLimits[0] + 'Z'}</gml:timePosition> 
     53                  <gml:timePosition>${ds.timeLimits[1] + 'Z'}</gml:timePosition> 
     54          </lonLatEnvelope>      
    5455    </py:for> 
    55  
    56  
    57   </Coverage> 
     56  </CoverageOfferingBrief> 
    5857 
    5958  <!--! ====================================================================== --> 
     
    124123    <Exception><Format>text/xml</Format></Exception> 
    125124 
    126     <Layer py:if="sm.contents is not None"> 
     125    <ContentMetadata py:if="sm.contents is not None"> 
    127126      <Title>Contents</Title> 
    128       <Layer py:for="ds in sm.contents.datasetSummaries" 
     127      <CoverageOfferingBrief py:for="ds in sm.contents.datasetSummaries" 
    129128             py:replace="markupLayer(ds)"> 
    130       </Layer> 
    131     </Layer> 
     129      </CoverageOfferingBrief> 
     130    </ContentMetadata> 
    132131  </Capability> 
    133132</WCS_Capabilities> 
  • cows/branches/wcsmerge/cows/service/imps/csmlbackend/wcs_csmllayer.py

    r4634 r4635  
    3737        tmpunits=copy(units) 
    3838        tmpunits.reverse() 
    39 #        domain = feature.getDomain()  
     39        domain = feature.getDomain() 
     40        tax= feature.getTimeAxis() 
     41        timelimits=[domain[tax][0],domain[tax][len(domain[tax])-1]]   
    4042        crs=feature.getNativeCRS() 
    4143        crss=[self._crscat.getCRS(crs).twoD] 
     
    4345            crss.append('CRS:84') 
    4446            crss.append('WGS84') 
    45         return title, abstract, units, crss 
     47 
     48        return title, abstract, timelimits, units, crss 
    4649        
    4750         
     
    6467        self._crscat=csml.csmllibs.csmlcrs.CRSCatalogue() 
    6568        for feature in csml.csmllibs.csmlextra.listify(ds.featureCollection.featureMembers): 
    66             title, abstract, units, crss=self.getInfo(feature) 
    67             layermap[feature.id]=CSMLCoverage(title,abstract, units, crss, feature) 
     69            title, abstract, timelimits, units, crss=self.getInfo(feature) 
     70            layermap[feature.id]=CSMLCoverage([title],[abstract], timelimits, units, crss, feature) 
    6871        if len(layermap) > 0: 
    6972            self.layermapcache[fileoruri]=layermap 
     
    8689    """ represents a WCS Coverage. Implements ICoverage """ 
    8790     
    88     def __init__(self, title, abstract, units, crss, feature): 
     91    def __init__(self, title, abstract, timelimits, units, crss, feature): 
    8992        self.title=title 
    9093        self.abstract=abstract 
    9194        self.description='TO DO - coverage description' 
    92         self.timeLimits='t1, t2' 
     95        self.timeLimits=timelimits 
    9396        self.units=units 
    9497        self.crss=crss 
    9598        self._feature=feature 
    9699        self.id=feature.id 
    97         bb= self._feature.getCSMLBoundingBox().getBox() 
     100        bb = self._feature.getCSMLBoundingBox().getBox() 
    98101        #convert 0 - 360 to -180, 180 as per common WXS convention 
    99102        if abs(bb[2]-bb[0]) >= 359 and abs(bb[2]-bb[0]) < 361: 
Note: See TracChangeset for help on using the changeset viewer.