viewshed

The viewshed object enables calculation of a 3D viewshed either by API or through access to the viewshed user interface tool available in the TerraExplorer for Web application. A 3D viewshed calculates and marks all areas on the terrain and on 3D models and objects that are visible from a selected point on the terrain. The following member and methods are available:

§   items

§   create()

§   startTool()

 

items

static items : Array<TerraExplorerObject>

Returns an array of TerraExplorerObject containing all viewshed objects in the project.

create

create(description, position, fovX, fovY, headingPitchRange, options) → {promise}

Creates a viewshed object.

Parameters

Name

Type

Description

description

String

The name of the viewshed object as it appears in the Analysis tab on the sidebar.

position

Cesium.Cartesian3/ Cesium.Cartographic

The position of the viewshed object.

fovX

Number

Horizontal FOV (horizontal angle limits), in degrees, of the viewshed. Values are in degrees from 1 to 120.

fovY

Number

Vertical FOV (vertical angle limits), in degrees, of the viewshed. Values are in degrees from 1 to 120.

headingPitchRange

Cesium.HeadingPitchRange

The heading, pitch and distance of the viewshed object.

options 

Object

Name

Type

Description

roll

Number

Roll angle of the viewshed.

Returns

Promise - A promise that resolves to the newly created viewshed TerraExplorerObject object.

 

Example

The following example creates a viewshed. For more information, see an online interactive tutorial with code editor.

TerraExplorer.analysis.viewshed.create("Viewshed on Current View", viewer.camera.position.clone(),53,53,new Cesium.HeadingPitchRange(viewer.camera.heading,viewer.camera.pitch,3000),{});

startTool

viewshed.startTool()

Activates the Viewshed user interface tool available in the TerraExplorer for Web application to calculate and mark all areas on the terrain and on 3D models and objects that are visible from a selected point on the terrain.

Example

TerraExplorer.analysis.viewshed.startTool();