[QGIS-Developer] GSoC 2021 QGIS On-the-fly Raster Calculator proposal draft review and feedback

Alessandro Pasotti apasotti at gmail.com
Mon Apr 12 12:39:50 PDT 2021


On Mon, Apr 12, 2021 at 9:23 PM Francesco Bursi
<francesco.bursi at hotmail.it> wrote:
>
> Hi Alessandro,
>
> First of all thank you for your feedback (let's hope for the best) and for your work.
> I did not forget your comment in my previous thread and I studied (I'd rather say I read, due to limited amount of time left) the existing documentation, I saw that hillshade benefits of openCL acceleration too.
> In fact, I discussed with mentors some extra features for the (possible, hopefully) new renderer (I think in the comment history you'll find openCL) but since openCL would add some extra complexities that maybe I wouldn't be able to manage in the GSoC coding time, I left it out of the proposal for the time being, and I added some possible modification and improvements to the raster calculator engine instead.
> By the way, and this is besides GSoC, the use of that framework and the possible results thrilled me and I'd like to improve the existing renderer feature for example. Given my knowledge of the topic at the moment this is more of an idea than a serious commitment but I'd like to to elaborate further this subject in the near future.
>
> Sorry for the long message, I hope my thoughts about it are clear.
>

I see, but there are two things to take into consideration:

1. OpenCL is already implemented for the raster calculator:
https://github.com/qgis/QGIS/blob/master/src/analysis/raster/qgsrastercalculator.cpp#L361
you don't have to start from scratches
2. I doubt that using the CPU only will be fast enough for OTF
rendering with complex expressions and bigger rasters

You might also consider OpenGL compute shaders as an alternative
approach, but that would mean starting from zero and it won't work on
CPUs like OpenCL does if there is no compatible GPU, I've actually
found out that OpenCL can exploit the parallelism of multi-core CPUs
and give decent performances even without using the GPU at all (intel
i7-4770HQ 4 core 8 threads is a good example).

Anyway, whatever you will do will be warmly welcome!

Kind regards.


-- 
Alessandro Pasotti
QCooperative:  www.qcooperative.net
ItOpen:   www.itopen.it


More information about the QGIS-Developer mailing list