mapnik-org/mapnik — Issue #654: Add more/better scaling methods to RasterSymbolizer
Author: artemp
Created: 2011-10-11 08:06:31+00:00
State: open
Labels: Symbolizers

At present RasterSymbolizer only supports bilinear/bilinear8 scaling.

As mentioned in [http://trac.osgeo.org/gdal/ticket/3740 this gdal ticket] and the associated discussion on [http://article.gmane.org/gmane.comp.gis.gdal.devel/24723 gdal-dev], this tends to make map tiles look terrible for rasters when heavily-zoomed-out.

Some sample images are available on the gdal ticket; they look the same when produced via mapnik.

Until now I assumed that was because mapnik was just using gdal to render the raster symbolizer, but looking at the code it seems that's not the case.

Perhaps we could add cubic-spline or lanczos resampling in image_util.hpp, and expose it as a scaling option for RasterSymbolizer.

Happy to write a patch if it's likely to be accepted.