This tool can be used to calculate the viewshed (i.e. the visible area) from a location (i.e. viewing station) or group of locations based on the topography defined by an input digital elevation model (DEM). The user must specify the name of the input DEM, a viewing station input file, the output file name, and the viewing height. The viewing station input file can be a vector shapefile of a Point base ShapeType (i.e. Point, PointZ, PointM, MultiPoint, MultiPointZ, and MultiPointM), or a raster file. If a raster viewing station raster is specified, viewing station locations will be inferred from all non-zero, non-NoData grid cells. The output image will be a Boolean raster, containing 1's and 0's, where 1's imply that the grid cell is visible from at least one viewing station. The viewing height is in the same units as the elevations of the DEM and represent a height above the ground elevation from which the viewshed is calculated. Viewshed analysis is a very computationally intensive task. Depending on the size of the input DEM grid and the number of viewing stations, this operation may take considerable time to complete.
The following is an example of a Python script that uses this tool:
wd = pluginHost.getWorkingDirectory()
demFile = wd + "DEM.dep"
viewingStationFile = wd + "station.shp"
outputFile = wd + "output.dep"
stationHeight = "10.0"
args = [demFile, viewingStationFile, outputFile, stationHeight]
pluginHost.runPlugin("Viewshed", args, False)
This is a Groovy script also using this tool:
def wd = pluginHost.getWorkingDirectory()
def demFile = wd + "DEM.dep"
def viewingStationFile = wd + "station.dep"
def outputFile = wd + "output.dep"
def stationHeight = "10.0"
String[] args = [demFile, viewingStationFile, outputFile, stationHeight]
pluginHost.runPlugin("Viewshed", args, false)