AnsweredAssumed Answered

How to use elevation data in a MapView?

Question asked by oliver.boesche on Feb 16, 2018
Latest reply on Feb 23, 2018 by oliver.boesche

Hi,

 

I currently try to load DTED files in an offline application using the MapView, but found no way to get values from the DTED files. The following example shows my current approach. Rendering the DTED files with a Hillshade-Renderer is successfull. Therefore, it is simple to see where elevation data should be available.

 

private async void Initialize()

{

var elevationFileList = new List<string>()

       {

@"C:\tmp\example.dt0",

@"C:\tmp\example.dt1",

@"C:\tmp\example.dt2"

      };

 

this.surface = new Surface();

var rasterElevation = new RasterElevationSource(elevationFileList);

await rasterElevation.LoadAsync();

this.surface.ElevationSources.Add(rasterElevation);

await this.surface.LoadAsync();

}

 

 

private async void MapView_GeoViewTapped(object sender, GeoViewInputEventArgs e)

{

var altitude = await this.surface.GetElevationAsync(e.Location);

System.Console.WriteLine("Altitude:{0}", altitude);

}

As far as I understand the documentation it is only possible to use the elevation data when it is bound to a surface on a SceneView. I would appreciate every hint to find a solution for this problem.

 

Best regards,
Oliver

Outcomes