Using COLORRANGE to display DEM data
Jeff Hoffmann
jeff at PROPERTYKEY.COM
Thu Aug 17 22:05:26 PDT 2006
Frank Warmerdam wrote:
> 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.
Thanks for the confirmation, Frank. I'm kind of disappointed that this
won't work, but I've found a couple of simple little utility programs
that will let me pre-process the TIFFs into the color-shaded output I
wanted. If anybody else is interested, they're located at
http://www.perrygeo.net/wordpress/?p=7 Overlaying a hillshaded version
at ~40% opacity on top of the color ramp make for some really nice
looking images with almost no work involved.
--
Jeff Hoffmann
Head Plate Spinner
PropertyKey.com
More information about the MapServer-users
mailing list