Set UTM Parameters Interactively
The easiest way to use the UTM projection is through a graphical user interface. You can
create or modify a UTM area of interest with the axesmui
projection control
panel, and get further assistance form the utmzoneui
control panel.
You can Shift+click in the window of an
axesm
-based map, or typeaxesmui
to display the projection control panel. Here you start from scratch:figure axesm utm axesmui
The Map Projection field is set to
cyln: Universal Transverse Mercator (UTM)
.Note
For UTM and UPS maps, the Aspect field is set to
normal
and cannot be changed. If you attempt to specifytransverse
, an error results.Click the Zone button to open the
utmzoneui
panel. Click the map near your area of interest to pick the zone:Note that while you can open the
utmzoneui
control panel from the command line, you then have to manually update the figure with the zone name it returns with asetm
command:setm(gca,'zone',ans)
Click the Accept button.
The
utmzoneui
panel closes, and thezone
field is set to the one you picked. The map limits are updated accordingly, and the geoid parameters are automatically set to an appropriate ellipsoid definition for that zone. You can override the default choice by selecting another ellipsoid from the list or by typing the parameters in the Geoid field.Click Apply to close the projection control panel.
The projection is then ready for projection calculations or map display commands.
Now view a choropleth base map from the
usstatehi
shapefile for the area within the zone that you just selected:states = readgeotable("usastatehi.shp"); framem faceColors = makesymbolspec("Polygon",... {"INDEX",[1 numel(states)],"FaceColor",polcmap(numel(states))}); geoshow(states,"DisplayType","polygon","SymbolSpec", faceColors)
What you see depends on the zone you selected. The preceding display is for zone 18T, which contains portions of New England and the Middle Atlantic states.
You can also calculate projected UTM grid coordinates from latitudes and longitudes:
[latlim, lonlim] = utmzone('15S')
latlim = 32 40 lonlim = -96 -90
mstruct = gcm; [x,y] = projfwd(mstruct, latlim, lonlim)
x = 1.0e+06 * -1.5029 -0.7829 y = 1.0e+06 * 3.7403 4.5369