2

I have downloaded data from the USGS to create a Map for a malaria risk in east africa but my question is only about the actuall Input in the Raster Calculator. I have a RFE Tiff that shows the Rainfall in the Area, the highest rainfall is within the value of 76 to 150 so I used the following expression in the Raster Calculator to get an Output with only these values: "ea06063_ea3606mod@1" >= 76 AND "ea06063_ea3606mod@1" <= 150. Unfortunately all I got as an Output was a black screen... Anybody knows what could be the mistake??

  • Try this ("ea06063_ea3606mod@1" >= 76) AND ("ea06063_ea3606mod@1" <= 150) – TsvGis Jul 27 '15 at 5:25
4

Assuming that these values between 76 and 150 exist at the map, the correct expression to do that is:

("ea06063_ea3606mod@1" >= 76 AND "ea06063_ea3606mod@1" <= 150)*("ea06063_ea3606mod@1")

Afterward, when you have the raster loaded in QGIS, in the layer properties unmark "no data value" and set 0 as your "Additional no data value".

  • This is just for my curiosity, but why *("ea06063_ea3606mod@1") at the end? – TsvGis Jul 27 '15 at 23:32
  • 2
    @TsvGis Because the first part of the expression produces only 1 (where the condition is valid) and 0 values (no valid condition). – xunilk Jul 27 '15 at 23:38
  • So if I understand correctly, by having *("ea06063_ea3606mod@1") at the end of the expression, allows the results to show the range of values between 76 and 150 rather than having the two values of 1 and 0 (True/False) – TsvGis Jul 27 '15 at 23:53
  • 1
    Yes and the 0 values are now the "no data value". – xunilk Jul 27 '15 at 23:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.