Ignore:
Timestamp:
21/08/07 10:05:25 (12 years ago)
Author:
domlowe
Message:

changes to enable SupportedFormats? and SupportedCRS parameters

Location:
TI05-delivery/ows_framework/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_common/ows_common/wcs.py

    r2592 r2833  
    99""" 
    1010 
    11 #NOTE, much of this is straight from WMS and needs to be overhauled. 
     11#NOTE, much of this is straight from WMS and needs to be overhauled. TODO 
    1212 
    1313 
     
    1717class WcsDatasetSummary(DatasetSummary): 
    1818    """ 
    19     We don't know how WMS will map Layer attributes onto an extension of DatasetSummary 
    20     so a pragmatic approach is taken here. 
    21      
    22     @ivar CRSs 
    23     @type CRSs: iterable of str 
    24     @ivar styles: Style descriptors, default [''] 
    25     @type styles: iterable of Style objects 
    26     @ivar dimensions 
    27     @type dimensions: dictionary mapping dimension names to Dimension objects 
    28     @ivar attribution 
    29     @type attribution: None or Attribution object 
    30     @ivar authorityURLs 
    31     @type authorityURLs: iterable of AuthorityUrl objects 
    32     @ivar identifiers 
    33     @type identifiers: iterable of Identifier objects 
    34     @ivar dataURLs 
    35     @type dataURLs: iterable of DataUrl objects 
    36     @ivar featureListURLs 
    37     @type featureListURLS: iterable of FeatureListURL objects 
    38     @ivar minScaleDenominator 
    39     @type minScaleDenominator: None or double 
    40     @ivar maxScaleDenominator 
    41     @type maxScaleDenominator: None or double 
    42  
    4319    """ 
    44     def __init__(self, CRSs=[], styles=[''], dimensions={}, attribution=None, authorityURLs=[], 
    45                 description=None, dataURLs=[], featureListURLs=[], 
    46                  minScaleDenominator=None, maxScaleDenominator=None, **kw): 
     20    def __init__(self, CRSs=[], description=None, formats=[],supportedCRSs=[],**kw): 
    4721        super(WcsDatasetSummary, self).__init__(**kw) 
    4822 
    4923        self.CRSs = CRSs 
    50         self.styles = styles 
    51         self.dimensions = dimensions 
    52         self.attribution = attribution 
    53         self.authorityURLs = authorityURLs 
    5424        self.description=description 
    55         self.dataURLs = dataURLs 
    56         self.featureListURLs = featureListURLs 
    57         self.minScaleDenominator = minScaleDenominator 
    58         self.maxScaleDenominator = maxScaleDenominator 
     25        self.formats=formats 
     26        self.supportedCRSs=supportedCRSs 
    5927 
    60  
    61 class Style(object): 
    62     """ 
    63     @ivar name 
    64     @type name: str 
    65     @ivar title 
    66     @type title: str 
    67     @ivar abstract 
    68     @type abstract: None or str 
    69     @ivar legendURLs 
    70     @type legendURLS: iterable of LegendURL objests 
    71     @ivar styleSheetURL 
    72     @type styleSheetURL: None or FormattedURL object 
    73     @ivar styleURL 
    74     @type styleURL: None or FormattedURL object 
    75  
    76     """ 
    77     def __init__(self, name, title, abstract=None, legendURLs=[], styleSheetURL=None, 
    78                  styleURL=None): 
    79         self.name = name 
    80         self.title = title 
    81         self.abstract = abstract 
    82         self.legendURLs = legendURLs 
    83         self.styleSheetURL = styleSheetURL 
    84         self.styleURL = styleURL 
    8528 
    8629class FormattedURL(object): 
     
    9639        self.onlineResource = onlineResource 
    9740 
    98 class LegendURL(FormattedURL): 
    99     """ 
    100     @ivar width 
    101     @type width: None or int 
    102     @ivar height: 
    103     @type height: None or int 
    104  
    105     """ 
    106     def __init__(self, width, height, **kw): 
    107         super(LegendURL, self).__init__(**kw) 
    108          
    109         self.width = width 
    110         self.height = height 
    11141 
    11242class Dimension(Domain): 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/csml_wcs.py

    r2831 r2833  
    113113        cvgAbstract=[feature.description.CONTENT] 
    114114        bbox=c.dataset.getBoundingBox()  #TODO, use the bounding box of the feature not the dataset. 
     115        crslist=['ndgcrs1', 'ndgcrs2'] #TODO, get these crs from the csml features 
    115116        return WcsDatasetSummary(identifier=feature.id, 
    116117                                 titles=cvgTitle, 
    117118                                 boundingBoxes=[BoundingBox([bbox[0],bbox[1]], [bbox[2],bbox[3]], 
    118                                  crs='CRS:84')], dimensions=dims,  description=cvgDescription,abstracts=cvgAbstract 
     119                                 crs='CRS:84')], description=cvgDescription,abstracts=cvgAbstract, formats=['application/cf-netcdf'], 
     120                                 supportedCRSs=crslist 
    119121                                 ) 
    120122 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/ows/wcs_capabilities.kid

    r2831 r2833  
    5959    <ows:Keywords> 
    6060    </ows:Keywords> 
    61  
    6261    <ows:WGS84BoundingBox py:for="bb in ds.boundingBoxes"> 
    6362            <ows:LowerCorner>${bb.lowerCorner[0]} ${bb.lowerCorner[1]}</ows:LowerCorner>                   
    6463            <ows:UpperCorner>${bb.upperCorner[0]} ${bb.upperCorner[1]}</ows:UpperCorner>         
    65     </ows:WGS84BoundingBox> 
     64    </ows:WGS84BoundingBox>     
     65    <SupportedCRS py:for="crs in ds.supportedCRSs"  
     66                py:content="crs"/>     
     67    <SupportedFormat py:for="format in ds.formats"  
     68                py:content="format"/> 
    6669    <CoverageSummary py:for="ds1 in ds.datasetSummaries" py:replace="coverageSummary(ds1)"/> 
    6770  </CoverageSummary> 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/wcs_getCoverageResponse.kid

    r2653 r2833  
    88        <ows:Abstract>Created from getCoverage request to NDG WCS</ows:Abstract> 
    99        <Identifier>${c.fileID}</Identifier> 
    10         <Reference>xlink:href="${c.hyperlink}" xlink:role="urn:ogc:def:role:WCS:1.1:metadata"</Reference> 
     10        <Reference xlink:href="${c.hyperlink}" xlink:role="urn:ogc:def:role:WCS:1.1:metadata"/> 
    1111    </Coverage> 
    1212</Coverages> 
Note: See TracChangeset for help on using the changeset viewer.