Select to view content in your preferred language

Working with Elevation on Android

1307
5
Jump to solution
02-21-2023 10:00 AM
NikitaBortnichuk
Emerging Contributor

Hello, Community!

My team is working on ArcGis map application on Android and we are looking for the options and ways how to work with elevations either offline or online. Currently we are using 2D map and we are getting elevations from WorldElevation/Terrain/ImageServer using ImageServiceRaster but it seems to work pretty slow, but at least it works. Now we are extending the functionality to let users working with our app offline and now we have a challeng to implement the work with elevation data offline. We are ready to consider all possible services and solutions on working with elevations online and offline. Any help is much appreciated!

0 Kudos
1 Solution

Accepted Solutions
Shubham_Sharma
Esri Contributor

Not sure if I understand what the end goal should look like, but in my understanding, you want to be able to display 3D elevation information on a 2D map and load it offline. Here are the steps to make that possible:

  • In order to showcase elevation you would need to use a "SceneView"
  • You can generate a 2D map layer to place your elevation surface using ArcGIS Pro
  • Export it to a mobile scene package and can be used to be loaded offline on a device.

 You can check out the Philadelphia Mobile Scene Package link to load an example scene package. Not sure how else would you be able to showcase elevation on a 2D layer. If your use case is more specific and would need technical support in setting up the tools you need reach out to our technical support team: https://support.esri.com/

View solution in original post

0 Kudos
5 Replies
Shubham_Sharma
Esri Contributor

Hello @NikitaBortnichuk ,

 

One possible approach to load a mobile scene package file (.mspk) to the SceneView. Check out the tutorial Create an offline scene using ArcGIS Pro

There is a sample app that does this in ArcGIS Runtime (100.x) Open mobile scene package

To achieve this using ArcGIS MapsSDK (200.x), follow the example below

val mobileScenePackage = MobileScenePackage(provisionPath + "/philadelphia.mspk")
lifecycleScope.launch {
    mobileScenePackage.load().onSuccess {
        sceneView.scene = mobileScenePackage.scenes[0]
    }.onFailure {
        showError(it.message.toString())
    }
}

Philadelphia Mobile Scene Package: ArcGIS Portal Item

0 Kudos
NikitaBortnichuk
Emerging Contributor

Thanks a lot for your suggestion! We will definetely consider this approach. However currently we are directed on using 2d maps as it saves us the memory. Do you know any approaches of how to use offline elevation data in 2-dimensional maps?

0 Kudos
Shubham_Sharma
Esri Contributor

Not sure if I understand what the end goal should look like, but in my understanding, you want to be able to display 3D elevation information on a 2D map and load it offline. Here are the steps to make that possible:

  • In order to showcase elevation you would need to use a "SceneView"
  • You can generate a 2D map layer to place your elevation surface using ArcGIS Pro
  • Export it to a mobile scene package and can be used to be loaded offline on a device.

 You can check out the Philadelphia Mobile Scene Package link to load an example scene package. Not sure how else would you be able to showcase elevation on a 2D layer. If your use case is more specific and would need technical support in setting up the tools you need reach out to our technical support team: https://support.esri.com/

0 Kudos
NikitaBortnichuk
Emerging Contributor

Thanks for your answer. I am sorry but I forgot to mention that we only need the elevation values on given coordinates. And we need to have this information offline. Do you know how to achieve that?

0 Kudos
Shubham_Sharma
Esri Contributor

You can follow this tutorial to create an offline scene that can have elevation sources on any point in the map using ArcGIS Pro. You can then load the created mobile scene package and load it to any ArcGIS Runtime application

https://pro.arcgis.com/en/pro-app/latest/help/sharing/overview/create-an-offline-scene.htm

0 Kudos