ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Aspect

Available with Spatial Analyst license.

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

Derives aspect from a raster surface. The aspect identifies the downslope direction of the maximum rate of change in value from each cell to its neighbors.

Aspect can be thought of as the slope direction. The values of the output raster will be the compass direction of the aspect.

Learn more about how Aspect works

Illustration

Aspect illustration
OutRas = Aspect(InRas1)

Usage

  • Aspect is the direction of the maximum rate of change in the z-value from each cell in a raster surface.

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

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

  • If the center cell in the immediate neighborhood (3 x 3 window) is NoData, the output is NoData.

  • If any neighborhood cells are NoData, they are first assigned the value of the center cell, then the aspect is computed.

  • 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.

  • See Analysis environments and Spatial Analyst for additional details on the geoprocessing environments that apply to this tool.

Syntax

Aspect (in_raster)
ParameterExplanationData Type
in_raster

The input surface raster.

Raster Layer

Return Value

NameExplanationData Type
out_raster

The output aspect raster.

It will be floating point type.

Raster

Code Sample

Aspect example 1 (Python window)

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

import arcpy
from arcpy import env  
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
outAspect = Aspect("elevation")
outAspect.save("C:/sapyexamples/output/outaspect01.img")
Aspect example 2 (stand-alone script)

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

# Name: Aspect_Ex_02.py
# Description: Derives aspect from a raster surface.
# Requirements: Spatial Analyst Extension

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

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

# Set local variables
inRaster = "elevation"

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

# Execute Aspect
outAspect = Aspect(inRaster)

# Save the output 
outAspect.save("C:/sapyexamples/output/outaspect02")

Environments

  • Auto Commit
  • Cell Size
  • Current Workspace
  • Extent
  • Geographic Transformations
  • Mask
  • Output CONFIG Keyword
  • Output Coordinate System
  • Scratch Workspace
  • Snap Raster
  • Tile Size

Licensing Information

  • ArcGIS for Desktop Basic: Requires Spatial Analyst or 3D Analyst
  • ArcGIS for Desktop Standard: Requires Spatial Analyst or 3D Analyst
  • ArcGIS for Desktop Advanced: Requires Spatial Analyst or 3D Analyst

Related Topics

  • An overview of the Surface toolset
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal