[Mapserver-users] 2bit tiff image recolor on the fly

Frank Warmerdam warmerdam at pobox.com
Fri Apr 4 08:53:24 EST 2003


Zarko Mocnik wrote:
> I Read Raster_HOWTO and searched archive of this and -dev list but I 
> still have problems with recoloring on the fly of 2 color tiff raster.
> I tried with similar configuration as this:
> LAYER
>  NAME 'cl2421'
>  DATA cl2421.tif
>  TYPE RASTER
>  CLASS
>    EXPRESSION "1"
>    COLOR 0 255 0
>  END  # CLASS
>  OFFSITE 0
> END  # LAYER
> 
> but image allways appears as black on white. I also tried with
> EXPRESSION "([pixel==1)" and similar, but allwas with same result. I got 
> the same result with versions 3.5, 3.6 or even 3.7.
> 
> Do any have a *real working example* with recoloring of 2 color tiffs?
> 
> Configuration: Windows XP. I used versions withoud GDAL support (in cas 
> of 3.7 event with GDAL support.

Zarko,

What does gdalinfo report about your file?  My first guess would be that it
is being converted on the fly to RGBA mode by GDAL and this is defeating your
classification.

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    | Geospatial Programmer for Rent





More information about the mapserver-users mailing list