[Qgis-user] Raster Calculator Error Questions

Wanda Norman wanda.mnorman2015 at gmail.com
Fri Feb 12 11:12:49 PST 2021


Thanks Nicolas for the quick response.  But I am still having issues.

I did upgrade to the 3.16 version and I am still unable to write the
formula.  I tried:  ( "aspect at 1" < = 90) OR ( "aspect at 1" > = 270) - I get
Expression is not valid. As soon as I put anything other than "aspect at 1" I
get a message that the expression is not valid.

This is the first time using the raster calculator and it looks as if I
can't move forward with the lesson without this step.

Any other suggestions?

Thanks for your help!
Wanda



On Fri, Feb 12, 2021 at 10:08 AM Nicolas Cadieux <
njacadieux.gitlab at gmail.com> wrote:

> Hi,
> I have not used the raster calculator in a while but I am not sure about
> you use of the \.
> Examples in the user manual (
> https://docs.qgis.org/3.16/en/docs/user_manual/working_with_raster/raster_analysis.html#raster-calculator)
> use this as examples.
>
> ("elevation at 1" < 50) * 1 + ("elevation at 1" >= 50) * 2
>
>
> I would try (expression 1) OR (expression 2).  Layers names must be placed
> between quotes “”.
>
> You could also update your QGIS version to 3.16.
>
> Nicolas Cadieux
> https://gitlab.com/njacadieux
>
> Le 12 févr. 2021 à 09:09, Wanda Norman <wanda.mnorman2015 at gmail.com> a
> écrit :
>
> 
>
> Greetings friends:
>
>
>
> I am working on lesson 7.3.5 in the User Guide / Manual (QGIS 3.10) –
> Following along: Using the Raster Calculator.
>
>
>
> I am having difficulty with the calculation formula as indicated below:
>
>
>
> The manual states this formula should be used:
>
>                Aspect at 1 <=90 OR Aspect at 1 >= 270
>
> Which I am assuming is incorrect because a) I get an error when I run it;
> and b) when I set the parameters using the expression operators the formula
> looks like this:
>
>Aspect at 1” <=90 OR “Aspect at 1” >=270
>
> However, I still get the error:
>
> Error parsing formula
>
> Execution failed after 0.02 seconds
>
>
>
> With some help – I then tried this formula
>
> \“Aspect at 1”\ <=90 OR \“Aspect at 1”\ >=270
>
> Which worked for this assignment.
>
>
>
> However, moving on to lesson 7.3.6 – More criteria: which takes me to
> 21.12.2. Calculate slope (less than 2 and 5 degrees)
>
> I get the same error as above again.
>
>
>
> I am steadily working my way through the Manual and would appreciate any
> help.  I am using QGIS version 3.10.9-A Coruna (64 bit) on a Windows PC.
>
>
>
> Thank you!
>
> Wanda Norman
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210212/83089c60/attachment.html>


More information about the Qgis-user mailing list