Aspect (3D Analyst)

Available with Spatial Analyst license.

Available with 3D Analyst license.

Summary

Derives the aspect from each cell of a raster surface.

The aspect identifies the compass direction that the downhill slope faces for each location.

The Surface Parameters tool provides a newer implementation and enhanced functionality.

Learn more about how Aspect works

Illustration

Aspect illustration
Aspect_3d (InRas1, OutRas)

Usage

  • The Surface Parameters tool provides a newer implementation of aspect, and is recommended to be used instead of the Aspect tool. The Aspect tool fits a plane to the 9 local cells, but a plane is rarely a good descriptor of the landscape and may mask or exaggerate natural variations of interest. The Surface Parameters tool fits a surface to the neighborhood of cells, instead of a plane, which provides a more natural fit to the terrain.

    The Aspect tool always uses a 3 by 3 window of cells to compute the value, the Surface Parameters tool allows window sizes from 3 by 3 to 15 by 15 cells. Larger window sizes are useful with high resolution elevation data, to capture land surface processes at an appropriate scale. Surface Parameters also provides an adaptive window option, which evaluates the local variability of the terrain, and chooses the largest appropriate neighborhood size for each cell. This can be particularly useful with gradual homogeneous terrain interrupted by streams, roads, or sharp breaks in slope.

    You can continue to use the traditional approach of the Aspect tool if you need your results to exactly match previous tool runs or if fast execution time is more important than a better algorithm.

  • This tool uses a 3 by 3 cell moving window to process the data. If the processing cell is NoData, the output for that location will be NoData.

  • Of the eight cells neighboring the processing cell, this tool requires that at least seven of them have a valid value. If there are fewer than seven valid cells, the calculation will not be performed, and the output at that processing cell will be NoData.

  • The cells in the outermost rows and columns of the output raster will be NoData. This is because along the boundary of the input dataset, those cells do not have enough valid neighbors.

  • Aspect is expressed in positive degrees from 0 to 360, measured clockwise from north.

  • Cells in the input raster that are flat—with zero slope—are assigned an aspect of -1.

  • For the geodesic method, specifying the surface z-unit is important to ensure the accuracy of the output. The Z unit parameter will be enabled only when the geodesic method is selected.

  • If a z-unit is available in the vertical coordinate system of the input raster, it will be applied automatically. It is recommended that you define a z-unit for the input raster if it is missing. You can use the Define Projection tool to specify a z-unit. If it is undefined, meter will be used by default.

  • The Project geodesic azimuths (project_geodesic_azimuths in Python) parameter is available only when the Method parameter is set to Geodesic.

    For the Geodesic method, if the Project geodesic azimuths parameter is checked (project_geodesic_azimuths is set to PROJECT_GEODESIC_AZIMUTHS in Python), the following are true:

    • North is always represented by 360 degrees.
    • Azimuths will be projected to correct the distortion caused by a nonconformal Output Coordinate System. These angles can be used to accurately locate points along the steepest downhill slope.

  • When the input raster needs to be resampled, the bilinear technique will be used. An example of when an input raster may be resampled is when the output coordinate system, extent, or cell size is different from that of the input.

  • If the Input raster parameter value (in_raster in Python) is high resolution with a cell size of less than a few meters, or particularly noisy, consider using the Surface Parameters tool and its user-defined neighborhood distance option instead of the immediate 3 by 3 neighborhood of this tool. Using a larger neighborhood can minimize the effect of noisy surfaces. Using a larger neighborhood can also better represent landforms and surface characteristics when using high resolution surfaces.

  • This tool can be graphics processing unit (GPU) accelerated when calculating geodesic aspect. This means that if a GPU device is available on your system, it can be used to improve the performance of the geodesic method.

    More information on how to configure your GPU device is available in the Spatial Analyst extension help in the GPU processing with Spatial Analyst help topic.

Parameters

LabelExplanationData Type
Input raster

The input surface raster.

Raster Layer
Output raster

The output aspect raster.

It will be floating-point type.

Raster Dataset
Method
(Optional)

Specifies whether the calculation will be based on a planar (flat earth) or a geodesic (ellipsoid) method.

The planar method is appropriate to use on local areas in a projection that maintains correct distance and area. It is suitable for analyses that cover areas such cities, counties, or smaller states in area. The geodesic method produces a more accurate result, at the potential cost of an increase in processing time.

  • PlanarThe calculation will be performed on a projected flat plane using a 2D Cartesian coordinate system. This is the default method.
  • GeodesicThe calculation will be performed in a 3D Cartesian coordinate system by considering the shape of the earth as an ellipsoid.
String
Z unit
(Optional)

The linear unit of vertical z-values.

It is defined by a vertical coordinate system if it exists. If a vertical coordinate system does not exist, the z-unit should be defined from the unit list to ensure correct geodesic computation. The default is meter.

  • InchThe linear unit will be inches.
  • FootThe linear unit will be feet.
  • YardThe linear unit will be yards.
  • Mile USThe linear unit will be miles.
  • Nautical mileThe linear unit will be nautical miles.
  • MillimeterThe linear unit will be millimeters.
  • CentimeterThe linear unit will be centimeters.
  • MeterThe linear unit will be meters.
  • KilometerThe linear unit will be kilometers.
  • DecimeterThe linear unit will be decimeters.
String
Project geodesic azimuths
(Optional)

Specifies whether geodesic azimuths will be projected to correct the angle distortion caused by the output spatial reference.

  • Unchecked—Geodesic azimuths will not be projected. This is the default.
  • Checked—Geodesic azimuths will be projected.
Boolean

arcpy.ddd.Aspect(in_raster, out_raster, {method}, {z_unit}, {project_geodesic_azimuths})
NameExplanationData Type
in_raster

The input surface raster.

Raster Layer
out_raster

The output aspect raster.

It will be floating-point type.

Raster Dataset
method
(Optional)

Specifies whether the calculation will be based on a planar (flat earth) or a geodesic (ellipsoid) method.

  • PLANARThe calculation will be performed on a projected flat plane using a 2D Cartesian coordinate system. This is the default method.
  • GEODESICThe calculation will be performed in a 3D Cartesian coordinate system by considering the shape of the earth as an ellipsoid.

The planar method is appropriate to use on local areas in a projection that maintains correct distance and area. It is suitable for analyses that cover areas such cities, counties, or smaller states in area. The geodesic method produces a more accurate result, at the potential cost of an increase in processing time.

String
z_unit
(Optional)

The linear unit of vertical z-values.

It is defined by a vertical coordinate system if it exists. If a vertical coordinate system does not exist, the z-unit should be defined from the unit list to ensure correct geodesic computation. The default is meter.

  • INCHThe linear unit will be inches.
  • FOOTThe linear unit will be feet.
  • YARDThe linear unit will be yards.
  • MILE_USThe linear unit will be miles.
  • NAUTICAL_MILEThe linear unit will be nautical miles.
  • MILLIMETERThe linear unit will be millimeters.
  • CENTIMETERThe linear unit will be centimeters.
  • METERThe linear unit will be meters.
  • KILOMETERThe linear unit will be kilometers.
  • DECIMETERThe linear unit will be decimeters.
String
project_geodesic_azimuths
(Optional)

Specifies whether geodesic azimuths will be projected to correct the angle distortion caused by the output spatial reference.

  • GEODESIC_AZIMUTHSGeodesic azimuths will not be projected. This is the default.
  • PROJECT_GEODESIC_AZIMUTHSGeodesic azimuths will be projected.
Boolean

Code sample

Aspect example 1 (Python window)

This example creates an aspect raster from an input surface raster.

import arcpy
from arcpy import env  
env.workspace = "C:/data"
arcpy.ddd.Aspect("elevation", "C:/output/outaspect.img")
Aspect example 2 (stand-alone script)

This example creates an aspect raster from an input surface raster.

# Name: Aspect_3d_Ex_02.py
# Description: Derives aspect from a raster surface.
# Requirements: 3D Analyst Extension

# Import system modules
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/data"

# Set local variables
inRaster = "elevation"
outAspect = "C:/output/outaspect2"
method = "GEODESIC"
zUnit = "FOOT"

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

# Execute Aspect
arcpy.ddd.Aspect(inRaster, outAspect, method, zUnit)

Licensing information

  • Basic: Requires 3D Analyst or Spatial Analyst
  • Standard: Requires 3D Analyst or Spatial Analyst
  • Advanced: Requires 3D Analyst or Spatial Analyst

Related topics