[Qgis-developer] Raster resampling

Marco Hugentobler marco.hugentobler at sourcepole.ch
Mon Jan 16 14:55:31 EST 2012


Hi Tim

 >- I noticed a shift (guesstimating in the order of 5-10 pixels) when
 >switching between the interpolation algorithms

Yes, I reduced the shift a bit last Saturday. But there is still a shift 
remaining because of double -> int rounding.

There are other known issues with the resampler branch right now:

- With paletted singleband rasters, color changes don't take effect
- There is a small bug with restoring the resampling method

>- with one of my ecw images the computer began to undergo very high
>cpu load with each  zoom / pan event when using bilinear or cubic
>interpolation. Unfortunately the dataset is too large for me to share
>with you right now - I will try to upload it for you when I get a
>chance.

That will be very usefull. I noticed I didn't really test with a layer 
containing pyramides.

Thanks for testing,
Marco


On 16.01.2012 17:55, Tim Sutton wrote:
> Hi Marco
>
>
> On Tue, Jan 10, 2012 at 12:39 PM, Marco Hugentobler
> <marco.hugentobler at sourcepole.ch>  wrote:
>>> Great stuff Marco - I hope to test your changes soon.
>>
>>
>> Thanks, Tim. The code is not 100% complete, but already testable. Because
>> there are many changes, I'm expecting a large number of bugs. So any report
>> about issues is greatly appreciated.
> I compiled your branch tonight. I havent tested with a lot of data
> sets yet, but two things I immediately noticed were:
>
> - with one of my ecw images the computer began to undergo very high
> cpu load with each  zoom / pan event when using bilinear or cubic
> interpolation. Unfortunately the dataset is too large for me to share
> with you right now - I will try to upload it for you when I get a
> chance.
> - I noticed a shift (guesstimating in the order of 5-10 pixels) when
> switching between the interpolation algorithms
>
> Otherwise (with the test images I have used thus far) it creates nice
> smooth tones where before they look pixelated which is great!
>
>
>
> Regards
>
> Tim
>
>> Regards,
>> Marco
>>
>>
>>
>> On 10.01.2012 10:29, Tim Sutton wrote:
>>> Hi
>>>
>>> On Fri, Dec 30, 2011 at 3:58 PM, Marco Hugentobler
>>> <marco.hugentobler at sourcepole.ch>    wrote:
>>>> Hi devs,
>>>>
>>>> Recently, I've been working on adding raster resampling to QGIS raster
>>>> (http://www.sourcepole.com/raster-resampling-in-qgis). The changes are in
>>>> the branch 'raster_resampler' of my github clone
>>>> (git://github.com/mhugent/Quantum-GIS.git).
>>>>
>>>> To add resampling in a clean way, I started a bit of refactoring within
>>>> QgsRasterLayer:
>>>>
>>>> - The new abstract class QgsRasterRenderer is added to replace the
>>>> drawingType switch. The method QgsRasterRenderer::draw() is a replacement
>>>> for the methods drawMultiBandColor(), drawMultiBandSingleBandGray(),
>>>> drawPalettedSingleBandColor(). This should move a lot of code out of
>>>> QgsRasterLayer and reduce code complexity. Currently implemented are
>>>> QgsPallettedRasterRenderer, QgsMultibandColorRenderer,
>>>> QgsSingleBandGrayRenderer
>>>> - The functionality of QgsRasterBuffer to draw the raster layer in
>>>> several
>>>> parts is moved to QgsRasterRenderer base class (same idea of reducing
>>>> complexity in QgsRasterLayer).
>>>> - QgsRasterResampler has two subclasses for now,
>>>> QgsBilinearRasterResampler
>>>> and QgsCubicRasterResampler (maybe average would be useful as well?)
>>>>
>>>> Any objections or suggestions about this? The code in the branch is
>>>> mostly
>>>> working, but far from being complete.
>>>> I'm going to be without internet connection the next few days, but hope
>>>> to
>>>> get the code to a testable state soon.
>>>>
>>>> Regards,
>>>> Marco
>>>>
>>> Great stuff Marco - I hope to test your changes soon.
>>>
>>> Regards
>>>
>>> Tim
>>>
>>>> --
>>>> 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
>>>>
>>>> _______________________________________________
>>>> Qgis-developer mailing list
>>>> Qgis-developer at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>>>
>>
>> --
>> 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
>>
>
>


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