Aspect

Zusammenfassung

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

Diskussion

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.

Syntax

Aspect (raster)
ParameterErläuterungDatentyp
raster

The input raster.

Raster
Rückgabewert
DatentypErläuterung
Raster

The output raster.

Codebeispiel

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