What I want to do is rescale a few rasters from whatever they are now (i.e., values between -99 and +1000 OR -256 - +256 OR 0 - 3.23) to a normalised value (i.e. values between 0 and 1).

I would prefer to do it in model builder with standard tools, but I am not averse to writing a new one in Python.

Any info appreciated.


It likely depends on what version of ArcGIS you have. You need to find the minimum and maximum value of the grid. One trick, which works in any version, is to create a constant grid and use it as the zone for a zonal max and zonal min calculation. Now you have four grids: the constant (which you can throw away), another constant grid with the zonal (=global) max in every cell, a comparable min grid, and the original grid. Normalize the original grid with a linear change modeled after this one:

normalized = ([original] - [min]) / Float([max] - [min])

(Float may be needed to enforce rational division rather than integer division when the original grid is in integer format.)

  • 1
    This sounds achievable. I could package this up into its own model and use it as a single operation, right? – Alex Leith Jan 17 '12 at 23:45
  • Yep, that's the idea. – whuber Jan 17 '12 at 23:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.