Antialiasing layers
Frank Warmerdam
warmerdam at POBOX.COM
Thu Nov 25 07:01:16 PST 2004
Trond Michelsen wrote:
> Hi.
>
> Can mapserver antialias raster layers? I'm combining a lot of raster
> layers with mapserver, and many of these consists mainly of thin
> lines. They all seem to be in the right spot, but when I zoom out, the
> lines breaks up or dissappears.
Trond,
No, MapServer does not include any support for antialiasing of raster
layers itself. However, you can moderate these effects by pre-build
"averaged" overview levels. Averaged overview levels will tend to
produce an anti-aliasing sort of effect for scanned linework.
Averaged overviews can be added to many GDAL supported raster formats
using the gdaladdo utility like this:
gdaladdo -r average work.tif 2 4 8 16 32 64 128
The default downsampling technique in MapServer (and gdaladdo for that
matter) is decimation, where at 1/4 resolution one of the pixels from the
4x4 input pattern would be selected - practically at random. For narrow
line work this results in spottiness that can be quite disturbing. Averaging
will give varying levels of grayness depending on how many pixels in the
decimated area are set originally.
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