Possible to calculate a raster's standard deviation break values?

489
3
Jump to solution
01-30-2013 06:56 AM
NickJacob
New Contributor II
Hello,

I'm trying to reclassify a raster by standard deviation using arcpy.  Problem is that when I go to use RemapRange I don't know how to calculate the break values for my new classes.  Does anybody know how to get around this?  I can access a few raster properties via GetRasterProperties_management(), but I need actual break values before I can reclassify.

arcpy.sa.Reclassify (in_raster, reclass_field, remap, {missing_values})
arcpy.sa.RemapRange (remapTable)
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
markdenil
Occasional Contributor III
GetRasterProperties_management (in_raster, "STD", {band_index})
gives you the Standard Deviation.

GetRasterProperties_management (in_raster, "MEAN", {band_index})
gives you the mean.

Similarly, MINIMUM and MAXIMUM returns the range.

The first Standard Deviation should be centered on the Mean: half above and half below.
The other breaks are full StdDev steps in each direction, to the end of the range.

View solution in original post

0 Kudos
3 Replies
markdenil
Occasional Contributor III
GetRasterProperties_management (in_raster, "STD", {band_index})
gives you the Standard Deviation.

GetRasterProperties_management (in_raster, "MEAN", {band_index})
gives you the mean.

Similarly, MINIMUM and MAXIMUM returns the range.

The first Standard Deviation should be centered on the Mean: half above and half below.
The other breaks are full StdDev steps in each direction, to the end of the range.
0 Kudos
NickJacob
New Contributor II
Thank you!  Great answer.
0 Kudos
AndrewChapkowski
Esri Regular Contributor
You can also use the arcpy.Raster object to get all the properties a tad faster.

Check out: http://resources.arcgis.com/en/help/main/10.1/index.html#//018z00000051000000
0 Kudos