# How to standardize raster output from 0 to 100 using raster algebra?

I am working on generating an integrated moisture index based on the following equation:

IMI = (hill shade * 0.5) + (curvature * 0.15) + (flow accumulation * 0.35)

Iverson et al. 1997

Another source

The equation requires that hillshade, curvature and flow accumulation are standardized from 0 - 100. How can I accomplish this standardization from 0-100 using raster algebra?

-
You should contact the authors: they have been remiss in not describing what they did with sufficient clarity to reproduce their work. If the "standardization" is applied on a grid-to-grid basis, it becomes arbitrary and of little scientific use (because the index will depend, among other things, on the extent of the grid, as well as its resolution in the case of curvature). It is also clear that their work is (a) subjective and (b) restricted in applicability to their particular region and their particular datasets: there is no evidence that this index generalizes. – whuber Feb 6 '13 at 19:06
I don't disagree with @whuber and wonder if CTI would not be a more stable index. – Jeffrey Evans Feb 6 '13 at 19:40

The language of data transformation can be confusing. Standardization refers to transforming your data so it has a mean of 0 and a standard deviation of 1 and is only appropriate for normally (Gaussian) distributed data. Whereas, normalization transforms your data so that the minimum value is 0 and the maximum is 1 while keeping the shape of the original distribution. You are wanting a stretch or normalization.

Here is the raster algebra syntax for a data stretch. The "+ 0" is, in this case, obviously irrelevant but is left in for cases where the desired minimum value is not zero. The min("raster") and max("raster") refer to the global min/max values of the rasters. I provide this example because it allows a specification of any desired output min/max raster values.

``````("raster" - min("raster")) * 100 / (max("raster") - min("raster")) + 0
``````

In your case you could just normalize and multiply by 100. The reason for this transformation is because the index needs the summed variables to be in the same variable space.

``````("raster" - min("raster")) / (max("raster") - min("raster")) * 100
``````

If you are using ArcGIS this toolbox has a tool for statistical transformations, including normalization. For this model it is not necessary to have the inputs in a 1-100 range, you can use 0-1 and then multiply the output by 100 to get the desired data range for the index.

-
These points are good but I believe they are not applicable to the question. The referenced paper is horribly vague on precisely what "standardized" (their term) means, but it is evident that the process is intended to create reproducible values that can be used for "prediction." Accordingly, it seems inappropriate to normalize separately within each raster, for then the results are arbitrary (they depend on the grid's extent, for instance). Moreover, because curvature and flow acccumulation have no effective bounds, some form of nonlinear normalization is needed. – whuber Feb 6 '13 at 19:00
@whuber, I don't understand how the answer is not applicable? Could you please clarify what exactly you feel is irrelevant to the question at hand? BTW, I am quite good friends with the authors if you would like me to put you in touch to voice your concerns with the index. – Jeffrey Evans Feb 6 '13 at 23:31
I don't believe it is applicable because I cannot believe this is what the authors meant by "standardize." If it is, their "index" has no generalizability (and its credibility is suspect for that matter), due to the arbitrary factors in its construction. I can see how universal normalization of the hillshade is possible (because the authors do provide the hillshading azimuth and elevation), but I cannot see how a universal linear normalization of either curvature or flow accumulation could be defined (or even make physical sense in terms of being linearly related to moisture). – whuber Feb 7 '13 at 0:01
Here is the authors response to my email about the scalability/transferability of the index, please note that I do not endorse or agree with his response, I am just passing it along: "And you are correct, IMI is scaled purposely to be a relative index across the region of interest. I wanted it to show the relative moisture situation locally; if the variables were fixed in range, there would be more homogenation. It is meant to be an index with the user given flexibility to adjust both the scale ranges for the variables and the weights of the variables going into the final index score." – Jeffrey Evans Feb 7 '13 at 16:49
Sorry, TNC recently killed conservationonline.rog. I am in the process of building a new tool site on conservationgateway.org but am very time limited, so this is not forthcoming. In the interim, you can access the toolbox via my website (evansmurphy.wix.com/evansspatial) under the tools section. I should also be posting a new version soon. – Jeffrey Evans Jul 5 '13 at 17:19

Remember that, for standardizing data, you assume that this data is in a normal distribution. If the data is not in a normal distribution, it is advisable to use percentile rank instead of normalization. A good explanation about the theory and about how to do it in SPSS are in these links:

http://www.psychstat.missouristate.edu/introbook/sbk14m.htm

http://blogs.perficient.com/businessintelligence/2012/03/21/ranking-your-cases-ibm-spss-statistics/ Anyway, if you are using ArcGIS, a good option is to stretch your raster using "Equalize Histogram", than export the raster ("Data" -> "Export data") using the option "use renderer" and setting the "No Data Value" to 0. This will give you a percentile rank from 1 to 255 and you can re-scale it dividing your raster values by 2.5.

-
Thank you for your contribution. Unfortunately, most of it is wrong or misleading. First, "standardization" is used here in a different sense than the "normalization" of the question. Second, standardization does not assume data are normally distributed. Finally, a histogram equalization will suffer from all the arbitrariness described in comments to another answer and be even more confusing and less interpretable. – whuber Dec 3 '13 at 17:00

Using Reclassify tools from arctool box also we can standardize the raster layer to a specified scale (1 to 3) (1 to 5) (1 to 9) (1 to 100).

-
Welcome to gis stack exchange. Sorry for the down-vote but your answer is incorrect. Using reclass would provide discrete classes, based on defined ranges, and not a standardization across a continuous range of values where, each value is reassigned to a corresponding new value in the defined data range. Additionally, the OP's data is floating point and needs to retain the decimal precision. – Jeffrey Evans Mar 29 at 18:50