User Tools

Site Tools


api:dk11:net:tatukgis.ndk.tgis_viewshed

TGIS_Viewshed class

DK11 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.

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 an instance.

Methods

Inherited Overrides Protected
Name Visibility Description
Generate public Generates viewshed (and, optionally, above-ground-level (AGL) raster) as a grid/Digital Elevation Model (DEM).
Generate(TGIS_LayerPixel, TGIS_LayerVector, TGIS_LayerPixel, float, string, float) public Generates viewshed as a grid/Digital Elevation Model (DEM).
Generate(TGIS_LayerPixel, TGIS_LayerVector, TGIS_LayerPixel, TGIS_LayerPixel, float, string, float) public Generates viewshed (and, optionally, above-ground-level (AGL) raster) as a grid/Digital Elevation Model (DEM).
GenerateFresnel public Generates n-th Fresnel Zone clearance map as a grid/Digital Elevation Model (DEM).
GenerateFresnel(TGIS_LayerPixel, TGIS_LayerVector, TGIS_LayerPixel, int, float, string, float) public Generates n-th Fresnel Zone clearance map as a grid/Digital Elevation Model (DEM).
raiseBusyEvent protected Prepares and raises the BusyEvent.

Properties

Inherited Protected
Name Visibility Description
AboveGroundLevelLayer public Output layer containing values of how many meters should be added to a particular point to be visible from at least one observer; this layer must have the same extent, CS, and resolution as OutputLayer; if NULL this analysis will be skipped; layer is initially filled according to the FillWithZeros property
CurvedEarth public If True then the elevation of input data will be corrected for Earth curvature and 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 Number of the Fresnel Zone to calculate.
ObserverElevation public Specifies coordinate used as elevation of the observers; default is DEM.
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; field value must be expressed 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 distance (in meters) between the observer and the cell for the analysis to be performed; greater distance implies no visibility; 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 e.g.
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

This class is OpenCL-enabled, it can utilize OpenCL for increased performance. Use TGIS_OpenCLEngine.Enabled to enable OpenCL computation mode.
Currently OpenCL computation mode can be used to generate viewshed only. Above Ground Level and Fresnel zone clearance are always computed using CPU. For best computation performance (e.g. for continuous generation) set ViewshedOutput to Visibility and don't set AboveGroundLevelLayer.

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 to 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 class.

References

2019/09/18 01:15