TfMSSmall

Mit der Spatial Analyst-Lizenz verfügbar.

Zusammenfassung

Defines an MSSmall transformation function which is determined from the mean multiplier and standard deviation multiplier shape–controlling parameters as well as the lower and upper threshold that identify the range within which to apply the function.

Learn more about how the parameters affect this transformation function

Diskussion

The tool that uses the TfMSSmall object is Rescale by Function.

Where x is the input value, there are two equations for the MSSmall function, depending on the product of a * m:

  • If x > a * m:

    f(x) = (b * s) / (x - (a * m) + (b * s))

    • where:

      x = the input value

      m = the mean

      s = the standard deviation

      a = a multiplier of the mean

      b = a multiplier of the standard deviation

      The a and b multipliers are input parameters.

  • If x <= a * m:

    f(x) = 0

The function values range from 0 to 1, which are then transformed to the evaluation scale.

The MSSmall function is useful when the small input values are preferred and they should receive the higher output evaluation values.

The result from the MSSmall transformation function can be similar to that of the Small transformation function, depending on how the multipliers of the mean and standard deviation are defined.

Syntax

TfMSSmall ({meanMultiplier}, {STDMultiplier}, {lowerThreshold}, {valueBelowThreshold}, {upperThreshold}, {valueAboveThreshold})
ParameterErläuterungDatentyp
meanMultiplier

The multiplier for the mean of the input values in the MSSmall function equation.

The meanMultiplier must be greater than 0.

(Der Standardwert ist 1.0)

Double
STDMultiplier

The multiplier for the standard deviation of the input values in the MSSmall function equation.

The STDMultiplier must be greater than 0.

(Der Standardwert ist 1.0)

Double
lowerThreshold

Defines the starting value at which to begin applying the specified transformation function. The input value corresponding to the lowerThreshold is assigned to the fromScale evaluation scale value on the output raster. Input values below the lowerThreshold are assigned to the valueBelowThreshold and are not considered in the function value range.

The lowerThreshold must be less than the upperThreshold.

(Der Standardwert ist None)

Double
valueBelowThreshold

A user-specified value to assign output cell locations with input values below the lowerThreshold.

The value for valueBelowThreshold can be float, integer, or NoData. In the tool dialog box, no quotation marks are used around NoData; however, quotation marks are required around "NoData" when scripting.

(Der Standardwert ist None)

Variant
upperThreshold

Defines the ending value at which to stop applying the specified transformation function. The input value corresponding to the upperThreshold is assigned to the toScale evaluation scale value on the output raster. Input values above the upperThreshold are assigned to the valueAboveThreshold and are not considered in the function value range.

The lowerThreshold must be less than the upperThreshold.

(Der Standardwert ist None)

Double
valueAboveThreshold

A user-specified value to assign output cell locations with input values above the upperThreshold.

The value for valueAboveThreshold can be float, integer, or NoData. In the tool dialog box, no quotation marks are used around NoData; however, quotation marks are required around "NoData" when scripting.

(Der Standardwert ist None)

Variant

Eigenschaften

EigenschaftErläuterungDatentyp
meanMultiplier
(Lesen und schreiben)

The value of the meanMultiplier for the transformation function which identifies the multiplier for the mean in the equation.

Double
STDMultiplier
(Lesen und schreiben)

The value of the STDMultiplier for the transformation function which identifies the multiplier for the standard deviation in the function equation.

Double
lowerThreshold
(Lesen und schreiben)

The value of the lowerThreshold for the transformation function which defines the starting value at which to begin applying the specified transformation function.

Double
valueBelowThreshold
(Lesen und schreiben)

The value that will be assigned to the output cells whose input values are below the lowerThreshold.

Variant
upperThreshold
(Lesen und schreiben)

The value of the upperThreshold for the transformation function which defines the ending value at which to stop applying the specified function.

Double
valueAboveThreshold
(Lesen und schreiben)

The value that will be assigned to the output cells whose input values are above the upperThreshold.

Variant

Codebeispiel

Transformation function MSSmall example 1 (Python window)

Demonstrates how to create a TfMSSmall class and use it in the RescaleByFunction tool within the Python window.

import arcpy
from arcpy.sa import *
from arcpy import env
env.workspace = "c:/sapyexamples/data"
outRescale = RescaleByFunction("elevation", TfMSSmall(1.5, 1.75, "#", "#", "#", "#"), 1, 10)
outRescale.save("c:/sapyexamples/rescaletfms1")
Transformation function MSSmall example 2 (stand-alone script)

Demonstrates how to transform the input data with the RescaleByFunction tool using the TfMSSmall class.

# Name: TfMSSmall_Ex_02.py
# Description: Rescales input raster data using a MSSmall function and
#     transforms the function values onto a specified evaluation scale. 
# Requirements: Spatial Analyst Extension
# Author: esri

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

# Set environment settings
env.workspace = "C:/sapyexamples/data"

# Set local variables
inRaster = "elevation"

# Create the TfMSSmall object
meanmult = 1.5
stdmult = 1.75
lowerthresh = "#"
valbelowthresh = "#"
upperthresh = "#"
valabovethresh = "#"
myTfFunction = TfMSSmall(meanmult, stdmult, lowerthresh, valbelowthresh, upperthresh, valabovethresh)

# Set evaluation scale
fromscale = 1
toscale = 10

# Execute RescaleByFunction
outRescale = RescaleByFunction(inRaster, myTfFunction, fromscale, toscale)

# Save the output
outRescale.save("c:/sapyexamples/rescaletfms2")

Verwandte Themen