Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="ArcGIS.Samples.LineOfSightGeoElement.LineOfSightGeoElement"
<ContentPage x:Class="ArcGIS.Samples.ShowExploratoryLineOfSightBetweenGeoelements.ShowExploratoryLineOfSightBetweenGeoelements"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Maui;assembly=Esri.ArcGISRuntime.Maui"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@

using Colors = System.Drawing.Color;

namespace ArcGIS.Samples.LineOfSightGeoElement
namespace ArcGIS.Samples.ShowExploratoryLineOfSightBetweenGeoelements
{
[ArcGIS.Samples.Shared.Attributes.Sample(
name: "Line of sight (geoelement)",
name: "Show exploratory line of sight between geoelements",
category: "Analysis",
description: "Show a line of sight between two moving objects.",
instructions: "A line of sight will display between a point on the Empire State Building (observer) and a taxi (target).",
tags: new[] { "3D", "line of sight", "visibility", "visibility analysis" })]
description: "Show an exploratory line of sight between two moving objects.",
instructions: "An exploratory line of sight will display between a point on the Empire State Building (observer) and a taxi (target).",
tags: new[] { "3D", "exploratory line of sight", "visibility", "visibility analysis" })]
[ArcGIS.Samples.Shared.Attributes.OfflineData("3af5cfec0fd24dac8d88aea679027cb9")]
public partial class LineOfSightGeoElement : ContentPage
public partial class ShowExploratoryLineOfSightBetweenGeoelements : ContentPage
{
// URL of the elevation service - provides elevation component of the scene
private readonly Uri _elevationUri = new Uri("https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer");
Expand Down Expand Up @@ -58,7 +58,7 @@ public partial class LineOfSightGeoElement : ContentPage
private int _frameIndex = 0;
private readonly int _frameMax = 150;

public LineOfSightGeoElement()
public ShowExploratoryLineOfSightBetweenGeoelements()
{
InitializeComponent();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
# Line of sight (geoelement)
# Show exploratory line of sight between geoelements

Show a line of sight between two moving objects.
Show an exploratory line of sight between two moving objects.

![Image of line of sight geoelement](LineOfSightGeoElement.jpg)
![Image of Show exploratory line of sight between geoelements](showexploratorylineofsightbetweengeoelements.jpg)

## Use case

A line of sight between `GeoElement`s (i.e. observer and target) will not remain constant whilst one or both are on the move.
An exploratory line of sight between `GeoElement`s (i.e. observer and target) will not remain constant whilst one or both are on the move.

An `ExploratoryGeoElementLineOfSight` is therefore useful in cases where visibility between two `GeoElement`s requires monitoring over a period of time in a partially obstructed field of view
(such as buildings in a city).

Note: This analysis is a form of "exploratory analysis", which means the results are calculated on the current scale of the data, and the results are generated very quickly but not persisted.

## How to use the sample

A line of sight will display between a point on the Empire State Building (observer) and a taxi (target).
The taxi will drive around a block and the line of sight should automatically update.
An exploratory line of sight will display between a point on the Empire State Building (observer) and a taxi (target).
The taxi will drive around a block and the exploratory line of sight should automatically update.
The taxi will be highlighted when it is visible. You can change the observer height with the slider to see how it affects the target's visibility.

## How it works

1. Instantiate an `AnalysisOverlay` and add it to the `SceneView`'s analysis overlays collection.
2. Instantiate an `ExploratoryGeoElementLineOfSight`, passing in observer and target `GeoElement`s (features or graphics). Add the line of sight to the analysis overlay's analyses collection.
2. Instantiate an `ExploratoryGeoElementLineOfSight`, passing in observer and target `GeoElement`s (features or graphics). Add the exploratory line of sight to the analysis overlay's analyses collection.
3. To get the target visibility when it changes, react to the target visibility changing on the `ExploratoryGeoElementLineOfSight` instance.

## Relevant API
Expand All @@ -37,4 +39,4 @@ This sample downloads the following items from ArcGIS Online automatically:

## Tags

3D, line of sight, visibility, visibility analysis
3D, exploratory line of sight, visibility, visibility analysis
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"category": "Analysis",
"description": "Show a line of sight between two moving objects.",
"formal_name": "LineOfSightGeoElement",
"description": "Show an exploratory line of sight between two moving objects.",
"formal_name": "ShowExploratoryLineOfSightBetweenGeoelements",
"ignore": false,
"images": [
"lineofsightgeoelement.jpg"
"showexploratorylineofsightbetweengeoelements.jpg"
],
"keywords": [
"3D",
"line of sight",
"exploratory line of sight",
"visibility",
"visibility analysis"
],
Expand All @@ -24,8 +24,8 @@
"ExploratoryLineOfSight.TargetVisibility"
],
"snippets": [
"LineOfSightGeoElement.xaml.cs",
"LineOfSightGeoElement.xaml"
"ShowExploratoryLineOfSightBetweenGeoelements.xaml.cs",
"ShowExploratoryLineOfSightBetweenGeoelements.xaml"
],
"title": "Line of sight (geoelement)"
"title": "Show exploratory line of sight between geoelements"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="ArcGIS.Samples.LineOfSightLocation.LineOfSightLocation"
<ContentPage x:Class="ArcGIS.Samples.ShowExploratoryLineOfSightBetweenPoints.ShowExploratoryLineOfSightBetweenPoints"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Maui;assembly=Esri.ArcGISRuntime.Maui">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

using Colors = System.Drawing.Color;

namespace ArcGIS.Samples.LineOfSightLocation
namespace ArcGIS.Samples.ShowExploratoryLineOfSightBetweenPoints
{
[ArcGIS.Samples.Shared.Attributes.Sample(
name: "Line of sight (location)",
name: "Show exploratory line of sight between points",
category: "Analysis",
description: "Perform a line of sight analysis between two points in real time.",
instructions: "Tap to place the starting point for the line. Tap again to place the end point.",
tags: new[] { "3D", "line of sight", "visibility", "visibility analysis" })]
public partial class LineOfSightLocation : ContentPage
description: "Perform an exploratory line of sight analysis between two points in real time.",
instructions: "The sample loads with a preset observer and target location, linked by a colored line. A red segment on the line means the view between observer and target is obstructed, whereas green means the view is unobstructed.",
tags: new[] { "3D", "exploratory line of sight", "visibility", "visibility analysis" })]
public partial class ShowExploratoryLineOfSightBetweenPoints : ContentPage
{
// URL for an image service to use as an elevation source
private string _elevationSourceUrl = @"https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer";
Expand All @@ -38,7 +38,7 @@ public partial class LineOfSightLocation : ContentPage
// Offset (meters) to use for the observer/target height (z-value for the points)
private double _zOffset = 2.0;

public LineOfSightLocation()
public ShowExploratoryLineOfSightBetweenPoints()
{
InitializeComponent();

Expand Down
Comment thread
praveenaak marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Show exploratory line of sight between points

Perform an exploratory line of sight analysis between two points in real time.

![Image of show exploratory line of sight between points](showexploratorylineofsightbetweenpoints.jpg)

## Use case

An exploratory line of sight analysis can be used to assess whether a view is obstructed between an observer and a target. Obstructing features could either be natural, like topography, or man-made, like buildings. Consider an events planning company wanting to commemorate a national event by lighting sequential beacons across hill summits or roof tops. To guarantee a successful event, ensuring an unobstructed line of sight between neighboring beacons would allow each beacon to be activated as intended.

Note: This analysis is a form of "exploratory analysis", which means the results are calculated on the current scale of the data, and the results are generated very quickly but not persisted. If persisted analysis performed at the full resolution of the data is required, consider using a `LineOfSightFunction` to perform a line of sight calculation instead.

## How to use the sample

The sample loads with a preset observer and target location, linked by a colored line. A red segment on the line means the view between observer and target is obstructed, whereas green means the view is unobstructed.

Tap to place the starting (observer) point for the line. Tap again to place the end (target) point.

## How it works

1. Create an `AnalysisOverlay` and add it to the scene view.
2. Create an `ExploratoryLocationLineOfSight` with initial observer and target locations and add it to the analysis overlay.
3. Listen for taps on the scene.
4. Update the target and observer positions by updating `ExploratoryLocationLineOfSight.ObserverLocation` and `ExploratoryLocationLineOfSight.TargetLocation`.

## Relevant API

* AnalysisOverlay
* ExploratoryLocationLineOfSight
* SceneView

## Tags

3D, exploratory line of sight, visibility, visibility analysis
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"category": "Analysis",
"description": "Perform a line of sight analysis between two points in real time.",
"formal_name": "LineOfSightLocation",
"description": "Perform an exploratory line of sight analysis between two points in real time.",
"formal_name": "ShowExploratoryLineOfSightBetweenPoints",
"ignore": false,
"images": [
"lineofsightlocation.jpg"
"showexploratorylineofsightbetweenpoints.jpg"
],
"keywords": [
"3D",
"line of sight",
"exploratory line of sight",
"visibility",
"visibility analysis"
],
Expand All @@ -22,8 +22,8 @@
"SceneView"
],
"snippets": [
"LineOfSightLocation.xaml.cs",
"LineOfSightLocation.xaml"
"ShowExploratoryLineOfSightBetweenPoints.xaml.cs",
"ShowExploratoryLineOfSightBetweenPoints.xaml"
],
"title": "Line of sight (location)"
"title": "Show exploratory line of sight between points"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="ArcGIS.Samples.ViewshedCamera.ViewshedCamera"
<ContentPage x:Class="ArcGIS.Samples.ShowExploratoryViewshedFromCameraInScene.ShowExploratoryViewshedFromCameraInScene"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Maui;assembly=Esri.ArcGISRuntime.Maui">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.UI.GeoAnalysis;

namespace ArcGIS.Samples.ViewshedCamera
namespace ArcGIS.Samples.ShowExploratoryViewshedFromCameraInScene
{
[ArcGIS.Samples.Shared.Attributes.Sample(
name: "Viewshed for camera",
name: "Show exploratory viewshed from camera in scene",
category: "Analysis",
description: "Analyze the viewshed for a camera. A viewshed shows the visible and obstructed areas from an observer's vantage point.",
instructions: "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.",
tags: new[] { "3D", "integrated mesh", "scene", "viewshed", "visibility analysis" })]
public partial class ViewshedCamera : ContentPage
description: "Analyze the exploratory viewshed for a camera showing the visible and obstructed areas from an observer's vantage point.",
instructions: "The sample will start with an exploratory viewshed created from the initial camera location, so only the visible (green) portion of the exploratory viewshed will be visible. Move around the scene to see the obstructed (red) portions. Tap the 'Update from Camera' button to update the exploratory viewshed to the current camera position.",
tags: new[] { "3D", "exploratory viewshed", "integrated mesh", "scene", "visibility analysis" })]
public partial class ShowExploratoryViewshedFromCameraInScene : ContentPage
{
// URL for a scene service of buildings in Girona.
private string _gironaMeshUrl = "https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/Girona_Spain/SceneServer";
Expand All @@ -30,7 +30,7 @@ public partial class ViewshedCamera : ContentPage
// Location viewshed analysis to show visible and obstructed areas from the camera
private ExploratoryLocationViewshed _viewshedForCamera;

public ViewshedCamera()
public ShowExploratoryViewshedFromCameraInScene()
{
InitializeComponent();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Show exploratory viewshed from camera in scene

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

![Image of show exploratory viewshed from camera in scene](showexploratoryviewshedfromcamerainscene.jpg)

## Use case

An exploratory viewshed analysis is a type of visual analysis you can perform at the current rendered resolution of a scene. The exploratory 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).

Note: This analysis is a form of "exploratory analysis", which means the results are calculated on the current scale of the data, and the results are generated very quickly but not persisted. If persisted analysis performed at the full resolution of the data is required, consider using a `ViewshedFunction` to perform a viewshed calculation instead.

## How to use the sample

The sample will start with an exploratory viewshed created from the initial camera location, so only the visible (green) portion of the exploratory viewshed will be visible. Move around the scene to see the obstructed (red) portions. Tap the 'Update from Camera' button to update the exploratory viewshed to the current camera position.

## How it works

1. Create an `ExploratoryLocationViewshed`, passing in the initial `Camera` and a min/max distance.
2. Update the viewshed using `ExploratoryLocationViewshed.UpdateFromCamera()`.

## Relevant API

* AnalysisOverlay
* ArcGISScene
* ArcGISTiledElevationSource
* Camera
* ExploratoryLocationViewshed
* IntegratedMeshLayer
* SceneView

## About the data

The scene shows an integrated mesh layer of [Girona, Spain](https://www.arcgis.com/home/item.html?id=5c55d0d1f21e489193cdeff11460a28c) with the [World Elevation source image service](https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer) both hosted on ArcGIS Online.

## Tags

3D, exploratory viewshed, integrated mesh, scene, visibility analysis
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"category": "Analysis",
"description": "Analyze the viewshed for a camera. A viewshed shows the visible and obstructed areas from an observer's vantage point.",
"formal_name": "ViewshedCamera",
"description": "Analyze the exploratory viewshed for a camera showing the visible and obstructed areas from an observer's vantage point.",
"formal_name": "ShowExploratoryViewshedFromCameraInScene",
"ignore": false,
"images": [
"viewshedcamera.jpg"
"showexploratoryviewshedfromcamerainscene.jpg"
],
"keywords": [
"3D",
"exploratory viewshed",
"integrated mesh",
"scene",
"viewshed",
"visibility analysis"
],
"offline_data": [],
Expand All @@ -19,16 +19,16 @@
],
"relevant_apis": [
"AnalysisOverlay",
"ArcGISScene",
"ArcGISTiledElevationSource",
"Camera",
"ExploratoryLocationViewshed",
"IntegratedMeshLayer",
"Scene",
"SceneView"
],
"snippets": [
"ViewshedCamera.xaml.cs",
"ViewshedCamera.xaml"
"ShowExploratoryViewshedFromCameraInScene.xaml.cs",
"ShowExploratoryViewshedFromCameraInScene.xaml"
],
"title": "Viewshed for camera"
"title": "Show exploratory viewshed from camera in scene"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="ArcGIS.Samples.ViewshedGeoElement.ViewshedGeoElement"
<ContentPage x:Class="ArcGIS.Samples.ShowExploratoryViewshedFromGeoelementInScene.ShowExploratoryViewshedFromGeoelementInScene"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Maui;assembly=Esri.ArcGISRuntime.Maui">
Expand Down
Loading
Loading