User Tools

Site Tools


api:dk11:net:tatukgis.ndk.tgis_viewshed

TGIS_Viewshed class

DK for .NET | TatukGIS.NDK.TGIS_Viewshed | Classes | Constructors | Methods | Properties | Events

Viewshed, above-ground-level (AGL), and Fresnel zone clearance generator.

Available also on: Delphi | Java | ActiveX | Python.

Syntax

// 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;

Inheritance

→ TGIS_BaseObjectDisposable

Constructors

Inherited Overrides Protected
Name Visibility Description
TGIS_Viewshed() public Creates a viewshed analysis engine with default settings.

Methods

Inherited Overrides Protected
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.

Properties

Inherited Protected
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.

Events

Inherited Protected
Name Visibility Description
BusyEvent public Event fired upon progress of the interpolation process.

Remarks

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.

General description

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:

  • Viewshed
    Creates a pixel layer where pixel values represent the number of observers visible from a particular location. This analysis can be used in two common scenarios:
    • Visibility (binary) case - values greater than or equal to 1 mean that a location is visible by at least one observer.
    • Frequency case - pixel value represents the number of observers visible from a particular location.
  • Above-Ground-Level
    Creates a pixel layer where pixel values indicate the minimum height that must be added to a non-visible cell to make it visible by at least one observer.

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

Advanced analyses

Polygonal areas

Analyses for polygonal areas (e.g., an exact city charter) can be done using the following steps:

  1. Uerform standard viewshed analysis for are which fully encompass a charter.
  2. Use TGIS_LayerPixel.Loop query for area covered by polygon on the result of the previous step. See how to do this in SimpleEdit sample.

Lines

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:

  1. Perform standard viewshed analysis for the area which encompassing the segment of road.
  2. Use TGIS_LayerPixel.Loop to query for terrain profile on the result of the previous step. See how to do this in SimpleEdit sample.

Vector results

Result of Generate method is a TGIS_LayerPixel. Polygonal shapes covering visibility areas can be generated from the TGIS_LayerPixel using TGIS_ContourGenerator.

References

2026/07/11 01:13

Page Tools