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.

figure
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.

ismap
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'}, ...
    {'Name','Hawaii','FaceColor','red'});

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

figure
worldmap('north america')
geoshow(states,'SymbolSpec',symbols, ...
    'DefaultFaceColor','blue','DefaultEdgeColor','black')
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.

figure
worldmap(korea5c,korea5cR)
geoshow(korea5c,korea5cR,'DisplayType','texturemap')
demcmap(korea5c)

Overlay the land area boundary as a line.

geoshow([S.Lat],[S.Lon],'Color','k')

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;
figure
axesm eckert4
Z = zeros(R.RasterSize);
geoshow(N,R,'DisplayType','surface','CData',N,'ZData',Z)
framem
gridm
plabel
mlabel('MLabelLocation',90)
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.

geoshow('landareas.shp','FaceColor','k')

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.

figure
geoshow(moonalb, moonalbrefvec)

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

figure
axesm ortho 
geoshow(moonalb, moonalbrefvec,'DisplayType','texturemap')
colormap(gray(256))
axis off

See Also

| | | | | |