[mapserver-users] OFFSITE more values

Frank Warmerdam warmerdam at pobox.com
Fri Sep 24 06:58:17 PDT 2010


Sven Schroeter wrote:
> Hi,
> 
> I have a rasterlayer with more than 1000 .ecw airial photos and want to 
> set more than one RGB-value transparent with OFFSITE.
> This works fine:
> OFFSITE 0 0 0
> 
> but I need something like this:
> OFFSITE [0 0 0,1 1 1,1 2 1]
> 
> Is there a possibility to solve my problem?

Sven,

There is no support for multiple offsite values in MapServer.

If you have ecw file with "lossy" nodata areas the usual approach is to
convert the files to uncompressed format (ie. GeoTIFF), and then use the
GDAL nearblack utility to convert pixels that are nearly black to black
so there is a single nodata/offset value.

Some folks have also had success deriving a nodata/data mask from this,
and using it to develop an alpha (transparency) band which can then be used
with the original ecw file via use of a GDAL VRT file grouping the extra
band with the original data.  This technique is fairly complicated and can
have some performance impact on MapServer but it does allow using the
original ECW files with exactly masked areas.

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