User Tools

Site Tools


api:dk11:delphi:gisviewshed.tgis_viewshed

TGIS_Viewshed class

DK11 for Delphi | GisViewshed.TGIS_Viewshed | Classes | Constructors | Methods | Properties | Events

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

Available also on: .NET | Java | ActiveX.

Syntax

// Delphi
type
  TGIS_Viewshed = class( TGIS_BaseObjectDisposable )
  end;
// C++ Builder
class PASCALIMPLEMENTATION TGIS_Viewshed : public TGIS_BaseObjectDisposable
{
};

Inheritance

→ TObject → TGIS_BaseObjectDisposable

Constructors

Inherited Overrides Protected
Name Visibility Description
Create 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; Single; String; Single) public Generates viewshed as a grid/Digital Elevation Model (DEM).
Generate(TGIS_LayerPixel; TGIS_LayerVector; TGIS_LayerPixel; TGIS_LayerPixel; Single; String; Single) 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; Integer; Single; String; Single) 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 published

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 form 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 valuess indicate the minimum height that must be added to a nonvisible 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 observes 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 PixelEdit sample.

Lines

Analyses for lines (e.g. how many times an observer is visible from the road) can be done using the following steps:

  1. Perform standard viewshed analysis for are which fully encompass a road.
  2. Use TGIS_LayerPixel.Loop to query for terrain profile on the result of the previous step. See how to do this in PixelEdit sample.

Vector results

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

References

2019/02/08 01:18