Hillshade (3D Analyst)

License Level:BasicStandardAdvanced

Summary

Creates a shaded relief from a surface raster by considering the illumination source angle and shadows.

Learn more about how Hillshade works

Illustration

Hillshade illustration
Hillshade_3d (InRas1, 99, 33, OutRas)

Usage

Syntax

Hillshade_3d (in_raster, out_raster, {azimuth}, {altitude}, {model_shadows}, {z_factor})
ParameterExplanationData Type
in_raster

The input surface raster.

Raster Layer
out_raster

The output hillshade raster.

The hillshade raster has an integer value range of 0 to 255.

Raster Dataset
azimuth
(Optional)

Azimuth angle of the light source.

The azimuth is expressed in positive degrees from 0 to 360, measured clockwise from north.

The default is 315 degrees.

Double
altitude
(Optional)

Altitude angle of the light source above the horizon.

The altitude is expressed in positive degrees, with 0 degrees at the horizon and 90 degrees directly overhead.

The default is 45 degrees.

Double
model_shadows
(Optional)

Type of shaded relief to be generated.

  • NO_SHADOWSThe output raster only considers local illumination angles; the effects of shadows are not considered.The output values can range from 0 to 255, with 0 representing the darkest areas, and 255 the brightest.
  • SHADOWS The output shaded raster considers both local illumination angles and shadows.The output values range from 0 to 255, with 0 representing the shadow areas, and 255 the brightest.
Boolean
z_factor
(Optional)

Number of ground x,y units in one surface z unit.

The z-factor adjusts the units of measure for the z units when they are different from the x,y units of the input surface. The z-values of the input surface are multiplied by the z-factor when calculating the final output surface.

If the x,y units and z units are in the same units of measure, the z-factor is 1. This is the default.

If the x,y units and z units are in different units of measure, the z-factor must be set to the appropriate factor, or the results will be incorrect. For example, if your z units are feet and your x,y units are meters, you would use a z-factor of 0.3048 to convert your z units from feet to meters (1 foot = 0.3048 meter).

Double

Code Sample

Hillshade example 1 (Python window)

This example generates a hillshade raster that includes shadows. Specific azimuth and altitude angles are set.

import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.HillShade_3d("elevation", "C:/output/outhillshd01", 180, 75, "SHADOWS", 1)
Hillshade example 2 (stand-alone script)

This example generates a hillshade raster that includes shadows. Specific azimuth and altitude angles are set and a z-factor to convert z units in feet to meters.

# Name: HillShade_3d_Ex_02.py
# Description: Computes hillshade values for a raster surface.
# Requirements: 3D Analyst Extension

# Import system modules
import arcpy
from arcpy import env

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

# Set local variables
inRaster = "elevation"
outRaster = "C:/output/outhillshd02"
azimuth = 180
altitude = 75
modelShadows = "SHADOWS"
zFactor = 0.348

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

# Execute HillShade
arcpy.HillShade_3d(inRaster, outRaster, azimuth, altitude, 
                   modelShadows, zFactor)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Requires 3D Analyst or Spatial Analyst
ArcGIS for Desktop Standard: Requires 3D Analyst or Spatial Analyst
ArcGIS for Desktop Advanced: Requires 3D Analyst or Spatial Analyst
3/7/2014