[Qgis-user] how to fix the raster calculator

Alessandro Pasotti apasotti at gmail.com
Thu Sep 26 09:07:03 PDT 2019


On Tue, Sep 24, 2019 at 12:19 PM Raymond Nijssen <r.nijssen at terglobo.nl>
wrote:

> Hi,
>
> I've been using the raster calculator lately and bumped into some
> unexpected behaviour issues. They are hard to isolate but I will create
> issues
>
> One of the things is the creation of empty output grids, resulting in
> raster layers with a range as described earlier in this thread:
>
> ([-1.79769e+308 to 1.79769e+308] instead of [0 1].
>

Hi Raymond,

Working on it (I've been able to reproduce it), can you please file a
ticket for me to reference in the PR?


>
> Somehow this was fixed after changing the locale (!) from NL back to EN.
>

This looks completely impossible to me: there is no locale involved in the
formulas (and no translation of operators!).

I was using a model that contained raster calculators and a python
> script running it.
> No clue what it could be, maybe parameter names being translated (I hope
> not!) or locale settings for decimal point/comma.
>
> Also, the names of the model parameter are like
> 'qgis:rastercalculator_4:sub_calc_sqrt', still containing the
> 'rastercalculator_4' part which can not be found or changed using the
> model editor.
>
>
> Besides, I'm wondering why very common functionality is missing in the
> raster calculator. I need abs() and max() functions and they don't
> exist. Or am I missing something?
>

Yes, you missed the implementation :)

Nobody had already implemented it, but I've done that today.


-- 
Alessandro Pasotti
w3:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190926/4ba6704c/attachment-0001.html>


More information about the Qgis-user mailing list