1

There is plenty unknown about how to use raster calculator, for example:

  1. how to write NODATA (Null) value in expression
  2. is it possible to use within (polygonLayerName) to clip result
  3. between shown operators there is even "not equal" symbol, you need to find yourself it is "!=" etc.

Generally is there any manual/help/tutorial to QGIS raster calculator describing what is and is not possible to do with it?

  • 1
    "...is and is not posssible" is a pretty broad question. Are you looking for something beyond the Documentation or this high-ranked search result? Some of your questions, such as the nodata / null issue are addressed at other questions here on GIS.SE. There is also the Raster Calc Plugin, which is different from the Raster Calculator in QGIS and has some documentation at the link. – Chris W May 30 '14 at 20:49
  • The "is not" is meant in the way of only important basics like for example you can't calculate grids in different projections, can you? The documentation site is brand new to me so thank you for that. If that site would add info about projection, null value, not equal, (possible clipping to polygon layer?) and few more advanced examples than it is all I am after. Thank you. Also info about Raster Calc Plugin is great, I didn't know about that either. – Miro Jun 2 '14 at 0:28
3

There is the Raster Calculator Documentation file and this Tutorial which give some information and examples. I am not positive, but I believe the Raster Calculator is 'what you see is what you get' in terms of functionality. There is a plugin available called RasterCalc that provides more functions (compared to the default Raster Calculator - not equal, for example) using both buttons and functions only available by typing them in, as noted at the link.

Some of your other questions may be more general in nature as to how raster calculation works and not the specific tool (ie projections, differing cell sizes and extents, etc.). Null values may also fall in that category - there is another question here on SE related to that: How to change null values raster values to 0 in QGIS? Clipping to a polygon layer could be something also known as a mask but it looks like the two options above only mask by values. There is a tool for it though.

  • Thank you, I am hesitating to accept this answer because though it is very helpful it doesn't answer how to work with no data (Null) value which is first and one of the most important parts of my question. Unless there is no way to specify NULL value in raster calculator so I can't do expression "IF A!=Null keep A, IF A=Null take B" – Miro Jun 2 '14 at 5:34
  • And my NULL value in TIF files is (probably because of conversion from other format - ERS/Surfer GRD) something like 1.70141e+38. – Miro Jun 2 '14 at 5:42
  • 1
    @miro I believe null values is a general issue to QGIS and not the raster calculator specifically. Per a comment on one of the answers in that question I linked to, you can set in the QGIS preferences how null values are represented in a raster. It appears that neither raster calculator can address null directly. – Chris W Jun 2 '14 at 20:50
  • 1
    Fair enough, I am taking it as not possible, thank you. – Miro Jun 2 '14 at 23:54
  • 1
    Oh sure it is possible. I can use gdal_translate (Raster/Conversion/Translate), set the Nodata end edit expression to -a_nodata None. Then the Null value becomes something like 1.70141e+38 which I can mask in raster calculator by something like A<10000 because all other values are way below that. I meant it is not possible with raster calculator itself. – Miro Jun 3 '14 at 0:46

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.