RegionGrow

Mit der Image Analyst-Lizenz verfügbar.

Mit der Spatial Analyst-Lizenz verfügbar.

Zusammenfassung

Groups adjacent pixels together depending on the specified radius from the seed point.

Diskussion

For more information about how this function works, see the Region Grow raster function.

The referenced raster dataset for the raster object is temporary. To make it permanent, you can call the raster object's save method.

Syntax

RegionGrow (raster, seed_points, max_growth_radius_field, similarity_threshold_field, {fill_value_field})
ParameterErläuterungDatentyp
raster

The input raster.

Raster
seed_points

The point feature class, serving as the initial seeds for the algorithm.

Each seed point corresponds to one entry in the attribute table, which includes values for the maximum growth radius, similarity threshold, and an optional fill value.

String
max_growth_radius_field

The field in the attribute table that defines the maximum growth radius, in the image's spatial reference units.

String
similarity_threshold_field

The field that defines the similarity threshold, as Euclidean distance in spectral space.

String
fill_value_field

The field that defines the fill value for the group of pixels formed from each seed point. In a multiband image, all bands will be assigned this value.

(Der Standardwert ist None)

String
Rückgabewert
DatentypErläuterung
Raster

The output raster.

Codebeispiel

RegionGrow example

Groups adjacent pixels based on the input seed points and assigns fill values for each group of pixels.

from arcpy.sa import *
out_regiongrow_raster = RegionGrow("mlc.tif", "seeds.shp",
                                   "radius", "similarity")
out_regiongrow_raster.save(
    "C:/arcpyExamples/outputs/Multispectral_Landsat_grow.crf")
RegionGrow example

Groups adjacent pixels based on the input seed points and assigns fill values for each group of pixels.

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

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

# Set the analysis environments
arcpy.env.workspace = "C:/arcpyExamples/data"

# Set the local variables
raster = "Multispectral_Landsat.tif"
seed_points = "seed_point.shp"
max_growth_radius_field = "radius"
similarity_threshold_field = "similarity"
fill_value_field = "None"

# Apply RegionGrow function
out_regiongrow_raster = RegionGrow(raster, seed_points, max_growth_radius_field,
                                   similarity_threshold_field, fill_value_field)

# Save the output
out_regiongrow_raster.save("C:/arcpyExamples/outputs/Mul_spec_RegionGrow.crf")

Verwandte Themen