Aspect

Resumen

Identifies the downslope direction of the maximum rate of change in value from each cell to its neighbors.

Debate

For more information about how this function works, see the Aspect 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

Aspect (raster)
ParámetroExplicaciónTipo de datos
raster

The input raster.

Raster
Valor de retorno
Tipo de datosExplicación
Raster

The output raster.

Muestra de código

Aspect example 1

This example calculates the aspect of the raster dataset.

from arcpy.ia import *
out_aspect_raster = Aspect("elevation.tif")
out_aspect_raster.save("C:/arcpyExamples/outputs/aspect.tif")
Aspect example 2

This example calculates the aspect of the raster dataset.

# Import the system modules
import arcpy
from arcpy.ia import *

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

# Set the local variables
in_raster = "elevation.tif"

# Execute Aspect function
out_aspect_raster = Aspect(in_raster)

# Save the output
out_aspect_raster.save("C:/arcpyExamples/outputs/aspect.tif")