4

Our application needs to do some elevation calculations (and is not connected to the internet), as a result we need to determine the highest elevation for a given polygon. How can we query DTED offline using ArcGIS .Net SDK?

Here is the little progress I have made...

Option 1 - Use Esri.ArcGISRuntime.Controls.FileElevationSource

So in order to use FileElevationSource it turns out it must be associated with a SceneView. We were only using a MapView so I added in a SceneVeiw and associated the FileElevationSource

sceneView.Scene.Surface.Add(elevationSource);

When I tired to access the elevation source I get an AccessViolation

elevationSource.GetElevationAsync(location as MapPoint).Result

Option 2 - Some how use LocalServer

The doco states that ArcGIS Runtime LocalServer support a number of Raster formats including DTED. Local Server raster support—ArcGIS Runtime SDK for .NET
So I used ArcMap to create a map package file with the DTED files within but have no idea how to use Local Sever to query the package file

Ultimately we want to:

  1. Load a number of DTED files
  2. Query for a given lat/lon what the elevation is at that point

Any help would be greatly appreciated!

Note we are using ArcGIS .Net SDK v10.2.7

1 Answers1

0

You can't access the result of an async operation until it completed. Instead try this:

var result = await elevationSource.GetElevationAsync(location as MapPoint);

We'll have better support for getting elevation directly from any raster soon, (hopefully Update 1, but might be U2).

dotMorten
  • 1,953
  • 1
  • 14
  • 10