TfLogisticGrowth
汇总
定义一个逻辑增长变换函数,该函数是根据最大值、最小值和 y 截距百分比这三个形状控制参数,以及确定函数应用范围的阈值上限和下限确定的。
讨论
使用 TfLogisticGrowth 对象的工具为 按函数重设等级 。
函数值的范围为从 0 到 100,此范围随后将转换为评估等级。
如果设置的 minimum 参数大于 lowerThreshold 值,或者设置的 maximum 参数小于 upperThreshold 值,则函数曲线将以较快速率增长。如果设置的 minimum 参数小于 lowerThreshold 值,或者设置的 maximum 参数大于 upperThreshold 值,则函数曲线将以较慢速率增长。
语法
TfLogisticGrowth({minimum}, {maximum}, {yInterceptPercent}, {lowerThreshold}, {valueBelowThreshold}, {upperThreshold}, {valueAboveThreshold})
| 名称 | 说明 | 数据类型 |
|---|---|---|
|
minimum (可选) |
逻辑增长变换函数的起点。 最小值必须小于最大值。 (默认值为 None) |
Double |
|
maximum (可选) |
逻辑增长变换函数的终点。 最小值必须小于最大值。 (默认值为 None) |
Double |
|
yInterceptPercent (可选) |
确定逻辑增长曲线的增长部分的取值范围。
(默认值为 1.0) |
Double |
|
lowerThreshold (可选) |
定义开始应用指定变换函数的起始值。在输出栅格上与
(默认值为 None) |
Double |
|
valueBelowThreshold (可选) |
此用户定义的值用于分配输入值小于
(默认值为 None) |
Variant |
|
upperThreshold (可选) |
定义终止应用指定变换函数的结束值。在输出栅格上与
(默认值为 None) |
Double |
|
valueAboveThreshold (可选) |
此用户定义的值用于分配输入值大于
(默认值为 None) |
Variant |
属性
| 名称 | 说明 | 数据类型 |
|---|---|---|
|
minimum (读取和写入) |
变换函数的 |
Double |
|
maximum (读取和写入) |
变换函数的 |
Double |
|
yInterceptPercent (读取和写入) |
变换函数的 |
Double |
|
lowerThreshold (读取和写入) |
变换函数的 |
Double |
|
valueBelowThreshold (读取和写入) |
输入值低于 |
Variant |
|
upperThreshold (读取和写入) |
变换函数的 |
Double |
|
valueAboveThreshold (读取和写入) |
输入值高于 |
Variant |
代码示例
演示如何创建 TfLogisticGrowth 类以及如何在 Python 窗口的 RescaleByFunction 工具中使用该类。
import arcpy
from arcpy.sa import *
from arcpy import env
env.workspace = "c:/sapyexamples/data"
outRescale = RescaleByFunction("biomass", TfLogisticGrowth(30, 412000, 15, "#", "#", "#", "#"), 1, 10)
outRescale.save("c:/sapyexamples/rescaletflg1")
演示如何通过 TfLogisticGrowth 类在 RescaleByFunction 工具中转换输入数据。
# Name: TfLogisticGrowth_Ex_02.py
# Description: Rescales input raster data using a LogisticGrowth function and
# transforms the function values onto a specified evaluation scale.
# Requirements: Spatial Analyst extension
# 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 = "biomass"
# Create the TfLogisticGrowth object
minimum = 30
maximum = 412000
yintercept = 15
lowerthresh = "#"
valbelowthresh = "#"
upperthresh = "#"
valabovethresh = "#"
myTfFunction = TfLogisticGrowth(minimum, maximum, yintercept, lowerthresh, valbelowthresh, upperthresh, valabovethresh)
# Set evaluation scale
fromscale = 1
toscale = 10
# Run RescaleByFunction
outRescale = RescaleByFunction(inRaster, myTfFunction, fromscale, toscale)
# Save the output
outRescale.save("c:/sapyexamples/rescaletflg2")