Formulas for the transformation functions
Available with Spatial Analyst license.
The formulas used for the transformation functions in the Rescale by Function tool will be explained in this section. The transformation function formulas are presented as Spatial Analyst Map algebra expressions.
The general formula for each transformation function is identified. By default, the general formula is altered to fit to the minimum (lowerThreshold) and the maximum (upperThreshold) of the input dataset. How the default parameters are determined is also presented below.
Using the general formula, any number of function curves can be defined, and any portion of the function curve can be captured. In the default version of the formula, there is only one curve for the function that will fit to the minimum and maximum of the input dataset. As a result, in addition to applying the linear scaling of the transformed values, data represented in different units, such as Celsius or Fahrenheit, will produce the same output evaluation values.
Apply a transformation function
Conceptually, the steps for applying a transformation function are as follows:
Specify the input dataset and function parameters.
Apply the transformation formula.
Scale the transformed values linearly to the evaluation scale.
The linear transformation equation used to scale the transformed values to the evaluation scale in step 3 above is as follows.
\(ScaledY = fromScale + (Y - min(Y)) * r\)
where:
\(Y = F(In)\), which is the transformed value with formula \(F\), which is shown in the following general forms where \(In\) is the input value
\(r\) is the result of \(\Large \frac {(toScale - fromScale)}{(max(Y) - min(Y))}\)
\(min(Y)\) is the minimum value of \(Y\)
\(max(Y)\) is the maximum value of \(Y\)
\(fromScale\) is the minimum of the evaluation scale (for example, 1)
\(toScale\) is the maximum of the evaluation scale (for example, 10)
Exponential
The following are the formulas and default values for the Exponential transformation function.
General form
The general form of the formula is as follows.
\(Exp((In – inShift) * baseFactor)\)
where:
\(In\) is the input value
\(inShift\) is the value subtracted from the input values
\(baseFactor\) is a multiplier for the shifted input values, which controls how steeply the exponential function increases
Default values
The default values of \(inShift\) and \(baseFactor\) are calculated as follows.
\(inShift = Con(toScale > fromScale, A, B)\)
and
\(baseFactor = Con(toScale > fromScale, C, D)\)
where:
\(A = \Large \frac {(minIn * Ln(toScale) - maxIn * Ln(fromScale))}{(Ln(toScale) - Ln(fromScale))}\)
\(B = \Large \frac {(minIn * Ln(fromScale) - maxIn * Ln(toScale))}{(Ln(fromScale) - Ln(toScale))}\)
\(C = \Large \frac {(Ln(toScale) - Ln(fromScale))}{(maxIn - minIn)}\)
\(D = \Large \frac {(Ln(fromScale) - Ln(toScale))}{(maxIn - minIn)}\)
\(Ln\) is the logarithm of a value with base e
\(minIn\) is the minimum of the input
\(maxIn\) is the maximum of the input
Gaussian
The following are the formulas and default values for the Gaussian transformation function.
General form
The general form of the formula is as follows.
\(Exp(-Spread * Square(In - MidPoint))\)
where:
\(Spread\) is the spread parameter, which controls the steepness of the decay from the midpoint
\(In\) is the input value
\(MidPoint\) is the midpoint parameter, which defines the center of the Gaussian curve
Default values
The default values of \(Spread\) and \(MidPoint\) are calculated as follows.
\(Spread = Ln(10) * 4 / Pow(MidPoint - minIn, 2)\)
and
\(MidPoint = (maxIn + minIn) / 2\)
where:
\(Ln(10)\) is the logarithm of 10 with base e
\(Pow(MidPoint - minIn, 2)\) is the value of \(MidPoint - minIn\) to the power of 2
\(minIn\) is the minimum of input
\(maxIn\) is the maximum of input
Large
The following are the formulas and default values for the Large transformation function.
General form
The general form of the formula is as follows.
\(1.0 / (1.0 + Pow(In / MidPoint, - Spread))\)
where:
\(In\) is the input value
\(MidPoint\) is the midpoint parameter, which defines the transition point of the function
\(Spread\) is the spread parameter, which controls how quickly the preference increases and decreases
Default values
The default values of \(Spread\) and \(MidPoint\) are calculated as below.
\(Spread = 5\)
and
\(MidPoint = (maxIn + minIn) / 2\)
where:
\(minIn\) is the minimum of input
\(maxIn\) is the maximum of input
Linear
The following are the formulas and default values for the Linear transformation function.
General form
The general forms of the formula according to the type of slope follow:
Positive slope (Min < Max):
\(Con(In < Min, 0, Con(In > Max, 1, (In - Min) / Diff))\)
Negative slope (Min > Max):
\(Con(In > Min, 0, Con(In < Max, 1, (In - Min) / Diff))\)
where:
\(In\) is the input value
\(Min\) is the specified minimum, which establishes the first point the Linear function must pass through
\(Max\) is the specified maximum, which establishes the second point the Linear function must pass through
\(Diff\) equals \(Max - Min\)
Default values
The default values of \(Min\) and \(Max\) are calculated as below.
\(Min = minIn\)
and
\(Max = maxIn\)
where:
\(minIn\) is the minimum of input
\(maxIn\) is the maximum of input
Logarithm
The following are the formulas and default values for the Logarithm transformation function.
General form
The general form of the formula is as follows.
\(Ln((In – inShift) * baseFactor)\)
where:
\(In\) is the input value
\(InShift\) is the value subtracted from the input values
\(baseFactor\) is the multiplier of the shifted input values, which controls the rise of the logarithm function
Default values
The default values of \(inShift\) and \(baseFactor\) are calculated as below.
\(inShift = Con(toScale > fromScale, A, B)\)
and
\(baseFactor = Con(toScale > fromScale, C, D)\)
where:
\(A = \Large \frac {(minIn * Exp(toScale) - maxIn * Exp(fromScale))}{(Exp(toScale) - Exp(fromScale))}\)
\(B = \Large \frac {(minIn * Exp(fromScale) - maxIn * Exp(toScale))}{(Exp(fromScale) - Exp(toScale))}\)
\(C = \Large \frac {(Exp(toScale) - Exp(fromScale))}{(maxIn - minIn)}\)
\(D = \Large \frac {(Exp(fromScale) - Exp(toScale))}{(maxIn - minIn)}\)
\(Exp\) is the exponential of a value with base e
\(minIn\) is the minimum of input
\(maxIn\) is the maximum of input
LogisticDecay
The following are the formulas for the Logistic Decay transformation function.
General form
The general form of the formula is as follows.
\(C / (1 + A * Exp((In – Min) * B))\)
The definitions of the parameters in the formula are the same as in LogisticGrowth.
Note:
In the LogisticGrowth equation, the Exponential calculations are determined from the negative of the value for calculating exponential: Exp(- (In - Min) * B).
LogisticGrowth
The following are the formulas and default values for the Logistic Growth transformation function.
General form
The general form of the formula is as follows.
\(C / (1 + A * Exp( - (In – Min) * B))\)
where:
\(Min\) is the specified minimum, which controls the starting point of the logistic growth
\(C\) is the capacity or upper horizontal asymptote
\(A\) determines the intercept when \(In = Min\)
\(B\) determines the base of exponential function
Exp
Default values
The default values of \(C\), \(A\), and \(B\) are determined as follows.
\(C = 100\)
\(A = C / yInterceptPercent - 1\)
\(B = \Large \frac {Ln(A)}{(0.5 * (Max + Min) - Min)}\)
where:
\(yInterceptPercent\) is the percent of y intercept divided by \(C\), which is set to 1 for
LogisticGrowthand 99 forLogisticDecayby default\(Min\) is the specified minimum, which is set to the minimum value of the input by default
\(Max\) is the specified maximum, which is set to the maximum value of the input by default
\(Ln(A)\) is the logarithm of \(A\) with base e
\(0.5 * (Max + Min)\) is the x coordinate of the inflection point \(y = C / 2\), making the inflection point in the middle of \(Min\) and \(Max\)
MSLarge
The following are the formulas and default values for the MSLarge transformation function.
General form
The general form of the formula is as follows.
\(Con(In > nMeans, 1 - (nStdv / (In - nMeans + nStdv)), 0)\)
where:
\(In\) is the input value
\(nMeans\) equals \(meanMultiplier\) * mean
\(nStdv\) equals \(STDMultiplier\) * std, in which std refers to the standard deviation among the entire population
Default values
Both meanMultiplier and STDMultiplier are set to 1 by default.
MSSmall
The following are the formulas and default values for the MSSmall transformation function.
General form
The general form of the formula is as follows.
\(Con(In > nMeans, nStdv / (In - nMeans + nStdv), 1)\)
where:
\(In\) is the input value
\(nMeans\) equals
meanMultiplier* mean\(nStdv\) equals
STDMultiplier* std, in which std refers to the standard deviation among the entire population
Default values
Both meanMultiplier and STDMultiplier are set to 1 by default.
Near
The following are the formulas and default values for the Near transformation function.
General form
The general form of the formula is as follows.
\(1.0 / (1.0 + Spread * Pow(In - MidPoint, 2))\)
where:
\(In\) is the input value
\(Spread\) is the spread parameter, which controls the steepness of the decay from the midpoint
\(MidPoint\) is the midpoint parameter, which defines the center of the curve
Default values
The default values of \(Spread\) and \(MidPoint\) are calculated as follows.
\(Spread = 36 / Pow(MidPoint - minIn, 2)\)
and
\(MidPoint = (maxIn + minIn) / 2\)
where:
\(Pow(MidPoint - minIn, 2)\) is the value of \(MidPoint - minIn\) to the power of 2
\(minIn\) is the minimum of input
\(maxIn\) is the maximum of input
Power
The following are the formulas and default values for the Power transformation function.
General form
The general form of the formula is as follows.
\(Pow(In – inShift, Exponent)\)
where:
\(In\) is the input value
\(inShift\) is the value subtracted from the input values
\(Exponent\) is the exponent to raise the function to
Default values
The default values of \(inShift\) and \(Exponent\) are calculated as follows.
\(inShift = Con(toScale > fromScale, A, B)\)
where:
\(A = Con(fromScale == 1, minIn - 1, minIn)\)
\(B = Con(toScale == 1, minIn - 1, minIn)\)
\(minIn\) is the minimum of input
\(maxIn\) is the maximum of input
and
\(Exponent = Con(toScale > fromScale, C, D)\)
where:
\(C = Con(fromScale == 0, C1, Con(fromScale == 1, C2, 2))\)
\(C1 = Con(toScale <= 1, 1, Ln(toScale) / (maxIn - inShift))\)
\(C2 = Ln(toScale) / Ln(maxIn - inShift)\)
\(D = Con(toScale == 0, D1, Con(toScale == 1, D2, 2))\)
\(D1 = Con(fromScale <= 1, 1, Ln(fromScale) / (maxIn - inShift))\)
\(D2 = Ln(fromScale) / Ln(maxIn - inShift)\)
\(Ln\) is the logarithm of a value with base e
\(minIn\) is the minimum of input
\(maxIn\) is the maximum of input
Small
The following are the formulas and default values for the Small transformation function.
General form
The general form of the formula is as follows.
\(1.0 / (1.0 + Pow(In / MidPoint, Spread))\)
where:
\(In\) is the input value
\(MidPoint\) is the midpoint parameter, which defines the transition point of the function
\(Spread\) is the spread parameter, which controls how quickly the preference decreases and increases
Default values
The default values of \(Spread\) and \(MidPoint\) are calculated as follows.
\(Spread = 5\)
and
\(MidPoint = (maxIn + minIn) / 2\)
where:
\(minIn\) is the minimum of input
\(maxIn\) is the maximum of input
SymmetricLinear
The following are the formulas and default values for the Symmetric Linear transformation function.
General form
The general forms of the formula for different types of slopes are as follows.
For positive slopes (\(Min < Max\)):
\(Con(In < Min , 0, Con(In < MidP, (In - Min) / HDiff, Con(In > Max, 0, (Max - In) / HDiff)))\)
For negative slopes (\(Min > Max\)):
\(Con(In < Max, 1, Con(In < MidP, (In - MidP) / HDiff, Con(In > Min, 1, (MidP - In) / HDiff)))\)
where:
\(In\) is the input value
\(Min\) is the specified minimum, which establishes one point the \(SymmetricLinear\) function must pass through
\(Max\) is the specified maximum, which establishes the other point the \(SymmetricLinear\) function must pass through
\(Diff\) equals \(Max - Min\)
\(HDiff\) equals \(0.5 * Diff\)
\(MidP\) equals \(Min + HDiff\)
Default values
The default values of \(Min\) and \(Max\) are calculated as follows.
\(Min = minIn\)
and
\(Max = maxIn\)
where:
\(minIn\) is the minimum of input
\(maxIn\) is the maximum of input