Terrain exaggeration

View inWPFUWPFormsiOSAndroid
View 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.xaml.cs
                       
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
    x:Class="ArcGISRuntimeXamarin.Samples.TerrainExaggeration.TerrainExaggeration"
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms"
    xmlns:resources="clr-namespace:Forms.Resources;assembly=ArcGISRuntime">
    <RelativeLayout>
        <esriUI:SceneView x:Name="MySceneView" Style="{StaticResource SceneWithFormStyle}" ViewInsets="0" />
        <resources:ResponsiveFormContainer x:Name="FormContainer">
            <StackLayout>
                <Label Style="{StaticResource LabelStyle}" Text="Terrain exaggeration:" />
                <Slider
                    x:Name="TerrainSlider"
                    Maximum="3"
                    MaximumTrackColor="CadetBlue"
                    Minimum="1"
                    MinimumTrackColor="CadetBlue"
                    Value="1" />
            </StackLayout>
        </resources:ResponsiveFormContainer>
    </RelativeLayout>
</ContentPage>

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