Elevation adds terrain relief to 3D scenes by defining height values across the map or scene. Other layers, such as imagery and vector tiles, are typically draped over the elevation surface. In most workflows, elevation data comes from an elevation service.tpk/.tpkx file. The file contains a tile cache of the data and metadata about the layer, packaged into a single, portable file.
Currently, the SDK supports tiled elevation layers using LERC compression.
An elevation surface can be created from any of the following:
- Item page URLs
- Web elevation services (image tile layers / cached elevation services)
- Local LERC-encoded tile packages (
.tpkor.tpkx)
The spatial reference of the elevation should match the basemap and image tile layers. See Spatial references for more information about coordinate systems.
To learn how to create LERC-encoded tile packages for elevation, see the ArcGIS Pro documentation: Share a tile package.
When you have multiple elevation sources, the last item added to the collection takes precedence and is displayed topmost in the Modes Panel UI. You can apply mesh modification to remove or change the altitude of specified polygon areas to the elevation surface that is defined by elevation sources.
Set elevation
The Terrain 3D from ArcGIS Online
To use the default elevation source, click the Elevation tab, and select Terrain 3D.
To use custom elevation sources:
- Click + Add New at the bottom right in the Elevation panel to open the pop-up window.
- Enter the online service URL for the elevation service or a local file package path in the Source field.
- Enter the name of the source in the Name field.
- Click Add.
- Find the newly added elevation source in the Elevation panel.
- To use a
.tpkor.tpkxfile package as an elevation source, use the absolute file path for the Source. - To change the elevation source order, click ⋮ and select Move up or Move down.
- The elevation source at the top of the list has the highest priority.
- To change an additional elevation source name, click ⋮ and select Rename.
- To zoom the Scene view camera to the extent of an additional elevation source, click ⋮ and select Zoom To.
- To delete an additional elevation source, click ⋮ and select Delete.
- To disable elevation, uncheck Enable All.
- To use a privately hosted elevation layer, select the matching configuration from the Authentication drop-down list in the Add New Elevation Layer pop-up window. For more information about using private content, see user authentication.
- Click the ArcGIS Map Actor in the Outliner panel.
- Expand the Elevation section in the Details panel.
- Click the + icon in the Elevation Sources row to add new array element.
- Expand the newly added item row.
- Enter a name for the elevation source by replacing
New Elevation Source. - Enter the online service URL for the elevation service or a local file package path in the Elevation Source field.
- Check the Is Enabled checkbox.
To use a privately hosted elevation layer, select the matching configuration from the Authentication drop-down list. For more information about using private content, see user authentication.
- To change the elevation source priority order, drag it to a new order position.
- The elevation source at the bottom of the list has the highest priority.
- To change an elevation source name, enter a new name in the Name field.
- To replace an elevation source URL or file path, enter a new value in the Source field.
- To hide an elevation source, uncheck the Is Enabled checkbox.
- To remove all elevation sources, click the trash icon in the Elevation Sources row.
- To remove an elevation source, click the v icon in the index row and select Delete.
- To set an elevation source, go to ArcGIS Maps SDK > ArcGIS Image Elevation Source, select the Create ArcGIS Image Elevation Source or Create ArcGIS Image Elevation Source with Name node, and set the elevation layer URL or local file package path in the source field.
- To create an elevation with a single source, use node ArcGIS Maps SDK > ArcGIS Map Elevation, and select Create ArcGIS Map Elevation with Elevation Source.
- Use the Set Elevation node to set the elevation with a single elevation source for the ArcGIS Map.
- To use multiple elevation sources, go to ArcGIS Maps SDK > ArcGIS Elevation Source Collection, and use Create ArcGIS Elevation Source Collection and Add node to register each elevation source to Elevation Source Collection.
- To create an elevation with multiple elevation sources, use Get Elevation node to set them for the ArcGIS Map and Set Elevation Sources to use registered elevation sources.
- Connect API key variable to the API Key pin.
Use ArcGISImageElevationSource for the tiled elevation layer.
To set one elevation source, set the elevation directly to set elevation with ArcGISMapElevation. To use multiple elevation sources, register each elevation source to ElevationSources.
To disable an elevation source:
arcGISMap->GetElevation()->GetElevationSources()->At(arcGISMap->GetElevation()->GetElevationSources()->IndexOf(Elevation_2))->SetIsEnabled(false);To remove an elevation source:
arcGISMap->GetElevation()->GetElevationSources()->Remove(arcGISMap->GetElevation()->GetElevationSources()->IndexOf(Elevation_2));You can find the sample code to set elevation with an elevation layer service URL by using in the SampleAPIMapCreator.cpp file. The sample script file is in:
Plugins/ArcGISMapsSDK/Source/ArcGISSamples/Private
Elevation exaggeration
Elevation exaggeration is used to make subtle changes to a surface. This can be useful when creating visualizations of terrain where the horizontal extent (or flat terrain) of the surface is significantly greater than the amount of vertical change (like hills and valleys).
The altitude values of the surface data are multiplied by the exaggeration factor. You can also make fractional elevation exaggeration changes to flatten, or reduce, surfaces or features that have extreme vertical variation.
To set up the elevation exaggeration:
- Click the Elevation tab.
- Click the gear button below the elevation source list to display the properties window.
- Drag the slider to view the elevation exaggeration scale between 0 and 100. You can also type a number in the text box.
- Click the ArcGIS Map Actor in the Outliner panel.
- Expand the Elevation section in the Details panel.
- Drag the slider to view the elevation exaggeration scale between 0 and 100. You can also type a number in the text box.
- Use the Set ExaggerationFactor node in ArcGIS Maps SDK > ArcGIS Map Elevation to set the elevation exaggeration.
In the ArcGISMapElevation, you can set the Elevation exaggeration using the ExaggerationFactor.
Refer to FAQ to troubleshoot data loading issues.