Access Basemaps and Terrain for Geographic Globe
Geographic globe objects created using the geoglobe
function plot
data over basemaps and terrain. You can access different basemap and terrain choices in
different ways.
MathWorks® offers a selection of basemaps, including two-tone, color terrain, and
high-zoom-level displays. Six of the basemaps are tiled data sets created using
Natural Earth. Five of the basemaps are high-zoom-level maps provided by Esri®. For more information about basemap options, see the geobasemap
function.
Use Installed Basemap
The "darkwater"
basemap is installed with MATLAB®. The other basemaps are not installed with MATLAB, but you can access them over an internet connection.
Download Basemaps
To work offline or to improve map responsiveness, you can download the basemaps created using Natural Earth onto your local system. The basemaps provided by Esri are not available for download.
Download basemaps using the Add-On Explorer.
On the MATLAB Home tab, in the Environment section, click Add-Ons > Get Add-Ons.
In the Add-On Explorer, scroll to the MathWorks Optional Features section, and click Show All to find the basemap add-ons. You can also search for the basemap add-ons by name (listed in the following table) or click Optional Features in Filter by Type.
Select the basemap add-ons that you want to download.
Basemap Name Basemap Data Package Name 'bluegreen'
MATLAB Basemap Data - bluegreen 'grayland'
MATLAB Basemap Data - grayland 'colorterrain'
MATLAB Basemap Data - colorterrain 'grayterrain'
MATLAB Basemap Data - grayterrain 'landcover'
MATLAB Basemap Data - landcover
Add Custom Basemaps
Add a custom basemap from a URL, an MBTiles file, a georeferenced image, or a
georeferenced data grid by using the addCustomBasemap
function. MATLAB requires an active internet connection to add and use custom basemaps
from a URL. MATLAB does not require internet access to add custom basemaps from MBTiles
files, images, or data grids.
MBTiles files are useful for storing and sharing tiled basemap data. You can write
a georeferenced image or data grid to an MBTiles file by using the mbtileswrite
function.
Access Terrain
By default, the geographic globe uses terrain data hosted by MathWorks and derived from the GMTED2010 model by the USGS and NGA. You need an active internet connection to access this terrain data, and you cannot download it.
To work offline or to improve terrain responsiveness, add custom terrain from DTED
files using the addCustomTerrain
function. You do not need an active internet
connection to add or use custom terrain.
Alternatively, you can set the Terrain
property of the
geographic globe object to 'none'
.
Specify Basemaps and Terrain
To specify a basemap for a geographic globe, you can either:
Use the
geobasemap
function. Specify the geographic globe as the first argument.uif = uifigure; g = geoglobe(uif); geobasemap(g,'streets')
Set the
Basemap
property of theGeographicGlobe
object. You can set this property by using a name-value pair or by using dot notation.uif = uifigure; g = geoglobe(uif,'Basemap','streets'); g.Basemap = 'topographic';
To specify terrain for the geographic globe, set the Terrain
property of the GeographicGlobe
object. You can set this property
by using a name-value pair or by using dot
notation.
uif = uifigure; g = geoglobe(uif,'Terrain','none'); g.Terrain = 'gmted2010';
See Also
geoglobe
| geobasemap
| addCustomTerrain
| addCustomBasemap
| mbtileswrite