[mapserver-users] Mapping a raster colour to Transparent
Dylan Keon
keon@nacse.org
Thu, 21 Nov 2002 12:57:10 -0800
Tweedy, Scott wrote:
> Is there any way to use MapServer to map a specific colour value in an
> input file to end up being transparent in the output PNG or GIF?
Check out the OFFSITE parameter. If you have a standard colormap (for a
DRG, for example), like this:
# value red green blue
0 255 255 255
1 0 0 0
2 255 255 255
3 91 159 230
4 230 45 30
...
give OFFSITE the value of the pixels you want to be transparent, like this:
LAYER
NAME drg_index
STATUS ON
TYPE raster
OFFSITE 0
TILEINDEX drg_index
TILEITEM "location"
MAXSCALE 50000
MINSCALE 2000
END
--Dylan
--
************************************************
Dylan Keon
GIS/Database Research Specialist
Northwest Alliance for Computational
Science and Engineering (NACSE)
Oregon State University
Corvallis, OR 97331
keon@nacse.org (541) 737-6608
************************************************