# How to create a standard deviation map from three rasters in QGIS?

I have 3 normalised (0-100) raster maps. Is it possible to get a map which shows the standard deviation? I'd like to see the areas with smaller and higher std deviation.

Thank you!

-
In light of two distinctly different (but potentially) correct answers to this question that have been offered, could you please clarify whether you need a global SD for each map or a local SD for the stack of three maps? – whuber Nov 27 '12 at 21:40
Yes I need the SD for the stack of the three maps. These maps are yield maps of three wheat harvesting periods of the same field. Bevore creating an average map (after normalisation) for further data processing I need to know if it is worth to put them together. When we always have nearly the same values in an area we know that we can trust our "potential" or average map. The should be the goal of my process. – Pimpel Nov 28 '12 at 6:54

You can use the GRASS GIS plugin to complete this task. First setup your views and map coundaries for your rasters in GRASS. Import your rasters into GRASS. You then want to use r.series function in GRASS to do this. It can take multiple layers, compute multiple kinds of statistics and render a result raster that visually represents those statistics.

Here is the manual on r.series

There does appear to be a problem with the plugin that keeps reporting invalid characters in filename for the input layers. But if you use the GRASS console to execute the function the results work.

-

Here's a general process

• Find the mean and standard deviation
• mean is m and standard deviation is o, then your 'smaller' standard deviation values would be less than m-o and 'higher' standard deviation values would be greater than m+o. Use that to create a new layer.

In QGIS,

• Raster -> Miscellaneous -> Info, which will print mean and standard deviation. Compute the m-o and m+o values.
• Use Raster -> Raster calculator. ssuming your layer name is raster input the following expression 'raster@1 > m+o OR raster@1 < m+o'
• The new layer would have pixel values of 1 that are outside 1 std. deviation. Other pixels will be 0.
-
I think you may be interpreting the question as asking for the standard deviations of all values within a raster and then using those as thresholds to flag larger or smaller values. This is a kind of "global" procedure. I believe the question asks for a local procedure in which the SD of each stack of 3 values is computed separately at each cell. The result is a new grid of those SDs. – whuber Nov 27 '12 at 21:39