View on GitHub

Analyze the viewshed for a camera showing the visible and obstructed areas from an observer’s vantage point.

Image of show viewshed from camera in scene sample

Use case

A viewshed analysis is a type of visual analysis you can perform on a scene. The viewshed aims to answer the question ‘What can I see from a given location?’. The output is an overlay with two different colors - one representing the visible areas (green) and the other representing the obstructed areas (red).

How to use the sample

The sample will start with a viewshed created from the initial camera location, so only the visible (green) portion of the viewshed will be visible. Move around the scene to see the obstructed (red) portions. Tap the ‘Viewshed from here’ button to update the viewshed to the current camera position.

How it works

  1. Get the current camera.
  2. Create a LocationViewshed, passing in the Camera and a min/max distance.
  3. Update the viewshed from a camera.

Relevant API

  • AnalysisOverlay
  • ArcGISTiledElevationSource
  • Camera
  • IntegratedMeshLayer
  • LocationViewshed
  • Scene
  • SceneView

About the data

The scene shows an integrated mesh layer of Girona, Spain with the World Elevation source image service both hosted on ArcGIS Online.

Tags

3D, integrated mesh, viewshed, visibility analysis