需要 Spatial Analyst 许可。
摘要
以隶属度更接近于 1 的较小输入值定义模糊隶属度函数。通过一个用户定义的中点(分配的隶属度为 0.5)和定义的散度来定义函数。
讨论
使用 FuzzySmall 对象的工具:模糊隶属度。
FuzzySmall 函数的方程为:
方程的输入为 f1(散度 (spread))和 f2(中点 (midpoint))。增大散度会导致模糊隶属度曲线变得陡峭。
当较小的输入值具有较高的隶属度时,较小值函数十分有用。
输入值可以为整型值或浮点型正值。
语法
FuzzySmall (midpoint, spread)
参数 | 说明 | 数据类型 |
midpoint | The user-defined value with a fuzzy membership of 0.5. The default is the midpoint of the range of values of the input raster. | Double |
spread | Defines the spread of the Small function. The spread generally ranges from 1 to 10, with the larger the value results in a steeper distribution from the midpoint. (默认值为 5) | Double |
属性
属性 | 说明 | 数据类型 |
midpoint (读写) | 定义隶属度函数中点的用户定义值。 | Double |
spread (读写) | Defines the spread of the membership function. The larger the value results in a steeper distribution from the midpoint. | Double |
代码实例
FuzzySmall 示例 1(Python 窗口)
演示如何在 Python 窗口下创建 FuzzySmall 类,并通过 FuzzyMembership 工具使用该类。
import arcpy
from arcpy.sa import *
from arcpy import env
env.workspace = "c:/sapyexamples/data"
outFzyMember = FuzzyMembership("as_std", FuzzySmall(19, 8))
outFzyMember.save("c:/sapyexamples/fzysml")
FuzzySmall 示例 2(独立脚本)
使用 FuzzySmall 类执行 FuzzyMembership。
# Name: FuzzySmall_Ex_02.py
# Description: Scales input raster data into values ranging from zero to one
# indicating the strength of a membership in a set.
# 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 = "as_std"
# Create the FuzzySmall algorithm object
midpoint = 12
spread = 8
myFuzzyAlgorithm = FuzzySmall(midpoint, spread)
# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")
# Execute FuzzyMembership
outFuzzyMember = FuzzyMembership(inRaster, myFuzzyAlgorithm)
# Save the output
outFuzzyMember.save("c:/sapyexamples/fzysml2")