[Qgis-developer] Are there convenience functions to do bilinear or cubic raster sampling?

Martin Dobias wonder.sk at gmail.com
Tue Jun 24 21:52:58 PDT 2014


On Wed, Jun 25, 2014 at 12:32 AM, Anita Graser <anitagraser at gmx.at> wrote:
> On Tue, Jun 24, 2014 at 7:46 AM, Martin Dobias <wonder.sk at gmail.com> wrote:
>> There are QgsBilinearRasterResampler and QgsCubicRasterResampler
>> classes for bilinear/cubic resampling used for raster rendering. As of
>> now they operate only on the whole raster image, not with individual
>> points.
>
> Exactly, something like those raster classes but working on individual
> points would be great to have in core and in the python API. Do you
> think this is a lot of work or is the raster code reusable?
>
> Should I open feature requests for this?

Probably not a lot of work, still not completely trivial (talking
about bicubic interpolation, bilinear is easy). I would probably use
scipy.interpolate module for the interpolation...

Regards
Martin


More information about the Qgis-developer mailing list