DK for .NET | TatukGIS.NDK.TGIS_Viewshed | Classes | Constructors | Methods | Properties | Events
Viewshed, above-ground-level (AGL), and Fresnel zone clearance generator.
// C# public class TGIS_Viewshed : TGIS_BaseObjectDisposable { }
' VisualBasic Public Class TGIS_Viewshed Inherits TGIS_BaseObjectDisposable End Class
// Oxygene type TGIS_Viewshed = public class( TGIS_BaseObjectDisposable ) end;
→ TGIS_BaseObjectDisposable
| Name | Visibility | Description | |
|---|---|---|---|
| TGIS_Viewshed() | public | Creates a viewshed analysis engine with default settings. | |
| Name | Visibility | Description | |
|---|---|---|---|
| Generate | public | Generates a viewshed raster and, optionally, an above-ground-level (AGL) raster using class properties. | |
| Generate(TGIS_LayerPixel, TGIS_LayerVector, TGIS_LayerPixel, float, string, float) | public | Generates a viewshed raster from a DEM. | |
| Generate(TGIS_LayerPixel, TGIS_LayerVector, TGIS_LayerPixel, TGIS_LayerPixel, float, string, float) | public | Generates a viewshed raster and, optionally, an above-ground-level (AGL) raster from a DEM. | |
| GenerateFresnel | public | Generates an n-th Fresnel zone clearance map using class properties. | |
| GenerateFresnel(TGIS_LayerPixel, TGIS_LayerVector, TGIS_LayerPixel, int, float, string, float) | public | Generates an n-th Fresnel zone clearance map from a DEM. | |
| Name | Visibility | Description | |
|---|---|---|---|
| AboveGroundLevelLayer | public | Output layer containing the additional height in meters required for a cell to become visible from at least one observer; this layer must have the same extent, coordinate system, and resolution as OutputLayer; if NULL, AGL analysis is skipped; the layer is initially filled according to the FillWithZeros property. | |
| CurvedEarth | public | If True, input elevations are corrected for Earth curvature and atmospheric refraction. | |
| FillWithZeros | public | If True then output is initially filled with zeros instead of NoData (default). | |
| Frequency | public | Radio frequency for Fresnel Zone analysis; default is 100 MHz. | |
| FresnelZoneNumber | public | Specifies the Fresnel zone number used for clearance calculation. | |
| ObserverElevation | public | Specifies which source is used as observer elevation; default is OnDem. | |
| ObserversLayer | public | Layer containing observer locations; layer is expected to contain one or more points; only first 50 points will be used. | |
| ObserversOffset | public | Fixed observers elevation offset in meters. | |
| ObserversOffsetField | public | Attribute field defining observers elevation offset in meters. | |
| OutputLayer | public | Output layer containing the viewshed analysis; values are set according to the ViewshedOutput property; the layer is initially filled according to the FillWithZeros property. | |
| Radius | public | Specifies the maximum analysis distance in meters; cells beyond this distance are treated as not visible; default is 20 km. | |
| Refractivity | public | Specifies the refractivity coefficient of light; default is 0.13. | |
| TerrainLayer | public | Terrain model as a grid layer. | |
| TerrainOffset | public | Fixed terrain elevation offset in meters to for example add forest level. | |
| ViewshedOutput | public | Specifies output values of the viewshed analysis. | |
| Name | Visibility | Description | |
|---|---|---|---|
| BusyEvent | public | Event fired upon progress of the interpolation process. | |
PURPOSE: Performs terrain-based visibility analysis from point observers or transmitters using a DEM and prepared raster output layers.
BEHAVIOR: Generates viewshed rasters, optional AGL rasters, and Fresnel zone clearance maps. Observer or transmitter elevations can be taken from Z, M, ZM, the DEM, or the DEM plus M, and can be additionally adjusted by fixed and field-based offsets. Up to 50 point features from the observer layer are used. OpenCL acceleration is available for viewshed generation only; AGL and Fresnel zone clearance are always computed on the CPU. For best performance, use ViewshedOutput = Visibility and leave AboveGroundLevelLayer unset.
USAGE: Configure analysis properties and prepared layers, then call a generation method.
viewshed = TGIS_Viewshed() viewshed.TerrainLayer = demLayer viewshed.ObserversLayer = observerLayer viewshed.OutputLayer = outputLayer viewshed.Generate()
CONSTRAINTS: Output raster layers must be constructed before generation. AboveGroundLevelLayer must match OutputLayer extent, coordinate system, and resolution. The observer or transmitter layer is expected to contain point shapes only.
A viewshed is the area of visibility of an observed object(s), or, conversely, an area that can be seen from an observer location(s). For more information see this article on Wikipedia.
We provide a way to perform common analysis:
Sample results:
| Visibility | Frequency | Above-Ground-Level |
|---|---|---|
![]() | ![]() | ![]() |
| green - visible area | color ramp red→green where: red - one observer visible green - all observers visible | color ramp green→red where: green - 1m red - 1440m |
Analyses for polygonal areas (e.g., an exact city charter) can be done using the following steps:
Analyses for lines (e.g., how many times an observer is visible from a given segment of road) can be done using the following steps:
Result of Generate method is a TGIS_LayerPixel. Polygonal shapes covering visibility areas can be generated from the TGIS_LayerPixel using TGIS_ContourGenerator.