[Qgis-developer] Raster resampling

Marco Hugentobler marco.hugentobler at sourcepole.ch
Mon Jan 23 16:11:07 EST 2012


Hi Radim

 >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.

This (resampling before reprojection) is now implemented in the 
raster_resampler branch. You are right, it improves performance a lot.

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

I only tested visually with one dataset (raster background map, 
unfortunately not free data). So not really a representative test.
In my example, visual quality is similar, no matter if reprojection 
comes first or second. But there is a big difference in performance if 
reprojection is second.

>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?

That sounds very advanced, especially using it on-the-fly. But probably interesting for the remote sensing power users.


Regards,
Marco






On 23.01.2012 19:46, Radim Blazek wrote:
> 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


-- 
Dr. Marco Hugentobler
Sourcepole -  Linux&  Open Source Solutions
Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland
marco.hugentobler at sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee



More information about the Qgis-developer mailing list