
$Id: README.MAPS,v 1.40 2004/08/13 00:25:53 we7u Exp $


Recommended Configurations for:

  U.S. Users:
  -----------

    Minimum:  Shapelib, pcre
    --------
      Allows use of all built-in map types plus 2003 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.

  Rest of World:
  --------------

    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.


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
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.


Getting Maps and other Data Files for Xastir:
---------------------------------------------

      NOTE:  Set map FILES to permissions 644 ("rw-r--r--"), map
      DIRECTORIES to 755 ("rwxr-xr-x") using the "chmod" command.
      These permissions will allow anyone on the box to read the map
      files, and access the map directories. Type these
      commands exactly as shown in order to set the map directory's
      permissions properly.  Do this as the root user:

      cd /usr/local/share/xastir/maps
      find . -type d -exec chmod 755 {} \;
      find . -type f -exec chmod 644 {} \;

      You can repeat these commands at anytime, to fix up errant map
      permissions that are created by downloading/installing new
      maps.

      Currently the maps/GPS directory needs to be writable by normal users
      in order to support downloading GPS data using GPSMan.  This will be
      changed at some future date, moving this directory into the user's
      home directory instead.

      cd /usr/local/share/xastir/maps
      chmod 777 GPS
      find GPS -type d -exec chmod 777 {} \;
      find GPS -type f -exec chmod 777 {} \;



    Download some maps:

      If you compiled with ImageMagick and have wget or libcurl installed,
      you can skip this step and use the online Tiger/Terraserver maps
      exclusively. However, having maps on your computer is often faster
      than transferring images over a modem, and is not subject to the
      failures of your internet connection.

      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 heirarchy to
      choose the layering).

      There are many methods for organizing many maps. Create a map
      heirarchy using something that makes sense to you. The old method of
      creating transparent/filled or raster/vector directories has been
      superceded 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, not matter what the setting suggests.

      Map types available by extension:

      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

      Raster Format:
      .tif/.fgd       geoTIFF raster image map
      .geo            Raster image map or internet raster image map

      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.

      A few maps of various types are available from:

        http://wetnet.net/~we7u/xastir/maps/

      Here's a page that we'll try to keep up-to-date which will have lots of
      links to downloadable maps on it:

        http://www.findewe.com/nwaprs/XastirMaps


     Dos/Win/MacAPRS style vector/fill maps:

      ftp://aprs.rutgers.edu/pub/hamradio/APRS/maps02/
      http://www.cnunix.com/ftp/hamradio/rutgers.mirror/maps/maps2/
      ftp://aprs.rutgers.edu/pub/hamradio/APRS/
      ftp://ftp.tapr.org/aprssig/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
      them 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.

      
     PocketAPRS vector maps:

      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.

      Also try:  
       ftp://ftp.tapr.org/aprssig/palmstuff/palmmaps/

   
     Shapefile format maps (Requires shapefile support):

      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".

      The latest Tiger/Line 2003 data converted to shapefile format is
      available from http://xastir.tamu.edu/. These maps only work with dbfawk
      support, and only contain vectors; no filled regions such as water. 
      FIXME

      Tiger/Line 2000 map data is available from:
      http://www.esri.com/data/download/census2000_tigerline/index.html
      but requires free registration.  A example of these types of files can
      be found at "http://wetnet.net/~we7u/xastir/maps/shapefile/USA/WA/".
      You'll need to run "tar xzvf <filename>" on each one of the files
      from that last site after downloading.  Some layers that may be of
      interest:


        CMSA/MSA Polygons 2000              tgr*msa00.shp
        PMSA Polygons 2000                  tgr*pms00.shp
        Consolidated Cities                 tgr*city.shp
        County - Current                    tgr*cty.shp
        County 2000                         tgr*cty00.shp
        Designated Places 2000              tgr*plc00.shp
        Designated Places Current           tgr*plccu.shp
        Key Geographic Locations            tgr*kgl.shp
        Landmark Points                     tgr*lpt.shp
        Landmark Polygons                   tgr*lpy.shp
        Line Features - Hydrography         tgr*lkH.shp
        Line Features - Landmarks           tgr*lkD.shp
        Line Features - Misc. Transport     tgr*lkC.shp
        Line Features - Non-visible         tgr*lkF.shp
        Line Features - Physical            tgr*lkE.shp
        Line Features - Rails               tgr*lkB.shp
        Line Features - Roads               tgr*lkA.shp
        Line Features - Unknown             tgr*lkX.shp
        School Districts - Elementary       tgr*elm.shp
        School Districts - Middle           tgr*mid.shp
        School Districts - Secondary        tgr*sec.shp
        School Districts - Unified          tgr*uni.shp
        Traffic Analysis Zones              tgr*taz.shp
        Urban Areas                         tgr*urb.shp
        Water Polygons                      tgr*wat.shp
        Alternate Feature Names             tgr*alt.shp
        Address Matching Info               tgr*add2.shp
        ZIP+4 Left and Right Info           tgr*zip.shp
        Key Geographic Location Addresses   tgr*add.shp
        Landmark Polygon Names              tgr*lpy2.shp
        Landmark Polygons Multi-Landmark    tgr*lpy3.shp
        Water Polygons Multi-Names          tgr*wat2.shp

      Older Tiger97 maps converted to shapefile downloadable from:
      http://www.mapshots.com

      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).  Lot's 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.

      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 Antartica).  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".

      -----
      Reprojecting shapefiles (or: why doesn't my shapefile show up?)

      A shapefile is pretty much just a collection of points and lines
      between points.  Xastir expects that those points are expressed in
      degrees of longitude and latitude with positive values indicating N
      and E and negative values indicating S and W.

      One often comes across shapefiles with data in some other format, such
      as UTM or stateplane projections with units in meters or feet.  You
      must re-project these sorts of shapefiles in order to use them in
      Xastir.  You must either know what the current format is of the
      shapefile you wish to reproject, or have the .prj file that some
      shapefiles come with.

      Fortunately, the shapelib-1.2.10 distribution (which you probably
      compiled and installed to enable shapefile maps in Xastir) includes a
      tool for performing this reprojection.

      First make the shpproj utility by:

      1. change to directory: <shapelib source directory>/contrib
      2. type 'make' to compile the contrib files
      3. Optionally install shpproj by copying it to /usr/local/bin

      shpproj takes 4 arguments:

          shpproj shp_file new_shp -i="in_params" -o="out_params"

      shp_file is the name of your existing shapefile triad (without the
      extension).

      new_shp is the name of your new shapefile triad (which doesn't exist
      yet).

      -i="in_params" are the parameters describing the existing shapefile.

      -o="out_params" are the parameters describing the new shapefile.  We
      want this to be "geographic".

      Examples:

      Convert shapefile triad from US Stateplane, South Central Texas region
      (FIPS code 4204), in feet to geographic:

        shpproj stateplane_shapefile geographic_shapefile \
             -i="init=nad83:4204 units=us-ft" -o=geographic

      Convert UTM zone 15 to geographic:

        shpproj utm_shapefile geographic_shapefile \
             -i="proj=utm zone=15 units=m" -o=geographic

      To get a listing of the FIPS codes, you need to have proj installed
      (see elsewhere in this file for more information).  Look in the
      "<proj source directory>/nad/nad.lst" file.

      For more detailed documentation, see the shpproj.txt file in the
      "<shapelib source directory>/contrib/doc" directory.

      There's a resource for looking up the FIPS codes for a particular
      area:

            http://www.aprs.net/fips/

      An important note about shpproj from Tom Russo, KM5VY:

      "I have been looking over shpproj's source code and it's very
      clear that it is doing datum conversions wrong.

      It is apparently written to be built against the very old
      proj-4.4.3 from USGS that didn't do direct transforms from one
      projection to another, and could only do proj->"geographic"
      conversions.

      It is completely incorrect to do "projection in one
      datum"->"geographic"->"projection in another datum", but
      that's precisely what shpproj does.  It is not possible
      to use this tool to convert a shapefile in NAD27 UTM
      cooordinates into WGS84 Lat/Lons for use in Xastir!.
      It does WGS 84 UTM->WGS84 Lat/Lon just fine.

      I have hacked up a variant of "cs2cs" that works directly on
      shapefiles and does datum conversion correctly (unlike
      shpproj):

          <http://www.swcp.com/~russo/shape_web/>"

      Another good note from Tom Russo, KM5VY on this topic:

      "...I contacted Frank Warmerdam about the datum conversion issue in
      shpproj and offered shpcs2cs back to him (since he wrote 99% of it
      anyway).  He said that ogr2ogr is capable of doing datum conversions as
      well as coordinate system conversions.  I haven't looked into it, as it
      looks like it'll take a little more work -- you have to know either the
      EPSG number or the "Well Known Transformation" (WKT) parameters --- these
      are the sort that are in .prj files other than the junk that shpproj
      produces, but they have a lot of detail and I can't construct them in my
      head as quickly as "+proj=utm +datum=NAD27 +zone=13".  Still, it is more
      powerful as it can convert between just about anything that OGR can read,
      in any projection (as long as the projection info's in the input layer),
      and output any other OGR format in any other projection (as long as you
      can specify that projection somehow).

      That's a long winded way of saying "You can also use ogr2ogr.  See the
      gdal distribution for more details."  didididit didit."

      Yet another note from Tom:

      "I just spent a few minutes and now understand a little about how to use
      ogr2ogr to do projections with datum shifts.  I added a small section to 
      http://www.swcp.com/~russo/shape_web explaining how to do it, with a link
      to a site that has all the different WKT and EPSG numbers for J.  Random
      Projection.  

      I still find "shpcs2cs" easier to use because can remember "+proj=utm
      +zone=13 +datum=NAD27 +to +proj=latlong +datum=WGS84" much easier than I
      can remember "-s_srs EPSG:26713 -t_srs EPSG:4326", but there it is.  Some
      users might find this helpful."



      -----

      Using "dbfawk" to interpret shapefile DBF data:  Each shapefile
      map (*.shp, *.shx) comes with a DBase data file (*.dbf) in which
      each shape in the .shp file has a corresponding set of descriptive
      data about that shape in the .dbf file.  While shapefiles are all
      a standard format and will most always draw (possibly after having
      been reprojected with shpproj), the corresponding .dbf data varies
      widely depending on the data source.  For example, US Census
      Tiger/Line files contain 20 attributes for each shape including such
      values as the name of the shape (i.e. street name), and a "Census
      Feature Class Code" (CFCC) which indicates whether a shape is a
      dirt road or a superhighway, for example.   

      In "pre-dbfawk" Xastir, knowledge of the various sources of
      shape files was built into the program and it was necessary to
      add code to support new shapefile sources (such as those
      produced by local government agencies, non-US, etc.).  Xastir
      with dbfawk moves this logic into metadata files named *.dbfawk.
      These files are linked to the .shp/.dbf files they belong with in
      one of two ways:
        1. "Signature" recognition.  .dbfawk files located in the config/
           directory are read to find the "dbfinfo" signature, which is
           simply the ordered list of attribute names found in the .dbf file.
           If you browse config/*.dbfawk you will see dbfawk's for the most
           well know shapefile types.  For example, tgrlk.dbfawk matches
           all the "tgr*lk?.dbf" US Census Tiger/Line files.  When a shapefile
           map is displayed, it's .dbf signature is matched up with one of
           the config/*.dbfawk files.
        2. "Tied" to a file.  If you installed a .dbfawk file in the same
            directory as the .shp and .dbf files (e.g. sample.shp, sample.dbf
            get a corresponding sample.dbfawk) then that file is used instead
            of signature matching.
      The first method allows a single .dbfawk file to be automatically
      used for hundreds of standard shapefile maps.  The later allows you
      to customize how your particulare shapfile map displays.

      What's in a .dbfawk file?  The best documentation of these files
      is found by looking at the commented examples in config/*.dbfawk.  
      dbfawk is modeled after the "awk" pattern scanning and processing 
      language -- but, it is *not* exactly awk:
        - Regular expression syntax is that used by Perl (the pcre library
          is used) rather than pure awk.
        - Action statements are much more limited than full-blown awk.
        - The concept of records and fields is used since a .dbf record
          is structured of usually several fields (name, feature type, etc.).
      That said, what dbfawk does is allow a great degree of control of
      how and when shapes and their names are displayed.  This is done by
      setting the values of several "builtin" variables [Technically, these 
      are only built-in to shapefile support.  Potentially the awk-like 
      code can be extended to other uses.]:
        dbfinfo:   the "signature" to match against.
        dbffields: which fields to read from the .dbf file.
        color:     what color code to display the shape with.
        lanes:     width of the shape.
        name:      name of the shape.
        key:       search key (used for WX alerts to find the shape)
	symbol:	   symbol for landmarks, etc.
	filled:	   draw polygons filled.
        fill_style: style of fill (solid, stiple, etc.)
	fill_color: color of fill
        pattern:   solid or dashed lines.
        display_level: at what zoom level to begin displaying the shape
        label_level: at what zoom level to begin displaying labels
        label_color: color to use for labels
      
      Execution of a dbfawk file:  Just like awk, the file consists of
      patterns that are matched against input data and actions to take
      when the pattern matches.  There are four special patterns in dbfawk:
        BEGIN_RECORD: action is executed just before parsing a record.
        BEGIN: action is executed just before parsing a field.
        END: action is executed just after parsing the field.
        END_RECORD: action is executed just after parsing a record.
      All other patterns are regular expressions that are matched against
      a data value of <fieldname>=<value>.  For example:
        FENAME=Main

      Actions in dbfawk files consist of setting variables and two special
      actions:
        next: skips to the next field in the record.
        skip: skips to the next record.
      If neither next nor skip is given in the action, then processing falls
      through to the next pattern/action pair in the dbfawk file.
      
      The special dbffields variable is used to list which fields of the
      record to be processed and in what order.  The order is significant
      since it may take several DBF fields to build up a complete name.
      For example, in Tiger/Line, the street name is actually the 
      concatentation of FEDIRP, FENAME, TYPE, FEDIRS.  Here's an excerpt
      from tgrlk.dbfawk to demonstrate:
        BEGIN {dbffields="TLID:FEDIRP:FENAME:FETYPE:FEDIRS:CFCC"}
        ...
	/^FEDIRP=(.+)$/ {name="$1 ";next}
	/^FENAME=United States Highway (.*)$/ {name="$(name)US $1"; next}
	/^FENAME=State Highway (.*)$/ {name="$(name)State $1";next}
	/^FENAME=State Route (.*)$/ {name="$(name)SR $1";next}
	/^FENAME=(.*)$/ {name="$(name)$1; next}
	/^FETYPE=(.+)$/ {name="$(name) $1"; next}
	/^FEDIRS=(.+)$/ {name="$(name) $1"; next}
      
      Creating and testing dbfawk files:  You can test an existing dbfawk
      file by setting debug level 16 in Xastir (this will generate a huge
      amount of map rendering debug output, including dbfawk info):
       "./xastir -v 16 2>/tmp/log"
      Or, use "testawk" which reads a .dbf file (or single field assignments
      on the command line).  For example:
	./testawk -D . -d tgr36119lkA.dbf 2>&1|less
	20 Columns,  42427 Records in file
	sig: TLID:FNODE:TNODE:LENGTH:FEDIRP:FENAME:FETYPE:FEDIRS:CFCC:FRADDL:TOADDL:FRADDR:TOADDR:ZIPL:ZIPR:CENSUS1:CENSUS2:CFCC1:CFCC2:SOURCE
	DBF Signatures match!
	name=Hancock Ave, key=80309984, symbol=, color=40, lanes=1, filled=0, pattern=1,display_level=96,label_level=16

      To create a .dbfawk file, you need to understand the layout and contents
      of your .dbf file.  Use "dbfinfo" and "dbfdump" which are in the shapelib
      contrib directory.  Dbfinfo will list the field names and dbfdump will
      dump out all fields of all records.  Take the field names from dbfinfo,
      and concatenate them together in order, separated by ":" to make the
      dbfinfo= signature variable assignment.

      Your best bet is to start with an existing .dbfawk file as an example.

      Dbfawk hints and kinks:  You have to think like an awk programmer and
      realize that the order that rules are listed matters, that it's important
      to use "next" as soon as it makes sense so other rules aren't looked at
      unnecessarily and, to use "skip" when you want to fix bad dbf data.
      For example, my county's Tiger/Line maps have several coding errors
      where a segment of a main highway is incorrectly labeled as a local 
      street.  This rule overrides one of those incorrect records:
	# This Furnace Dock Rd segment is really Rt 9!
	/^TLID=139773160$/ {name="Briarcliff-Peekskill Pky"; display_level=8192; label_level=512; color=4; lanes=4; skip;}
      TLID is the Tiger/Line ID which is the unique identifier for this 
      segment.
      -----

    Rolling your own shapefile maps:

    It is relatively easy to create your own shapefile maps (for example,
    if you want to highligt a walkathon course).  There are several
    methods available with Xastir:
    1. Use GPSMan to download a GPS track to a shapefile.
    2. Save a station tracklog of an actual station or an object that
       you manually move along the course.  When you select Station Info,
       you are presented with the option to save the track, which gets
       put in 
       .xastir/tracklogs/<datestamp>_<callsign>_APRS_Trail_<color>.*
       You can move the .shp, .shx, and .dbf files to your maps directory.
       Use DBFAWK to make a map-specific .dbfawk file.  For example:
	BEGIN {dbfinfo="Credits:DateTime";dbffields="Credits:"}
	BEGIN_RECORD {key=""; lanes=4; color=12; name=""; filled=0; 
           pattern=1; display_level=8192; label_level=32; symbol=""}
       This makes the track width 4 and red (12).
    3. You can also use the shapelib tools (shpproj was presented earlier)
       to manually create a shapefile.  For example, the following 
       marks out the mileposts for a marathon, using tgrlpt.dbfawk
       (US Census Tiger/Line landmark points with an APRS symbol extension)       for the metadata:
       #!/bin/sh
       # turn mileposts into a Tiger landmark shapefile

       rm -f posts.shp posts.dbf
       shpcreate posts point
       dbfcreate posts -n ID 8 0 -s CFCC 3 -s NAME 30
       shpadd posts -74.0570 40.6025
       dbfadd posts 1 'X\m ' Start
       shpadd posts -74.0443 40.6065
       dbfadd posts 2 'X\m ' 1M
       shpadd posts -74.0353 40.6093
       dbfadd posts 3 'X\m ' 2M
       shpadd posts -74.0268 40.6260
       dbfadd posts 4 'X\m ' 3R
       shpadd posts -74.0200 40.6277
       dbfadd posts 5 'X\m ' 3G
       shpadd posts -74.0270 40.6252
       dbfadd posts 6 'X\m ' 3B
       shpadd posts -74.0197 40.6395
       dbfadd posts 7 'X\m ' 4R
       shpadd posts -74.0203 40.6388
       dbfadd posts 8 'X\m ' 4BG
       shpadd posts -74.0077 40.6508
       dbfadd posts 9 'X\m ' 5R
       shpadd posts -74.0083 40.6503
       dbfadd posts 10 'X\m ' 5BG
       shpadd posts -73.9957 40.6623
       dbfadd posts 11 'X\m ' 6R
       shpadd posts -73.9962 40.6617
       dbfadd posts 12 'X\m ' 6BG
       shpadd posts -73.9850 40.6743
       dbfadd posts 13 'X\m ' 7R
       shpadd posts -73.9858 40.6738
       dbfadd posts 14 'X\m ' 7BG
       shpadd posts -73.9782 40.6865
       dbfadd posts 15 'X\m ' 8M
       shpadd posts -73.9597 40.6890
       dbfadd posts 16 'X\m ' 9M
       shpadd posts -73.9573 40.7007
       dbfadd posts 17 'X\m ' 10M
       shpadd posts -73.9622 40.7122
       dbfadd posts 18 'X\m ' 11M
       shpadd posts -73.9515 40.7230
       dbfadd posts 19 'X\m ' 12M
       shpadd posts -73.9520 40.7345
       dbfadd posts 20 'X\m ' 13M
       shpadd posts -73.9525 40.7465
       dbfadd posts 22 'X\m ' 14M
       shpadd posts -73.9403 40.7503
       dbfadd posts 23 'X\m ' 15M
       shpadd posts -73.9578 40.7587
       dbfadd posts 24 'X\m ' 16M
       shpadd posts -73.9556 40.7675
       dbfadd posts 25 'X\m ' 17M
       shpadd posts -73.9465 40.7808
       dbfadd posts 26 'X\m ' 18M
       shpadd posts -73.9372 40.7935
       dbfadd posts 27 'X\m ' 19M
       shpadd posts -73.9272 40.8047
       dbfadd posts 28 'X\m ' 20M
       shpadd posts -73.9343 40.8142
       dbfadd posts 29 'X\m ' 21M
       shpadd posts -73.9453 40.8050
       dbfadd posts 30 'X\m ' 22M
       shpadd posts -73.9525 40.7923
       dbfadd posts 31 'X\m ' 23M
       shpadd posts -73.9630 40.7810
       dbfadd posts 32 'X\m ' 24M
       shpadd posts -73.9720 40.7696
       dbfadd posts 33 'X\m ' 25M
       shpadd posts -73.9811 40.7683
       dbfadd posts 34 'X\m ' 26M
       shpadd posts -73.9763 40.7720
       dbfadd posts 35 'X\m ' Finish
    ---------


     GeoTIFF Map files (requires GeoTIFF):

      If you compiled in geoTIFF support, you can use USGS DRG topographic
      maps. These are primarily useful to U.S. users. DRG topo maps can be
      found for free for most states, and can be purchased for others.

        http://www.bianifc.org/gis_gps/gps/drgfree.html
        http://www.gisdatadepot.com

      or try a google search with "free drg maps" as the search query.

      The 7.5' topo maps work the best so far.  Be sure to install the .tif AND
      the .fgd files side-by-side into the map directories. Without the .fgd
      file Xastir won't be able to crop the white border from the map.  Xastir
      currently knows how to handle NAD27, NAD83, and WGS84 geoTIFF files.
      GeoTIFF files created in other datums will be displayed at an incorrect
      location with Xastir. The .tfw files included with most geoTIFF images
      are not used by Xastir.

      If you must make FGD files by hand, the included script mapfgd.pl can
      create them for you from the USGS geoTIFF files. The format Xastir is
      looking for is the following:

        1.5.1.1  WEST BOUNDING COORDINATE:  -122.000000
        1.5.1.2  EAST BOUNDING COORDINATE:  -120.000000  
        1.5.1.3  NORTH BOUNDING COORDINATE:  48.000000 
        1.5.1.4  SOUTH BOUNDING COORDINATE:  47.000000 

     -or-

        1.5.1.1  West_Bounding_Coordinate:  -122.000000
        1.5.1.2  East_Bounding_Coordinate:  -120.000000  
        1.5.1.3  North_Bounding_Coordinate:  48.000000 
        1.5.1.4  South_Bounding_Coordinate:  47.000000 

      Notes about DRG-Enhanced (DRG-E) files:
      * The DRG-E files will draw over the correct spots if you remove
      the .fgd file, but will overflow their boundaries and

      * The DRG-E files will draw over the correct spots with decent
      boundary trimming (as far as I can tell, which isn't very far:
      correct me!) if you use a .fgd file taken from 'real' DRG files
      from USGS.

      Basically: get rid of the .fgd file from the DRG-E!!

      Be wary of DRG-E or DOQQ files that are compressed with MrSID
      compression.  That is a proprietary compression format for
      which we do not have access to the decoding algorithm.  We
      cannot use those from within Xastir.  There's possible good news
      lurking on the horizon though:  LizardTech has mentioned on the
      gdal-dev mailing list that they might be supporting open-source
      with a driver for gdal sometime soon.


    .geo files/online maps & graphics:

      If you have ImageMagick and wget or libcurl installed, .geo files
      for NWS radars are available from one of these sites:

          ftp://gcpoolz.com/geos/Srb_geos.zip
          http://wetnet.net/~we7u/xastir/maps/radar-geos.tgz

      You'll probably want to add an IMAGESIZE line to each one to speed up
      loading when some radars are offscreen: (bash syntax, modify for your
      shell...)

          for a in srb_*; do echo "IMAGESIZE 620 620" >> $a; done

      For .geo files with an ftp or http address for fetching the image,
      IMAGESIZE is currently a REQUIRED parameter in the .geo file.  For
      .geo files where the image is resident on your hard drive, the
      IMAGESIZE tag is optional.

      Please also note that the coordinates in the .GEO files are expressed
      in decimal degrees, and are listed with longitude first then latitude
      on the TIEPOINT lines.

      Tiger maps of the USA are available through the map menu under 
      "Enable/configure Tigermap". These maps are generated by the census
      bureau webserver.

      A .geo with only the word "TERRASERVER" in it will retrieve a satellite
      photo of the area from terraserver.  You need "wget" or libcurl, plus
      ImageMagick installed, and support for them compiled into Xastir.  No
      additional map downloads are needed if these are the only maps that you
      want to use.

      A .geo with only the word "TOPOSERVER" in it will retrieve a topographic
      map of the area from terraserver.  You need "wget" or libcurl, plus
      ImageMagick installed, and support for them compiled into Xastir.  No
      additional map downloads are needed if these are the only maps that you
      want to use.

      Other tags you can put in a .geo file: 
      DATUM: (not used, yet...)
      PROJECTION: Currently only supports "TM" for transverse mercator.
      REFRESH: number of seconds to reload the maps.  Multiple maps
          with different values pick the smallest value.
      TRANSPARENT:  Color to remove from the background (make it transparent).
          Use a number, 0=black.  Colormapped images use the map value, so 
          white is usually 0xffff.  Value can be decimal or hex if preceeded 
          by "0x".  
      CROP: removes borders.  Values are [left top right bottom] with
          (0,0) at the upper left.  A good value for the NWS radar
          images above is "CROP 35 20 616 600"
      GAMMA, CONTRAST, NEGATE, EQUALIZE, NORMALIZE, LEVEL, MODULATE:  These 
          are all ImageMagick options, and are documented there, and
          briefly in the xastir help file.

     
     "Find Address" feature (US only):

      The "Find Address" feature is based on the open source geocoder by
      Dan Egnor and as such uses the same format for the data. You can
      download preprocessed data based on Census Tiger 2003 data at:
      http://www.dementia.org/geocoder/tgr2003/


     Geographic Names Information System Labels:

      These aren't maps, but are collections of name labels for locations.
      These display at various zoom levels like Dos/WinAPRS map labels, but are
      also searchable from the Maps menu.

         http://geonames.usgs.gov/

      Click the link "Download GNIS Data: State and Topical Gazetteers" on
      the left.

      These files should be renamed in the form "<ST>.gnis" after download,
      where <ST> is the abbreviation for the state that they cover, and
      should be placed in the /usr/local/share/xastir/GNIS/ directory. To
      make sure that maps are layered correctly with GNIS labels on the top
      of the map stack, plus searchable, it is suggested that you link
      /usr/local/share/xastir/maps/z to this GNIS directory.

      Type this as root to create the link and directories:
       cd /usr/local/share/xastir/maps
       ln -s ../GNIS z

      The map files must end in ".gnis" to be used by Xastir, and must be in
      pipe delimited format.  These are readily available from the above link
      with such filenames as "AZ_DECI.TXT". The files must be renamed to
      <ST>.gnis, and the trailing whitespace should be removed for speed. This
      can be accomplished in one step with the following command. (bash
      style...)

   for a in *deci; do sed -e 's/[ ]*$//g' < $a > `basename $a _deci`.gnis; done

      Indivdual files can have whitespace removed as follows:
        sed -e 's/[ ]*$//g' < inputfile > outputfile


     County weather Warning maps (requires shapefile support):
      
       The latest shapefile format weather maps may be found here:
         http://www.nws.noaa.gov/geodata/

       or more easily found here (but not guaranteed to be the most
       current:
         http://wetnet.net/~we7u/xastir/Counties/

        --------------------------
        The files of interest are:
        --------------------------

        NWSI Libraries:
        ---------------
        County Warning Areas
        Zone Forecast Areas
        Fire Weather Zones
        Coastal and Offshore Marine Zones (3 files)

        County Libraries:
        -----------------
        AWIPS Counties

      Unzip those files in the /usr/local/share/xastir/Counties/ directory and
      Xastir should find them and use them for weather alerts. Be sure to
      include the .shp, .shx, .and dbf.
           
       Note that you can also use the county file as the background polygon
       filled map for drawing county lands and borders.  Either make a link
       to these files from your maps directory, or copy the files there so
       that they show up in the Map Chooser.

     Raw Tiger/Line format maps (requires GDAL/ORG):

      If you have GDAL/OGR library added to Xastir, you should (very soon)
      be able to use Tiger/Line maps.  The developers are working to add
      this capability.

      2002 map data can be found here:

        http://www.census.gov/geo/www/tiger/tiger2002/tgr2002.html

      2003 map data can be found here:

        http://www.census.gov/geo/www/tiger/tiger2003/tgr2003.html

     SDTS format maps (requires GDAL/OGR):

        http://edc.usgs.gov/geodata/

      The "hypsography" maps contain topo lines.  They look very nice overlaid
      on top of terraserver satellite images.  Note that for some types of maps
      you also need to download a data dictionary file to go with them.

      Also note that the various datasets appear to reuse filenames.  You may
      need to separate each one into its own subdirectory in order to keep all
      of the files from getting overwritten by new maps.

     MapInfo TAB/MID/MIF format maps (requires GDAL/OGR):

      http://www.mapinfo.com
      http://research.umbc.edu/~roswell/mipage.html


     Download audio files:

       To play the wav files you will need a program such as vplay to play the
       audio file through your sound card.

       Grab xastir-sounds.tgz at the ftp site you downloaded Xastir, or at
        ftp://ftp.tapr.org/software_lib/Linux/xastir/xastir-sounds.tgz

       Untar the file.  Put the sounds files into the
       /usr/local/share/xastir/sounds directory where Xastir can find them.
       (FIXME: thunder.wav is missing?).

     Download FCC and/or RAC Database files:

       If the FCC database is installed, a Search FCC Database button will
       appear in the station info box. If the RAC (Radio Amateurs of Canada)
       database is installed, a Search RAC Database button will appear for
       callsigns beginning with "VE" or "VA".

       The download and installation of these is automated in the fcc-get
       script included with Xastir, but you may install them by hand
       individually if you wish.

       To use the FCC lookup:
       ----------------------

         Download:
         ftp://ftp.fcc.gov/pub/Bureaus/Wireless/Databases/uls/complete/l_amat.zip

         (The only file needed from this 60Meg zip is the EN.dat file)

         **** NOTE To use the data base file it must be sorted first!!! ****
     
         unzip l_amat.zip
 
         To sort the file: Make sure you have plenty of disk space
         for this as the file is BIG!

         sort +4 -t \| EN.dat >EN.dat.sorted

         Install it in the xastir/fcc directory:

         su
         mv EN.dat.sorted /usr/local/share/xastir/fcc/EN.dat


       To use the RAC lookup:
       ----------------------

         Download:
         ftp://ftp.rac.ca/pub/cdncaldb.zip

         unzip cdncaldb.zip
         mv AMATEUR.RPT /usr/local/share/xastir/fcc/AMACALL.LST



WHERE TO FIND MORE INFO ON MAP DATUMS, ETC:

    Geodesy:
    http://oceanservice.noaa.gov/education/geodesy/welcome.html

    "Geodesy for the Layman"
    http://www.ngs.noaa.gov/PUBS_LIB/Geodesy4Layman/toc.htm
    


  ------------------------------------------------------------------------
Copyright (C) 1999 Frank Giannandrea
Copyright (C) 2000-2004 The Xastir Group

