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

Anita Graser anitagraser at gmx.at
Thu Jul 10 12:01:03 PDT 2014


Thank you Denis,

That worked perfectly!

I think it would be good to add these convenience functions to core.
Should I open a ticket?

Best wishes,
Anita

On Wed, Jun 25, 2014 at 8:19 AM, Anita Graser <anitagraser at gmx.at> wrote:
> Hi Denis,
> That looks extremely useful. Thanks a lot! I will try it as soon as
> possible.
> Best wishes
> Anita
>
> On Jun 25, 2014 7:23 AM, "Denis Rouzaud" <denis.rouzaud at gmail.com> wrote:
>>
>> Hi Anita,
>>
>> I don't know if it can be useful, but you'll find the python code here to
>> do interpolation (nearest, linear, bicubic) on single points:
>>
>> https://github.com/3nids/rasterinterpolation/blob/master/core/rasterinterpolator.py
>>
>> Cheers,
>>
>> Denis
>>
>> On 24.06.2014 19:32, Anita Graser wrote:
>>>
>>> Thanks everyone for your answers!
>>>
>>>> On Tue, Jun 24, 2014 at 12:31 PM, Denis Rouzaud
>>>> <denis.rouzaud at gmail.com> wrote:
>>>>>
>>>>> But, you can have such functionality through processing or via plugins
>>>>> (e.g.
>>>>> Raster Interpolation).
>>>
>>> True, but I would like to expand my profile from line script with
>>> these interpolation methods so using other tools is not really an
>>> option.
>>>
>>>>> Anyway, that would be an idea to bring such functionality in core!
>>>
>>> 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?
>>>
>>> Best wishes,
>>> Anita
>>
>>
>


More information about the Qgis-developer mailing list