FuzzyLarge (arcpy.sa)

Resumen

Defines a fuzzy membership function where the larger input values have membership closer to 1. The function is defined by a user-specified midpoint (which is assigned a membership of 0.5) with a defined spread.

Debate

The tool that uses the FuzzyLarge object: FuzzyMembership.

The equation for the fuzzy Large function is:

Large fuzzy function equation

The inputs to the equation are f1, the spread, and f2, the midpoint. Increasing the spread causes the fuzzy membership curve to become steeper.

The Large function is useful when the large input values have a higher membership.

The input values can be either integer or floating point positive values.

Fuzzy Large graph
Variations of the Fuzzy Large membership function.

Sintaxis

FuzzyLarge (midpoint, spread)
ParámetroExplicaciónTipo de datos
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 Large function. The spread generally ranges from 1 to 10, with the larger the value results in a steeper distribution from the midpoint.

(El valor predeterminado es 5)

Double

Propiedades

PropiedadExplicaciónTipo de datos
midpoint
(Lectura y escritura)

The user-defined value defining the midpoint for the membership function.

Double
spread
(Lectura y escritura)

Defines the spread of the membership function. The larger the value results in a steeper distribution from the midpoint.

Double

Ejemplo de código

FuzzyLarge example 1 (Python window)

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

import arcpy
from arcpy.sa import *
from arcpy import env
env.workspace = "c:/sapyexamples/data"
outFzyMember = FuzzyMembership("as_std", FuzzyLarge(12, 5))
outFzyMember.save("c:/sapyexamples/fzymemb")
FuzzyLarge example 2 (stand-alone script)

Performs a FuzzyMembership using the FuzzyLarge class.

# Name: FuzzyLarge_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 FuzzyLarge algorithm object
midpoint = 15
spread = 5
myFuzzyAlgorithm = FuzzyLarge(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/fzylarge")

Temas relacionados

9/12/2013