Changeset 5762 for qesdi


Ignore:
Timestamp:
24/09/09 12:06:04 (10 years ago)
Author:
pnorton
Message:

Added the land colour and the coastline width options to the coast wms controller.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qesdi/wms_ddc_vis/trunk/lib/wms_ddc_vis/controllers/coastwms.py

    r5752 r5762  
    3939        RenderingOption('show_rivers', "Show Rivers" ,bool , False ), 
    4040        RenderingOption('coastline_colour', "Coastline Colour" ,str , "black" ), 
     41        RenderingOption('land_colour', "Land Colour" ,str , None ), 
     42        RenderingOption('coastline_width', "Coastline Width" ,float , 0.5 ), 
    4143        RenderingOption('resolution', "Coastline Resolution" ,str , "auto", ["coarse","low", "intermediate", "high", "auto"]  ),             
    4244    ] 
     
    227229          
    228230        log.debug("resolution = %s" % (resolution,)) 
     231 
     232        #make the colour compatable with matplotlib 
     233        if bgcolor.find('0x') == 0: 
     234            bgcolor = '#' + bgcolor[2:] 
     235        log.debug("bgcolor = %s" % (bgcolor,)) 
    229236        ldg = LayerDrawerCoastlines(transparent=transparent, 
    230                                     resolution=resolution) 
    231  
    232  
     237                                    resolution=resolution, 
     238                                    bgcolour=bgcolor) 
     239 
     240        ldg.landColour = parser.getOption('land_colour') 
    233241        ldg.drawRivers = parser.getOption('show_rivers') 
    234242        ldg.coastlineColour = parser.getOption('coastline_colour') 
     243        ldg.coastlineWidth = parser.getOption('coastline_width') 
    235244 
    236245        xLimits = (bbox[0], bbox[2]) 
Note: See TracChangeset for help on using the changeset viewer.