Viewshed (3D Analyst)

Summary

Determines the raster surface locations visible to a set of observer features.

Learn more about how Viewshed works

Usage

Syntax

Viewshed_3d (in_raster, in_observer_features, out_raster, {z_factor}, {curvature_correction}, {refractivity_coefficient})
ParameterExplanationData Type
in_raster

The input surface raster.

Raster Layer
in_observer_features

The feature class that identifies the observer locations.

The input can be point or polyline features.

Feature Layer
out_raster

The output raster.

The output will only record the number of times that each cell location in the input surface raster can be seen by the input observation points (or vertices for polylines). The observation frequency will be recorded in the VALUE item in the output raster's attribute table.

Raster Dataset
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
curvature_correction
(Optional)

Allows correction for the earth's curvature.

  • FLAT_EARTH No curvature correction will be applied. This is the default.
  • CURVED_EARTH Curvature correction will be applied.
Boolean
refractivity_coefficient
(Optional)

Coefficient of the refraction of visible light in air.

The default value is 0.13.

Double

Code Sample

Viewshed example 1 (Python window)

This example determines the surface locations visible to a set of observers defined in a shapefile.

import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.Viewshed_3d("elevation", "observers.shp", "C:/output/outvwshd01", 2,
                  "CURVED_EARTH", 0.15)
Viewshed example 2 (stand-alone script)

This example determines the surface locations visible to a set of observers defined in a shapefile.

# Name: Viewshed_3d_Ex_02.py
# Description: Determines the raster surface locations visible to a set of
#              observer features.
# 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"
inObserverFeatures = "observers.shp"
outViewshed = "C:/output/outvwshd02"
zFactor = 2
useEarthCurvature = "CURVED_EARTH"
refractivityCoefficient = 0.15

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

# Execute Viewshed
arcpy.Viewshed_3d(inRaster, inObserverFeatures, outViewshed, zFactor,
                  useEarthCurvature, refractivityCoefficient)

Environments

Related Topics

Licensing Information

ArcView: Requires 3D Analyst or Spatial Analyst
ArcEditor: Requires 3D Analyst or Spatial Analyst
ArcInfo: Requires 3D Analyst or Spatial Analyst

6/10/2013