Interactively Create Small Circle and Track Annotations on Maps
You can interactively generate geographic line annotations, such as
navigational tracks and small circles. Great circle tracks are the shortest distance between
points that, when closed, partition the Earth into equal halves. A small circle is the locus
of points at a constant distance from a reference point. Use trackg
and
scircleg
to create them by clicking on the map. Double-click the tracks
or circles to modify the lines. Shift+click the tracks to type specific
parameters into a control panel. The control panels also allow you to retrieve or set
properties of tracks and circles (for instance, great circle distances and small circle
radii).
Set up an orthographic view centered over the Pacific Ocean. Use the
coastlines
MAT-file.
axesm('ortho','origin',[30 180]) framem; gridm load coastlines plotm(coastlat,coastlon,'k')
Create a track with the trackg
function, which prompts for two
endpoints. The default track type is a great circle. Create a great circle track from Los
Angeles, California, to Tokyo, Japan, and a 1000 km radius small circle centered on the
Hawaiian Islands.
trackg Track1: Click on starting and ending points
Now create a small circle around Hawaii with the scircleg
function, which prompts for a center point and a point on the perimeter. Make the circle's
radius about 2000 km, but don't worry about getting the size exact.
scircleg Circle 1: Click on center and perimeter
The map should look approximately like this.
To adjust the size of the small circle to be 2000 km, Shift+click anywhere on its perimeter. The Small Circles dialog box appears.
Type 2000
into the Radius
field.
Click Close. The small circle adjusts to be 2000 km around Hawaii.
To adjust the track between Los Angeles and Tokyo, Shift+click on it. This brings up the Track dialog, with which you specify a position and initial azimuth for either endpoint, as well as the length and type of the track.
Change the track type from Great Circle
to Rhumb
Line
with the Track pop-up menu. The track immediately changes shape.
Experiment with the other Track dialog controls. Also note that you can move the endpoints of the track with the mouse by dragging the red circles, and obtain the arc's length in various units of distance.
The following figure shows the Small Circles and Track dialog boxes.