change range of raster

3304
6
Jump to solution
09-18-2016 09:08 PM
LanoYado
New Contributor III

Hi, I have a raster layer that has values between 0.5 to 2.0. I want to change (narrow) the range of its values to be between [0.95 1.05]. Every cell value of the layer of course changes accordingly.  Any tool or way in ArcGIS to do that?

Thanks in advance 

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

don't know if there is a builtin but there are examples of rescaling data using python on the web

ie python - Convert a number range to another range, maintaining ratio - Stack Overflow 

which is in theory could be implemented using The transformation functions available for Rescale by Function—Help | ArcGIS for Desktop using a linear scale function Rescale by Function—Help | ArcGIS for Desktop 

but I haven't tried it

View solution in original post

6 Replies
DanPatterson_Retired
MVP Emeritus

don't know if there is a builtin but there are examples of rescaling data using python on the web

ie python - Convert a number range to another range, maintaining ratio - Stack Overflow 

which is in theory could be implemented using The transformation functions available for Rescale by Function—Help | ArcGIS for Desktop using a linear scale function Rescale by Function—Help | ArcGIS for Desktop 

but I haven't tried it

NeilAyres
MVP Alum

I had never seen that rescale by function tool. Very cool.Thanks Dan

0 Kudos
DanPatterson_Retired
MVP Emeritus

Neil... There is a whole load of other functions in that associated list The transformation functions  looking for a purpose... 

XanderBakker
Esri Esteemed Contributor

You could use the raster calculator and apply something like: 

((RasterValue - 0.5) / (2.0 - 0.5)) * (1.05 - 0.95) + 0.95

... to stretch the values linearly.

However I like the option provided by Dan_Patterson  better.

LanoYado
New Contributor III

Thanks all. Very helpful.

0 Kudos
DanPatterson_Retired
MVP Emeritus

I marked your question assumed answered, if that is alright, since you didn't select one