TfSymmetricLinear (arcpy.sa)

サマリ

Defines a Symmetric Linear transformation function which is determined from the minimum and maximum 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

説明

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

A linear function is applied between the specified minimum and maximum values which is mirrored around the midpoint of the minimum and maximum. The corresponding input value to the mirrored point receives the highest preference value (the highest output evaluation value), with the preferences decreasing linearly as the input values move away from the mirrored point value.

To create a positive slope for the transformation function, set the minimum value to be less than the maximum value. To create a negative slope for the function, set the minimum value to be larger than the maximum value.

The following relationships between the minimum and maximum parameters and the thresholds are important to understand:

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

構文

TfSymmetricLinear ({minimum}, {maximum}, {lowerThreshold}, {valueBelowThreshold}, {upperThreshold}, {valueAboveThreshold})
パラメータ説明データ タイプ
minimum

The starting point for the Symmetric Linear transformation function. The point of inflection to mirror the function is determined by the midpoint of the minimum and maximum. If the minimum value is less than the maximum, the linear function will have a positive slope. If the minimum value is greater than the maximum, the linear function will be a negative slope.

The minimum cannot equal the maximum.

(デフォルト値は次のとおりです None)

Double
maximum

The ending point for the Symmetric Linear transformation function. The point of inflection to mirror the function is determined by the midpoint of the minimum and maximum. If the minimum value is less than the maximum, the linear function will have a positive slope. If the minimum value is greater than the maximum, the linear function will have a negative slope.

The minimum cannot equal the maximum.

(デフォルト値は次のとおりです None)

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.

(デフォルト値は次のとおりです 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.

(デフォルト値は次のとおりです 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.

(デフォルト値は次のとおりです 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.

(デフォルト値は次のとおりです None)

Variant

特性

プロパティ説明データ タイプ
minimum
(読み書き)

The value of the minimum for the transformation function which defines the starting point for the Symmetric Linear function.

Double
maximum
(読み書き)

The value of the maximum for the transformation function which defines the ending point for the Symmetric Linear function.

Double
lowerThreshold
(読み書き)

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
(読み書き)

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

Variant
upperThreshold
(読み書き)

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

Double
valueAboveThreshold
(読み書き)

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

Variant

コードのサンプル

Transformation function SymmetricLinear example 1 (Python window)

Demonstrates how to create a TfSymmetricLinear 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("distroads", TfSymmetricLinear(30, 8500, "#", "#", "#", "#"), 1, 10)
outRescale.save("c:/sapyexamples/rescaletfli1")
Transformation function SymmetricLinear example 2 (stand-alone script)

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

# Name: TfSymmetricLinear_Ex_02.py
# Description: Rescales input raster data using a SymmetricLinear 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 = "distroads"

# Create the TfSymmetricLinear object
minimum = 30
maximum = 8500
lowerthresh = "#"
valbelowthresh = "#"
upperthresh = "#"
valabovethresh = "#"
myTfFunction = TfSymmetricLinear(minimum, maximum, lowerthresh, valbelowthresh, upperthresh, valabovethresh)

# Set evaluation scale
fromscale = 1
toscale = 10

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

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

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

関連トピック

4/26/2014