RoadMap User Manual and README
February 2009
Introduction
RoadMap is an open source program that displays street maps.
When a GPS receiver is available RoadMap can track the current location
of the vehicle on the screen, continuously adjusting the position of the
map; with appropriate map data, it can also identify the name of the
current street as well as the name of the next intersection. RoadMap
can be used without a GPS receiver, as a static map viewer and address
finder.
RoadMap runs on various UNIX and Linux systems, but it's also ported to
Windows CE, and other efforts are underway.
RoadMap is released under the GPL (see the COPYING file).
RoadMap currently support map data from several sources:
- US Census Bureau (TIGER data)
The census bureau TIGER data only covers the US and its territories.
- OpenStreetMap
An external tool (buildmap_osm) can be used to fetch maps from
the OpenStreetMap (OSM) project. More information about this
user-supported project can be found at http://www.openstreetmap.org
- Canadian RNF (Road Network File) maps
The RNF files contain road data, but currently no water
features or municipality information.
- Digital Charts of the Words
DCW is a set of world-wide maps produced by the US Department
of Defense. The DCW contains only major highways and freeways, for
some parts of the world (mostly Europe and Japan) and their accuracy
does not allow reliable car navigation. These maps are also quite
old.
RoadMap uses a binary file format for representing maps that is
compact enough to allow the storage of many maps on a Compact Flash or
MultiMedia card. The map of Los Angeles county takes a little more than
10 Mbytes of flash space. RoadMap comes with a set of tools to convert
the US Census bureau data into its own map format.
RoadMap has been designed to be usable on both desktop or laptop
computers, and on much smaller PDA and embedded devices, like
the Sharp Zaurus, the iPAQ, or the Pocket PC.
In its current version, RoadMap can work with any of the GTK+ 1.2,
GTK 2.0, GPE, QT/X11 or QT/QPE graphic environments. The QT environment
(particularly the QT/QPE version) is mostly used for the Zaurus port (but
could probably be used with OPIE). QT3 and QT4 are both supported. The
most stable environment is the GTK 2.0 one (this is the one used for
most development). The GPE support is and optional extension of the
GTK 2.0 environment and is very experimental (i.e. untested).
GTK 1.2 is still interesting because it's quite a bit more efficient
when running on limited hardware than is GTK 2.0.
RoadMap is also available on Windows CE (i.e. Pocket PC), built using the
mingw32ce cross-compiler. As gpsd does not exist on Windows, the
Windows CE version directly listens to the GPS serial port.
RoadMap can currently display the map around a specified street address,
track a GPS position, and identify the current street and the next
intersection. Trip support is provided (waypoints, route following, and
general landmarks). Large sets of "Point of Interest" features also can
be displayed on the map.
The plan for the future is to implement some navigation features similar
to those found in commercial car navigation systems, and to port RoadMap
to as many environment as possible.
Authors
This document, as well as RoadMap as a whole, is primarily the work
of Pascal Martin. Other major contributors include Steve Woodbridge,
Ehud Shabtai, Paul Fox, and Danny Backx. The RoadMap "forked road"
icon was designed by fmiser from the RoadMap mailing list.
About this Documentation
This documentation was written using vi (what else? :-) in the format
supported by txt2tags. The txt2tags tool was used to produce the HTML
version of this manual (file web/manual.html). The HTML file can be
regenerated using the following command:
txt2tags --toc -t html -o web/manual.html -i README
The txt2tags tool is available at
http://txt2tags.sourceforge.net/
Quickstart
This section describes the most basic steps you'll need to perform
in order to get RoadMap running on your system. More detailed
information is available in the Installation Guide section of the
documentation.
To build RoadMap for a "standard" linux/unix environment, follow
the following steps:
For more complete installation and configuration information,
please consult the "INSTALLATION" section of the README file.
The README is on the web, here:
http://roadmap.sourceforge.net/usermanual.html
Good luck, and have fun!
Full Installation Guide
- DEPENDENCIES
- GPS and gpsd
RoadMap communicates with a GPS receiver using the NMEA 0183 protocol.
RoadMap has been tested with a Garmin 38. The GPS receiver must be
configured with the datum set to either NAD83 or WGS 84.
RoadMap can connect directly to the GPS receiver using a serial port (or an
emulated serial port in the case of USB receivers), but RoadMap usually
communicates with the GPS receiver through gpsd, a GPS communication daemon
for UNIX. Going through the intermediate daemon insulates RoadMap from
some of the GPS configuration, and lets more than one program use the
GPS device at once. It also allows RoadMap to use a GPS device which is
connected to a different computer. The most typical setup is to have
gpsd on the same computer, in which case the GPS source should be set as
"gpsd://localhost".
http://gpsd.berlios.de
gpsd is not required when building RoadMap, and RoadMap can run without
gpsd as a static map viewer or address finder.
- Desktop toolkit
RoadMap usually uses one flavor or another of GTK or QT for its user
interface. One of these toolkits must be installed. RoadMap can be built
for QT/QPE, but the RoadMap makefile for QT must be modified.
- Voice support
RoadMap optionally uses flite (festival lite) to generate voice messages.
See the section "VOICE INTERFACE" for more information.
- Optional libraries
RoadMap uses the expat library to load GPX trip and landmark files.
RoadMap can be built without expat, with some loss of functionality, by
changing config.mk to say: EXPAT = NO. (On Debian or Ubuntu linux
systems, use "apt-get install libexpat1-dev" to install the expat
library.)
Likewise, RoadMap can sometimes use the agg library to render anti-
aliased maps and street label text. If you don't have agg, RoadMap will
only create horizontal labels. (Angled labels are available using a
relatively crude built-in font. To use agg, you need to change the
default "AGG = NO" in config.mk to choose one of the options listed
there. Unfortunately those options ("rgb565", "rgba32", "bgra32",
"rgb24", "bgr24") cannot currently be auto-detected, so there may be
some trial-and-error involved to get the setting right. See the
comments in config.mk for more tips. RoadMap requires version 2.4 or
later of the agg library -- 2.3 is incompatible. If your linux
distribution includes 2.3, make sure that if you install 2.4 as well,
that RoadMap finds both headers and libraries from 2.4. Note:
currently (as of August, 2006) the agg support is only available if
you're using the GTK2 build of roadmap. (On Debian or Ubuntu linux
systems, use "apt-get install libagg-dev" to install the agg library.)
The "buildmap" program uses the shapelib library to decode the "shapefile"
format). Currently, most of the maps used by RoadMap are not in that
format, but some are: Canadian provinces, state boundaries, and the Digital
Charts of the World. If only US maps from the census bureau are used,
or if only pre-built maps are used, then there is no need for shapelib:
set SHAPEFILES = NO in config.mk. (On Debian or Ubuntu linux systems, use
"apt-get install libshp-dev" to install the shapefile library.)
- Miscellaneous
RoadMap uses "aptconvert" to format the documentation (see previous
section) into HTML format. Since this is an uncommon tool, a
pre-converted copy of usermanual.html is provided in the RoadMap
tarball.
RoadMap can use the "convert" program from the ImageMagick package to
generate the PNG versions of some of the icons on its toolbar. Pre-built
copies of these PNG files are distributed, so ImageMagick is optional,
and in any case is only required for building RoadMap -- it is not
necessary when running RoadMap.
- DIRECTORIES
RoadMap is to be installed in a few different directories, where each
directory contains a specific type of file: commands, configuration files,
icons and maps.
Before you install RoadMap, you must choose what installation
directories to use for these files. Some of these choices are already
made for you when you install a pre-built package, or are assigned
default values in the makefiles (source package). This section
describes the whole thing, regardless of how you install RoadMap. It
also provides some information about the standard locations in the most
common cases.
RoadMap supports searching through lists of directories, instead of just
a single location, for each type of file.
One reason for RoadMap to support a list of directories is to define a
default system-wide configuration, and at the same time to allow a
specific user to install their own setup. Another reason (for the map
files on a PDA) is to let the users choose the type of hardware storage
that is most convenient.
Directory pathnames in most RoadMap path lists can include several
"shortcut" characters:
- EXECUTABLE FILES
The RoadMap programs should be installed in a standard executable directory.
This is an easy one: the only requirement is that this directory must appear
in the PATH variable (either you choose an existing directory or you add your
own).
- CONFIGURATION FILES
RoadMap comes with some critical configuration files (files sprites,
preferences, etc..). RoadMap can find these files in a few different
places, but the list cannot be changed in the user preferences since it
is used to load the preferences themselves. The list can, however, be
changed using the "--config=..." commandline option.
On most UNIX systems this list is:
- /etc/roadmap,
- /usr/local/share/roadmap (preferred path),
- /usr/share/roadmap
- a site-specific directory chosen at compile time, and
- ~/.roadmap (the "user configuration" directory, which can be
referred to as '&' in other path references). The specific value
of the path to the "user configuration" directory is configurable,
using the General.UserPath setting. The "user configuration"
directory can be changed using the "--userpath=..." commandline
option.
These directories are searched sequentially: any configuration item found
in one directory overrides all the same items found in the directories
listed before. In other words, the configuration is loaded in the following
order:
- /usr/share/roadmap (installation defaults)
- /usr/local/share/roadmap (local site defaults)
- /etc/roadmap (local machine defaults)
- ROADMAP_CONFIG_DIR, chosen at compile time
- ~/.roadmap (current user configuration)
The directory ~/.roadmap contains the user configuration: any changes
the user makes while running RoadMap are saved here. The items in the
user configuration take precedence over the "default" configuration
defined in the "shared" directories. The user configuration directory
can be referred to with the shorthand '&' in other parts of the roadmap
config.
The user directory ~/.roadmap usually has two subdirectories:
"trips" and "maps". "Usually", because while the directory
~/.roadmap/trips is used as the default location for the trip files,
it can be changed with the General.TripsPath setting. Note that trip
files can be stored anywhere, not just in that directory -- they're just
more convenient for selection when stored there..
The directory ~/.roadmap/maps contains map files specific for this
user. (As a general rule, users should probably share maps, since they
can take a lot of space.) This directory might be used when maps
are downloaded on the fly, as shared maps might not be writeable by all
users.
These user configuration directories are created if they do not exist.
- ICON FILES
RoadMap (the GTK version, at least) needs some icons. These icons must
be placed in the operating system's standard locations. On UNIX, this
usually means:
- ~/.roadmap/pixmaps,
- ROADMAP_CONFIG_DIR/pixmaps, chosen at compile time,
- /usr/local/share/pixmaps or
- /usr/share/pixmaps.
This list can be changed using the General.IconPath setting.
- MAP FILES
RoadMap needs some map files to serve any useful purpose.
The location for these map files can be redefined in the user preferences
(item Map.Path). The maps are a problem of their own, since they may require
a huge space (up to 1.8G Bytes for the full set). It is recommended that
maps be shared between users. Sharing across a network would probably
be quite inefficient. In addition, care must be taken since the map
format may vary between systems of different architectures. (Technically
speaking, the maps contain endian-specific data.)
Maps can be located in any directory mentioned in the Map.Path
preferences setting. The index file usdir.rdm must also be in one of
those directories.
RoadMap will only consult a single usdir.rdm file at a time. The first
usdir.rdm index file discovered by RoadMap must index any and all maps
you might wish to view. This means that if you've built a subset of the
maps, and a corresponding usdir.rdm file (using "buildus"), then when
you build more maps, you can't create and install a second usdir.rdm file
and expect RoadMap to use them both. A new usdir.rdm must be built which
indexes all of the maps.
RoadMap will only read the index file once, at startup, even if a newer
version becomes available. In contrast, new map files can be added to
the Map.Path directories, and RoadMap will find them as needed. This
means that maps kept on removeable storage devices can be used fairly
easily. [ The one caveat when introducing replacement maps is that
RoadMap will only try and find a map when it really needs to. RoadMap
will keep a number of maps open, for easy access -- the number is
controlled by "Map.Cache". You may have to visit that many other maps
before RoadMap will need to reopen a map file which you've visited before
but subsequently replaced. ]
(The map search paths referred to below may be changed using the "--maps=..."
commandline option.)
By default, RoadMap is built to search for the following directories on most
UNIX systems:
- ~/.roadmap/maps/... (a.k.a. "&/maps") and its subdirectories,
- ROADMAP_MAP_DIR, chosen at compile time,
- /var/lib/roadmap/... (preferred path) and its subdirectories, and
- /usr/lib/roadmap/... and its subdirectories.
(Note that releases prior to 1.1.0 did not search subdirectories.)
RoadMap also searches in /usr/local/share/roadmap and /usr/share/roadmap,
but this is in violation of the FHS filesystem standard, since these maps
are not architecture-independent.
The architecture-dependent nature of the map files is not an issue with a
PDA, as these machines tend to be used standalone and not to rely on network
access.
- DOWNLOADING ROADMAP AND MAPS
RoadMap can be downloaded from the RoadMap web site:
http://roadmap.sourceforge.net/download.html
Previously, RoadMap came either as a set of sources, or as a set of binary
files. This is no longer the case -- it is not hard to build, and
there are choices to be made when building, so the source tarball is all
that is currently available. (Specific systems or software distributions
may offer pre-built packages.)
Because installing a full set of maps can take some time (and space!), a
quick way to get a feel for RoadMap is to download and install the the
"demo" tar file which contains outlines of the US state boundaries, the
detailed street map of San Francisco, and a minimal directory file which
will let RoadMap use them.
http://roadmap.digitalomaha.net/maps/demo_maps.tar.gz
The complete set of maps, along with the complete index file that
describes them, is available here:
http://roadmap.sourceforge.net/maps.html
The full RoadMap index file (usdir.rdm) must be downloaded
to use any but the demo maps -- RoadMap will not work without it.
http://roadmap.digitalomaha.net/maps/usdir.rdm.tar.gz
Please refrain from downloading all the US states at once, as the map
files are huge and the bandwidth is expensive.
Installing the maps in one of the default directories (see the previous
section) is recommended, but you can install them anywhere, assuming you
set Map.Path accordingly in the RoadMap preferences.
- INSTALLING FROM THE SOURCE TARBALL (UNIX)
To build RoadMap from the source distribution:
- Install the development libraries for GTK+ 1.2, GTK+ 2.0 or Qt.
- Install the shapelib and expat development libraries. Shapelib is
required for building maps from some data sources (though not the US Tiger
data). The "expat" library is optional, except that you won't be able to
save or restore route, waypoint, or track information.
- Unpack RoadMap's tarball:
tar xzvf <tarball>
- Edit the config.mk file found in the src directory, and
choose one of GTK, GTK2, QT, or QT4, along with other build
options, described in the comments of that file.
Simply typing "make" will build the default selection in config.mk.
(GNU make is required.)
The complete list of options for building RoadMap is as follow.
These can all be modified by editing config.mk.
- DESKTOP=GTK2|GPE|GTK|QT|QPE|QT4|QPE4|WINCE
-
Compiles RoadMap for a specific GUI environment. The GPE
environment is a PDA variant of GTK2 and the QPE environment
is a PDA variant of QT. (WINCE will attempt to use the
arm-wince-mingw32ce cross-compiler to build RoadMap for the
Windows CE environment.)
- SHAPEFILES=NO
-
Do not link buildmap with the shapelib. The side effect of
this option is that some map sources cannot be converted to
RoadMap files anymore. These include the Digital Charts of
the World, the Canadian RNF road maps, and the US State
boundary outlines. This option should only be used when the
shapelib library is not available.
- EXPAT=NO
-
Do not link roadmap with the expat library. The side effect
is that you cannot load or save trips or landmarks anymore.
- AGG=NO
-
Do not try to link roadmap with the agg library. This
optional library, currently supported for the GTK2 and Win32
desktops, can give much prettier (anti-aliased) lines and
text.
- MODE=DEBUG|PROFILE
-
Compiles RoadMap in debug mode. The PROFILE option also
generates the necessary information and code for profiling.
- run make to install roadmap:
make install
- TROUBLESHOOTING THE INSTALLATION
This section describes the most common problems encountered when installing
RoadMap:
- When running "make build" a compiler error message appears, complaining
that the file shapefil.h cannot be found. This typically happens if
the shapelib library was not installed. The shapelib library is only
used to create some map formats -- neither the TIGER maps nor the
OpenStreetMap maps require shapefile support. It is possible to build
RoadMap without the shapelib, using the option "SHAPEFILES=NO" in
config.mk.
- After RoadMap has been installed, the display only shows the message
"No map available" or a blank screen. RoadMap must be provided with
a position before it can show something meaningful. It is recommended
to enter a known address to setup a position. Another way to feed a
position is to install a GPS device RoadMap can talk to.
- The display shows no street; lakes, parks, airport and hospitals
appear as block areas. This is typical of a missing "class" file.
This file, usuall "default/All", must be located in the RoadMap
configuration directory. It is likely the "make install" step was not
performed.
- The display is all black. RoadMap seems to find the map files and
one can select streets on the screen, but it seems everything is
drawn black on black. Be sure all of your configuration files are
up to date, and that none are being "shadowed" by older files in your
~/.roadmap directory. This may also happen on a QPE-based PDA: this
may be a problem with QPE not defining color names. Try redefining all
colors in schema using the RGB syntax ('#' followed by an hexadecimal
RGB value).
- Waypoints, the compass and the vehicle's location all appear as small
black squares. This is typical of a missing "sprites" file. The "sprite"
file must be located in one of the RoadMap configuration directories.
It is likely the "make install" step was not performed.
- If things do not go any better, start roadmap with the --debug option
and check what roadmap tells you it is doing.
Using RoadMap
- DESCRIPTION
RoadMap is the main application. It displays the map
and can keep track of the current GPS position.
Depending on which toolkit you use, and before
a "make install" has been done, the final executable
will be found in src/gtk/gtkroadmap, src/gtk2/gtkroadmap
or src/qt/qtroadmap (zroadmap on the Zaurus).
== COMMAND LINE OPTIONS ==
The options marked as "sticky" remain in effect the next time RoadMap
is run. (The use of the option actually changes the specified RoadMap
preferences item.)
The RoadMap application accepts the following command line options:
- --config=<PATH>
-
Replace the built-in search path for system
configuration data. While this will usually just be a simple
directory path, it can actually be a comma-separated list of paths
from which RoadMap should load its config. User directories (usually
"~/.roadmap", but see --userpath, below) will still be processed as
usual. If specified, this option will also be passed to roadgps when
invoked via roadmap.
- --userpath=<USERPATH>
-
Replace the default directory which holds user
configuration data. The default value for the this is $HOME/.roadmap
(i.e., "~/.roadmap") If specified, this option will also be passed to
roadgps when invoked via roadmap.
- --maps=<PATH>
-
Replace the built-in search path for maps. While this will
usually just be a simple directory path, it can actually be a
comma-separated list of paths, and may include the "/..." trailer to
extend the search downward. See the DIRECTORIES section.
- --icons=<PATH>
-
Replace the built-in search path for icons. If specified,
this option will also be passed to roadgps when invoked via roadmap.
- --location=<LONGITUDE,LATITUDE>
-
Set the location point (see menu entry
"Show Location.."). This option is sticky (preference item
Locations.Location=<LONGITUDE,LATITUDE>).
- --metric
-
Use the metric system for all units. This option is sticky
(preference item General.Unit = "metric").
- --imperial
-
Use the imperial system for all units. This option is sticky
(preference item General.Unit = "imperial").
- --no-area
-
Do not show the polygons (parks, hospitals, malls, airports,
etc..).
- -geometry=<WIDTHxHEIGHT>
-
See option --geometry=<WIDTHxHEIGHT>.
- --geometry=<WIDTHxHEIGHT>
-
Sets the geometry for the RoadMap main window.
- --geometry:<WINDOW>=<WIDTHxHEIGHT>
-
Set the geometry of a specific RoadMap window, according to
its title. --geometry:Main=<WIDTHxHEIGHT> is equivalent to
--geometry=<WIDTHxHEIGHT>. If the window's title includes
any space, dashes can be used in place of the spaces (the
goal here is to be shell friendly). This option is sticky
(preference item Geometry.<WINDOW> = <WIDTHxHEIGHT>). To
set the default geometry of all unspecified windows, use
--geometry:Default=<WIDTHxHEIGHT>.
- --no-toolbar
-
Do not show the toolbar. This option is sticky (preference
item General.Toolbar = "no").
- --no-icon
-
Do not show any icons, i.e. leave as much space as possible
for the map. This option is sticky (preference item
General.Icons = "no").
- --gps=<URL>
-
Use a specific GPS source. This option is not sticky: it
overrides the preferences setting this time, but the
preferences setting is not modified. The main use of this
option is to rerun GPS logs created using roadgps, or to
run logs created using gpsbabel, from other input sources.
For instance: gpsbabel -i gpx -o nmea,gprmc=1 infile.gpx
outfile.nmea will create an NMEA logfile from a GPX format
file created elsewhere, or even from a tracklog created by
roadmap itself.
- --trip=<FILENAME>
-
Tells roadmap to make the given GPX tripfile current.
- --map-boxes
-
Show map bounding boxes as grey lines. This is mostly
just for debug purposes, but can be useful in figuring out why no
map is in view at your current location.
- --square
-
Show squares boundaries as grey boxes. This option is for
debug purpose only.
- --debug
-
Print all informational and debug traces.
- --debug=<source>,...
-
Print all informational and debug traces for the
specified source files only (a comma-separated list of source files).
- --verbose
-
Print all informational traces.
- --help
-
Show a description of all command line options, key bindings
and actions (see the section CONFIGURING THE MENUS AND TOOLBAR).
- --help=SECTION
-
Show a description of either the command line options
(
help=options), the key bindings (help=keymap) or the actions
(--help=actions).
- GETTING HELP
The main RoadMap window includes a "Help" menu. This help can be used to
display various topics from this document. The help text is actually an
HTML version of this file, shown using a web brower. The default browser
is "dillo", but this default can be changed in the user's preferences
(see section PREFERENCE ITEMS).
- THE ROADMAP DISPLAY
The main RoadMap window shows the menu, the toolbar and the map's canvas.
The toolbar is optional: all the commands are also available from the menu
bar or from the keyboard or iPAQ buttons.
When RoadMap starts, the map view reflects the previous session's mode
If no session data is found, RoadMap tracks the current GPS position.
It is possible to select another mode: show the current destination
point (see the section "Managing Trips" below), show a specific
location, track the GPS position with the north shown up, track the GPS
position with the direction of movement shown up, etc.
When RoadMap is in GPS tracking mode, the map view will reflect the
movement of the car so that the GPS sprite will remains at the
predefined position (usually the center, but it is possible to move the
position of the GPS sprite using the arrow keys). The map can be held
to its current position: the "hold" button freezes the map view to its
current location, but updates will continue, so that, for example, one
should see the GPS sprite move away from the map's center. The hold
mode make it easy to select streets and read street names while on the
road. To come back to the original map view, this view must be
re-selected (for example by using the menu command Find / GPS position
or the "G" toolbar button).
RoadMap indicates the current street a few seconds after the GPS
position reached the street. This display is also shown for a limited
time. There are several criteria used by RoadMap to "lock" on a street:
the distance to the street (the closest the better, not more than the
value set with Accuracy.Street), the direction of the street compare to
the direction of the vehicle or if the street is connected to the
current "locked" street. RoadMap uses fuzzy logic to combine these
criteria into one single value. None of the fuzzified values for the
distance and direction may be below the value set by
Accuracy.Confidence, or else the street is not selected. The final
fuzzy value must also be above the same limit. RoadMap then selects the
street with the highest fuzzy value.
RoadMap can also display messages at each of the four corners of the
map: the message at top left will be shifted to leave room for the
compass, which shows map orientation. These messages can be defined by
the user using RoadMap's specific format strings (see section
"Configuring the RoadMap text and voice messages").
- USING THE MOUSE OR PEN
RoadMap mostly uses just one mouse button (the left button on a 3 button
mouse). This is because RoadMap is designed for a PDA, where pens are
used.
A short mouse click (or pen tap) on the map screen displays information
(i.e., name, address range, etc, as appropriate) about the closest
waypoint, landmark, street, road or freeway. This display is shown for a
limited amount of time (see preference "Highlight.Duration"). Whether or
not one of those map features is near enough to be selected, the
clicked/tapped point will be remembered as the current "Selection", for
the purposes of adding new waypoints or landmarks.
A long mouse click or pen tap (with no accompanying motion) will bring up
a popup menu (see preference item "Events.Long Click").
Dragging the mouse with the button down, or dragging the pen on the
screen, moves the map display according to the movements of the mouse
or pen.
Dragging a map display is a CPU-intensive action, so a few "Style"
preference items can be used to limit the amount of drawing to be
performed while doing it.
A few additional actions are specific to the mouse devices, with no pen
equivalent: the mouse's right button and wheel.
A popup menu can be attached to the mouse's right button (see preference
item "Events.Right Click"). The menu iteself must be defined in the file
roadmap.popup (see section CONFIGURING THE MENUS AND TOOLBAR).
Mouse wheel actions will trigger a zoom in and out of the map display,
depending on the direction of the wheel movement.
- KEY BINDINGS
Most of the RoadMap commands are available from the keyboard. The
button and key bindings are common to all ports, but some buttons might
not exist on some platforms.
All the button and key bindings are case insensitive, i.e. the same
binding applies to 'A' and 'a' (as well as to "Button-Left" and
"button-left"--whatever it means).
Button-Left |
Move the map view to the left. |
Button-Right |
Move the map view to the right. |
Button-Up |
Move the map view up. |
Button-Down |
Move the map view down. |
+ (or = ) |
Zoom in: enlarge the central part of the map. |
- |
Zoom out: show a larger area. |
A |
Search for a specified address. |
B |
Start the route back to the departure point. |
C |
Bring up the roadgps GPS console. |
D |
Show the current route's destination. |
E |
Erase maps among those currently visible. |
F |
Toggle full screen mode. |
G |
Show the current GPS position. |
H |
Hold the map view in its current position. |
I |
Search for a specified street intersection. |
J |
Rotate the map counterclockwise. |
K |
Rotate the map clockwise. |
L |
Show the last selected location. |
M |
Enable/Disable map download. |
N |
Create a new trip. |
O |
Open an existing trip. |
P |
Stop tracking the current trip. |
Q |
Quit RoadMap. |
R |
Set the map back to the default zoom level. |
S |
Start tracking the current trip. |
T |
Toggle display of the current track. |
U |
Center the map on the GPS position (north up). |
V |
Create new waypoint based on current GPS position. |
W |
Set the selected street block as waypoint. |
X |
Find an intersection. |
Y |
Save a screenshot of the current map display. |
F11 |
Toggle the full screen mode (same as 'F'). |
The current bindings that are used by the application can be printed
using the "--help=keymap" option.
Note for Familiar 0.7.1 GPE users: the GPE environment has defined the
button bindings in a way that makes it impossible for RoadMap to use them
(the buttons are mapped to the GPE applications). In this environment it
is recommended that the toolbar be enabled to replace the buttons. The
joypad is still available.
- ON-THE-FLY MAP DOWNLOAD
Since maps can take a lot of space, users may want to install only the
few maps they need. The on-the-fly download feature of RoadMap helps
the user to select visually which maps to download or remove. RoadMap
is capable of downloading compressed maps: gzip, bzip2 or lzop
compressed files are automatically recognized and uncompressed after
transfer.
The map download is available in a special RoadMap mode, which can be
activated and deactivated using the Map Download menu entry. On startup
the download mode is always deactivated. RoadMap shows a red "download"
icon in the right top corner of the map screen to indicate that the
download mode has been activated.
In the download mode, if a map is not found by the display engine, the
user will be asked for the permission to download the file from the
configured source (as defined in the preference item "Download.Source").
The destination directory can also be configured (using the preferences
item "Download.Destination"). Both the source and the destination file
name can be edited manually before each download.
RoadMap is designed to support multiple download protocols. The protocol
is selected depending on the source string, as much as possible using
the well-known URL syntax. Two protocols are available: a local file
copy (the source is either a full path or a "file://*" URL) and the HTTP
protocol (the source is a "http://*" URL). The local file copy protocol
can be useful in some cases, for example when mounting the map server's
disk using nfs or smbfs.
If the suffix of the downloaded file matches a well-known compressed files
suffix, RoadMap will invoke the appropriate tool to uncompress the file.
The compression tools supported are gzip (.gz suffix), bzip2 (.bz2 suffix)
and lzop (.lzo suffix). This feature makes it possible to store compressed
maps on the server side. Using compressed files may reduce by a factor of
two the time it takes to download the map, depending on the compression
tool used, the specific map's content, etc.. Note that maps are always
stored uncompressed: because RoadMap maps the file in memory, compressed
file cannot be used by RoadMap.
If the user cancels the download of a specific map, RoadMap will not
request the same download again for the remainder of the session. This
means that RoadMap will request the same maps again if stopped and then
restarted. This was done because there is at this time no way for the
user to change his mind and re-request the download of a cancelled map.
This is a part of the user interface that is likely to change in the
future.
RoadMap also provides a dialog for deleting maps, activated through the
"Delete Maps.." menu entry. The dialog shows the number of map files
stored locally, the total size of the local maps and the list of maps
currently visible on the RoadMap screen. The proper way for selecting
maps to delete is to view an area you do not need anymore, hit the
"Delete Maps.." entry, then select a specific county and hit the Delete
button. The county will immediately disappear from the map screen and
the dialog gets updated (i.e. the map statistics and the map list will
reflect the latest delete action). Several counties can be deleted this
way before the dialog is closed (button "Done").
Note that a deleted map is automatically added to the "cancel download"
list, so that RoadMap will not request for this map again. As such, it
is not a problem to delete maps while the download mode is active. If
you need to download again a map that was deleted, just restart RoadMap.
A typical use of the download feature is to preload the maps you need
before you go on a trip. Activate the download mode and select the
destination address: RoadMap will request the download on the map that
covers this destination. Zoom out the display to force the download of
adjacent counties, if required. Repeat for each place you are likely to
go to. Use the arrow keys or buttons to "fly over" the roads you are
going to travel on. If you missed a map, and you did set a public map web
server, it should be possible to download maps from an hotel's Internet
access. Of course, if you are (rich and) lucky enough to have an Internet
connection while on the road, the download feature can also be used at
any time.
Here is a typical setup using the HTTP protocol:
- Install the individual map files, gzip-compressed, in a "maps"
subdirectory of the web server directory tree. Say the web
server is named "desktop".
- Set the preference Download.Source to
http://desktop/maps/usc%05d.rdm.gz
- Set the preference Download.Destination to /var/lib/roadmap
- Make sure the preference Map.Path does include the directory
/var/lib/roadmap.
- WAYPOINTS AND ADDRESSES
** NOTE THAT MANY (ALL?) OF THE ADDRESS AND INTERSECTION SEARCHING
OPTIONS ARE ONLY CURRENTLY AVAILABLE WHEN USING THE US TIGER MAPS. **
RoadMap manages several types of points: a location point (selected using
a street address or the mouse), the GPS position (updated automatically
if a GPS fix is available), and an arbitrary number of user-defined
waypoints, which may appear as part of a route or a track.
One can select which one of these locations serves as the center of
the map. The GPS and waypoints positions are special cases: see the
section on trip management.
The location point is really a buffer for the selection of a street
block. Once selected, the point can be defined as a (new) waypoint or
as the destination, by using it to establish a new trip. Thus the
definition of a destination or waypoint is a two step procedure: (1)
select a location, and (2) use the selected point to create a waypoint or
a new route (in the Trip menu).
The location point can be entered in one of three ways:
- by clicking on a location on the map,
- by entering a valid USPS address (street number, name, city and state
names) in the dialog launched by the "Show Location.." menu entry,
- by specifying the intersection of two streets in the dialog launched
by the "Show intersection.." menu entry.
More details are provided in the following sections.
- STREET NAME OPTIONS
Street names are used in the two dialogs used to select a specific location:
the address and intersection dialogs. These dialogs follow the same rules
regarding the format of the names.
When entering a street name, the street prefix and suffix, if provided,
must be among the abbreviations listed by the US Census Bureau (N for
north, SW for southwest, etc..). The "type" part of the name (i.e. "Rd",
"St", "Pl") can be given using either the Census Bureau abbreviation, or by
spelling it out in full (i.e., "Road", "Street", "Place"). In almost all
cases, the US Census Bureau conventions follow the usual abbreviations, so
there is no need to worry here. In addition, any of these fields is
optional: not providing them only makes the search less selective. If
several matches are found, RoadMap shows a list of all matching streets and
lets the user select the appropriate one.
The exact format of the data expected by RoadMap as a complete street name
is as follow:
[prefix ' '] name [[' ' suffix] ' ' type]
The name itself may include space characters. Potential conflicts are
resolved by excluding the prefix, suffix and type fields from the name
only when a match is found with the valid set for that county. As such,
the following names would work OK in any circumstances:
N Rio del Sol St --> RoadMap detects both a prefix and a type.
Rio del Sol St --> RoadMap detects the type, no valid prefix.
N Rio del Sol --> RoadMap detects the prefix, no valid type.
Rio del Sol --> RoadMap detects no valid prefix or type.
Lets go through an example: we will search for 100 East Washington
Boulevard in Los Angeles, California. The name of the street should be
typed as follow:
e washington blvd
The 'e' stands for "east", 'blvd' stands for boulevard, according to the
US Census Bureau documentation. Note that RoadMap is not case sensitive.
The result is a single match, so RoadMap shows the location immediately
without any additional question. However it is possible to omit either
the prefix, street type, or both, with the effect of broadening the search.
Let say we entered:
washington blvd
Now RoadMap display a dialog that lists 3 matches:
Washington Blvd, Los Angeles
W Washington Blvd, Los Angeles
E Washington Blvd, Los Angeles
The first item in the list is shown selected, and RoadMap displays a new
location in the map display. In fact, each time the user selects one
address in the list, RoadMap displays the corresponding map location.
When the user hits the OK button, this simply confirms the current choice
as the final one.
Note that not providing a prefix, suffix or street type does broaden
the search, but the street name must always be provided in full: at that
time RoadMap provides only an exact street names search. Thus providing
"wash" instead of "washington" only triggers the error message "No street
with that name could be found".
- OTHER ADDRESS OPTIONS
It is possible to not specify the street number part of an address:
in that case, all street blocks matching the street and city names will
be listed. Be careful, that might make a long list, and RoadMap has a
limit of 256 items per list (matching items beyond the 256th one are
discarded).
It is also possible to specify an approximate city search: if the city
name is prefixed with a character '?', then the name of the city is used
to find the county, but is not used in the street match: the idea is to
list all similar addresses around (i.e. in the county). This is useful
when one is not sure of the city name, or only knows the name of a city
nearby.
- SELECTING AN INTERSECTION
The "Intersection.." menu entry activates a dialog that asks for
two street names and a state name. RoadMap will search within the given
state for all intersections between streets that match the street names
provided. This search may take a few seconds, especially if the maps must
be read from disk.
In the (likely) case where multiple intersections have been found, RoadMap
displays a list that shows the name of the city and the name of the county
where each intersection is located. This selection list follows the same
rules as the address selection list described in the previous sections.
- MANAGING TRIPS
RoadMap can support many trips: each trip context is saved in a trip
file. One trip at a time can be edited or activated. A saved trip can
be reloaded from its trip file.
The last trip created or loaded will be reloaded the next time RoadMap
starts. If the name of the trip has been specifically set by the user, it
will appear in the titlebar of the RoadMap window.
A trip is a collection of landmarks, routes, and tracks which (usually)
have some relationship to one another.
Routes are sequences of waypoints that (usually!) lead you somewhere you
want to go. Tracks are sequences of recorded waypoints that show you
where you've been. Although one doesn't usually do so, a track can be
followed just as a route can be followed.
Trip landmarks are arbitrary waypoints that aren't part of a route or a
track. They're presumably interesting all by themselves. (The trip's
landmarks are distinct from another set of landmarks known as your
"Personal Landmarks". The "personal landmarks" are displayed on the map
no matter which trip is loaded.) Landmarks and waypoints are sometimes
just referred to as "Places".
One end of a route is the starting point, and the other is the
destination. Comments attached to the route's waypoints are used to
give directions from one waypoint to the next. Routes can be reversed,
in order to traverse them backwards (but the comments don't get
rewritten). Reversing a route will not change the trip file -- the
reversal is completely internal to RoadMap.
When you load a trip (or when you start RoadMap, and the last trip you
used is automatically reloaded) you'll be presented with a menu of
routes to choose from. (If there's only one route in the trip, it will
be selected automatically.)
While you might choose to name your trips with a ".gpx" suffix, as a
reminder of what format they're stored in, this is entirely optional.
File suffix doesn't matter.
Note that although tracks and routes are conceptually separate, either
type can be selected at this point, and any of the operations under the
"Routes" menu can be applied to either.
One of the buttons in this "Manage Routes" dialog is "None", which is a
quick way of not selecting any route at all.
- Creating a route:
If you're starting a "fresh" trip, you'll likely start by creating a
route. Choose a place that will be part of the route (a waypoint,
a landmark, a street address, a geographic location) and then use
the "Create New Route" menu entry to begin constructing your route.
This will create an unnamed route with only one waypoint -- your
destination.
A route with only one waypoint isn't very interesting, so you'll
want to select more points along the route. To select a new place,
you can a) click (or tap) on the street where you wish to go, b) use
the "Find" menu items "Address...", "Intersection...", or
"Position..." to locate it, or c) choose another, previously created
place from the route, the trip landmarks, or the personal landmarks.
After locating your new waypoint, use the "Add as waypoint" menu
item to add each to the route. You'll have choices of where to add
(at the beginning, at the end, or as a midpoint of the nearest route
segment), as well as a chance to add it as a landmark, to either the
trip's list, or your personal list. Continue adding waypoints to
your route.
(If you do much route creation, you should create a toolbar button for
the "addroutewaypoint" command. Then, the easy way to create a route
is to first create a trivial route between the two endpoints as
described above, and then points on the map and add them with your
toolbar button. The route will "snap" into place through each new
point you add.)
Note that waypoints are always copied. So if you choose an
existing waypoint or landmark to use as a route waypoint, you'll
end up with a new waypoint, not just a second reference to an
existing waypoint.
You can give your new route points names as you go, or wait until
later and use the "Route Waypoints..." menu item to go back to the
list, and select the ones you wish to rename or to which you wish to
add comments. Waypoint deletion can be done here as well.
It is also possible to delete, edit, or move waypoints and landmarks
by directly selecting them with the mouse. Use a short click to
select the place of interest -- its identifying information will be
shown along the bottom of the screen. Then use the appropriate
menu command to delete, edit, or move the selection. These commands
are most readily accessed via the "long click" menu. If doing a
move, you'll select the place, then choose the "Move place" command,
then click or tap at the new desired location.
Your route doesn't yet have a name. That's fine -- routes and
tracks can be unnamed. If there's only one route in a trip file,
it's no big deal, but if there's more than one, you might want to
give them names to help keep them straight. You do this (you can
also add descriptive text) from the "Manage Current Routes" menu
item. This is also where you'd select a different route to work
with. If your trip has tracks, they'll appear hear as well. Be
careful with delete! There's no undo command. Note that in
addition to having no name, multiple routes can have the same name.
This will not confuse RoadMap, though it may confuse the user.
- Converting a track to a route:
Another, perhaps less convenient, method of creating a route, is to
base it on a track that you (or someone else) has already travelled.
While it's possible to simply select a track and follow it as one
would follow a route, there are usually too many trackpoints showing
up and obscuring the actual roads. It's better to create a route
from the track using the "Simplify Route" command. (Remember that
all of the route commands apply to tracks as well.) If
simplification was successful (i.e., if any waypoints could be
eliminated) a new route will be created and selected. It will be
named after the original, with "Simple ..." prepended to to the
original name. (If it had a name -- otherwise the result is unnamed
as well.)
- Importing a route:
One advantage of using the popular GPX format is that routes
and landmarks can be obtained from other sources. Not only are
some GPS management programs converting to use GPX directly, but
there are many "<something-else>-to-GPX" conversion programs
available. There are many such programs listed at:
http://www.topografix.com/gpx_resources.asp
One of the best, and most complete, of these conversion programs
is gpsbabel, available here:
http://www.gpsbabel.org
There's also an online front-end to gpsbabel, here:
http://www.gpsvisualizer.com/gpsbabel
Gpsbabel will convert from most popular GPS data formats, and
can talk directly to many GPS devices without involving their
vendor's "support software" at all. [ RoadMap is particularly
indebted to gpsbabel, since much of the code which supports
RoadMap's GPX input and output came directly from gpsbabel. ]
One handy source of route and waypoint data these days is Google
Maps. Google directions and waypoints can be converted directly to
GPX format by the GMapToGPX bookmarklet:
http://www.elsewhere.org/GMapToGPX
gpsbabel can do this too, somewhat more indirectly -- the following
script shows how:
#!/bin/sh
function usage()
{
echo usage: $0 "from address" "to address" >&2
exit 1
}
if [ $# != 2 ]
then
usage
fi
from="$1"
to="$2"
# the gpsbabel line simplifies: the "error=xxx" value is in miles,
# and signifies how far any single point must be from the straight
# line connecting its neighbors in order to not be discarded.
wget -O - "http://maps.google.com/maps?q=$from to $to&output=js" \
2>/dev/null |
sed -e 's/<b>//g' -e 's/<\/b>//g' |
gpsbabel -r -i google -f - -x simplify,error=0.05 -o gpx -F -
The above script shows how one might use gpsbabel to simplify
a route or track rather than doing it with the Simplify command
inside RoadMap. Using gpsbabel might give better results, since
it currently uses a different (and more expensive) algorithm
than does RoadMap.
Once you have a have a data in GPX format, it's simply a matter
of loading that that data with "Open Trip", or merging it into
another of your existing trips with "Merge Trip".
- Quick Destination:
Sometimes one doesn't really want to follow a route at all -- all
you want to do is set a goal, and be kept informed of how far away
it is, and in which direction. (This might be useful for geocaching,
for instance.) That's what the "Quick Destination" menu entry is
for. Select where you want to go (a waypoint, a street address, an
intersection, or latitude/longitude spot), and as you move around,
the display will continously display the distance and direction
to that point.
- Following a route:
A route that has been created or loaded can then be activated.
Activating a route defines the departure point (the current GPS
location) and enables the "trip display" mode: extra status
information will appear on the map. This will include an arrow
beside the GPS location symbol to indicate the direction of the next
waypoint, as well as user configurable messages, such as distance
information, the directions to the next waypoint (if any are present
in the waypoint's comments), its distance, etc. The messages will
display at the corners of the map. (see CONFIGURATION for more
information about these user configurable messages).
If the route's waypoint contains comments (from the "<cmt>" element
of the GPX file), these will be displayed as directions which
should be followed when that waypoint is reached. The directions
displayed will be from the next waypoint which has directions, i.e.
there may intervening waypoints that do not have comments.
A waypoint is "attained" by entering within its "vicinity". This
radius is set in the user's' trip preferences (125 ft, by default).
When entering the vicinity circle, the GPS directional arrow will
immediately begin pointing at the next waypoint in the list.
On-screen directions will not be updated (i.e., to describe the next
turn, rather than the current turn) until one leaves the waypoint
vicinity. In addition, RoadMap honors a larger circle, at twice the
size of the waypoint vicinity. If one enters this circle and then
leaves it (without ever entering the inner "vicinity-sized" circle),
then RoadMap will see if the next route segment is closer than the
last route segment, and if so will assume that the user is on track
to the next. The directional pointer and on-screen directions will
be updated, even though the waypoint was never "quite" attained.
This helps accomodate small map errors, or large roundabout or
interchange intersections where the actual waypoint may be
unreachable.
A route can be stopped at any time and then resumed. When a route is
resumed, the waypoint chosen as the "next" to be visited is chosen
by searching for the route segment that is closest (in geometrical
terms) to the GPS location. The route can also be resumed in reverse
mode: in that case the departure point and the destination point
switch roles. The reverse mode makes it possible to use the same
RoadMap route on the way back, though as noted previously, any
comments on the waypoints that give directions will be unchanged.
This can be a bit confusing sometimes!
When a route is active, RoadMap tracks the GPS position in realtime
and updates the map accordingly. The GPS position can be shown in
two modes: either North up or GPS direction up depending on the
"Map.DynamicOrientation" preference item. In the second case, the
map is rotated according to the direction information received from
the GPS, and is convenient as it matches the driver's or passenger's
view. (This dynamic rotation is in addition to the map manual
rotation.) Some people find it disconcerting, however, and will wish
to retain "North up" mode.
- CURRENT TRACK
Unless specifically disabled in preferences, the GPS track followed
by the user will be continuously recorded by RoadMap. By default
this "breadcrumb trail" will be displayed on the map, but this can
be suppressed with the "Show/Hide Track" toggle command. Whether
the track is displayed initially is also configurable.
The frequency at which points for the track are recorded is
determined by several settings in preferences:
- If "Time" is chosen, then track points will be saved
periodically every so many seconds (as long as the GPS
has moved at least a little bit).
- If "Distance" is chosen, then a new track point will be saved
whenever the configured distance from the previously saved
trackpoint has been exceeded.
- IF "Deviation" is chosen, then a new track point will only be
saved if the new point is significantly "off track" from the
preceding path of travel. This minimizes the points saved,
since straight line travel is represented by very few points.
- If "Off" is chosen, then no track points will be saved.
Normally the recorded track will be saved in the configured filename.
The default for this file is "currenttrack.gpx". If one wishes to
record tracks, but never save them to disk, set the filename to the
special value "NONE". Complete tracks are preserved in the event of
a system or program crash.
Using RoadGps
RoadGps is a handy GPS console, inspired by the
Garmin satellite status page, with NMEA logging capability.
The functionality of RoadGps is now included directly in
roadmap, but roadgps is still available as a separate
program. If configured to use gpsd, roadgps and roadmap can
be active at the same time, since gpsd manages the serial
port connection to the GPS unit.
If built as separate program, roadgps can be started on its
own (using command line options similar to those of
RoadMap), and in any case from the RoadMap's File / GPS
Console menu item.
The screen shows the list of satellites, their position in
the sky (north up) and the strength of the signal. It marks
in reverse video the satellites being used to compute the
current position. In addition, the locations of the Sun
and/or Moon are shown, for general reference.
RoadGps uses a subset of the RoadMap preferences setup, but has no
preferences editor of its own: configure RoadMap first, and then use
RoadGps.
Configuration
This section describes the files used to configure RoadMap on the local
machine. In most cases these files contain user-defined data that
defines the look of the RoadMap user interface, or resources used by
RoadMap.
For more information on configuring specific devices (e.g., WinCE,
iPhone, XO laptop), see the PLATFORM SPECIFIC section of the
documentation.
We will first describe where to find these configuration files on the
different operating systems that RoadMap supports, then we will describe
the content of each configuration file.
The files themselves are the same on all operating systems.
Note that this section does not cover the files describing the maps:
there is a clear separation in RoadMap between the map data, which the
user normally does not modify or customize, and the configuration data,
which the user may want to custimize. The map files are described in a
separate section.
The configuration files are stored in a set of directories to allow for
a default, system-wide configuration and allow each user to customize
the configuration separately. See the INSTALLATION section of the
documentation for more details.
Files
The syntax of most RoadMap configuration files is similar to the X
ressources file format (the exceptions are the sprites file and the
trip files). Each configuration item is represented by one line of text,
using the following format:
name ': ' value
The following configuration files are used:
- preferences
-
User's preferences.
- session
-
The latest context used (locations)
- sprites
-
The definition of the graphic symbols
- roadmap.toolbar (Optional)
-
The actions shown on the RoadMap toolbar.
- roadgps.toolbar (Optional)
-
The actions shown on the RoadGps toolbar.
The session file contains the current state of roadmap, which is saved
(if needed) when roadmap exits. The preferences file contains all of the
static preference items, and can be edited by the user. The sprites
file contains the graphical definition of the symbols usd by RoadMap to
indicates the various locations, to draw the compass, etc..
The toolbar files define the content of the RoadMap and RoadGps toolbars.
See the section CONFIGURING THE MENUS AND TOOLBAR for more information.
- CLASS FILES AND SKINS
The RoadMap configuration also contains the map class files. Each class
file describes the organization of one set of map files showing the same
list of layers (roads, topography, water feature, etc...).
The class files are stored in a skin subdirectory. It is possible to
install multiple sets of class files by creating multiple skin
subdirectories and then select the active skin in the user preference.
The default skin is named, well, "default".
The class files are described in more details in the MAP FORMAT section.
(Note that the class files replace the old schema file, which is no
longer used.)
== Messages ==
The RoadMap text displays and voice messages can be configured by the
user using format strings in the preferences. The format strings contain
static and dynamic parts. The dynamic parts (or "%-macros") are specified
using the character '%' followed by one character that denotes a predefined
RoadMap variable.
%A |
Estimated time of arrival (not yet implemented). |
%B |
Direction of travel (bearing). |
%C |
The name of the city for the selected or current street. |
%D |
Distance to the destination (set only when a trip is active). |
%E |
Next sunset time (evening), undefined in night time. |
%e |
Next sunset time, always defined. |
%F |
Full name (number, name, city) of the selected or current street. |
%H |
Altitude. |
%M |
Next sunrise time (morning), undefined in daylight time. |
%m |
Next sunrise time, always defined. |
%N |
Name of the selected or current street. |
%P |
Name of the selected or current place. |
%R |
Name of the route or list containing the selected place. |
%S |
Speed. |
%T |
Current time, format HH:MM. |
%W |
Distance to the next waypoint (set only when a trip is active). |
%X |
Directions to be followed when the next waypoint (with |
|
directions) is reached. (set only when a trip is active). |
%Y |
Distance to the next waypoint which includes directions, unless |
|
the GPS is "at" that waypoint. (set only when a trip is active). |
%# |
the street number range to the selected or current street block. |
%s |
Total number of satellites. |
%v |
Total number of available satellites. |
%x |
Distance from one side of the screen to the other. |
%y |
Distance from the top to the bottom of the screen. |
Note that the time is always shown using the military format: HH:MM.
Example: "%D (%W)" shows the distance to the destination point, followed
by the distance to the next waypoint (in parenthesis).
A message is evaluated, and displayed, only when all referenced %-macros
have a defined value. Therefore the example above will show nothing if
there is no trip active, or if there is no next waypoint. It is
possible to define several alternatives, separated by the character '|':
the first alternative that has been successfully evaluated will be
displayed.
Example: "%D (%W)|%D" shows both distances to the destination point and
to the next waypoint if both distances are defined, or else only the
distance to the destination point if this distance is defined. If none
of the two distance have been defined (for example when no trip is
active), then no display is shown and/or no sound is produced.
Likewise, "In %Y, %X|%X" will say something like "In 0.5 miles, Turn
Right", unless you're already at the point at which you should turn
right. Then it will just say "Turn Right".
Another typical example is "sunset: %E|sunrise: %M", which shows the
next sunset (in daylight time) or sunrise (in night time).
It is possible to "link" together parts of a string using simple or
double quotes. This is used when the string specifies an external
command to execute. RoadMap does not use the shell to execute commands
(so to stay independent from the OS-specific shell syntax), but it does
recognise the use of quotes to specify a command parameter that includes
spaces. Such a parameter may be enclosed in single or double quotes.
There is no difference between one quote or another, except that the
parameter must be terminated with the same quote character it was
started with.
Example: "flite -t 'On %N'" to specify the command flite with two
parameters ("-f" and "On %N").
Menus and Toolbar
The items shown in the RoadMap and RoadGps menus and toolbars can be
redefined by the user in text configuration files. Note that each
program comes with a built-in menus and toolbar configuration that
serves as the default, so none of these configuration files is required
to be present for RoadMap or RoadGps to work. In fact, RoadMap is
distributed with none of the configuration files described in this
section. (Example files are provided for RoadMap, but are not installed
automatically.)
It must be realized that making any change to the menus and the toolbar
comes at a price: this documentation was written using the standard
user interface. Modifying the user interface is likely to make this
documentation even more confusing than it originally is.
The major reason for customizing the menus or the toolbar is to let
the user tailor the toolbar to fill small screens (such as a PDA) with
his preferred controls at the most convenient place. Using a GUI in
a car or on a bike is challenging enough.
The configuration files are organized with one entity per line. An
entity is either the title of a menu, the name of an action, a separator
or a comment.
Each menu is described by it's title (prefixed with character '/'),
followed by the list of items in that menu. The title of a menu is
a user-defined string with a maximum length of 254 characters (it is
recommended to select short titles made of a single word, however).
There is no such title line for toolbars: all menu title lines will be
silently ignored. The toolbar is organized as a single, anonymous, menu.
Each menu or toolbar item is described by its action name. A separator is
described by the character '-'. There must be only one item (title, action
name or separator) per line. Empty lines are authorized and lines starting
with the '#' character are treated as comments.
There are two sorts of menus. All menus are available as popup menus,
which are invoked either in response to an event (as specified in the
preferences "Events" section), or by being invoked from a menu entry or
toolbar button. In addition, menus that are specified as menubar menus
will appear in the menu bar. Invoking a popup menu from another menu is
how submenus are implemented in RoadMap.
The menus, popup and toolbar configuration files for roadmap are named
"roadmap.menus", "roadmap.popup" and "roadmap.toolbar", respectively.
The same configuration files for roadgps are named "roadgps.menus",
"roadgps.popup" and "roadgps.toolbar". These files must be stored in
the same places as other RoadMap configuration files.
By default, a long click of mouse button 1 will bring up the menu called
"/Long Click Popup" in road{map,gps}.popup, and a right click (button 3)
will bring up the menu called "/Right Click Popup". These bindings can be
changed by setting "Events:Long Click" or "Events:Right Click" in the
preferences.
There is a different list of possible actions for RoadMap and RoadGps.
The list of valid action names can be obtained using the command line
option --help=actions:
roadmap --help=actions
roadgps --help=actions
The following is an example of a menus definition file for RoadMap:
/Right Click Popup
preferences
gpsconsole
-
quit
/Help
about
The following is an example of a toolbar definition file for RoadMap:
full
quit
-
destination
location
gps
hold
-
zoomin
zoomout
zoom1
->Help...
The last item in the toolbar file example will invoke the "Help..." menu.
If the toolbar file is empty, no toolbar will be created.
It's actually possible to configure RoadMap with no on-screen buttons or
menus at all. By creating an empty "roadmap.menus" file, the internal
menubar menus will be suppressed. Then, configure the Long or Right Click
action to invoke the "Menus..." menu. This special popup contains the same
list of menus that would normally appear in the menubar. This allows full
access to RoadMap commands, all via the mouse. More practically, one might
wish to bind the "->Menus..." popup menu to a toolbar button -- then
RoadMap could run with a toolbar, but no menubar.
It is also possible to rename the RoadMap actions, with the effect of
changing the labels used in the menus and the text of the tooltips.
The translations are described in text files, one text file per program:
"roadmap.actionlabels" for roadmap and "roadgps.actionlabels" for
roadgps. These files should be located in the usual RoadMap
configuration places.
Each action is renamed using one line of text that contains the action
name, its menu label, its toolbar label and its tip label (in that
order). Each of these items is separated by one special character.
This separator can be any character except a letter (upper case or lower
case) or a digit ('0' to '9'). Different separators can be used on
different lines, but a single line must use a single separator character.
The following are examples of valid action renaming lines (from English to
French, to please our Canadian friends):
mutevoice;Silencieux;S;Desactive la synthese vocale
enablevoice+Volubile+V+Active la synthese vocale
quit,Quitter,Q,Quitter l'application
(This mechanism is not intended to provide a general mechanism for the
internationalization of RoadMap.)
Remember that the toolbar labels should be very short, since the toolbar
has a limited size.
On-Screen Objects
RoadMap can display small images on the screen (on-screen objects) which
can reflect the state of the program (e.g., which way is north, how strong
is the GPS signal), and/or allow actions to be performed (e.g. zoom in,
show the trip's destination). These objects may be placed anywhere on the
screen, but nothing prevents them from being obscured by other popup
messages and displays, so their position is usually along the sides of the
screen.
The position, display, and actions associated with these objects are
controlled by a "roadmap.screenobjects" file. The distributed copy of this
file contains definitions for a small compass image, a map download
indicator, zoom in and zoom out control points, and some arrow indicators
which help point the way when following a route. The user is free
to make a local copy of this file in order to add on-screen command
points, and to customize the display in general.
The roadmap.screenobjects file is made of a sequence of single-line
commands. The "sprites" referred to in this description are defined
in the configuration file named "sprites", described in the "SPRITES FILE"
section of the documentation.
N <name> |
Name of the object (unused, but starts |
|
a new object) |
P <x> <y> |
The screen position of the sprite, measured |
|
from the top left in pixels. Negative offsets |
|
measure from the right and from the bottom. If |
|
the <x> or <y> value begins with a 'C', then |
|
the remainder is an offset from the center of |
|
the screen. |
E <sprite> [text] |
The name of the sprite which will be drawn. |
E <sprite> [text] |
Multiple sprites can be specified. Which |
|
one is displayed is selected via the object's |
|
"state" indicator. If "text" is specified, it |
|
will be displayed with the sprite (assuming the |
|
sprite has been defined to have text associated |
|
with it). |
|
- The text can be divided into multiple lines. |
|
Line breaks are indicated by inserting a '^'. |
|
- The text can contain %-macros, just as defined |
|
for other text displays, in order to display |
|
dynamic content. The '|' "alternation" symbol |
|
is also honored. See the "CONFIGURING THE |
|
TEXT AND VOICE MESSAGES" section of the |
|
documentation. |
S <statename> |
The "state" indicator which will choose among |
|
the listed sprites. For "constant" displays, |
|
this is optional. |
A <actionname> |
The action which should be invoked when the |
|
sprite is selected. Optional. The action can |
|
be a simple action name, or, when prefixed with |
|
"-->", the name of a popup menu which should |
|
be invoked. |
R |
Sprites will normally rotate, either with the |
|
screen, or based on an angle retrieved via |
|
the state indicator. Specifying 'R' suppresses |
|
this by forcing rotation to the given angle. |
B <x> <y> <x> <y> |
Optional -- the bounding box used to determine |
|
whether a selection has taken place. (I.e., |
|
the size of the sprite.) Normally the bounding |
|
box is calculated by RoadMap itself (and if |
|
the object will rotate, the bounding box is |
|
forced to have maximal dimensions), but |
|
irregularly shaped sprites, combined with the |
|
rotation of the sprite, may require that the |
|
box be overridden. Note that the bounding box |
|
of any text associated with the sprite is |
|
calculated and considered separately. |
The screen objects can display different sprites to indicate the state of
various internaly RoadMap runtime states. These state indicators are
referenced by name, and are linked to the screen object via the 'S'
descriptor in the "roadmap.screenobjects" file.
The possible state indicators are as follows. Most have just two possible
"return values", but some can represent more than two state values. In
addition, any can optionally return an angle which can influence the
display of the sprite.
get_download_enabled |
Indicates whether the user has enabled |
|
map downloads. |
get_GPS_reception |
Four possible states, indicating current GPS |
|
performace: N/A, none, poor, and good. |
zoom_reset |
Indicates whether zoom is at the default level. |
view_mode |
Indicates 2D or 3D map rendering. |
get_orientation |
Indicates whether map rotation is fixed or |
|
dynamic. Also returns the current angle of |
|
the map relative to north. (This is what |
|
drives the on-screen compass object.) |
get_direction_next |
When following a route, indicates the direction |
|
to the next waypoint. This indication is |
|
relative to the direction of travel -- i.e., it |
|
points correctly if the user holding the display |
|
is facing forward in the vehicle. |
get_direction_2nd |
As above, but points to the waypoint after the |
|
next. |
get_direction_dest |
As above, but points to the final destination. |
- A NOTE REGARDING COLORS
Some RoadMap configuration items define colors to be used. As a general
rule a color must be described in a way that is suitable for the target
graphic system.
In the case of X11, that means either a color name (as defined in the
/etc/X11/rgb.txt) or a color definition: #rrggbb where rr, gg and bb
are hexadecimal values (for example: #FFFFFF is white, #000000 is black).
Note that the #rrggbb format is broadly supported, even on target systems
that do not support named colors.
Preference Items
- General.Unit
-
The unit system used, either "imperial" or "metric"
- General.Default Zoom
-
The zoom level when roadmap is started.
- Format: integer
- Default: 60
- General.Keyboard
-
Show (yes) or hide (no) a keyboard on the screen.
- Format: boolean
- Default: yes
- General.Icons
-
Show (yes) or hide (no) icons on the toolbar.
- Format: boolean
- Default: yes
- Command line option: --no-icon
- General.IconPath
-
The icon search path.
- Format: a comma-separated list of directory paths.
- Default: see the ICON FILES section of this document.
- Comment: The hardcoded default includes the usual linux system
pixmap directories used for storing application icons.
A "pixmaps" subdirectory of the user's .roadmap
directory, and the system roadmap config directory,
will also be searched.
- General.Busy Cursor Delay
-
Delay until mouse cursor switches to "busy"
- Format: integer (milliseconds)
- Default: 200
- Comment: When displaying maps that cover a large area, or on
a slow computer, a screen refresh may take some time.
The mouse will change to a "watch" or hourglass or other
busy indicator after this amount of time. Use '0' to
disable this.
- General.Progress Bar Delay
-
Delay until progress bar during refresh.
- Format: integer (milliseconds)
- Default: 350
- Comment: When displaying maps that cover a large area, or on
a slow computer, it may be helpful to have an on-screen
indication of how long the refresh will take. The
value is the delay until the progress bar appears. Use
'0' to disable the progress bar. It may be desirable
to disable the progress bar especially if the X window
manager insists on making the progress dialog fullscreen,
or if it always takes focus away from roadmap (in which
case keystrokes will go to the progress bar dialog
box instead of roadmap).
- General.Show Errors
-
Should runtime errors be reported on-screen?
- Format: boolean
- Default: yes
- Comment: Errors detected by RoadMap will always be logged
to the postmortem file (and to stderr, if available),
but this preference item controls whether the user
will see them in a dialog box on the screen.
- General.Toolbar
-
Show (yes) or hide (no) the roadmap toolbar.
- Format: boolean
- Default: yes
- Command line option: --no-toolbar
- Comment: In some case (GTK2) it may be necessary to suppress
or minimize the toolbar if a very small screen is
needed, because the size of the toolbar may dicate
the minimum size of the screen. The toolbar can also
be eliminated by creating an empty "roadmap.toolbar"
file.
- General.Toolbar Orientation
-
Choose where to position the toolbar
- Format: "Top", "Bottom", "Left" or "Right"
- Default: system default toolbar position (usually on top).
- General.Tooltips
-
Show (yes) or hide (no) tooltips on menus and buttons.
- Format: boolean
- Default: yes
- Comment: Tooltips may not work well on a touchscreen device.
- General.UserPath
-
Directory for per-user configuration.
- Format: a directory path, usually starting with '~'
- Default: ~/.roadmap
- Comment: This directory can be referred to in other RoadMap
path specifications using the shortcut '&'.
- General.TripsPath
-
Directory in which trips are stored, usually per-user.
- Format: a directory path
- Default: &/trips, i.e. in ~/.roadmap/trips
- Comment: Trips files can be stored anywhere, but in some places
RoadMap makes it easier if they're stored here. New
trips, unnamed by the users will be stored here.
- General.Sprite Scale
-
Sets a scaling factor for all RoadMap sprites.
- Format: integer (percentage)
- Default: 100
- Geometry.Main
-
Sets the size of the RoadMap main window.
- Format: <WIDTH>x<HEIGHT>
- Default: 800x600
- Geometry.Default
-
Sets the default size for other RoadMap windows.
- Format: <WIDTH>x<HEIGHT>
- Default: 300x200
- Geometry.WINDOW
-
Sets the size of the RoadMap window named WINDOW.
- Format: <WIDTH>x<HEIGHT>
- Default: <the value of Geometry.Default >
- Display.Bottom Right
-
Defines the message on the bottom right corner.
- Format: RoadMap format string
- Default: %D (%W)|%D
- Display.Bottom Left
-
Defines the message on the bottom left corner.
- Format: RoadMap format string
- Default: %S
- Display.Top Right
-
Defines the message on the top right corner.
- Format: RoadMap format string
- Default: In %Y, %X|%X");
- Display.Top Left
-
Defines the message on the top left corner.
- Format: RoadMap format string
- Default: <empty>
- Display.Duration
-
The time during which a selection or message is shown.
- Format: number of seconds.
- Default: 10
- Comment: The selection is only removed when the map is redrawn.
- Display.Refresh Period
-
Minimum interval between display refreshes.
- Format: integer (milliseconds)
- Default: 200
- Display.Font Size
-
The size of the text used for labeling.
- Format: integer (pixels)
- Comment: Currently only honored if either the internal
"linefont", or AGG, is being used.
- Help.Browser
-
The browser program used to show the help text.
- Format: a program name, with or without path.
- Default: firefox
- Help.Source
-
Whether RoadMap will find Help text on the local machine or the web.
- Format: "local", "web"
- Default: "local"
- Help.Website
-
If Help.Source is "web", this is the site to access for Help text.
- Format: string
- Default: "roadmap.sourceforge.net"
- Map.Path
-
The map database search path.
- Format: a comma-separated list of directory paths.
- Default: empty string (i.e. RoadMap uses the hardcoded default)
- Comment: The hardcoded default also includes the directories
/usr/local/share/roadmap and /usr/share/roadmap, for
compatibility purposes. These two directories were the
standard locations for the maps in previous versions of
RoadMap. Maps can be located in any directory mentioned
in this path. RoadMap will only consult a single
usdir.rdm file at a time, even if more than one is
present in the Map.Path directories.
- Map.Cache
-
The number of entries in RoadMap's mapping cache.
- Format: integer
- Default: 8
- Comment: This value controls how many maps RoadMap will
keep "open" at once, for faster access.
- Map.Background
-
The color used for the background of the maps.
- Format: color
- Default: LightYellow
- Map.Labels
-
Enable/disable the initial display of street names.
- Format: boolean
- Default: yes
- Comment: Chooses whether streets are labeled at startup.
They can still be toggled by command.
- Map.DynamicOrientation
-
Rotate the map to match the GPS direction.
- Format: boolean
- Default: off
- Comment: Chooses whether the map will initially show north,
or the direction of travel, towards the top of the
screen. Can be toggled by command as well.
- Map.Panning Percent
-
How far an arrow key will move the map view
- Format: integer
- Default: 25
- Comment: Percentage (of the smaller or width or height) by
which the map will pan when an arrow key is used.
- Map.GPS map offset latitude
-
Allows tuning of GPS latitude results.
- Format: integer
- Default: 0
- Comment: Offset (millionths of a degree) applied to GPS results
- Map.GPS map offset longitude
-
Allows tuning of GPS longitude results.
- Format: integer
- Default: 0
- Comment: Offset (millionths of a degree) applied to GPS results
- Map.Signs
-
Enable/disable the map sprites and street signs.
- Format: boolean
- Default: yes
- Comment: Use only in special cases (very small screens)
- Map.Refresh
-
Forces a screen refresh every time.
- Format: enumeration (normal / forced)
- Default: normal
- Map.Use Linefont
-
Enables use of the internal linefont.
- Format: enumeration (off / labels / signs / all)
- Default: labels
- Comment: The internal line font may be preferable to the system
font since it can draw at angles, and since its size can be
easily scaled. It is not very pretty, however.
- Map.ViewMode
-
Select 2D (flat) or 3D (perspective) map view.
- Format: enumeration (2D / 3D)
- Default: 2D
- Comment: Chooses the map view used at startup.
- Labels.MinFeatureSize
-
The shortest street which may be labeled.
- Format: integer (in pixels)
- Default: 25
- Labels.Color
-
The color used when labeling streets.
- Format: color
- Default: Black
- Labels.Font Size
-
The size of the text used for labeling.
- Format: integer (pixels)
- Comment: Currently only honored if either the internal
"linefont", or AGG, is being used.
- Landmarks.Name
-
The filename used for storing personal landmarks
- Format: pathname, including & and ~ shortcuts
- Default: landmarks.gpx, in the '&' (~/.roadmap) directory.
- Landmarks.Color
-
The color used when labeling personal landmarks.
- Format: color
- Default: dark red
- Landmarks.Font Size
-
The size of the text used for labeling.
- Format: integer (pixels)
- Comment: Currently only honored if either the internal
"linefont", or AGG, is being used.
- Track.Name
-
The filename used for storing current "breadcrumb" track
- Format: pathname, including & and ~ shortcuts
- Default: currenttrack.gpx, in the '&' (~/.roadmap) directory.
- Comment: The file is in stored in GPX format.
- Track.Initial Display
-
Determines whether the track is displayed when
RoadMap starts.
- Format: enumeration (on, off)
- Default: on
- Comment: The display can still be toggled by command.
- Track.Policy
-
The algorithm used to decide when to store a new trackpoint
- Format: enumeration ("off", "Deviation", "Distance", "Time")
- Default: off
- Comment: When "off", no track is recorded. When set to "Time",
a new trackpoint is stored after "Track.Time Delta" time
has passed since the last point was recorded. Shen set to
"Distance Delta", a new point is stored when the user has
moved Track.Distance from the last point. "Deviation" is
the optimal setting: call the most recent three points A,
B, and C. Point B is dropped if the distance from A to B
and then to C is approximately equal to the distance
directly from A to C.
- Track.Time Delta
-
Time interval used when Track.Policy is "Time".
- Format: integer (seconds)
- Default: 15
- Track.Distance Delta
-
Distance used when Track.Policy is "Distance".
- Format: integer (with units)
- Default: 100 m
- Track.Autosave minutes
-
Number of minutes between automatic saves of
the current track.
- Format: integer
- Default: 1000
- Track.Saved Track Points
-
Approximate number of track points saved in
memory, or in a single file.
- Format: integer
- Default: 1000
- Comment: After "Track.Autosave minutes", if there are 25%
more points in the current track than this number, then
75% are saved to an archive file, and the remainder
are still kept in memory and displayed on the map.
- Trip.Name
-
The filename holding the current trip.
- Format: pathname, including & and ~ shortcuts
- Default: SavedTrip.gpx, in the '&/trips' (~/.roadmap/trips)
directory, but usually chosen by the user.
- Comment: The file is in stored in GPX format.
- Trip.Show Inactive Routes
-
Should waypoints in unselected routes be shown.
- Format: boolean
- Default: yes
- Comment: Can still be toggled by command.
- Trip.Show Inactive Tracks
-
Should waypoints in unselected tracks be shown.
- Format: boolean
- Default: no
- Comment: Can still be toggled by command.
- Trip.Connect Route Points
-
Should route waypoints be connected with
straight lines?
- Format: boolean
- Default: yes
- Comment: Can still be toggled by command.
- Trip.Route Connect Color
-
The color used to connect route waypoints.
- Format: color
- Default: red
- Trip.Waypoint Radius
-
How close does the GPS need to be to a waypoint
to be "on" the waypoint.
- Format: integer (distance, with units)
- Default: 125 ft
- Trip.GPS Focus Release Delay
-
Delay until GPS loses focus, if off-screen.
- Format: integer (seconds)
- Default: 5 seconds
- Comment: If the GPS is being tracked, and the map is moved so
that the GPS is no longer visible, the map will continue
to move relative to the GPS for the specified number of
seconds. After this, the focus will "hold" to the current
location. A value of zero (0) will force tracking to
continue forever -- the minimum actual delay is 1 second.
- FeatureFiles.Path
-
List of files containing "Point of Interest" features
to display on map.
- Format: A comma-separated list of featurefile specifiers.
A featurefile specifier is a semi-colon-separated list of
display parameters:
filename;spritename;labelcolor;labellevel;spritelevel,filename;spritename...
- Default: <empty>
- Comment: The filename may include & and ~ as path shorthands.
The spritename should appear in the sprites file. The
labelcolor will be used when writing the feature's name.
The label and sprite levels are integers, representing the
zoom level above which the label or sprite, respectively,
will not be drawn. Either the sprite name or the label
color may be the string "NONE", which will suppress the
sprite or the label, respectively. Either declutter level
may be omitted.
- Files.Make Backups
-
Enable/disable the creation of backup files.
- Format: boolean
- Default: yes
- Comment: On UNIX, backup files will have a '~' character
appended. Under Windows, a ".bak" suffix will be used.
- GPS.Background
-
The background color for the RoadGps screen.
- Format: color
- Default: LightYellow
- Comment: This color is used by RoadGps, not by RoadMap.
- GPS.Foreground
-
The foreground color for the RoadGps screen.
- Format: color
- Default: Black
- Comment: This color is used by RoadGps, not by RoadMap.
- GPS.Timeout
-
A timeout for detecting that the GPS link is down.
- Format: number of seconds.
- Default: 10
- Comment: The GPS link is considered down if no new GPS data was
received for the specified amount of time. Note that the
GPS status will also go "down" because the GPS has lost
satellite visibility. This timeout simply forces that
status if communication with the GPS receiver is lost.
- GPS.LostFixWarningTimeout
-
Timeout for the "lost satellite" message.
- Format: number of seconds.
- Default: 10000
- Comment: If the satellite link is lost, RoadMap will alert the
user with a popup message. The message can be dismissed
manually. It will also go away when satellite communication
is restored. This timeout controls how long the message
will remain up if neither of those things happen. A setting
of 0 disables the popup message altogether.
- GPS.Source
-
The URL that gives the address of the GPS data source.
- Format: <protocol>:<description>
- Default: gpsd://localhost
- Comment: The gpsd protocol (gpsd://<hostname>[:<port>]) uses
the NMEA raw mode of gpsd, while the gpsd2 protocol
(gpsd2://<hostname>[:<port>]) uses the gpsd native protocol.
The object protocol (object:<id>) makes it possible to use
an internal RoadMap object as GPS source (so that a driver
can feed the GPS position to RoadMap). The file protocol
(file://<path>) is also possible, for debug. If gpsd is not
available, one can use a GPS source connected directly to a
serial port. (tty://<device-path>[:baudrate]) An example
would be "tty://dev/ttyS0", or "COM1:" under Windows. 4800
baud is the NMEA standard, but a different speed can be
given: "tty://dev/ttyS0:19200". (Note that using direct
tty access prevents one from running both RoadMap and
RoadGps at the same time, since there is no mechanism in
place to allow sharing the serial port. Using gpsd is
recommended.)
- GPS.Baud
-
The baud rate to use if GPS.Source is a serial port
- Format: integer
- Default: 4800
- GPS.Color
-
The color used for the current GPS position symbol.
- Format: color
- Default: green
- Comment: This color is used by RoadMap, not by RoadGps.
- Destination.Color
-
The color used for the destination symbol.
- Format: color
- Default: red
- Selected Street.Background
-
The color for the background of the selected
street name.
- Format: color
- Default: yellow
- Selected Street.Foreground
-
The color for the foreground of the selected
street name.
- Format: color
- Default: black
- Selected Street.Text
-
The format used for the selected street's display.
- Format: RoadMap format string
- Default: %F
- Console.Background
-
The color used for the background of the trip display.
- Format: color
- Default: yellow
- Console.Foreground
-
The color used for the foreground of the trip display.
- Format: color
- Default: black
- Current Street.Background
-
The color for the background of the current
street's name.
- Format: color
- Default: DarkSeaGreen4
- Current Street.Foreground
-
The color for the foreground of the current
street's name.
- Format: color
- Default: white
- Current Street.Text
-
The text used to display the current street's name.
- Format: color
- Default: black <(I would recommend using white--see above)>
- Default: %N, %C|%N
- Voice.Current Street
-
The command used to announce the current street's
name.
- Format: RoadMap format string
- Default: flite -t 'On %N'
- Voice.Selected Street
-
The command used to announce the selected street's
name.
- Format: RoadMap format string
- Default: flite -t '%N'
- Voice.Next Intersection
-
The command used to announce the name of the
next intersection.
- Format: RoadMap format string
- Default: flite -t 'Next intersection: %N'
- Voice.Approach
-
Reserved for future use (approaching waypoint).
- Accuracy.Confidence
-
The minimum rating for a street to be selected
- Format: integer, range 0 .. 1024
- Default: 25
- Comment: RoadMap uses fuzzy logic to identify what street
the vehicle is on. This value if a minimum fuzzy result
for RoadMap to select any street. This helps not selecting
whatever street is near by when off-road. This also speeds
up the identification process by filtering out unlikely
matches.
- Accuracy.GPS Position
-
The GPS's estimated position error (worst case)
- Format: distance
- Default: 30m
- Comment: This default accuracy can be adjusted to the actual GPS
estimate if a Garmin GPS receiver is used.
- Accuracy.GPS Speed
-
GPS's speed accuracy.
- Format: integer (ft/s or m/s depending on the current unit system).
- Default: 4
- Accuracy.Minimum drag
-
The minimum movement required to initiate a drag.
- Format: integer (pixels)
- Default: 5
- Accuracy.Mouse
-
The size of the street or place selection search area.
- Format: number of pixels
- Default: 20
- Comment: On a mouse click, RoadMap defines the street search area
as the rectangle delimited by the two points
(x-accuracy, y-accuracy) and (x+accuracy, y+accuracy).
Limiting the search to this area speeds up the process,
compared to searching in the whole screen area.
- Accuracy.Street
-
The street selection accuracy.
- Format: integer (using the current unit system).
- Default: 150
- Comment: This is the maximum distance to a street for the
navigation logic. If a street is at a distance greater than
this value, then RoadMap will never consider this street
when searching which street the vehicle is on.
- History.Depth
-
The maximum number of items in the "Find" history.
- Format: integer
- Default: 100
- Approach.Background
-
Reserved for future use (approaching waypoint).
- Approach.Foreground
-
Reserved for future use (approaching waypoint).
- Approach.Text
-
Reserved for future use (approaching waypoint).
- Download.Source
-
The format used to generate the URL of the source.
- Format: printf() format, which must include the sequence "%05d".
- Default: /usr/local/share/roadmap/usc%05d.rdm
- Comment: This item is either a full path name (starting with a '/')
or an URL (such as "file:[...]" or "http:[...]").
- Download.Destination
-
The path of the directory where to store the
downloaded map files.
- Format: string
- Default: &/maps
- Comment: This item must be either a full path name or start with
'~' (user home directory) or '&' (RoadMap user's directory).
- Style.Use Pretty Lines
-
If "yes", roads are shown with all the defined
pens (see schema). If "no", roads are shown with the first pen only.
- Format: boolean
- Default: "yes"
- Style.Pretty Lines when Dragging
-
If "yes", roads are shown with all the
defined pens when dragging (if enabled--see above). If "no", roads
are shown with the first pen only while dragging.
- Format: boolean
- Default: "yes"
- Style.Show Objects when Dragging
-
If "yes", objects are shown when
dragging. If "no", objects are not shown while dragging. Objects
are the sprites, text messages, etc..
- Format: boolean
- Default: "yes"
== Session Items ==
- Location.Position
-
The latest selected position.
- Format: longitude ',' latitude.
- Default: -122394181,37794928
- Comment: The name of this item is kind of silly, to be changed.
- Command line option: --location=<LONGITUDE>,<LATITUDE>
- GPS.Position
-
The latest received GPS position.
- Format: longitude ',' latitude.
- Default: -122394181,37794928
- GPS.Direction
-
The latest received GPS direction.
- Format: degrees
- Default: 0
- Selection.Position
-
The position of the latest selection.
- Format: longitude ',' latitude.
- Default: -122394181,37794928
- Address.Position
-
The position of the latest address used.
- Format: longitude ',' latitude.
- Default: -122394181,37794928
- Trip.Name
-
The name of the last used trip file.
- Format: string
- Default: default
- Delta.X
-
The horizontal map shift compare to the reference position.
- Format: number of pixels
- Default: 0
- Delta.Y
-
The vertical map shift compare to the reference position.
- Format: number of pixels
- Default: 0
- Delta.Rotate
-
The rotational shift compare to the reference direction.
- Format: degrees.
- Default: 0
- General.Zoom
-
The current zoom level.
- Format: number
- Default: see the default zoom preference item.
- Focus.Rotate
-
Indicate if the current map focus is set to rotate.
- Format: boolean (1 or 0)
- Default: 0
- Focus.Name
-
Name of the reference position where the focus should be set.
- Format: either "GPS", "Location" or "Address"
- Default: "Location"
- Navigation.Enable
-
Controls whether navigation mode is enabled.
- Format: boolean
- Default: "yes"
- Comment: When enabled, the navigation logic will announce the
names of the current and approaching streets. See also
Accuracy.Street.
- Voice.Mute
-
Defines if the voice function was muted by the user.
- Format: boolean
- Default: "no"
- Hold.Direction
-
An artefact of saving the context. Ignored.
- Hold.Position
-
An artefact of saving the context. Ignored.
- Log.Path
-
Last selected path for the RoadGps log files.
- Format: a directory path.
- Default: /var/tmp
- Events.Right Click
-
The name of the menu to open on a mouse right click.
- Format: string
- Default: Right Click Popup
- Events.Long Click
-
The name of the menu to open on a mouse long click.
- Format: string
- Default: Long Click Popup
(*) NOTE: the default position values match 1 Market St, San Francisco, CA.
Schema Items
The schema file uses the same format as the preference file. It defines
the properties of the various categories of objects that make a map.
the list of categories matches the list of Tiger file's categories
(see Tiger's CFCC field) that have been filtered by buildmap.
The two differences with the preferences files are that there is no
pre-defined category in RoadMap: categories are defined by the maps
(FIXME: this is still to be done--as a temporary hack, the categories
have been hardcoded somewhere) and there is no default value.
For each category, RoadMap use the following items:
- <category>.Class:
-
the class of object this category belongs to.
- Format: Road, Feature or Area.
- Comment: Road and Feature categories are searched in the "line"
table of the map files and drawn as lines. The Road
category is searched when a street name is looked for.
The Area objects are drawn separatly, as polygons.
- <category>.Color:
-
the color used when drawing the objects.
- <category>.Declutter:
-
the zoom level from which the objects are hidden
- Format: integer
- Comment: The definition of this item is rather obscure. To be fixed.
- <category>.Thickness:
-
the thickness used to draw lines.
RoadMap uses the following categories:
- Freeways
- Ramps
- Highways
- Streets
- Trails
- Rivers
- Shore
- Hospitals
- Malls
- Airports
- Stations
- Lakes
- Parks
- Sea
Sprites
This file defines the drawing commands used to draw the various symbols
used by RoadMap:
- GPS (indicates the current GPS position and direction),
- Position (indicates the currently selected location),
- Destination,
- Highlight (marks the endpoints of a selected street block) and
- Compass (used to indicates the direction of the North pole).
The sprites file is made of a sequence of single-line commands:
S <name> |
Starts a sprite. |
A <name> |
Defines the current sprite as an alias of |
|
the specified sprite. |
F <color> <thickness> |
Define the pen to be used by the subsequent |
|
drawing commands. |
X <percent> |
Optional scale factor for this sprite. All |
|
components of the sprite will be adjusted. |
L <x>,<y> .. |
Draw a line. |
P <x>,<y> .. |
Draw a filled polygon. |
C <x>,<y> <radius> |
Draw a circle. |
D <x>,<y> <radius> |
Draw a disk (filled circle). |
B <x>,<y> <x>,<y> |
Optional -- the bounding box used to determine |
|
whether a selection has taken place, when a |
|
a sprite is in use as an on-screen object (in |
|
"roadmap.screenobjects"). Normally the |
|
bounding box is calculated by RoadMap itself, |
|
but irregularly shaped sprites, combined with |
|
the rotation of the sprite, may require that |
|
the box be overridden. |
T <x>,<y> <s> text... |
Adds text to the sprite, of size 's'. "text" |
|
can be ommitted, in cases where the sprite's |
|
text will be provided by a screen object |
|
definition. Text strings are fixed, with no |
|
expansion of %-macros. |
TR |
If the sprite has text, supply a backing |
|
rectangle sized and positioned to match the |
|
text. |
TB |
If the sprite has text, supply a box outline |
|
around the text. |
The coordinates are pixel positions, relative to the sprites "hot point".
The "natural" direction for the sprite, for pointing purposes is to the
north. Positive X and Y values are towards the east and south, negative
are towards the west and north.
The bounding box of a sprite is normally calculated internally, but can
be overridden. If a sprite has text associated with it, the text forms a
second, separate, bounding box. This is because the text may change
shape (if it's dynamically produced), and because sprites tend to be
compact, while text tends to be long and thin. Currently these bounding
box outlines are only used when a sprite is referenced in
"roadmap.screenobjects". The sprite's bounding box can also be
overridden there.
An S command must appear before any alias or drawing command.
A sprite cannot contain both an alias command and drawing commands. In
addition, if an alias command is present, it is the only command defining
this sprite (i.e. an alias sprite is defined by just one S and one A
command). For example:
S Friend
A GreenTriangle
S GreenTriangle
F white 2
L 0,0 7,14 0,8 -7,14
F DarkGreen 2
L 0,1 6,13 0,10 -6,13 0,1
A sprite alias is just another name for the referenced sprite: an alias
will be visually identical to the sprite it references. An alias command
can reference a sprite that is itself an alias. There is no limit to
the depth of the alias chain, but circular references are illegal, and
detected. Forward references are legal, i.e. the sprite referenced in
an alias command can be defined later in the file.
One reason for using alias sprites is to make it simpler to redefine
sprites known to RoadMap (such as "Direction" or "Destination"). The
alias mechanism has a negligible fixed cost at runtime: using multiple
alias levels will have no practical impact on RoadMap performances.
Trip Files
RoadMap trip data is stored in GPX format. More about the widely-used
GPX data format can be found at:
http://www.topografix.com/gpx.asp
The main thing to know about this format is that a GPX file
may contain one or more "routes", one or more "tracks", and
one or more "landmarks".
Routes and tracks are very similar: it's most useful to
think of a route as "where you want to go", and a track as
"where you've been". Routes are usually "composed", either
manually or using navigation software. Tracks are usually
recorded, by making a note of one's GPS location
periodically. (By the way, tracks don't get included into
trip files automatically. If you wish to store your tracks
along with your routes for a given trip, you'll need to save
copies of your current track and them to the trip.)
Routes and tracks are both composed of "waypoints". To
reduce confusion, RoadMap tries to use the term "waypoint"
to _only_ refer to points which are contained in routes and
tracks. Points that are unassociated with a specific route
or track are called "landmarks". If you read the GPX
documentation you'll find that everything is called a
waypoint.
Waypoints simply represent a place, along with some other
information about that place. For instance, a waypoint in a
route might have a name, and it might also have a comment
attached to it which says which way to turn when this
waypoint is reached. A waypoint in a track might only
contain its location and the time at which you were there.
The landmarks in the trip file might represent places of
interest which, while not really part of a route, are
related to the trip somehow.
Here are some more details regarding how RoadMap uses the GPX
format.
Waypoints (and landmarks):
<name> is used directly if available.
If no name is available, a shortened version of the <cmt>
or <description> element will be used instead. If
neither of these elements is available, a name will be
generated.
In addition, if no <cmt> is available, the <description>
element will be used as a description.
The <sym> element will be used as the sprite name, if it
is set, otherwise fixed RoadMap defaults will be used for
the spritename, depending on what sort of waypoint it is.
When generating a waypoint while recording a track,
RoadMap will set the <ele>, <speed>, <course>, and <time>
elements, as well as the "lat" and "lon" attributes. All
of this data comes directly from the GPS. The <name> and
<sym> elements are left unset.
Routes and Tracks:
The <name> and <desc> elements will be used and set. For
tracks, the <trkseg> level of the hierarchy is ignored --
all track segments are treated as one.
The following trip file example contains just one route,
which goes from the Golden Gate's bridge to 1 Market St, in
san Francisco, California. It also contains the locations
of some nearby pizza parlors:
<?xml version="1.0"?>
<gpx version="1.1">
<rte>
<name>198 Richardson Ave to 1 Market St</name>
<rtept lat="37.8003" lon="-122.44703">
<cmt>Head southeast from Richardson Ave</cmt>
</rtept>
<rtept lat="37.79879" lon="-122.4446">
<cmt>Bear left at Lombard St</cmt>
</rtept>
<rtept lat="37.79901" lon="-122.44265">
<cmt>Turn right at Divisadero St</cmt>
</rtept>
<rtept lat="37.78336" lon="-122.43948">
<cmt>Turn left at Geary Blvd</cmt>
</rtept>
<rtept lat="37.78529" lon="-122.42467">
<cmt>Bear right at Ofarrell St</cmt>
</rtept>
<rtept lat="37.78678" lon="-122.40458">
<cmt>Turn left at Market St</cmt>
</rtept>
<rtept lat="37.79444" lon="-122.39487">
<cmt>Arrive at destination</cmt>
</rtept>
</rte>
<wpt lat="37.792612" lon="-122.393843">
<name>Village Pizzeria</name>
</wpt>
<wpt lat="37.793392" lon="-122.397554">
<name>Parkway Pizza</name>
</wpt>
<wpt lat="37.789001" lon="-122.394843">
<name>Dogzilla Cafe</name>
</wpt>
</gpx>
In addition to the trip files, there are two other important
files which are also stored in GPX format.
- Personal Landmarks
-
Called "landmarks.gpx" by default, this contains
landmarks (waypoints) which you might want to keep handy
no matter what trip file you have loaded. Examples might
include your home, your office, your hairdresser, etc.
When writing this file, only the personal landmarks are
written. When reading, only the unassociated waypoints
are read -- any routes or tracks in the file are ignored.
- Current Track
-
Contains waypoints representing where you've been -- a
"breadcrumb trail", if you will. This file (called
"currenttrack.gpx" by default) will only contain a single
track when written. When read (on startup, to restore
previous state), only the first track in the file will be
read. All other routes or tracks and waypoints will be
ignored (and likely lost, when the current track is saved
at the end of the session). Along with the
currenttrack.gpx, you may see "recenttrack.csv", and one
or more "savetrack-*.gpx" files (which will include a
date in their names). The "savetrack" files are archival:
if the in-memory list gets too big, or if the user
"clears" the current track, then excess historical
trackpoints will be written to a "savetrack" file. A
"savetrack" file will also be created if you manually
reset the current track -- a backup of its contents is
saved, for good measure. The "recenttrack.csv" file is a
temporary file, used to keep RoadMap from losing any
track points in the event that it dies (crashes)
unexpectedly. The goal is to never lose a track point.
(These files are not stored in the same directory as the other
trip files, but instead in the same directory in which the
user's preferences and session file are found.)
Feature Files
Like the RoadMap trip data, feature data is stored in GPX format. Each
feature file should represent a related set of points of interest, like
ice cream shops, motels, campgrounds, or mountaintops. A single sprite
can be associated with each file, and will be used to represent its
contents on the map. Features will be labeled using the pen color
specified. Either or both of the sprite and label can be suppressed by
specifying the name "NONE". Feature labels and sprites can also be
selectively disabled as the map is zoomed out. An example feature file
specification, which uses ';' as its delimiter, might be:
&/icecream.gpx;ConeSprite;darkblue;350;750
This says that the ice cream shops listed in the given file should
be drawn with the ConeSprite, labeled with a "darkblue" pen, the labels
should be eliminated above zoom level 350, and the sprites should
disappear above zoom 750. Likewise:
&/towns.gpx;NONE;black;350;350
says that towns should be labeled in black, with no sprite, up to
zoom level 350. If a higher sprite declutter level is specified:
&/towns.gpx;NONE;black;350;1000
then a small default sprite (with the name "PointOfInterest") will be
shown, up to the higher level.
Multiple file specifications (including each file's associated (and
semicolon-separated) sprite name, pen color, and declutter levels)
should be separated by ',' characters.
Note that unlike the maps, which are read and cached on an as-needed
basis, the feature files are read into memory in their entirety when
RoadMap starts, so there is a memory penalty for using large feature
files.
Configuration Examples
~/.roadmap/preferences ("factory" defaults):
Accuracy.GPS Speed: 4
Accuracy.Confidence: 25
Accuracy.Street: 150
Accuracy.Mouse: 20
Accuracy.Minimum Drag: 5
Approach.Background: yellow
Approach.Foreground: black
Approach.Text: Approaching %N, %C|Approaching %N
Console.Background: yellow
Console.Foreground: black
Current Street.Background: yellow
Current Street.Foreground: black
Current Street.Text: %N, %C|%N
Destination.Color: red
Display.Bottom Left: %S
Display.Bottom Right: %D (%W)|%D
Display.Top Right: In %Y, %X|%X
Display.Duration: 10
Display.Rotate: yes
General.Default Zoom: 20
General.Keyboard: no
General.Toolbar: yes
General.Icons: yes
General.Unit: imperial
Geometry.Main: 800x600
Geometry.Preferences: 800x300
GPS.Background: LightYellow
GPS.Color: red
GPS.Foreground: black
GPS.Source: gpsd://localhost
GPS.Timeout: 10
History.Depth: 100
Map.Path: ~/.roadmap,/var/lib/roadmap,/usr/lib/roadmap
Map.Cache: 8
Map.Background: LightYellow
Map.Refresh: normal
Map.Signs: yes
Polygons.Declutter: 1300
Selected Street.Background: yellow
Selected Street.Foreground: black
Selected Street.Text: %F
Shapes.Declutter: 1300
Voice.Approach: flite -t 'Approaching %N'
Voice.Current Street: flite -t 'On %N'
Voice.Next Intersection: flite -t 'Next intersection: %N'
Voice.Selected Street: flite -t 'Selected %N'
~/.roadmap/session ("factory" defaults):
Delta.Rotate: 0
Delta.Y: 0
Delta.X: 0
Focus.Rotate: 0
Focus.Name: Address
Trip.Name: default.gpx
Hold.Direction: 0
Hold.Position: 0,0
Selection.Position: -122394181,37794928
Address.Position: -122394181,37794928
GPS.Direction: 0
GPS.Position: 0,0
General.Zoom: 150
Using OpenStreetMap Maps
This information is preliminary, since OSM support is
work-in-progress. It does work, but may change in detail.
- Indexed maps
The maps that RoadMap renders come from several sources (TIGER, various
shapefile formats, OpenStreetMap). They all need to be indexed for use
by RoadMap for several reasons. First, we don't want to overload RoadMap
to be with several ways to interpret the same data. Second, there's not
always a direct mapping between the coordinates on the screen where
RoadMap is trying to displaya map, and the name of the map file(s) that
contain(s) information for that region.
- File name formats
The map files are named in a way that depends on how the data was
obtained and therefore, how the data is organized. A map file called
"usc25027.rdm" contains contains data from county 27 in state 25). A
map file called iso-be.rdm contains the whole country "be". A third
map file format is based on QuadTiles.
The files contain some information that RoadMap can use to figure out
where it is -- an index is made using this information so that RoadMap
doesn't need to continually look in all the files. That index is
currently called "usdir.rdm".
- QuadTiles, RoadMap tileid values, and filenames
If the name of the file holding the map data encoded its position and size
somehow, then an index wouldn't be needed (at least for positioning --
there are other reasons an index is useful, but none are as critical to
rendering). For maps whose data source is organized by geography (i.e.,
latitude/longitude) rather than politics (i.e. country name), it's
possible to do such an encoding.
The encoding used by RoadMap for OpenStreetMap (OSM) maps is known as
"quadtile" encoding. There's a good description of quadtiles as they
relate to OSM on the OSM wiki, here:
http://wiki.openstreetmap.org/index.php/QuadTiles
(There's also a more general article on Wikipedia.) The OSM quadtile
scheme uses a full 32 bits worth of addressing in a "tileid", and can
reference tiles as small as 600 meters on a side (at the equator --
they're narrower further north and south). RoadMap doesn't need such
fine-grained resolution, and uses fewer bits for RoadMap tileids. This
frees those bits to be used for other purposes, and RoadMap uses only 27
bits to address quadtiles (the smallest addressable tile is about 2.4km on
a side). Of the 5 bits remaining in a 32 bit word, RoadMap uses one bit
internally to distinguish a tileid from one of the "FIPS" county
identifiers that represent RoadMaps other maps, and the other 4 are used
to encode how many bits of the 27 address bits are currently in use -- the
4 bits are used to represent "bit count" values of 12 through 27, maximum
and a minimum tile sizes that RoadMap can handle of from 2.4km up to 320km
on a side.
The encoded RoadMap tileid is used directly to form the filename
representing the data for that OSM quadtile. The tileid is represented in
hexadecimal. The lowest 4 bits (the least-significant hex digit) is 12
less than the bit level -- so a 19 bit tile would have a '7' in that
digit. The OSM quadtile value appears in the other 7 hex digits. Its
value is "left-justified" -- i.e., as more bits are added to the quadtile
address, the address grows to the right.
As an example, to RoadMap encoding of the 19 bit OSM quadtile id of
251833, would be 0x3d7b9007. (251833 is 0x3d7b9 in hex).
- Fetching OpenStreetMap data by QuadTile
OSM map data is available from servers on the web, using a simple API. As
simple as it is, though, it can produce a lot of data in XML format, very
quickly. While it might not be a problem for desktop systems with
high-speed connections, if RoadMap is to be able to do on-demand loading
of OSM data, an alternative protocol is preferable. Conveniently, work
has already been done to specify just such a compact profile. Known as
the "OSM Mobile Binary Protocol", it is documented here:
http://wiki.openstreetmap.org/index.php/OSM_Mobile_Binary_Protocol
Roadmap comes with code which can provide data in this format, which can
be run in two different ways: either as a a command-line program, or as a
proxy server implemented as a CGI script. The two programs share most of
their code, and are written in PHP.
Converting the "Mobile Binary" data to a format useable directly by
RoadMap is handled by the command "buildmap_osm". Given some information
about position and area, the size of the quadtiles desired, and the source
of the data, buildmap_osm will produce the RoadMap .rdm files necessary
for displaying that region.
buildmap_osm can be given two lat/lon pairs, to specify a bounding box, or
a single lat/lon pair plus a radius in miles or km (it's not really a
radius -- the distance again actually describes a square bounding box).
The size of the quadtile to fetch is specified in "bits" (see the previous
section), and the source of the data is specified either as the PHP
"osmgetbmap" command, or as a URL referring to an installed version of the
PHP cgi script.
A sample command looks like:
buildmap_osm -m /tmp/maps -s osmgetbmap 48.135,17.125:20km
which will fetch 40 km square worth of maps centered on Bratislava. Using
the web proxy, the same request might look like:
buildmap_osm -m /tmp/maps -s http://localhost:801/cgi-bin/bmap.php \
48.135,17.125:20km
- Fetching OpenStreetMap data in large chunks
The OpenStreetMap servers only allow obtaining a limited amount of map
info per query. Access via the OSM Mobile Binary Protocol is subject to
such limitations.
Other services (e.g. http://download.geofabrik.de/osm/europe/) provide
access to large chunks of OSM data in a single file, e.g. a file per
country, like the maps used in many commercial GPS devices.
The buildmap_osm command was extended to be able to process those files.
A sample command looks like
buildmap_osm -i iso-be.osm -o iso-be.rdm
which will convert one file into the other.
The file name format is twofold : iso-xx.rdm or iso-xx-yyy.rdm . The former
is a file per country (xx is the ISO two-character code for the country).
The latter format allows for country subdivisions (yyy is a subdivision of
country xx). The codes xx and yyy are defined in the ISO-3166-1 (country)
and ISO-3166-2 (country subdivision). Note that the latter is incomplete.
- Limitations
- Because the OSM maps are loaded based on geographic location, they
currently have no notion of political locality. This means that
searching by address or intersection can't currently work.
- There's no way currently to do on-demand loading of OSM maps. Work
needs to be done to integrate a buildmap_osm "method" into RoadMap's map
download scheme.
- When a tile is fetched, it will include all roads (and other lines --
"ways" in OSM parlance) which start or end in that tile. This leads to
two interesting issues:
- The true bounding box of the data in a fetched tile is probably not
going to line up with the presumed dimensions of that tile. The
bounding box may be smaller (if there is very little data, all within
the bounds of the tile), or larger (as a result of roads and other
features extending past the tile "boundaries").
- When a neighboring tile is fetched, it may include the same line, if
the other end of the line is in that tile. In order to reduce the
amount of duplicated data, when tiles are fetched via the "mobile
binary" protocol, we tell the server that we already have tiles to the
south and east, but not to the north and west. This way, if you load
a full set of tiles, you should get just one copy of any line. The
osmgetbmap code, however, doesn't do a perfect job of figuring out
what not to give you based on what you say you already have, so you
may get duplicated data, particularly around the edges of the area
requested. The order in which RoadMap fetches tiles might need to be
changed to help with this problem, as well.
- Because tiles can provide overlapping data, map rendering near the edges
of tiles can be somewhat messy -- the lines on one tile may be
rendered before the polygons of the next, for instance, and labels
placed when rendering one may collide with labels placed when
rendering the next. For this reason, tiles should be kept fairly
large -- RoadMap already has the means to make rendering relatively
large areas efficiently. The only reason to choose small tiles is to
reduce "latency" when requesting data on-demand.
Building Maps
To build the TIGER map files from scratch:
- download some maps from the US Census bureau:
http://www.census.gov/geo/www/tiger/tiger2006se/tgr2006se.html
This download can be automated by using the shell script
roadmap/src/rdmdownload:
rdmdownload <tiger-path> [<state-symbol> ..]
(To download older versions of the maps (e.g. 2000), see the
script for the options available.)
- Build the maps:
rdmgenmaps <tiger-path> maps=<map-path>
This command processes all the Census Bureau files found in <tiger-path>
and creates the map files for RoadMap in the <map-path> directory.
There is one map file generated for each county. Alternately, specific
counties can be built. Counties are identified by their FIPS codes
(e.g. 06075 for San Francisco, CA).
rdmgenmaps <tiger-path> [maps=<map-path>] <county fips code> ..
The rdmgenmaps command can also process one full state at a time:
rdmgenmaps <tiger-path> maps=<map-path> <two-letter state abbreviation>
The rdmgenmaps tool is a shell script that extracts the TIGER files from
the downloaded ZIP files, invokes the buildmap tool and then cleans up
the TIGER files. Last, rdmgenmaps invokes the buildus tool to generate
the US states and counties catalog. The main purpose of rdmgenmaps is
really to keep the TIGER files in compressed form, considering their
huge size..
The buildmap tool is the worker program used by rdmgenmaps. It
takes a county "FIPS" code and a TIGER file as input and produces one
RoadMap .rdm map file. The option --help gives more information about
the available options.
Here is an example:
buildmap 01001 /tmp/TGR01001.RT1
The buildus tool creates a catalog of maps that is used by RoadMap
to combine all states and counties into a giant US map.
Map Utilities
RoadMap comes with a small set of utility programs and scripts which
are used to build and maintain the map data files that roadmap uses.
- buildmap
-
buildmap takes various input map formats as input and
produces the map files used by roadmap. This program
is only used to prepare the map files and is not
needed when running roadmap.
- buildus
-
buildus takes a set of roadmap map files and creates a
directory file that lets roadmap choose the map(s) to
display according to location or city. buildus is not
needed when using roadmap -- only when preparing the
maps.
- rdmgenmaps
-
A script to simplify the generation of the maps.
- dumpmap
-
Display the data tables from a map file. This application is used
for debug purposes only and is not needed when using roadmap.
A RoadMap map file is a small database of C tables. The tables are
organized in a tree fashion and each table is identified by a path.
One specific set of tables (the dictionary) groups all the names
that appear in the map.
dumpmap can be used to display information extracted from a map file:
dumpmap [--usage] [-d TABLE] [--strings] [--volume=NAME] [--search=NAME]
The name of map files must be provided after the options: dumpmap
will process each provided file sequentially, according to the
options that was selected.
See the "Map Format" section of the documentation for more
information about the format of the maps.
RoadMap Navigation
Navigation support is work in progress.
It requires maps that have been built with a new version of buildmap
(or buildmap_osm) because this new version will add a couple of tables
to the map.
Navigation support needs to be compiled in, see "Building". RoadMap will
show an additional menu labelled "Navigate" when this code is compiled in.
- Building RoadMap with Navigation Support
Set USE_NAVIGATE_PLUGIN = yes in config.mk and run "make".
The Makefile dependency rules should cause a recompile of the right files.
If that doesn't happen, please rebuild the dependencies with
"make depends".
- Use of RoadMap Navigation
Use one of the new buttons in the Trip -> Places -> Personal Landmarks
dialog to specify both Departure and Destination.
Then say Navigate -> Navigate.
A dialog should then appear saying how far you'll travel, and how much
time it'll take to travel there. The route is also drawn.
On my Linux PC, calculating the route is almost instantaneous for short
trips, on my PDA it takes a bit longer.
The next step isn't there yet (working on that) : RoadMap should do
sensible things when it notices that you're following the route.
Also route calculation isn't what it should be, I need to look at the
algorithm, it makes the strangest moves :-)
Maps for Navigation
In order to support navigation, several extensions were made to the
RoadMap map format :
- Line By Point table
This allows you to query which lines start or end at a given point.
- Turn restriction table
This allows you to specify that some turns aren't allowed.
There's no buildmap support for this feature yet, meaning none of
our maps currently contain this table.
- Oneway street and layer table
This table has an indication whether a street is "oneway" only, and
it also stores the layer (type of street). The layer info was in
another map table already (RoadMap used it) but it was stored in a
way which made access to it slow.
All of these additions are exactly that : there's more info in the maps,
but the existing tables aren't changed in any way.
This means that old maps still work for RoadMap, just don't try to use
navigation with them.
Both buildmap (Tiger) and buildmap_osm (OpenStreetMap) have been extended,
both kinds of maps will support navigation.
You'll find that the maps are substantially bigger than before.
The line by point tables can use another round of space optimisation,
this awaits understanding of the hashing.