Next / Previous / Contents / TCC Help System / NM Tech homepage

6. The wayimage script: Plotting waypoints on an image

To display a set of waypoints statically on an image, you can use the wayimage script to produce a JPEG file.

To run wayimage:

    wayimage [option] ... wayfile route-id ...

where the options include:

-m mag-code

specifies a magnification code; default is 4 meters/pixel.

-k tile-kind

specifies a kind of tile, 1 for photoquad tiles, 2 for topo map tiles. The default is 2.

-b map-base

Specifies the directory containing the map base (see building the map base, above). The default is subdirectory tiles in the current directory.

-x margin

Specifies an extra margin to be shown around the rectangle defined by the waypoints. The units of margin are in tiles. For example, if you are using topo maps at the recommended 4 meters/pixel scale, each tile is 800×800 meters. The default margin is half a tile, or 400 meters; if you set the option -x 2.0, you'll get a margin of 1600 meters.

-o image-out

Specifies the name of the output image file to be written. The default is wayimage.jpg; most images will be written in JPEG format, but topo images for mag-codes 2, 8, and 32 will be written as GIF images.

Positional arguments to the wayimage script:

wayfile

Specifies the waypoint file to be read. If no route in this file is selected by name or ID, all the waypoints in the file are displayed.

route-id

Selects one <route> element in the waypoint file, by specifying its id attribute. Any number of route IDs may be specified; if none are given, all the routes in the waypoint file are displayed.

Points are plotted on the base image as white squares containing the waypoint numbers in red, with one black pixel showing the exact location of the waypoint.

A report showing all waypoints is also written to the standard output stream. Points outside the known map tiles, if any, will be shown with the prefix “Outside:”. The plotted points are listed with their waypoint numbers so you can relate them to the image produced.