This task calculates a viewshed analysis, which is the process of identifying locations that are visible from one or more view points. These view (or observer) points are often constrained by variables such as height, horizontal and vertical field of view (FOV), azimuth, and pitch. To properly model a restricted viewshed analysis, you need to take into account these view constraints.
To determine more than one single viewshed, run this task multiple times with different single-view pixel locations.
To create a classification vector file of the results, run the ClassificationToShapefile task on the output raster of this task.
ENVI uses the Izraelevitz (2003) algorithm for viewshed analysis, which is an extension to the original Xdraw algorithm developed by Franklin et al. (1994). The Izraelevitz algorithm performs well in densely sampled terrain elevation models, and it is significantly faster than the radial interpolation method used in previous versions of ENVI.
References:
Franklin, W.R., C.K. Ray, and S. Mehta. Geometric Algorithms for Siting of Air Defense Missile Batteries, Technical Report DAAL03-86-D-0001 (1994), Battelle, Columbus Division, Columbus, OH, 129 p.
Izraelevitz, D. "A Fast Algorithm for Approximate Viewshed Computation." Photogrammetric Engineering & Remote Sensing 69, No. 7 (2003): 767-774.
Example
e = ENVI()
DEMfile = Filepath('GMTED2010.jp2', Subdir=['data'], $
Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(DEMfile)
AlpsSubset = ENVISubsetRaster(raster, $
SUB_RECT=[22200, 4374, 22700, 4874])
outFile = e.GetTemporaryFilename()
AlpsSubset.Export, outFile, 'ENVI'
newRaster = e.OpenRaster(outFile)
View = e.GetView()
Layer = View.CreateLayer(AlpsSubset)
Task = ENVITask('RasterViewshed')
Task.INPUT_RASTER = AlpsSubset
Task.AZIMUTH = 135.0
Task.HEIGHT = 500.0
Task.HORIZONTAL_FIELD_OF_VIEW = 120.0
Task.PITCH = 10.0
Task.PIXEL_LOCATION = [100, 250]
Task.RANGE = 50000.0
Task.VERTICAL_FIELD_OF_VIEW = 60.0
Task.Execute
DataColl = e.Data
DataColl.Add, Task.OUTPUT_RASTER
viewshedLayer = View.CreateLayer(Task.OUTPUT_RASTER)
View.Zoom, /FULL_EXTENT
Syntax
Result = ENVITask('RasterViewshed')
Input parameters (Set, Get): AZIMUTH, COMBINATION, HEIGHT, HORIZONTAL_FIELD_OF_VIEW, INPUT_RASTER, OUTPUT_RASTER_URI, PITCH, PIXEL_LOCATION, RANGE, VERTICAL_FIELD_OF_VIEW
Output parameters (Get only):OUTPUT_RASTER
Parameters marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Parameters marked as "Get" are those whose values you can retrieve but not set.
Input Parameters
AZIMUTH (optional)
Specify the angle in degrees clockwise from North from the observer point. Values range from 0 to 360. Specify an array of values if using multiple view points (specified with the PIXEL_LOCATION parameter). The number of array elements must match the number of view points.
COMBINATION (optional)
Specify one of the following string values indicating how multiple viewsheds should be combined.
- Union (default): The viewshed is based on what is visible from any of the view sources. For example, four observers will be positioned to maximize surveillance coverage of an area. An intersection will determine the area that is visible to at least one of the observers.
- Intersection: The viewshed is based on what is visible from all view sources. For example, a communications facility must be positioned to have a direct line of sight to three locations. A union will determine the area that is visible to all three view sources.
HEIGHT (required)
Specify the view height in meters above the surface. Or specify an array of values if using multiple view points (specified with the PIXEL_LOCATION parameter).
HORIZONTAL_FIELD_OF_VIEW (optional)
Specify the angle in degrees of the horizontal range of the observer point. Values range from 0 to 360. Specify an array of values if using multiple view points (specified with the PIXEL_LOCATION parameter).
INPUT_RASTER (required)
Specify an elevation raster to use for calculating the viewshed.
OUTPUT_RASTER_URI (optional)
Specify a string with the fully qualified filename and path of the associated OUTPUT_RASTER.
- If you do not specify this parameter, or set it to an exclamation symbol (!), ENVI creates a temporary file.
- If you set it to the hash symbol (#), ENVI creates a file in the temporary directory, but this file will not be deleted when ENVI closes.
PITCH (optional)
Specify the verticle pointing angle (in degrees) of the observer point's line of sight. A positive pitch value is above the horizon, and a negative pitch value is below the horizon. Values range from -90 to 90. Specify an array of values if using multiple view points (specified with the PIXEL_LOCATION parameter).
PIXEL_LOCATION (required)
For a single view point, specify a two-element integer array with the column and row location in the elevation raster.
For multiple view points, specify a 2D array as follows, where n is the number of view points:
[[column_1, column_2,...column_n], [row_1, row_2,...row_n]]
RANGE (required)
Specify a range at least three times the pixel size (in meters), out to which a viewshed will be calculated.
Specify an array of values if using multiple view points (specified with the PIXEL_LOCATION parameter).
VERTICAL_FIELD_OF_VIEW (optional)
Specify the angle in degrees of the vertical range of the observer point. Values range from 0 to 180. Specify an array of values if using multiple view points (specified with the PIXEL_LOCATION parameter).
Output Parameters
OUTPUT_RASTER
This is a reference to the output raster of filetype ENVI.
Methods
Execute
Parameter
ParameterNames
Properties
DESCRIPTION
DISPLAY_NAME
NAME
REVISION
TAGS
Version History
ENVI 5.2 |
Introduced |
ENVI 5.3. 2 |
Added the following parameters: AZIMUTH, HORIZONTAL_FIELD_OF_VIEW, PITCH, and VERTICAL_FIELD_OF_VIEW
|
See Also
ENVITask, ClassificationToShapefile Task,