Mapping Toolbox | ![]() ![]() |
Display great circle or rhumb line track defined via mouse input
Syntax
h = trackg(ntrax) h = trackg(ntrax,npts) h = trackg(ntrax,linestyle
) h = trackg(ntrax,npts,linestyle
) h = trackg(ntrax,PropertyName
,PropertyValue,...) h = trackg(ntrax,npts,PropertyName
,PropertyValue,...) [lat,lon] = trackg(ntrax,npts,PropertyName
,PropertyValue,...) h = trackg(track
,ntrax,...)
Description
This function is used to define great circles or rhumb lines for display using mouse clicks. For each track, two clicks are required, one for each endpoint of the desired track segment. You can modify the track after creation by shift-clicking on it. The track is then in a edit mode, during which you can change the length and position by dragging control points, or by entering values into a control panel. Shift-clicking again exits the edit mode
h = trackg(ntrax) brings forward the current map axes and waits for the user to make (2 x
ntrax
) mouse clicks. The output h
is a vector of handles for the ntrax
track segments, which are then displayed.
h = trackg(ntrax,npts) specifies the number of plotting points to be used for each track segment. npts
is 100 by default.
h = trackg(ntrax,linestyle
) specifies the line style for the displayed track segments, where linestyle
is any line style string recognized by the standard MATLAB function line
.
h = trackg(ntrax,PropertyName
,PropertyValue,...) allows property/value pairs to be set, where PropertyName
and PropertyValue
are recognized by the line
command.
[lat,lon] = trackg(ntrax,npts,...) returns the coordinates of the plotted points rather than the handles of the track segments. Successive segments are stored in separate columns of lat
and lon
.
h = trackg(track
,ntrax,...) specifies the logic with which tracks are calculated. If the string track
is 'gc'
(the default), great circle path is used. If track is 'rh'
, rhumb line logic is used.
See Also
track1 |
Great circle or rhumb line from point, azimuth, and range |
track2 |
Great circle or rhumb line from two points |
scircleg |
Interactive small circles |
![]() | track2 | trimcart | ![]() |