Create Maps Using geoshow

Create a range of different maps using geoshow.

Geographic map 1: World Land Area

Create a worldmap. Then project and display world land areas.

worldmap world
geoshow('landareas.shp','FaceColor',[0.5 1.0 0.5])

You can also project and display world land areas using a default Plate Carree projection.

geoshow('landareas.shp','FaceColor',[0.5 1.0 0.5])

The axes show position in latitude and longitude, but are displayed on a set of ordinary axes. To display geographic data on a set of map axes instead, use axesm, usamap, or worldmap before calling geoshow.

ans = 0

Geographic map 2: North America with Custom Colored States in the U.S.

Read the USA high resolution data.

states = shaperead('usastatehi','UseGeoCoords',true);

Create a SymbolSpec to display Alaska and Hawaii as red polygons.

symbols = makesymbolspec('Polygon', ...
    {'Name','Alaska','FaceColor','red'}, ...

Create a world map of North America with Alaska and Hawaii in red, and all other states in blue.

worldmap('north america')
geoshow(states,'SymbolSpec',symbols, ...
axis off

Geographic map 3: Korea Elevation Grid

Load elevation data and a geographic cells reference object for the Korean peninsula. Import a land area boundary using shaperead.

load korea5c
S = shaperead('landareas','UseGeoCoords',true);

Create a world map. Then project and display the elevation data as a texture map.


Overlay the land area boundary as a line.


Geographic map 4: EGM96 Geoid Heights

Get geoid heights and a geographic postings reference object from the EGM96 geoid model. Then, display the heights as a surface using an Eckert projection. Ensure the surface appears below the grid lines by setting the 'CData' name-value pair to the geoid height data and the 'ZData' name-value pair to a matrix of zeros. Display the frame and grid of the map using framem and gridm. Display the parallel and meridian labels using plabel and mlabel.

[N,R] = egm96geoid;
axesm eckert4
Z = zeros(R.RasterSize);
axis off

Create a colorbar and add a text description. Then, mask out all the land.

cb = colorbar('southoutside');
cb.Label.String = 'EGM96 Geoid Heights in Meters';

Then, mask out all the land.


Geographic map 5: Moon Albedo Image

Load the moon albedo image.

load moonalb

Project and display the moon albedo image using a default Plate Carree projection.

geoshow(moonalb, moonalbrefvec)

Project and display the moon albedo image as a texturemap in an orthographic projection.

axesm ortho 
geoshow(moonalb, moonalbrefvec,'DisplayType','texturemap')
axis off

See Also

| | | | | |