Ignore:
Timestamp:
04/04/08 12:34:39 (12 years ago)
Author:
domlowe
Message:

changed colormapping to work at the slab level rather than the getimage level

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/branches/ows_framework-refactor/ows_common/ows_common/service/imps/wms_csmllayer.py

    r3760 r3761  
    228228        self.bbox=bbox 
    229229         
     230        #set colour map for ALL images from this slab 
     231        v=self._netcdf(layer.title) 
     232        tvar=v(squeeze=1) 
     233        #array of data 
     234        value=tvar.getValue() 
     235        self.minval=min(min(l) for l in value) 
     236        self.maxval=max(max(l) for l in value) 
     237         
    230238         
    231239    def getImage(self, bbox, width, height): 
     
    243251        #how to handle varmin,varmax? ..read array? 
    244252        #minval, maxval=genutil.minmax(grid.value) 
    245         minval=min(min(l) for l in grid.value) 
    246         maxval=max(max(l) for l in grid.value) 
     253        #minval=min(min(l) for l in grid.value) 
     254        #maxval=max(max(l) for l in grid.value) 
     255        minval=self.minval 
     256        maxval=self.maxval 
    247257        renderer=RGBARenderer(minval, maxval)          
    248258        return renderer.renderGrid(grid, bbox, width, height, cmap) 
Note: See TracChangeset for help on using the changeset viewer.