Tour 7: Annotating Maps for Programmers
This is an advanced
topic! Most users never need to worry about Meta
tags.
Skip to the [ next tour 8
]
Advanced Topic: Annotating Maps for Programmers
When viewing a map, press F8 to display the
Waypoint Editor. The Waypoint Editor is
automatically shown after adding a waypoint using
the F2 key.

The status line of the Waypoint Editor shows the
current cursor position 'line: column'.
The format for a Waypoint is:
location;comment
A waypoint file can be as simple as a list of map
coordinates followed by text that you would like
displayed at the coordinate. For example:
40 46 37.1 N 111 53 14.9 W;
Utah State Capitol
will display the text 'Utah State Capitol' at the
front steps of the capitol:

A variety of other annotations features can be
added using Meta Tags:
- Lines that connect waypoint locations: line
styles and colors
- Symbols: draw scaled boxes, lines, arrows over
map images
- Text location, size, style and colors
In addition, you can use the waypoint file to:
- Set the title displayed on the 'All Topo
Maps' program
- Set the {Measurement Spike} location
- Automatically Center the viewer over a map
location
The location may be entered in any reasonable
format.
All characters after the semicolon ';' are
included as the Waypoint Comment. You may place file
note lines anywhere in the waypoint file by placing
a ';' as the first non-space character on the line.
After you manually edit Waypoints in the Waypoint
Editor, you should select the Reannotate menu
option to reload the Waypoints onto the map surface.
2000 Waypoints can be read from a Waypoint File
and displayed at once.
You can use the Jump button, or right-mouse-click
'Jump To This Waypoint' to move the map to center a
location in the Waypoint Editor on the screen.
You can convert all of the <locations> in a
Waypoint file to other coordinate formats using the
'Convert' menu option.
Coordinate Entry
You may enter coordinates in the Waypoint Editor
using Decimal Degrees, Degrees Decimal Minutes (GPS
Style), Degrees Minutes Seconds or UTM:
N 41.654097 W 113.122817
N 41 39.302 W 113 6.915
N 41° 39" 22', W 113° 6" 54'
323,894.1M E, 4,613,502.1M N,
Z 12
You may include degree, minute and second symbols
(° " ') or you may leave them off.
UTM coordinates must have a ‘Z’ or ‘Zone’ before
the zone number.
323,894.1M E, 4,613,502.1M N,
Z 12
All Topo Maps allows a great degree of
flexibility when entering map coordinates, however
be sure to include the minus sign (or compass
direction) for longitudes:
W 113.12 or -113.12
but NOT
113.12
Latitude may be listed first or second:
41.654097 -113.122817
or
-113.122817 41.654097
But, be careful, if the coordinates are
ambiguous, longitude (the X or East-West coordinate)
will be assumed to be first unless the direction is
explicitly listed as NSEW:
N 41.654097 W 113.122817
Degree, Minute, Seconds marks and commas may be
included or omitted:
N 41° 39.302", W 113° 6.915"
or
N 41 39.302 W 113 6.915
Compass direction may be indicated by NSEW or
sign:
N 41° 39.302" W 113° 6.915"
or
41° 39.302" -113° 6.915"
Waypoint Comments
Any text may be placed after a semi-colon ‘;’:
41° 39.302" -113° 6.915";
anything goes here...
If you do not place a semi-colon at the end of
the coordinate:
41 39.302 -113 6.915
the coordinate will be annotated with the default
style set by the coordinate display box

To only display the marker symbol (no text),
include a semi-colon without any text:
41 39.302 -113 6.915;

If you would like to place a multiple line
comment at a location, use the pipe symbol '|' to
start a new line. (The pipe symbol, is typically
found as the uppercase backslash key '\' on your
keyboard.) For example:
40 47 48.5 N 111 48 47.9 W;
12/4/98|Type 2 Flow|50 x 150 Meters
will place a three line comment on the map:

Jumping To A Waypoint

Once a Waypoint is entered into the Waypoint
Editor, you can instantly jump to it.
Place the Waypoint Editor’s text cursor on the
desired waypoint line, then right-click and select ‘Jump
to This Waypoint’ (or press Alt-J). The correct map
will be displayed, and the selected waypoint will be
centered on the display.
<Meta> Tag Commands In Waypoint Files
Meta commands (much like the commands used to
write HTML code for the web) may be included in
waypoint files. Meta tags are always enclosed within
'<' '>' brackets and consist of a Meta command and
optional arguments.
Jump to [ Meta Tag
Errors ] [ <Title... ] [
<Auto... ] [
<Href... ] [
<Meas... ] [
<@... ] [
<@Slide> ] [
<Font... ] [
<Position... ] [
<Line... ] [
<Symbol... ] [ <+><-> ]
Meta commands (much like the commands used to
write HTML code for the web) may be included in
waypoint files. Meta tags are always enclosed within
'<' '>' brackets and consist of a Meta command and
optional arguments.
Most of the tags and the arguments may be
abbreviated with just a few characters. This greatly
speeds up annotation entry.
For example: The 'Font' command may be
abbreviated with just a single 'F'.
The <Meta> tag to select blue 12pt Arial text
on a white background, placed at the top left
corner of a coordinate is:
<Font "Arial" 12 Bold Blue _White Northwest>
but it may be abbreviated:
<F "Arial" 12 Bold Blu _Whi NW>
When you make changes to the waypoint file, using
the waypoint editor, the map annotations are not
automatically updated. You must press the Reannotate
button on the toolbar, or right-click 'Reannotate'
to load any changes onto the map surface:

Waypoint files are read sequentially from their
beginning to end. As each 'coordinate; text' pair is
encountered it is displayed with the fonts, lines,
and symbols selected by the <Meta> tags.
There are four types of waypoint file Meta tags:
System Meta Commands
- Hyper link to web, file or multimedia
content
- Center location on screen
- Set viewer Title
- Set Measurement Spike location
- Set the defaults styles to the current style
- Restore the factory default styles
- Save all settings
- Restore all settings
Text Font Meta Command
- Font Name
- Font Size
- Text Color and Background Color
- Text Position around coordinate
Text Position Command
- Text Position around coordinate
- Text Offset from coordinate
Connecting Line Meta Command
- Line ON/OFF
- Line Style
- Line Color and Background Color
- Line Width
Symbol Meta Commands
- Symbol Type
- Symbol Color
- Symbol fill Color
- Symbol Width and Height (in Meters, Miles or
Feet), minimum Marker size in pixels
- Symbol Direction (in Compass bearing)
- Symbol Line Width
Meta Tag Errors
The system logger is updated with descriptions of
any errors that occur while All Topo Maps
looks at and interprets waypoint coordinates and
Meta tags. You may display the System Information
Logger by selecting the main map window menu option:
'View: System Information Logger'.

will display:

System Meta Commands
Title <Title "Use This Title>
The Title command will place the specified text
as the caption of All Topo Maps. The title
must be enclosed by quotes. For example:
<T "I Like All Topo Maps">
places 'I Like All Topo Maps" as the form name:

Autojump <Auto "40 44 11.9 N 111 47 40.2
W">
After a waypoint file containing an Auto tag is
loaded, the specified location is centered on the
screen. If multiple Auto tags are encountered within
the waypoint file, then only the last valid tag in
the file is used.
The location must be enclosed by quotes. Any
measurement format supported by the waypoint editor
for coordinate entry may be used.
AutoJump is only evaluated when a waypoint file
is read from the disk (not on a reannoation)
For example:
<A "40 44 11.9 N 111 47 40.2
W">
will center the Utah State Capitol building on
the screen:

Hyper-Links in Meta Files <Href "location">
Any waypoint coordinate can include a hyper-link
to a web site, picture file, audio/visual clip or
other multimedia source. To add a link to a
coordinate add the <H …> command. It is customary to
also change the font to underlined as an indication
to users that a link exists. For example:
<+><h "http://www.state.ut.us/"><f
under _yel>
N 40 46 37.4 W 111 53 14.5; State of Utah
<->
generates this map:

Right clicking near the coordinate shows:
and the user may then select to
Open the link. Any link registered with the
operating system is supported.
Measurement Spike Location <M "location">
<MeasurementSpike "40 44 11.9 N 111 47 40.2
W">
Use the Spike tag to place the measurement spike
at the passed location. The location must exist in
the loaded map set. Any measurement format supported
by the waypoint editor for coordinate entry may be
used.
For example:
<M "40 44 11.9 N 111 47 40.2
W">
will set the Measurement Spike to the Utah State
Capitol building.
The spike location meta tag is only evaluated
when a waypoint file is read from the disk.
Setting/Restoring the Default Symbol Style
<@ SetDef> <@ GetDef> <@ ClrDef>
Use the <@ SetDef> command to save the current
Line, Symbol and Text styles as the default values.
The <@ GetDef> command will revert back to the saved
style. The <@ ClrDef> Meta tag will restore the
default symbol style to the factory defaults:
For example these waypoint entries:
<F 15 Bold Black _White
Italic><@ SetDef>
430638.9M E 4528659.7M N Z 12;
Coming Down...
<F 10 Norm Blue _Yel>
430492.6M E 4528547.5M N Z 12;
2
430346.3M E 4528425.6M N Z 12;
3
<@ GetDef>
430175.6M E 4528289.0M N Z 12;
Done
result in this map display:

Slide Show <@Slide>
Place the <@Slide> tag on any line with a valid
coordinate to use the coordinate as a destination
slide. The tag can not have a space between the @
and Slide.
Once one or more slides are defined, use the
keypad ‘*’ key to show the first slide in a waypoint
file and the keypad ‘+’ and ‘-‘ keys to loop through
the slides.
Annotation Text Font <Font ...>
The Text Font command accepts these arguments in
any order:
Text Color
Background Color
Font Name (windows font name)
Font Styles (Bold, Italic, Underline or Normal)
Text Position (location around the coordinate)
Text Colors may be any of the following
predefined colors:
Aqua Black Blue Dkgreen
Fuchia Gray Green Limegreen
Ltgray Maroon Navy Olive
Purple Red Silver Teal
White Yellow
Specify the background color (the color that
fills the box behind the text) by placing an
underscore before the color name. All colors may be
abbreviated by using the first three characters of
their name:
_Aqua _Black _Blue _Dkgreen
_Fuchia _Gray _Green _Limegreen
_Ltgray _Maroon _Navy _Olive
_Purple _Red _Silver _Teal
_White _Yellow
The Font Name may be any available font, it must
be enclosed in quotes, and not surprisingly it must
be spelled correctly. If you share your waypoint
files with others, use fonts which are widely
available, the operating system will substitute
fonts freely if it does not have the correct face.
These keywords are accepted for font styles:
Bold
Italic Underlined Normal
You can specify multiple style keywords within a
command, NORM or NORMAL will clear Bold, Italic and
Underlined. For example:
<F Bold>41 38 54.2 N 113 6
46.1 W; Bold
<F Italic>41 38 50.3 N 113 6
45.7 W; Bold Italic
<F Underlined>41 38 47.1 N 113
6 45.4 W; Bold Italic Underlined
<F Normal>41 38 44.0 N 113 6
44.9 W; Normal
will generate:

The text position around the coordinate location
may be specified as:
Center, North, NorthEast, East, SouthEast,
South, SouthWest, West, NorthWest
or abbreviated:
C, N, NE, E, SE, S, SW, W, NW
See the
<Position ...> tag for additional text
positioning capabilities and examples.
Changing the Position of Text Annotations <Position
...>
Use the <Position> Meta tag to change the
position of text annotations about the map
coordinate they are referencing. You may specify
both a compass position and a distance in screen or
printer pixels to move away from the coordinate. The
Meta tag:
<P NW 10>
sets the annotation on the North West side of the
coordinate, removed 10 pixels.
The text position around the coordinate location
may be specified as:
Center,
North, NorthEast, East,
SouthEast, South, SouthWest,
West, NorthWest
or abbreviated:
C, N, NE, E, SE, S, SW, W, NW
For example:
<P C> 45 27 50.5 N 114 56 38.6
W; Center
<P N 5> 45 28 6.6 N 114 56
37.8 W; North
<P E 5> 45 27 50.5 N 114 56
15.4 W; East
<P S 5> 45 27 34.3 N 114 56
39.0 W; South
<P W 5> 45 27 50.9 N 114 57
1.3 W; West
<P NE 5> 45 28 1.1 N 114 56
21.0 W; NorthEast
<P SE 5> 45 27 39.3 N 114 56
21.8 W; SouthEast
<P SW 5> 45 27 39.3 N 114 56
55.1 W; SouthWest
<P NW 5> 45 28 2.6 N 114 56
54.1 W; NorthWest
generates these annotations (on the Salmon River
in Idaho):

Connecting Coordinates with Lines <Line
...>
You can connect successive map coordinates with
lines to indicate paths or boundaries. The lines can
be solid, colored and any width. The Line command
accepts these arguments in any order:
ON or OFF
Width (any integer like 2,3,4)
Color (see the color listing for font above)
Background Color (see the color listing for
font above)
Style (Styles only work with Width=1)
Style may be any of the following:
| Solid |
Dot |
Dash |
DashDot |
DashDotDot |
or abbreviated:
If you specify a line type other than Solid, the
line width is forced to 1 (this is a limitation of
the operating system.)
Lines are drawn only if both the map coordinate
and the previous map coordinate have lines enabled.
For example, to draw a triangle around the Utah
State Capitol using Red, White and Blue solid lines
2 pixels wide, with the text 'Utah is Not Square!'
centered above the top vertex, you might use these
commands:
<P N 15> ; set annotation
centered above, move away 5 pixels
<L ON Red Solid 2>
40 46 52.6 N 111 53 14.3 W;
Utah is Not Square!
40 46 31.9 N 111 53 34.2 W;
<L White> 40 46 32.0 N 111 52
51.6 W;
<L Blue> 40 46 52.6 N 111 53
14.3 W;
<L OFF>

At each coordinate, a symbol is displayed. The
default symbol is a small dot, centered over the
coordinate location on the map
The allowable arguments to the Symbol tag are:
Style use to set the symbol type:
Line, Arrow, Triangle, Circle, Ellipse,
Rectangles, Cross, Wind
Color sets the drawing color
_Color sets the background color for Circles
Ellipses and narrow lines
X= and Y= un-rotated symbol dimensions in
Meters Miles, Feet or Yards
L= symbol length in Meters Miles or
Feet
W= Line Widths for symbol drawings
R= Rotation angle for symbols (in compass
degrees)
M= Minimum marker size in screen pixels
Color and Background Color
The color and background colors are the same as
text colors. The first three characters of the color
names serve as abbreviations, add a leading
underscore to any color to set the background color:
Aqua Black Blue Dkgreen
Fuchia Gray Green Limegreen
Ltgray Maroon Navy Olive
Purple Red Silver Teal
White Yellow
_Aqua _Black _Blue _Dkgreen
_Fuchia _Gray _Green _Limegreen
_Ltgray _Maroon _Navy _Olive
_Purple _Red _Silver _Teal
_White _Yellow
Marker Dots
For each symbol style, including None, a small
marker dot is placed at the map coordinate. The
marker dot is placed in addition to any symbol. You
may change the size of the marker dot using the M=
tag. For example:
<P 10>
<S M=3> 44 18 52.8 N 115 3
58.2 W; Small Marker Dot
<S M=4> 44 18 48.1 N 115 3
52.3 W; Medium Marker Dot
<S M=7> 44 18 44.8 N 115 3
47.4 W; Big Marker Dot
generates:

Styles
The following styles are supported:
| None |
No symbol is
placed, (a marker dot is placed). |
| Line |
A straight line of
length X= is placed from the coordinate with R=
rotation. This line is in addition to a
connecting line between points. |
| Arrow |
A circle is drawn
at the coordinate, with a line of length X= at
R= rotation. (Same as Line.) |
| Triangle |
A triangle is drawn
with the coordinate at it's center. L= controls
size, rotation is active. |
| Circle |
A filled circle
with diameter X= is drawn at the coordinate |
| Ellipse |
A filled ellipse,
centered at the coordinate with X= and Y= height
and width is drawn. |
| Square |
A square is drawn,
centered over the coordinate with L= side
length, R= rotation. |
| Rect or
RC |
A rectangle is
drawn centered over the map coordinate with X=
width and Y= height and R= rotation. |
| RBL |
A rectangle of X=
width, Y= height and R= rotation; is drawn with
the map coordinate set at it's bottom left
corner. |
| RBC |
A rectangle of X=
width, Y= height and R= rotation; is drawn with
the map coordinate set at it's bottom right
corner. |
| RBR |
A rectangle of X=
width, Y= height and R= rotation; is drawn with
the map coordinate set at it's bottom right
corner. |
| Cross |
A cross is drawn
with X= width, Y= height and R= rotation. |
| Wind |
A wind flag is
drawn with X= speed (knots) and from R=
direction. |
Setting the X=, Y= and L= Values
The X, Y symbol dimensions are set by the X= and
Y= arguments. The default units are Meters, scaling
is provided by adding units to the number. For
example:
X=1.25Mi
results in a 1.25 Mile X dimension, while
Y=1050.1Ft
results in a 1,050.1 foot dimension and
Y=300yards
results in a 300 yard dimension.
Acceptable abbreviations must immediately follow
the measurement (without any spaces) and include:
Yards: any word starting with ya or
yd
Feet: any word starting with fe or ft
Miles: any word starting with mi
Rotation
Rotation is expressed as degrees clockwise from
North. (The same as compass measurements.)
You may enter line and arrow lengths with X
offset from the base coordinate, Y offset from the
base coordinate and Rotation about the coordinate.
For example, the first coordinate below, specifies
the Cartesian offset of the blue line's endpoint
from it's base map coordinate, while the second line
is specified as a length at a compass bearing:
<S Line Blue
W=2 X=-608Fe Y=1220Fe R=0>
40 47 31.5 N 111 53 10.7 W; Left Trail
<S Line Red W=2 L=0.377Mi R=16.5>
40 47 29.9 N 111 52 57.1 W; Right Trail

Symbol Style Examples:
None: <S None> 44 23 31.5 N
116 9 51.7 W; Hill Top

or: <S None M=0> 44 23 31.5 N 116
9 51.7 W; Hill Top

Arrow: The arrow symbol is exactly the same
as Line.
Line: <S Line L=0.25Mi
R=260 W=2 Red>
44 23 31.5 N 116 9 51.7 W; Hill Top

or: <S Line X=0.249Mi Y=-0.045
R=260 W=2 Red>
44 23 31.5 N 116 9 51.7 W; Hill Top

Triangle:
<S Tria L=0.25Mil R=0 W=2 Red> 44 23
31.5 N 116 9 51.7 W; Hill Top

rotate the point with R=:
<S Tria L=0.25Mil R=45 W=2 Red> 44 23
31.5 N 116 9 51.7 W; Hill Top

Circle:
<S Cir L=0.25Mil R=45 W=2 LtG> 44
23 31.5 N 116 9 51.7 W; Hill Top

Ellipse: Ellipses do not rotate.
<S Ell Y=0.35Mi X=0.75Mi > 44
23 22.6 N 116 9 39.7 W; R=0

Square
<S Squ L=0.25Mil R=0 W=2 Blu>
44 23 31.5 N 116 9 51.7 W; Hill Top

Rect or RC (Centered Rectangle)
<S RC X=0.25Mi Y=0.5Mi R=0 W=2
Blu> 44 23 31.5 N 116 9 51.7 W; Hill Top

rotated: <S RC X=0.25Mi Y=0.5Mi
R=25 W=2 Blu> 44 23 31.5 N 116 9 51.7 W; Hill Top

RBL (Rectangle Bottom Left base)
<S RBL X=200ft Y=1000ft R=0
W=2 Blu> 44 23 31.5 N 116 9 51.7 W; Hill Top

rotated to face SSW (112.5 deg):
<S RBL X=200ft Y=1000ft
R=202.5 W=2 Blu> 44 23 31.5 N 116 9 51.7 W; Hill
Top

RBC (Rectangle Bottom Center base)
<S RBC X=200ft Y=1000ft R=45
W=2 Blu> 44 23 31.5 N 116 9 51.7 W; Hill Top

RBR (Rectangle Bottom Right base)
<S RBR X=200ft Y=1000ft R=45
W=2 Blu> 44 23 31.5 N 116 9 51.7 W; Hill Top

Saving and Restoring Styles <+> & <->
Often, you would like to change the display
attributes for a single map coordinate, then return
to using the same styles that were in use before the
change. It might be difficult to track down all of
the styles that are currently used, so a simple way
to save and restore style is included.
Use the <+> Meta command to save all styles, then
make the desired style changes draw the annotations
and finally use <-> to restore the styles to the
previous values.
For example, we can turn this series of points:
40 46 11.8 N 111 49 21.1 W;
Start
40 46 26.1 N 111 49 6.9 W; Stop for Lunch
40 46 40.4 N 111 48 41.7 W; End

into:
40 46 11.8 N 111 49 21.1 W;
Start
<+><P N 5><F "Courier New" 20 Yel _Blu Bold >
40 46 26.1 N 111 49 6.9 W; Stop for Lunch
<->
40 46 40.4 N 111 48 41.7 W; End

Saves and Restores may be nested up to 15 levels
deep.
[
Continue to Next Tour Page
|