Select to view content in your preferred language

Offline map - Can not load elevation

366
2
08-20-2024 02:35 AM
Mir-WaissSaki
Emerging Contributor

Hi,

I am using ArcGIS Pro 3.3.1 and ArcGIS Map SDK 1.6.

I am trying to create an offline map in a Unity scene so I downloaded my map through ArcGIS Pro as a .vtpk file.

It is possible to load this file offline from the assets folder as a basemap. But I have problems to load the elevation.

MirWaissSaki_2-1724143517865.png

MirWaissSaki_0-1724146232229.png

I tried to load the .vtpk as a elevation source. This does not work. I even tried to add it to the layers as a ArcGIS Vector Tile Layer. Nothing.

After that, I used the analysis tools to manage the tile cache and then exported it as .tpk and .tpkx file in ArcGIS Pro.

MirWaissSaki_1-1724146282135.png

I tried to use these files as elevation source but it did not work. I even tried to load it via Code. No chance.

1.What did I do wrong? Could you please provide a step-by-step guide on how to load a map offline in Unity with both a basemap and an elevation layer.

2. I’m not seeing the Nova Basemap style on my .vtpk basemap. The file name suggests that I downloaded a Nova basemap, so I’m not sure why it’s not displaying correctly.

 

Thank you for your help!

 

 

2 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

The first part of your approach is correct - basemaps for offline use are either a vector tile layer (.vtpk) containing features such as streets, etc, or an image tile layer (.tpkx) typically used for aerial/satellite imagery.

Elevation is also an image tile layer, but the tiles need to be generated as a LERC-encoded.

You'll need to follow the steps in this topic to create a tile package for elevation Share a tile package—ArcGIS Pro | Documentation, and specifically you're going to follow the section Create a tile package for a web elevation layer.

Summary:

To create a tile package that publishes an offline elevation layer, the following must be true:

  • The input raster dataset must represent elevation data.
  • The tiling scheme must use LERC compression.

If you're not working in the coordinate system Web Mercator Auxiliary Sphere (i.e. ArcGIS Online, etc) and instead you're working in local/projected coordinate system then you'll need to use the Generate Tile Cache Tiling Scheme tool with Tile Format set to LERC Compression to generate a new LERC tiling scheme based on your elevation dataset. You should use the same spatial reference as the basemap vector tile package you're creating.

Then create a tile package using the Manage Tile Cache tool to generate a LERC cache. For Input Tiling Scheme, use one of the following:

  • Elevation tiling scheme matches the ArcGIS Online/Bing Maps/Google Maps tiling scheme used by ArcGIS Online basemaps (or basemaps extracted from ArcGIS Online)
  • Elevation tiling scheme with two additional levels matches the ArcGIS Online/Bing Maps/Google Maps tiling scheme used by ArcGIS Online basemaps but has two additional levels for higher-resolution data.
  • Import scheme uses the tiling scheme you created in the optional first step or the tiling scheme of an existing image service. If using this option, browse to the tiling scheme file or service for Import Tiling Scheme.

And finally use the Export Tile Cache tool with the Export Cache As option set to Tile package (.tpkx).

 

For example, the image below shows a raster dataset as an elevation surface layer I've added in ArcGIS Pro (and used 20x exaggeration for effect):

MichaelBranscomb_0-1724152129616.png

And then I've used the Manage Tile Cache geoprocessing tool to create a new cache where the Input Tiling Scheme parameter is Elevation Tiling Scheme (which means it matches the ArcGIS Online/Bing Maps/Google Maps tiling scheme used by ArcGIS Online basemaps):

MichaelBranscomb_2-1724152338068.png

And next I used the Export Tile Cache tool to create a tile package (.tpkx):

MichaelBranscomb_3-1724152564601.png

I tested the new TPKX file while I was in ArcGIS Pro to ensure it worked there (the TOC shows the .tpkx file):

MichaelBranscomb_4-1724152818503.png

And lastly, here it is in Unity (looked better in this case with the imagery basemap):

MichaelBranscomb_5-1724156943632.png

 

I've opened an internal issue to update our documentation to assess how we can better describe this process for creating tile basemap and elevation tile packages for use with our SDKs.

 

Thanks  

Mir-WaissSaki
Emerging Contributor

Thank you so much for your step-by-step guide on importing elevation data into Unity, it worked perfectly!

However, I've noticed that sometimes ArcGIS Pro gets stuck when I use the Manage Tile Cache tool. It reaches 100% but never finishes, remaining in a pending state. I found that defining an area of interest helped resolve this issue, and it's sufficient for now.

Could you please explain how I can import custom basemaps for offline use? In my earlier message, I described the issue with the Nova map. I have a basemap in a .vtpk file, but it's not the Nova map. it looks different.

MirWaissSaki_0-1724658996779.png

 

 

Thank you!

0 Kudos