<div dir="ltr">Thanks Nicolas for the quick response. But I am still having issues.<div><br></div><div>I did upgrade to the 3.16 version and I am still unable to write the formula. I tried: <span style="white-space:pre-wrap"> ( "aspect@1" < = 90) OR ( "aspect@1" > = 270) - I get Expression is not valid. A</span>s soon as I put anything other than "aspect@1" I get a message that the expression is not valid. </div><div><br></div><div>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.</div><div><br></div><div>Any other suggestions?</div><div><br></div><div>Thanks for your help!</div><div>Wanda</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 12, 2021 at 10:08 AM Nicolas Cadieux <<a href="mailto:njacadieux.gitlab@gmail.com">njacadieux.gitlab@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Hi,<div>I have not used the raster calculator in a while but I am not sure about you use of the \.</div><div>Examples in the user manual (<a href="https://docs.qgis.org/3.16/en/docs/user_manual/working_with_raster/raster_analysis.html#raster-calculator" target="_blank">https://docs.qgis.org/3.16/en/docs/user_manual/working_with_raster/raster_analysis.html#raster-calculator</a>) use this as examples.</div><div><br></div><div><pre style="box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;font-size:12px;white-space:pre-wrap;line-height:1.4;margin-top:0px;margin-bottom:0px;padding:12px;overflow:auto;color:rgb(64,64,64);background-color:rgb(248,248,248)"><span style="box-sizing:border-box">(</span><span style="box-sizing:border-box;color:rgb(186,33,33)">"elevation@1"</span> <span style="box-sizing:border-box;color:rgb(102,102,102)"><</span> <span style="box-sizing:border-box;color:rgb(102,102,102)">50</span><span style="box-sizing:border-box">)</span> <span style="box-sizing:border-box;color:rgb(102,102,102)">*</span> <span style="box-sizing:border-box;color:rgb(102,102,102)">1</span> <span style="box-sizing:border-box;color:rgb(102,102,102)">+</span> <span style="box-sizing:border-box">(</span><span style="box-sizing:border-box;color:rgb(186,33,33)">"elevation@1"</span> <span style="box-sizing:border-box;color:rgb(102,102,102)">>=</span> <span style="box-sizing:border-box;color:rgb(102,102,102)">50</span><span style="box-sizing:border-box">)</span> <span style="box-sizing:border-box;color:rgb(102,102,102)">*</span> <span style="box-sizing:border-box;color:rgb(102,102,102)">2</span></pre><div><br></div>I would try (expression 1) OR (expression 2). Layers names must be placed between quotes “”.</div><div><br></div><div>You could also update your QGIS version to 3.16. </div><div><br><div dir="ltr">Nicolas Cadieux<div><a href="https://gitlab.com/njacadieux" target="_blank">https://gitlab.com/njacadieux</a></div></div><div dir="ltr"><br><blockquote type="cite">Le 12 févr. 2021 à 09:09, Wanda Norman <<a href="mailto:wanda.mnorman2015@gmail.com" target="_blank">wanda.mnorman2015@gmail.com</a>> a écrit :<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">Greetings friends:</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">I am working on lesson 7.3.5 in the User Guide / Manual (QGIS 3.10) – Following along: Using the Raster Calculator.</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">I am having difficulty with the calculation formula as indicated below:</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">The manual states this formula should be used:</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> Aspect@1 <=90 OR Aspect@1 >= 270</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">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:</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> “Aspect@1” <=90 OR “Aspect@1” >=270</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">However, I still get the error:</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;font-family:"Times New Roman",serif;color:red">Error parsing formula</span><span style="font-size:12pt;font-family:"Times New Roman",serif"></span></p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;font-family:"Times New Roman",serif;color:red">Execution failed after 0.02 seconds</span></p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">With some help – I then tried this formula</p><p class="MsoNormal" style="margin:0in;text-indent:0.5in;font-size:11pt;font-family:Calibri,sans-serif">\“Aspect@1”\ <=90 OR \“Aspect@1”\ >=270</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">Which worked for this assignment.</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">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)</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">I get the same error as above again.</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">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.</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">Thank you!</p><font color="#888888"><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">Wanda Norman</p></font></div>
<span>_______________________________________________</span><br><span>Qgis-user mailing list</span><br><span><a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a></span><br><span>List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></span><br><span>Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></span><br></div></blockquote></div></div></blockquote></div>