This page is a subset of the information contained in the file README.MAPS of the Xastir distribution. It is not kept rigidly in sync with that file, nor does it contain all of the information in that file.
To find the real README.MAPS, please look in the source directory for Xastir, or in the installation directory ${prefix}/share/doc/xastir where "${prefix}" is usually /usr/local, but could also be /usr if you installed xastir from a binary package.
If you compiled with ImageMagick and have wget or libcurl installed, you can use the online OpenStreetMap/Terraserver maps exclusively. However, having maps on your computer is often faster than transferring images over the Internet, and is not subject to network failures. See the section below on map caching for an exciting feature that works with most online maps to really speed things up!
Xastir isn't of much use unless you can display data in relation to geodetic information of the Earth. The developers have gone out of their way to provide the ability to use many map formats, as well as ways to make your own maps for use within Xastir. Fortunately, Xastir comes out of the box with the ability to display many map formats. Below is a list of the many types of map formats and the associated library packages needed to view them.
Map Type: Libraries Required/Notes:
--------------- -------------------------
DosAPRS Built-in.
WinAPRS Built-in.
X-APRS Built-in.
MacAPRS Built-in.
PocketAPRS Built-in.
USGS GNIS Built-in. Can split into county-sized chunks using xastir/scripts/split_gnis.pl to speed things up.
Address Lookup Built-in.
Weather Alerts Shapelib
pre-2003 Tigermaps Shapelib
post-2003 Tigermaps Shapelib, pcre
ESRI Shapefiles Shapelib
Image Maps ImageMagick. Often need lcms library and others as well (whatever it takes to make ImageMagick
happy). Can also use the XPM library for some image types without installing ImageMagick.
Internet Maps ImageMagick plus wget or libcurl. Often need lcms library and others as well (whatever it
takes to make ImageMagick happy).
UI-View Maps Convert from .INF to .GEO format using xastir/scripts/inf2geo.pl
OziExplorer Maps Convert some maps to .GEO format using xastir/scripts/ozi2geo.pl
USGS DRG Topo libtiff, libtiff-devel, libproj, libgeotiff
USGS SDTS GDAL/OGR. Preliminary.
MapInfo GDAL/OGR. Preliminary.
Tiger/Line Raw GDAL/OGR. Preliminary.
Microstation DGN GDAL/OGR. Preliminary.
S57 GDAL/OGR. Preliminary.
The recommended configuration of Xastir allows to use of many of these map formats.
Minimum: Shapelib, pcre
Allows use of all built-in map types plus 2003 (and later) Tigermap data, shapefile weather alerts, and local ESRI Shapefile format
maps, including U.S. satellite/image/topo maps via Internet.
Medium: Shapelib, pcre, lcms, ImageMagick, libcurl/wget,
Allows use of all the above plus Internet maps and local image maps.
Maximum: Shapelib, pcre, lcms, ImageMagick, libcurl/wget, libtif, libproj, libgeotiff
Allows use of all the above plus USGS topo maps.
Bleeding edge: GDAL/OGR
Adds more map types, but they're not fully supported yet. You can certainly get some use out of them though, like overlaying
SDTS contour vectors on top of terraserver satellite images.
Minimum: lcms, ImageMagick, libcurl/wget
Allows use of all built-in map types plus local and Internet image maps, including Canadian topo maps via Internet.
Medium: lcms, ImageMagick, libcurl/wget, Shapelib, pcre
Allows use of all the above plus ESRI Shapefile maps.
Maximum: libproj, libtiff, libgeotiff, GDAL/OGR
Adds more map types. Some of these may not be useful in your part of the world. GDAL/OGR stuff is not fully supported yet.
You can have any number of maps in the /usr/local/share/xastir/maps directory. You can organize the maps however you like. You can also use symbolic links to link to files/directories on other disks. Map files are loaded in the order that they appear in the chooser unless you adjust the layering priorities in the "Properties" dialog (it's recommended that you use these now instead of a directory hierarchy to choose the layering).
There are many methods for organizing many maps. Create a map hierarchy using something that makes sense to you. The old method of creating transparent/filled or raster/vector directories has been superseded by the new map layering features in the Map Chooser->Properties dialog. It's now suggested that the map layering be done there, and the directory layout designed to make it easiest for the user to select maps. Perhaps a good start would be:
World/
Canada/
Canada/Province/
USA/
USA/State/WA/
USA/State/WA/County/
...
GNIS/
Overlay/
Please note that the map directories are entirely up to the user now. Use the map layering facilities (Map Chooser->Properties) to determine the order in which they will be drawn, and to determine which will draw filled areas. Note that raster maps will always draw filled, it doesn't matter what the setting suggests. For vector maps, you have a choice of:
Fill = No Polygons will never be filled Fill = Yes Polygons will always be filled Fill = Auto Polygon fill is determined by map (or if it's a Shapefile, by any associated dbfawk file).
Vector Format:
.shp/.shx/.dbf Shapefile vector map (need all three files) .pdb PocketAPRS vector map .map APRSdos/WinAPRS/MacAPRS vector map .gnis GNIS labels file (actually points instead of vectors) .geo Vector map or Internet vector map. Note that for http/ftp-based maps Xastir requires an IMAGESIZE line.
Raster Format:
.tif/.fgd geoTIFF raster image map .geo Raster image map or Internet raster image map. Note that for http/ftp-based maps Xastir requires an IMAGESIZE line.
Note: ".geo" is listed twice because it can fit in both categories, depending on the base format of the map file that the .geo file points to. .geo files are handled by the XPM library or by ImageMagick, so most anything that can be handled by those installed libraries can by handled by Xastir.
Online maps are downloaded on-demand, based on the current map view and zoom level. They require an Internet connection, however map tiles are cached so once loaded, they will be available from local disk.
Online map functionality includes support for OpenStreetMaps (streets and trails) and TerraServer (arial and topo) images. Just open the map chooser and look for the "Online" directory, then select the desired maps.
Please note THE ONLINE TIGERMAPS NO LONGER WORK. They are permanently gone (the service has been discontinued at tiger.census.gov), however OpenStreetMaps have replaced them. You will need to acquire and compile the latest CVS version for full OSM support. Tiger/Line shapefiles are still available and supported, see below for instructions on downloading them.
Offline maps are stored locally on your computer, so no Internet connection is required for normal use.
See also: Major_Features
Lots of links to downloadable maps: Xastir Maps
Dos/Win/MacAPRS style vector/fill maps:
WORLDHI.MAP is suggested as a basic view of the world map.
You can use any of the other maps available from this site. Many of these were created from Tiger/Line maps, but they are several years out of date. It is suggested that you don't use these as your primary street-level maps; the newer shapefile-based maps are usually preferable. In cases where you cannot compile shapefile support, these maps suffice.
The WinAPRS 2.51 distribution included the full collection of PocketAPRS vector maps for the USA. The download is about 60MB, from the TAPR ftp site.
ftp://ftp.tapr.org/aprssig/winstuff/WinAPRS/waprs251.zip
For Canada theres a country wide set of topographic map images available from the "Department of Natural Resources Geomatics Canada". Running /scripts/toporama250k.pl will pull down 430mb of 1:250k map images from that departments site. If thats not enough data, running /scripts/toporama50k.pl will pull down around 10gigs.
For Ireland, EI8IC (http://www.mapability.com) has produced a set of overlay maps that show the County Borders, Main Towns and Roads. John, EI7IG, has created a set of ".geo" files to go with them and they are all available in one tarball from ireland.aprs2.net They are free for non-commercial use.
Also available are a map of the country, with an associated geo file, the South East, it's associated geo and a Weather Radar .geo file.
Shapefile format maps are slowly becoming the standard vector format of maps used with Xastir. Xastir 1.3.2 and above by default enable dbfawk support for parsing shapefile metadata, see below.
A nice world map is available at http://aprsworld.net/gisdata/world/ thanks to James Jefferson, TerraSpace, Russia, and the Digital Chart of the World (for Antarctica). Note that this file is currently available only in uncompressed or in tar/bzip2 format. To decompress the latter file, you'd type "bunzip2 filename" and then "tar xvf filename" (or tar xvfj <filename>).
If you also use GeoTIFF images, get the handy usgs_24kgrid.zip file from http://data.geocomm.com/quadindex/. This file provides a grid of all of the 7.5' maps and their names for the U.S. A nice world map is available at http://aprsworld.net/gisdata/world/ thanks to James Jefferson, TerraSpace, Russia, and the Digital Chart of the World (for Antarctica). Note that this file is currently available only in uncompressed or in tar/bzip2 format. To decompress the latter file, you'd type "bunzip2 filename" and then "tar xvf filename".
http://www.bts.gov has the "National Transportation Atlas" that you can download pieces of (at least for the larger layers) or ask for (free) CD-ROM's to be mailed to you.
Some other shapefile format maps are available at: http://www.nws.noaa.gov/geodata/
Still other shapefiles are available from esri.com, geographynetwork.com and gisdatadepot.com (from their "free data" link). Lots of useful stuff at these sites, just look around. You can also check with your County GIS office for shapefiles of your county. You can convert them from State Plane to Lat/Long projection using instructions later in this document.
Canadian street maps in Shapefile format are available at http://www.geobase.ca
Recent versions of Xastir have the ability to display Tiger/Line 2008 and 2009 ESRI format maps. The latest CVS should provide all of the files needed except for the maps themselves. You will need dbfawk support compiled in.
The most recent release of the data is Tiger/Line 2009. Here are instructions for obtaining a single county's worth of files, extracting the maps, and configuring them for use in Xastir. Instructions for HowTo:MAPS:OldTigerLine are also available.
Go to ftp://ftp2.census.gov/geo/tiger/TIGER2009 with a browser. Use this to find the name of the directory for the state and counties you are interested in. Most of the files are not practical for use with Xastir, so we'll only get a subset.
Create a directory for your state, then store your desired state and county names in a pair of variables (change the parts in italics as desired):
mkdir -p ~/tiger2009/MN
cd ~/tiger2009/MN
STATE="27_MINNESOTA"
COUNTIES="27003_Anoka_County 27123_Ramsey_County 27053_Hennepin_County"
Once that's done, the "for" loop can be cut and pasted into your shell to get the files we want from each county and unzip them:
for county in $COUNTIES; do
mkdir -p $county
cd $county
for file in edges areawater pointlm arealm; do
wget "ftp://ftp2.census.gov/geo/tiger/TIGER2009/$STATE/$county/*$file*"
unzip *$file*.zip
rm *$file*.zip
done
cd ..
done
You should now have a set of directories for each county, each containing edges, water features and points/areas of interest.
As an alternative, you may download an entire state with the following commands (replace STATE below with the desired NN_state directory name seen on the FTP site):
GET='*_[0-9][0-9]_county.zip,*_[0-9][0-9][0-9][0-9][0-9]_cousub.zip,*lm.zip,*water.zip,*edges.zip'
wget -nH --cut-dirs 2 -r -c ftp://ftp2.census.gov/geo/tiger/TIGER2009/STATE/ -A "$GET"
Move the directory hierarchy and ensure everyone can read the files:
cd ~
sudo mv tiger2009 /usr/local/share/xastir/maps/
sudo chmod a+rX /usr/local/share/xastir/maps/tiger2009
You may want to adjust the directory hierarchy depending on your personal preferences.
Depending on how recent your CVS installation of Xastir is, you may need to obtain the dbfawk files for the Tiger/Line 2009 shapefiles.
mkdir ~/xtmp (or the temporary directory of your choice)
cd ~/xtmp
wget ftp://luno.org/xastir/config/tl_2009*.dbfawk
chmod a+r *dbfawk
sudo mv *.dbfawk /usr/local/share/xastir/config
Start Xastir, open the map chooser and you should see a Tiger2009 folder. Select the map(s) you want to view. Enjoy!
You probably want to select just a county (or maybe a few) at a time. Selecting an entire state in the map chooser is likely to make loading maps really really slow, even on a fast machine.
Map caching works in conjunction with the map download routines, which fetch maps from http or ftp addresses. The map caching features use functions found in Berkeley DB 4.0 library, AKA libdb (version 4.0 or better), to create and manage a cache directory and a persistent database of information about the files in the cache directory. This directory defaults to ~/.xastir/map_cache. The files under this directory can be cleaned up or removed by hand at any time - the caching routines will simply download the maps and put new entries into the .db file.
Map files are saved with filenames that include the number of seconds since the Unix epoch. This allows the caching routines to easily determine the age of maps so that older cached maps can be deleted. This is currently (Dec 2004) controlled with a compile time maximum age setting. See map_cache.h for specifics and for brief documentation about all of the map_cache functions.
The final result here will be ESRI Shapefile vector maps that you can then use within Xastir. You'll need Shapelib compiled into Xastir to make use of this feature.
Another way would be to drive the course with a GPS and then download the track via Xastir/GPSman to create a Shapefile map.
Yet another way would be to drive it with an APRS rig and then Store Track as described above. You could also drive with GPS/Xastir (without APRS) to get a very detailed track and then save your own track.
calc_distance() calc_distance_course() distance_from_my_station()
Haversine formula is more accurate for shorter distances than spherical trigonometry calculations. Both methods are equivalent for longer distances. Both are Great-Circle calculations (as opposed to Rhumb-line or planar geometry). See the GIS FAQ for info on these methods. Dr. Math website mentions both of these and refers people to the same GIS FAQ.
Also note that the Haversine formula is ill-conditioned if the two points are antipodal (on opposite sides of the Earth). From the GIS FAQ: "but the error, perhaps as large as 2km (1 mi), is in the context of a distance near 20,000km (12,000 mi)." For our purposes that's just fine.
Dead-reckoning effectively does a Rhumb-Line calculation as it is trying to do a constant heading. That means it is not the shortest distance between the points. I'm still trying to get my head around that last concept as it is counter-intuitive to someone versed in compass/maps on land and with shorter distances.
A Great-Circle route is the shortest distance between two points on a sphere, whereas a Rhumb-line is what you get if you move along a constant compass heading and is a bit longer.
We probably do not need to go to ellipsoid calculations for Xastir. Spherical calculations should be accurate enough for what we do.