[mapserver-users] Raster overlay question
Frank Warmerdam
warmerdam at pobox.com
Fri Nov 15 20:08:35 PST 2002
TCHaddad wrote:
> Hello list,
>
> Until now, my use of raster data within Mapserver has been limited to displaying tiled
> Tiffs as backgrounds to my vector data.
>
> However I have some raster data which I am interested in using as an overlay on top of
> vector data (and other rasters) if possible. Are translucent solid colors possible for
> any of the raster formats that Mapserver handle?
>
> I would probably classify my data into about 12 classes, one of which I would not draw
> (invisible), and the remainder of which I would like to draw with a translucent color
> so that vectors and background imagery can be seen through the colors.
>
> I guess what I am wondering is if Mapserver supports "Opacity" for raster classes...
TH,
I believe that currently (3.7 dev) class colors cannot include an opacity
value, so the only thing you can do is assign an opaque color or make the
class transparent. In 3.7 raster files that have red, green, blue and alpha
bands can be displayed with alpha blending to the map layers if processed
through the GDAL raster driver, and using GD 2, to produce 24bit output
images. So in theory you could achieve your effect by expanding the file
with RGBA class colors into an RGBA file to overlay but there are reasons
this wouldn't be a great idea:
o The input files would be substantially larger.
o You need to use 3.7 dev.
o The 24bit output files would likely be substantially larger.
However, if you really want to pursue such an option I could try to help.
I would like to see Map file color keywords be able to specify an RGBA
color, instead of just RGB but even then alpha blending can only practically
be done on 24bit output, not colormap output files.
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