RegionGrow

Disponible con licencia de Image Analyst.

Disponible con una licencia de Spatial Analyst.

Resumen

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

Debate

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.

Sintaxis

RegionGrow (raster, seed_points, max_growth_radius_field, similarity_threshold_field, {fill_value_field})
ParámetroExplicaciónTipo de datos
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.

(El valor predeterminado es None)

String
Valor de retorno
Tipo de datosExplicación
Raster

The output raster.

Muestra de código

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")

Temas relacionados