Main Content

removeCustomTerrain

Remove custom terrain data

Since R2020a

Description

removeCustomTerrain(terrainName) removes the custom terrain data specified by the user-defined terrainName. You can use this function to remove terrain data that is no longer needed. The terrain data to be removed must have been previously added using addCustomTerrain.

example

Examples

collapse all

Display a line from the surface of Gross Reservoir to a point above South Boulder Peak using custom terrain.

First, add terrain for an area around South Boulder Peak by calling addCustomTerrain and specifying a DTED file. The DTED file is from the SRTM Void Filled data set, available from the US Geological Survey. Name the terrain "southboulderpeak".

addCustomTerrain("southboulderpeak","n39_w106_3arc_v2.dt1")

Create a geographic globe. Specify the terrain by name, using the "Terrain" argument of the geoglobe function. Then, plot the line. Tilt the view by holding Ctrl and dragging.

uif = uifigure;
g = geoglobe(uif,"Terrain","southboulderpeak");

lat = [39.95384 39.95];
lon = [-105.29916 -105.3608];
hTerrain = [10 0];
geoplot3(g,lat,lon,hTerrain,"y","HeightReference","Terrain","LineWidth",3)

A 3-D line plotted from the surface of a reservoir to a point above a peak.

Close the geographic globe and remove the custom terrain.

close(uif)
removeCustomTerrain("southboulderpeak")

Input Arguments

collapse all

User-defined identifier for terrain data previously added using addCustomTerrain, specified as a string scalar or a character vector.

Data Types: char | string

Version History

Introduced in R2020a