# Laboratory Sessions

```Laboratory Sessions
Exercice 1. Run m_demo (M-Map Toolbox)
Subirectory m_map
- Run m_demo looking and interpreting the code that has bee used to generate them
%
%
M_DEMO runs all the demos.
M_DEMO(NUM) runs examples NUM (1&lt;=NUM&lt;=10), pausing between examples.
- Distinguish the options to generate different type of map projections using the command
m_proj
- How the geographical coordinates are specified?
- Look at line coasts, m_coast command. Describe options. Patches and color palette.
- Look at gridding options
- How to plot elevations?
- How to plot topographic information (case 7)?
- How to plot your own data in a map?
- How to plot high resolution equal area plots?
- How to use of UTM projections.
- Plot a reduced region in UTM coordinates (3-4 degrees of latitude and longitude)
- Get used with Miller and Lambert projections
Exercice 2 Drawing a map with the coast line, bathymetry or political borders of a country
- Example for Arizona
&gt;&gt; m_proj('oblique mercator','longitudes',[-132 -125],'latitudes',[56 40],'direction',
'vertical','aspect',.5);
&gt;&gt; m_coast;
&gt;&gt; m_grid;
- Select another country or region and show the results
Exercice 3 Look for a more detailed coast-line in the
The Coastline Extractor, http://rimmer.ngdc.noaa.gov/mgg/coast/getcoast.html
- Select a region of the world
- Georeference the region (grid) and plot it
Exercice 4 Draw a map of a country with its political boundaries
from http://www.maproom.psu.edu/dcw/
- Georeference the region (grid) and plot them
- Example:
&gt;&gt; m_plotbndry('spain','color','r')
&gt;&gt; m_grid
Exercice 5 Plotting the topographic map of a country (MATLAB mapping toolbox)
Example:
From the cartographic institute of Catalonia
obtain the file cata200.dtm
Then it should be readed with the MATLAB wizard
data(&lt;120240x15)
textdata(&lt;6x1 cell&gt;
b) or from the subdirectory cat from lab_maps
c) Execute in MATLAB
&gt;&gt; x=data';
&gt;&gt; xs=reshape(x,1350,1336);
&gt;&gt; size(xs)
ans =
1344
1336
&gt;&gt; xs2=xs(1:10:1344,1:10:1336);
&gt; size(xs2)
ans =
135 134
&gt;&gt; axesm('utm')
&gt;&gt; surfm(xs2) or surfacem(xs2)
Exercice 6 Plotting Google Maps in MATLAB
- Select in Google the region you want to plot and produce the figure in MATLAB.
Edit it and add titles and put text pointing out different positions.
Exercice 7 Importing an image of a map, georeferencing and exporting it
Example from Google Earth, select a location
Select the borders of the map you want to export
Look and keep the coordinates of the map borders
Export the map as a jpeg image file
Plot externally the exported map file as a jpeg image
Import this image map file in Matlab using commad imread.m
Check the sizes of the image raster data matrix created in MATLAB
Plot the image and see how is positioned compared to what was externally
Transform the coordinates to adapt the image representation the same as originally in Google
Earth
Create a georeference matrix and a georeference vector
Use geoshow MATLAB command to plot it and check for its adequate position and
georeferences
Once the image is georeferenced, plot it as a map, adding an appropriate grid
Add own data in this map. Acces to some positions and plot on top of them some information
Open the map in the mapview graphical interface interactive MATLAB program
Add some indication and information in some positions of the map
Export the map as a georeferenced tiff file
Reopen directly this file from mapview or using other mapping commands in MATLAB
Exercice 8 Representing results of a monitoring campaign
Represent the results of an environmental monitoring campaign on a map
```