Select to view content in your preferred language

Is there any API or method which returns elevation given latitude, longitude as inputs.

527
2
05-27-2019 07:34 AM
AbhijeetSatam
New Contributor III

I am using ArcGIS Runtime SDK for Qt 100.4. I am working on offline 3d application. Loaded the map (.tpk) and elevation data (.tiff). Its working with wgs84 reference. I wanted to know if there is an API or other method which returns elevation given latitude, longitude as inputs.

2 Replies
LukeSmallwood
Esri Contributor

Hi,

If you want to get the elevation at a lat/long in your 3D app you can follow this process:

- obtain the Surface from your Scene object (see https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-scene.html#baseSurface)

- create a Point at your lat/long (see https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-point.html#Point-2). Be careful the constructor expects the inputs in long(x), lat(y) order.

- run an asynchronous locationToElevation operation on your Surface supplying your location Point (https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-surface.html#locationTo...)

I hope that helps,

Luke

0 Kudos
AbhijeetSatam
New Contributor III

I wanted to know location of multiple (>1k) points at an instance (during runtime) required for processing elevation of each individual point.

1.Is using asynchronous operation like locationToElevation still the most efficient way?

2.So in the case of multiple elevation queries, is it okay to obtain surface only once?

0 Kudos