Viewshed for camera
Analyze the viewshed for a camera. A viewshed shows the visible and obstructed areas from an observer's vantage point.
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).
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 button to update the viewshed to the current camera position.
- Create a
LocationViewshed, passing in a
Cameraand a min/max distance.
- Update the viewshed using
3D, integrated mesh, Scene, viewshed, visibility analysis
<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms" x:Class="ArcGISRuntime.Samples.ViewshedCamera.ViewshedCamera"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <esriUI:SceneView x:Name="MySceneView" Grid.Row="0" /> <Button x:Name="UpdateObserverButton" Text="Viewshed from Here" Clicked="UpdateObserverWithCamera" Grid.Row="1" /> </Grid> </ContentPage>