31a9c4d907399d3c61b2a74e29742cebe4b4811e
[debian/splat] / utils / README
1                         ================
2                         SPLAT! Utilities
3                         ================
4
5 Utilities for use with SPLAT! software are found under the
6 splat-1.1.1/utils directory.  They include the following:
7
8
9 srtm2sdf
10 ========
11 The srtm2sdf utility generates SPLAT Data Files (SDFs) from 3-arc second
12 STS-99 Space Shuttle Topography Mission (SRTM-3) elevation data files.
13 This data is of a much higher quality than that contained in older USGS
14 Digital Elevation Models of the same resolution.  However, many SRTM-3
15 Version 2 elevation models contain data "voids" and "wells" that are the
16 consequence of the radar mapping process.
17
18 The srtm2sdf utility has the ability to detect and replace SRTM data
19 outliers with equivalent SDF data created through the usgs2sdf utility
20 (below).  If equivalent USGS-derived SPLAT Data Files are not available,
21 SRTM outliers are handled either through adjacent pixel averaging, or by
22 threshold limiting using user-specified limits.  Of all three methods,
23 the USGS-derived SDF replacement method yields the best results.
24
25 SRTM-3 Version 2 Elevation Data may be downloaded from:
26
27     ftp://e0srp01u.ecs.nasa.gov:21/srtm/version2/
28
29 Files available at this site are ZIP compressed, and must be
30 uncompressed (using "unzip", or "gunzip -S .zip") prior to being
31 processed by srtm2sdf.
32
33 The srtm2sdf utility accepts command-line options as follows:
34
35 -d: used to specify the directory path to the location of existing
36     SDF files (presumably created at an earlier date through the
37     usgs2sdf or postdownload utility) that are to be used to replace
38     outliers found in the SRTM data file.  The -d option overrides
39     the default path specified in your $HOME/.splat_path file.
40
41 -n: used to specify the elevation (in meters) below which SRTM data
42     is replaced.  Below this limit, SRTM elevation data is either
43     replaced using existing SDF equivalent files, or averaged among
44     adjacent elevation data points.  The default threshold for the
45     replacement limit is sea-level (0 meters).  Unless elevations
46     below sea-level are known to exist for the region being
47     processed by the srtm2sdf utility, the -n option need not be
48     specified.
49
50 Some examples of srtm2sdf use:
51
52     srtm2sdf N40W074.hgt
53
54     srtm2sdf -d /cdrom/sdf N40W074.hgt
55
56     srtm2sdf -d /dev/null N40W074.hgt (/dev/null prevents USGS data
57                 replacement from taking place)
58
59     srtm2sdf -n -5 N40W074.hgt
60
61 In all cases, SDF files are written into the current working directory.
62
63
64 usgs2sdf
65 ========
66 The usgs2sdf utility takes as an argument the name of an uncompressed
67 and record delimited Digital Elevation Model Data (DEM) downloaded from
68 the US Geological Survey, and generates a SPLAT Data File (SDF) compatible
69 with SPLAT! Software.  usgs2sdf may be invoked manually, or via the
70 postdownload script.
71
72
73 postdownload
74 ============
75 postdownload is a front-end to the usgs2sdf utility.  postdownload
76 takes as an argument the name of the gzipped Digital Elevation Model
77 (DEM) downloaded from the US Geological Survey (ie: wilmington-w.gz).
78 postdownload uncompresses the DEM file, adds necessary record delimiters,
79 and invokes usgs2sdf to produce a SPLAT Data File (SDF).
80
81 USGS Digital Elevation Models may be downloaded from:
82
83     http://edcftp.cr.usgs.gov/pub/data/DEM/250/
84
85 Invoke postdownload with the name of each DEM file downloaded to
86 produce a database of SPLAT Data Files.
87
88
89 citydecoder
90 ===========
91 This utility reads U.S. Census Bureau files of Incorporated Places/Census
92 Designated Places, and generates city/site data files for use with SPLAT!
93 software.  Files for use with this utility are available for download
94 free of charge from:
95
96         http://www.census.gov/geo/www/cob/bdy_files.html.
97
98 Please select the ARC/INFO Ungenerate (ASCII) Metadata Cartographic Boundary
99 Files from this site and unzip them prior to importing them to citydecoder.
100 U.S. Census files are cataloged by the two digit FIPS code for the region
101 (state) they represent.  citydecoder takes as an argument the two-letter
102 file prefix plus the FIPS code of the region or state being processed.
103 For example:
104
105         citydecoder pl34
106
107 reads files "pl34_d00.dat" and "pl34_d00a.dat" that are extracted after
108 the downloaded file has been unzipped, and generates a list of city names
109 and geographical coordinates for the state of New Jersey (FIPS code 34).
110 This data may be sorted and written to a file (cities.nj.dat) in the
111 following manner:
112
113         citydecoder pl34 | sort > cities.nj.dat
114
115 A list of FIPS codes (fips.txt) is included under splat/utils for your
116 convenience.
117
118
119 fontdata
120 ========
121 The fontdata utility reads Slackware gzipped console font data
122 to create the fontdata.h file required for compilation of SPLAT!.
123 Font data of the type needed by this utility may be found under
124 /usr/lib/kbd/consolefonts (Slackware < 8), or under
125 /usr/share/kbd/consolefonts (Slackware >= 8.0).
126
127 A default fontdata.h file is already included in with SPLAT!, and is
128 a derivative of the s.fnt console font type available under Slackware.
129 fontdata takes as an argument the name of the file containing the
130 gzipped compressed console fonts:
131
132         fontdata s.fnt.gz
133
134
135 Building The Utilities
136 ======================
137 Normally, these utilities are built and installed along with SPLAT!
138 when SPLAT!'s ./configure script is invoked.  However, if you modify
139 them and/or wish to build and install them separately, here is how it's
140 done.  First, invoke the "build" script to compile each or all utilities
141 in this directory by name.  For example:
142
143         ./build citydecoder
144
145 compiles citydecoder only, while
146
147         ./build all
148
149 compiles all utilities.
150
151
152 Installing The Utilities
153 ========================
154 Invoke the "install" script to install each or all utilities in this
155 directory by name.  For example:
156
157         ./install citydecoder
158
159 installs citydecoder only, while
160
161         ./install all
162
163 installs all utilities.
164
165 You need to be 'root' to install any or all of these utilities.
166
167 ---
168 John A. Magliacane, KD2BD
169 March 2006
170