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
Hey Keith,
Does this still work with 100.4.0? It used to work for me in previous versions but now, it freezes unless i put some delay before calling
GetElevationAsync(point);
I've been able to make this work in 100.4. My short recipe is:
- Load WebScene from portal
- Iterate and LoadAsync on scene.BaseSurfaces.ElevationSources
- await scene.BaseSurface.GetElevationAsync(point)
Yes, still working for me in 100.4. Sounds like you might have something else causing your problem.
Hi,
The current release of ArcGIS Runtime (100.8) now includes support for identifying cell/pixel values from raster data.
Welcome to ArcGIS Runtime 100.8
Thanks
Mike