Changeset 3534


Ignore:
Timestamp:
27/02/08 15:12:44 (11 years ago)
Author:
mkochan
Message:

Added descriptions to the View objects

Location:
DPPP/kml/csml2kml/python/csml2kml/csml2kml
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • DPPP/kml/csml2kml/python/csml2kml/csml2kml/KML.py

    r3459 r3534  
    184184    ''' 
    185185 
    186     def __init__(self, name, children, styleID = None, region = None, opened = True, visible = True): 
     186    def __init__(self, name, children, styleID = None, region = None, opened = True, visible = True, description = None): 
    187187        self.name = name 
    188188        self.children = children 
     
    191191        self.opened = opened 
    192192        self.visible = visible 
     193        self.description = description 
    193194 
    194195    def build(self): 
     
    197198            SubElement(folderElement, 'styleUrl').text = '#' + self.styleID 
    198199        SubElement(folderElement, 'name').text = self.name 
     200        if self.description: 
     201            SubElement(folderElement, 'description').text = self.description 
    199202        if self.visible: 
    200203            SubElement(folderElement, 'visibility').text = '1' 
  • DPPP/kml/csml2kml/python/csml2kml/csml2kml/WMSCapabilities.py

    r3531 r3534  
    124124        self.layer = layer 
    125125        self.wmsRequestConfigElement = wmsRequestConfigElement 
     126        self.description = None 
    126127 
    127128    def areCategoriesListedExplicitly(self): 
     
    207208 
    208209        # Create a KML folder that represents the view of the layer 
    209         kmlLayerViewFolder = KMLFolder(self.name, [], visible = False, opened = False) 
     210        kmlLayerViewFolder = KMLFolder(self.name, [], visible = False, opened = False, description = self.description) 
    210211 
    211212        # Create a categorisation dictionary, dict, which will contain categories (as returned by 
     
    238239 
    239240    def __init__(self, layer, wmsRequestConfigElement): 
     241        View.__init__(self, layer, wmsRequestConfigElement) 
    240242        self.name = 'Whole timecourse' 
    241         View.__init__(self, layer, wmsRequestConfigElement) 
     243        self.description = 'All periods as a contiguous animation. Periods are substituted with logical years.<br><br>Because animation in Google Earth cannot skip between dates, logical years are used to keep the animation contiguous, as will be visible on the animation bar. The first period is substituted with year 1, etc.' 
    242244        yearSet = set() 
    243245        for timestep in self.layer.timesteps: 
     
    267269 
    268270    def __init__(self, layer, wmsRequestConfigElement): 
     271        View.__init__(self, layer, wmsRequestConfigElement) 
    269272        self.name = 'Compare months' 
    270         View.__init__(self, layer, wmsRequestConfigElement) 
     273        self.description = 'In each period, the selected month spreads to cover the whole period.<br><br>Note that if duration of each period is shorter than the spacing between the periods (e.g. for some 20 year climatologies), there will be "blind spots" in the animation.' 
    271274 
    272275    def areCategoriesListedExplicitly(self): 
     
    296299 
    297300    def __init__(self, layer, wmsRequestConfigElement): 
    298         self.name = 'Compare period' 
    299301        View.__init__(self, layer, wmsRequestConfigElement) 
     302        self.name = 'Split by period' 
     303        self.description = 'Animate the selected period only.<br><br>The animation runs only during the period\'s central year, but actually covers the whole period.' 
    300304 
    301305    def areCategoriesListedExplicitly(self): 
Note: See TracChangeset for help on using the changeset viewer.