Outputting 8-bit GeoTIFF with PCT: extra entry?

Avi A Blackmore sysadmin at SATSHOT.COM
Thu Mar 2 11:15:25 EST 2006


On Wednesday 01 March 2006 05:31 pm, Frank Warmerdam wrote:
>
> There are a number of reasons various color cells can get allocated by
> MapServer whether used or not.  I *suspect* 0,0,0 is your background
> color and (IMAGECOLOR on the map object, implicit or explicit).  You might
> want to try setting that to one of your class colors to avoid it being
> allocated separately.

	I didn't know about the IMAGECOLOR attribute, actually.  I discovered that the problem is, it was NOT set to
0 0 0.  Mapserver seems to want to allocate that color at the lowest end of the palette, but since my imagecolor was 255, 255, 255,
that was stuck into the 0 slot.  So color 1 was made to be 0, 0, 0.

	So I explicitly set IMAGECOLOR to 0 0 0 in the Mapscript app, and now it works properly!  Thanks very much!

> The problem you are running into is basically why MapServer in pseudocolor
> WMS or normal map drawing mode is not very suitable for serving raw data.
> It does too much fooling around allocating colors and remapping them as
> things are drawn.   But, you might just fiddle with things to get it
> working.

	That has been our MO all along.  "If it doesn't work, abuse it until it does."  :-)

-- 
Avi Blackmore
System Administrator/Programmer
Agri ImaGIS Technologies, Inc.



More information about the mapserver-users mailing list