Available with 3D Analyst license.
Summary
Determines the raster surface locations visible to a set of observer features, using geodesic methods.
Usage
There are two types of visibility analysis that can be performed by this tool, controlled by the Analysis type parameter. For the first type, FREQUENCY, the tool determines which raster surface locations are visible to a set of observers. For the other, OBSERVERS, it identifies which observers are visible from each raster surface location.
This tool can be GPU accelerated, which means that if a GPU device (Graphics Processing Unit) is available on your system, it will be used to enhance the performance of the tool.
Currently, this tool only supports NVIDIA graphics cards with CUDA compute capability 2.0 or OpenCL 1.2 and is dependent on your system having an appropriate card installed. To ensure proper tool execution, see the NVIDIA driver update page for the latest available driver.
A GPU error may be returned and the tool fails to execute if the Windows TdrDelay (Timeout Detection and Recovery Delay) registry key value is too small for the operation. The default value for TdrDelay is 2 seconds, but you may need to adjust it to a larger value, such as 60 seconds. On most Windows systems, the path to the TdrDelay key in the Registry is HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\GraphicsDrivers. If the TdrDelay key does not exist, you must create it in this path and assign it the larger value. You must reboot your machine for the change to take effect. For more details on how to define the TdrDelay registry key, visit the Microsoft TDR Registry Keys web page.
Unlike other similar tools, Viewshed 2 does not have a Z factor parameter. To ensure the correctness of the output visibility raster, assign a spheroidal vertical coordinate system to the input raster if it does not already have one.
The visibility of each cell center is determined by a line-of-sight test between the target and each observer. If an observer can see the target at the cell center, the cell is considered visible. This tool always considers the curvature of the earth when the visibility is determined.
On the output visibility raster, nonvisible cells are assigned NoData.
For the OBSERVERS analysis type, the allowed maximum number of input observer points is 32.
If the input raster contains undesirable noise caused by sampling errors, and you have the ArcGIS Spatial Analyst extension available, you can smooth the raster with a low-pass filter, such as the Mean option of Focal Statistics, before running this tool.
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.
By default, the viewshed will be calculated to the maximum extent of the input dataset. For improved performance, it is recommended to explicitly set the Outer radius parameter to the maximum distance of interest for your analysis. This parameter will allow the tool to perform its computations only on the cells that are within a certain distance to the observers.
You can use the Analysis Method parameter to control the quality of and the time it takes to obtain a result. The PERIMETER_SIGHTLINES method is intended for exploratory analysis, as it achieves faster performance at the expense of output quality. To get the most accurate output, use the ALL_SIGHTLINES method.
For more details on technical aspects of the implementation of this tool, see the following resource.
http://support.esri.com/en/knowledgebase/techarticles/detail/42804
Syntax
Viewshed2_3d (in_raster, in_observer_features, out_raster, {out_agl_raster}, {analysis_type}, {vertical_error}, {out_observer_region_relationship_table}, {refractivity_coefficient}, {surface_offset}, {observer_elevation}, {observer_offset}, {inner_radius}, {inner_radius_is_3d}, {outer_radius}, {outer_radius_is_3d}, {horizontal_start_angle}, {horizontal_end_angle}, {vertical_upper_angle}, {vertical_lower_angle}, {analysis_method})
Parameter | Explanation | Data Type |
in_raster | The input surface raster. It can be an integer or a floating-point raster. The input raster is transformed into a 3D geocentric coordinate system during the visibility calculation. NoData cells on the input raster do not block the visibility determination. | Raster Layer |
in_observer_features | The input feature class that identifies the observer locations. It can be point, multipoint, or polyline features. The input feature class is transformed into a 3D geocentric coordinate system during the visibility calculation. Observers outside of the extent of the surface raster or located on NoData cells will be ignored in the calculation. | Feature Layer |
out_raster |
The output raster. For the FREQUENCY analysis type, when the vertical error parameter is 0 or not specified, the output raster records the number of times that each cell location in the input surface raster can be seen by the input observation points. When the vertical error parameter is greater than 0, each cell on the output raster records the sum of probabilities that the cell is visible to any of the observers. For the OBSERVERS analysis type, the output raster records the unique region IDs for the visible areas, which can be related back to the observer features through the output observer-region relationship table. | Raster |
out_agl_raster (Optional) | The output above ground level (AGL) raster. The AGL result is a raster where each cell value is the minimum height that must be added to an otherwise nonvisible cell to make it visible by at least one observer. Cells that were already visible will be assigned 0 in this output raster. When the vertical error parameter is 0, the output AGL raster is a one-band raster. When vertical error is greater than 0, to account for the random effects from the input raster, the output AGL raster is created as a three-band raster. The first band represents the mean AGL values, the second band represents the minimum AGL values, and the third band represents the maximum AGL values. | Raster |
analysis_type (Optional) | Choose which type of visibility analysis you wish to perform, either determining how visible each cell is to the observers, or identifying for each surface location which observers are visible.
| String |
vertical_error (Optional) | The amount of uncertainty (the Root Mean Square error, or RMSE) in the surface elevation values. It is a floating-point value representing the expected error of the input elevation values. When this parameter is assigned a value greater than 0, the output visibility raster will be floating point. In this case, each cell value on the output visibility raster represents the sum of probabilities that the cell is visible to any of the observers. When the analysis type is OBSERVERS or the analysis method is PERIMETER_SIGHTLINES, this parameter is disabled. | Linear unit |
out_observer_region_relationship_table (Optional) | The output table for identifying the regions that are visible to each observer. This table can be related to the input observer feature class and the output visibility raster for identifying the regions visible to given observers. This output is only created when the analysis type is OBSERVERS. | Table |
refractivity_coefficient (Optional) | Coefficient of the refraction of visible light in air. The default value is 0.13. | Double |
surface_offset (Optional) | This value indicates a vertical distance (in surface units) to be added to the z-value of each target cell as it is considered for visibility. It should be a positive integer or floating-point value. It can be a field in the input observer features dataset or a numerical value. If this parameter is set to a value, then that value will be applied to all the observers. To specify different values for each observer, set this parameter to a field in the input observer features dataset. | Linear unit | Field |
observer_elevation (Optional) | This value is used to define the surface elevations of the observer points or vertices. It can be a field in the input observer features dataset or a numerical value. If this parameter is not specified, the observer elevation will be obtained from the surface raster using bilinear interpolation. If this parameter is set to a value, then that value will be applied to all the observers. To specify different values for each observer, set this parameter to a field in the input observer features dataset. | Linear unit | Field |
observer_offset (Optional) | This value indicates a vertical distance (in surface units) to be added to observer elevation. It should be a positive integer or floating-point value. It can be a field in the input observer features dataset or a numerical value. If this parameter is set to a value, then that value will be applied to all the observers. To specify different values for each observer, set this parameter to a field in the input observer features dataset. | Linear unit | Field |
inner_radius (Optional) | This value defines the start (minimum) distance from which visibility is determined. Cells closer than this distance are considered not visible in the output but can still block visibility of the cells between the inner radius and the outer radius. The default value is 0. It can be a field in the input observer features dataset or a numerical value. If this parameter is set to a value, then the value will be applied to all the observers. To specify different values for each observer, set this parameter to a field in the input observer features dataset. | Linear unit | Field |
inner_radius_is_3d (Optional) | Type of distance for the inner radius parameter.
| Boolean |
outer_radius (Optional) | This value defines the maximum distance from which visibility is determined. Cells beyond this distance are excluded from the analysis. It can be a field in the input observer features dataset or a numerical value. If this parameter is set to a value, then the value will be applied to all the observers. To specify different values for each observer, set this parameter to a field in the input observer features dataset. | Linear unit | Field |
outer_radius_is_3d (Optional) | Type of distance for the outer radius parameter.
| Boolean |
horizontal_start_angle (Optional) | This value defines the start angle of the horizontal scan range. The value should be specified in degrees from 0 to 360.0, with 0 oriented to north. The default value is 0. It can be a field in the input observer features dataset or a numerical value. If this parameter is set to a value, then the value will be applied to all the observers. To specify different values for each observer, set this parameter to a field in the input observer features dataset. | Constant | Field |
horizontal_end_angle (Optional) | This value defines the end angle of the horizontal scan range. The value should be specified in degrees from 0 to 360.0, with 0 oriented to north. The default value is 360.0. It can be a field in the input observer features dataset or a numerical value. If this parameter is set to a value, then the value will be applied to all the observers. To specify different values for each observer, set this parameter to a field in the input observer features dataset. | Constant | Field |
vertical_upper_angle (Optional) | This value defines the upper vertical angle limit of the scan above a horizontal plane. The value should be specified in degrees from 0 to 90.0, which can be integer or floating point. The default value is 90.0. It can be a field in the input observer features dataset or a numerical value. If this parameter is set to a value, then the value will be applied to all the observers. To specify different values for each observer, set this parameter to a field in the input observer features dataset. | Constant | Field |
vertical_lower_angle (Optional) | This value defines the lower vertical angle limit of the scan below a horizontal plane. The value should be specified in degrees from -90.0 to 0, which can be integer or floating point. The default value is -90.0. It can be a field in the input observer features dataset or a numerical value. If this parameter is set to a value, then the value will be applied to all the observers. To specify different values for each observer, set this parameter to a field in the input observer features dataset. | Constant | Field |
analysis_method (Optional) | Choose the method by which the visibility will be calculated. This option allows you to trade some accuracy for increased performance.
| String |
Code Sample
Viewshed2 example 1 (Python window)
This example determines the surface locations visible to a set of observers without using any observer parameters.
import arcpy
from arcpy import env
env.workspace = "C:/data"
result = arcpy.Viewshed2_3d("elevation", "obser1.shp", "C:/output/outvwshd01",
"", "OBSERVERS", "", "C:/output/obstable01.dbf")
Viewshed2 example 2 (stand-alone script)
This example determines the surface locations visible to a set of observers using attributes in the input feature class as the observer parameters.
# 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"
# Check out the ArcGIS 3D Analyst extension license
arcpy.CheckOutExtension("3D")
inRaster = "elevation"
inObservers = "obser2.shp"
outRaster = "c:/output/outvshd02"
outAGL = ""
analysisType = "OBSERVERS"
verticalError = ""
outAnalysisRelationTable = "C:/output/obser_region2.dbf"
refractCoeff = ""
surfaceOffset = "offsetb"
observerElevation = "spot"
observerOffset = "offseta"
innerRadius = "radius1"
innerIs3D = "False"
outerRadius = "radius2"
outerIs3D = "True"
horizStartAngle = "azimuth1"
horizEndAngle = "azimuth2"
vertUpperAngle = "vert1"
vertLowerAngle = "vert2"
analysisMethod = "ALL_SIGHTLINES"
# Execute Viewshed2
result = arcpy.Viewshed2_3d(inRaster, inObservers, outRaster, outAGL,
analysisType, verticalError,
outAnalysisRelationTable, refractCoeff,
surfaceOffset, observerElevation, observerOffset,
innerRadius, innerIs3D, outerRadius, outerIs3D,
horizStartAngle, horizEndAngle, vertUpperAngle,
vertLowerAngle, analysisMethod)
Environments
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