Matlab Class Home      Class Outline      Previous Task      Next Task      Main Class Page      Evaluation 14

Task 14.4 Detail: controlling the map projection and other details

Summary of new tools and commands.

Task: Create a map of Europe using the equal area projection. Draw the continental outlines. Based on this display, what are the relative sizes of Italy and Norway? Are they about the same size or is one much bigger than the other?

The map axes command, axesm, allows complete control of the map being created. It can be used to specify the map projection and the area covered by the map as well as other properties.

A complete list of available map projections can be printed with maps. This will provide the type, name and short name for dozens of map projections. maps IDLIST provides a list of short names; maps NAMELIST provides a list of projection names.

To activate a given map projection, in this case, the Equal Area Conic (Albers) projection, the command is

  axesm('MapProjection','eqaconic',...
     'MapLatLimit',[30 60],'MapLonLimit',[-10 50],...
     'Grid','on','Frame','on')
The minimum and maximum of the latitude and longitude for the map are provides as well as commands to turn on the Grid and Frame.

   SS14_4a

A discussion of the best choice of a map projection to use in different circumstances is beyond the scope of this class. However, there is information available online to help make these choices.

mlabel draws tick marks for meridians (longitudes). It is a toggle. The commands below work to turn the lines on or off or to have them redrawn.

 mlabel ON
 mlabel OFF
 mlabel RESET

plabel draws tick marks for parallels (latitudes). It is a toggle. The commands below work to turn the lines on or off or to have them redrawn.

 plabel ON
 plabel OFF
 plabel RESET

If a handle is returned with the axesm command issued above, then various properties of the axes object and the map characteristics can be set with setm.

Flow chart for task.

%%%  create base map
%%%  add land areas
%%%  compare sizes of Norway and Italy

Script for task.

%%%  create base map
  figure
   axesm('MapProjection','eqaconic',...
     'MapLatLimit',[30 75],'MapLonLimit',[-30 60],...
     'Grid','on','Frame','on')
%%%  add land areas
   geoshow('landareas.shp')
%%%  compare sizes of Norway and Italy

Matlab Class Home      Class Outline      Previous Task      Next Task      Main Class Page      Evaluation 14


email: J. Klinck