You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Johannes Kolbe edited this page Jul 3, 2014
·
1 revision
It is possible to get several statistic values from Raster Coverages, such as the maximum, minimum, mean value, the histogram, etc.
To get these values you have to use the .statistics() method on an existing Raster Coverage and assign it to a new variable for further work. By default it will calculate most of the values but not the histogram and standard deviation. To calculate the histogram as well you can call the method like this: .statistics(PropertySets.pHISTOGRAM).
To access the histogram you can then use the method .histogram() and will get a list of tuples in return.
rc=RasterCoverage(n000302.mpr)
stats=rc.statistics(PropertySets.pHISTOGRAM)
stats.histogram()
#list of (value, frequency) pairs