[mapguide-users] Raster resizing algorithm
Frank Warmerdam
warmerdam at pobox.com
Mon Jun 23 12:30:26 EDT 2008
Tom Chadwin wrote:
> Hello all
>
> How does MGOS resize rasters on the fly? The image quality is poor compared
> to a graphics package bicubic resample, and text can be difficult to read
> because of distortion.
Tom,
The GDAL based FDO raster provider for MGOS uses nearest neighbour resampling
for imagery. To some extent you can improve image quality by pre-creating
more appropriately resampled overview layers within the image itself.
Generally speaking "average" resampling works fairly well for this purpose.
Currently there is no bicubic support in the GDAL tools for overview building.
eg.
gdaladdo -r average your.tif 2 4 8 16 32
You can get gdaladdo as part of GDAL. For instance, for windows it is available
as part of OSGeo4W (http://trac.osgeo.org/osgeo4w) or FWTools
(http://fwtools.maptools.org).
Generally speaking it is hard to get very good quality with the GDAL FDO
provider for scanned maps with "fine" text on them.
There is a "high precision warper" in GDAL that includes bicubic resampling.
It might be interesting one day to modify the GDAL FDO provider to support
using it as an option, though it will definately degrade performance. This
is the warper that I hope to connect when it is time for the GDAL FDO provider
to provide on the fly reprojection of imagery.
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 | President OSGeo, http://osgeo.org
More information about the mapguide-users
mailing list