I have been trying to 'range standardise' or normalise my raster values from 0-100 and I know how to do this mathematically:
("raster"-min("raster"))/(max("raster")-min("raster"))*100
and I have input this equation into the raster calculator using both the min() and max() and the .minimum and .maximum syntax.
Why are these not working for me? ArcGIS 10.3.1
Answer
Raster objects have minimum and maximum (as well as mean and standardDeviation) properties that can be accessed in the raster calculator.
("raster" - "raster".minimum) / ("raster".maximum - "raster".minimum) * 100
This will work as long as you have already calculated statistics for the raster, otherwise it will fail as "raster".minimum
will return None
.
Messages
Executing: RasterCalculator "("raster" - "raster".minimum) / ("raster".maximum - "raster".minimum) * 100" c:\Temp\Default.gdb\rastercalc
Start Time: Tue May 10 09:46:45 2016
(Raster(r"raster") - Raster(r"raster").minimum) / (Raster(r"raster").maximum - Raster(r"raster").minimum) * 100
Succeeded at Tue May 10 09:46:48 2016 (Elapsed Time: 3.17 seconds)
No comments:
Post a Comment