[Qgis-developer] Raster resampling

Radim Blazek radim.blazek at gmail.com
Mon Jan 23 13:46:03 EST 2012


On Fri, Jan 20, 2012 at 3:26 PM, Marco Hugentobler
<marco.hugentobler at sourcepole.ch> wrote:
> Is it to have resampling on layer (and color) level and additionaly
> resampling on provider (and raster band) level in the method
> QgsRasterDataProvider::readBlock? Then if otf-reprojection is on and raster
> type is not paletted, use the one inside the provider level, else the one on
> layer level?

That would be one possibility but I was thinking about resampling on
layer (renderer) level before reprojection, exactly like you described
in your next post bellow.

On Sat, Jan 21, 2012 at 5:09 PM, Marco Hugentobler
<marco.hugentobler at sourcepole.ch> wrote:
> Ok, after some tests, I see that resampling and reprojection together do not
> perform too well. Also (comparing with UMN), there is a quality difference
> if doing the resampling after the otf-reprojection (without
> otf-reprojection, quality and performance are similar).

UMN MapServer is resampling before reprojection? The 'quality
difference' means that the result in QGIS with resampling after
reprojection is worse? How much?

> Fortunately, QgsRasterProjector is quite generic. So maybe it is possible to
> to use it directly in the raster renderer classes and do the resampling in
> source SRS.

That was my idea from my previous post. I thought that optional order
of reprojection and resampling could be the best for performance.

What about a more generic pipeline where various filters (resampling,
reprojection, color table application, OTF hill shader .... ) could be
used in an arbitrary order. The same API could be used for raster
processing. Or IOW, various raster processing filters would be used
for raster rendering on map canvas. What about filter plugins? Are
there the "QGIS Processing Framework" interfaces suitable for this
purpose?

Radim


More information about the Qgis-developer mailing list