raster calculator expression help for linear mapping

4187
4
Jump to solution
05-07-2015 03:14 PM
by Anonymous User
Not applicable

So i have two raster (raster A and B) that represent maximum and minimum value of a parameter. I have another raster that reprensent the value that i want to use to calculate the values between the min-max range using this equation:

(?function?)*(-exp(rasterC))

The problem is that the result sometimes is not between the range in some cells. What kind of statistical function can I use for ?function? to remain between min-max range?

I used (Max-min/mean) for ?function?... but is not the correct function.

help.png

0 Kudos
1 Solution

Accepted Solutions
curtvprice
MVP Esteemed Contributor

raster_a = min raster

raster_b = max raster

raster_c = 0 -> 1 raster

A linear mapping of C (0->1) on to the linear range of (B->A) is

"raster_a" + ((1.0 - "raster_c") * ("raster_b" - "raster_a"))

View solution in original post

4 Replies
SepheFox
Frequent Contributor

If I understand your question correctly, you need the Con tool: Con (raster C, raster A, raster B, "value = 1")

JayantaPoddar
MVP Esteemed Contributor

In Raster Calculator, write a conditional statement like below:

Con(InRasC = 0, InRasA, Con(InRasC = 1, InRasB, InRasC))



Think Location
curtvprice
MVP Esteemed Contributor

raster_a = min raster

raster_b = max raster

raster_c = 0 -> 1 raster

A linear mapping of C (0->1) on to the linear range of (B->A) is

"raster_a" + ((1.0 - "raster_c") * ("raster_b" - "raster_a"))

SepheFox
Frequent Contributor

Oh, I see now what he's looking for.