Terrain exaggeration

View inAndroidFormsUWPWPFWinUIiOSView on GitHub

Vertically exaggerate terrain in a scene.

Image of terrain exaggeration

Use case

Vertical exaggeration can be used to emphasize subtle changes in a surface. This can be useful in creating visualizations of terrain where the horizontal extent of the surface is significantly greater than the amount of vertical change in the surface. A fractional vertical exaggeration can be used to flatten surfaces or features that have extreme vertical variation.

How to use the sample

Use the slider to update terrain exaggeration.

How it works

  1. Create an elevation source and add it to a new surface.
    • An elevation source defines the terrain based on a digital elevation model (DEM) or digital terrain model (DTM).
  2. Add the surface.
    • The surface visualizes the elevation source.
  3. Configure the surface's elevation exaggeration using Surface.ElevationExaggeration.

Relevant API

  • Scene
  • Scene.BaseSurface
  • Surface
  • Surface.ElevationExaggeration

Tags

3D, DEM, DTM, elevation, scene, surface, terrain

Sample Code

TerrainExaggeration.xamlTerrainExaggeration.xamlTerrainExaggeration.xaml.cs
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<UserControl x:Class="ArcGISRuntime.WinUI.Samples.TerrainExaggeration.TerrainExaggeration"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:esriUI="using:Esri.ArcGISRuntime.UI.Controls">
    <Grid>
        <esriUI:SceneView x:Name="MySceneView" />
        <Border Style="{StaticResource BorderStyle}">
            <StackPanel>
                <TextBlock Text="Terrain exaggeration:" />
                <Slider x:Name="TerrainSlider"
                        Maximum="3"
                        Minimum="1"
                        StepFrequency=".01"
                        Value="1" />
            </StackPanel>
        </Border>
    </Grid>
</UserControl>

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.