Using COLORRANGE to display DEM data

Frank Warmerdam warmerdam at POBOX.COM
Thu Aug 17 21:06:10 PDT 2006


Jeff Hoffmann wrote:
> I'm trying to use the COLORRANGE feature to display DEM data, but I'm 
> not getting any output from what I'm doing now.  I have a tif with one 
> band (the elevation) and I'm trying to first split that band into 
> different classes for elevation ranges then I want to use a color ramp 
> within each class to get a smooth blue->green->yellow->red sort of 
> transition.  The first split into classes seems to work -- I can assign 
> each class a solid color and I'll see that, I just can't get the color 
> ramp to work within the class.  Here's one of my class definitions:
> 
>   CLASS
>     EXPRESSION ([pixel] >= 500 AND [pixel] < 1000)
>     STYLE
>       COLORRANGE 48 255 180 255 255 0
>       DATARANGE 500 1000
>       RANGEITEM "[pixel]"
>     END
>   END
> 
> Does anybody know what's going wrong here?

Jeff,

Excellent idea, but unfortunately the raster colorrange support only
works with one class, and a single color range.  This is a limitation
of the implementation.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org



More information about the MapServer-users mailing list