The mapping toolbox has two major functions: displaying information on maps, making calculations (distance, bearing, tracks) in a geographical system. Some of the tools can be used for basic navigation. In this class, I will focus mainly on the display capabilities of this toolbox, you are encouraged to look at the other tools at your leisure. Longitude is basically arbitrary. There were several proposed locations, but we now use the Greenwich Observatory in England (actually on a short hill east of the center of London) as the location of longitude=0. Longitude can range from 0 to 360 degrees or -180 to 180 degrees. The distance between locations can be calculated with [dist,az]=distance([lat1,lon1,lat2,lon2), where dist is the distance between the points and az is the azimuth from location 1 to location 2. The distance is given in units of degree on the surface of the ocean. There are a number of distance converters (deg2nm, km2nm,km2sm,nm2km,sm2km) to convert between degrees(deg), kilometers(km), statute miles(sm), nautical miles(nm) and so forth. This distance depends on the geoid (shape of the surface of the earth) that is used to convert the angles to distance. An inverse tool is available that will calculate the lat and lon of a point some distance and angle from a known point [lat2,lon2]=reckon(lat1,lon1,dist,az). This would allow the determination of a set of points along some direction with desired spacing (say, a location every 10 km along a true bearing of 32 degree from a given location). The coordinate system for these maps is latitude and longitude. The software converts lat-lon specifications into the appropriate location on the map (that is, it does the transformation for you). It is possible to get the details of these transformations, but I will not discuss these details. There are two general setup routines (worldmap and usamap) which allow common basemaps to be created. These routines choose a projection and map limits to show the desired location. For example, worldmap(‘europe’) will create a convenient map for Europe. Similarly, usamap(‘conus’) will create a map for the coterminous 48 states. There are two kinds of data that can be used in the mapping package. Vector data are arrays of latitudes and longitudes. An example is coastline data, which can be obtained with the command ‘load coast’. This will produce two arrays (lat, long). You can create your own arrays which might show a ship track, a sampling transect, some boundary, etc. Two examples below will create a world map and a US map showing the coastlines. A second type of data involves 2D arrays of values. Most of the time these arrays are at regular intervals (1 degree of lat and lon, for example). A Digital Elevation Map (DEM) is one example. The sample program below shows the elevation (depth) of the Earth’s surface as represented by the ‘topo’ data set, provided by Matlab. A similar function (textm) is available to put string or symbols on a map. The command ‘textm(lat,lon,string)’ will put the string at the given location. All of the handle graphics options that we have seen before work the same way with these functions, so you can control the size, color, font, etc of the lines or symbols that you draw. The first argument in the function call is assumed to be the projection. However, the propery name ‘MapProjection’ can be included. Other useful properties are ‘MapLatLimit’ and ‘MapLonLimit’ which control the area covered by the map. The software will use these limits to control the parameters of the projection. You can make specific choices for these parameters by setting the appropriate properties. The example below shows a map covering Chesapeake Bay. You can change the parameters to produce maps of other regions. The ‘Grid’ and ‘Frame’ properties draw a set of gridlines on the map and put a line around the figure. A second geometry type is ‘Line’. In this case, an array of .Lat and .Lon values would be added to the structure. The function ‘geoshow’ is able to read a structure with these variables and plot the points or draw the lines. The matlab function deal either matchs corresponding values or sets a list of values to some single value. Source.