The Globe Display Compared with the Orthographic Projection

This example illustrates the differences between the two-dimensional orthographic projection, which looks spherical but is really flat, and the three-dimensional Globe display. Use the Rotate 3D tool to manipulate the display.

Render 2-D Orthographic Projection

Load the topo data set and render it with a two-dimensional orthographic map projection.

load topo
axesm ortho
framem
meshm(topo,topolegend);
demcmap(topo)

View the map obliquely.

view(3)
daspectm('m',1)

You can view the map in 3-D from any perspective, even from underneath. To visualize this, define a geolocated data grid with meshgrat, populate it with a constant z-value, and render it as a stem plot with stem3m.

[latgrat,longrat] = meshgrat(topo,topolegend,[20 20]);
stem3m(latgrat,longrat,500000*ones(size(latgrat)),'r')

Use the Rotate 3D tool on the figure window toolbar to change your viewpoint. No matter how you position the view, you are looking at a disc with stems protruding perpendicularly.

Render 3-D Globe Display

Render the topo data set with a three-dimensional Globe transform rather than orthographic projection. Display the topo surface in a new figure and view it in 3-D.

figure
axesm('globe','Geoid',earthRadius)
meshm(topo,topolegend);
demcmap(topo)
view(3)

Include the stem plot to visualize the difference in surface normals on a sphere.

stem3m(latgrat,longrat,500000*ones(size(latgrat)),'r')

You can apply lighting to the display, but its location is fixed, and does not move as the camera position is shifted.

camlight('headlight','infinite')

You can use the LabelRotation property when you use the Orthographic or any other Mapping Toolbox™ projection to align meridian and parallel labels with the graticule. Because the Globe display is not a true map projection and is handled differently internally, LabelRotation does not work with it.

For additional information on functions used in this example, see the reference pages for view, camlight, meshgrat, and stem3m.