move gbp.conf to debian/
[debian/splat] / utils / README
1                         ================
2                         SPLAT! Utilities
3                         ================
4
5 Utilities for use with SPLAT! software are found under the
6 splat-1.3.0/utils directory.  They include the following:
7
8
9 srtm2sdf
10 ========
11 The srtm2sdf utility generates SPLAT Data Files (SDFs) from STS-99
12 Space Shuttle Topography Mission (SRTM) elevation data files.  This
13 data is of a much higher quality than that contained in older USGS
14 Digital Elevation Models of the same resolution.  However, many SRTM
15 Version 2 elevation models contain data "spikes", "voids", and "wells"
16 that are the consequence of the radar mapping process.
17
18 The srtm2sdf utility has the ability to detect and replace SRTM data
19 outliers with equivalent usgs2sdf derived SDF data (see usgs2sdf below).
20 If such data is not available, SRTM outliers are handled either through
21 adjacent pixel averaging, or by threshold limiting using user-specified
22 limits.  Of all three methods, the USGS-derived SDF replacement method
23 yields the best results.
24
25 The srtm2sdf utility processes SRTM-3 3-arc second resolution data
26 or use with SPLAT! operating in standard definition mode.
27
28 SRTM-3 Version 2 Elevation Data files may be downloaded from:
29
30     ftp://e0srp01u.ecs.nasa.gov:21/srtm/version2/
31
32 Files available at this site are ZIP compressed, and must be
33 uncompressed (using "unzip", or "gunzip -S .zip") prior to being
34 processed by srtm2sdf.
35
36 The srtm2sdf utility accepts command-line options as follows:
37
38 -d:  used to specify the directory path to the location of usgs2sdf
39      derived SDF files that are to be used to replace outliers found
40      in the SRTM data file.  The -d option overrides the default path
41      specified in your $HOME/.splat_path file.
42
43 -n:  used to specify the elevation (in meters) below which SRTM data
44      is either replaced with usgs2sdf-derived SDF data, or averaged
45      among adjacent elevation data points.  The default threshold for
46      the replacement limit is sea-level (0 meters).  Unless elevations
47      below sea-level are known to exist for the region being
48      processed by the srtm2sdf utility, the -n option need not be
49      specified.
50
51 Some examples of srtm2sdf use:
52
53     srtm2sdf N40W074.hgt
54
55     srtm2sdf -d /cdrom/sdf N40W074.hgt
56
57     srtm2sdf -d /dev/null N40W074.hgt (/dev/null prevents USGS data
58                 replacement from taking place)
59
60     srtm2sdf -n -5 N40W074.hgt
61
62 In all cases, SDF files are written into the current working directory.
63
64 The srtm2sdf utility may also be used to convert 3-arc second SRTM data
65 in Band Interleaved by Line (.BIL) format for use with SPLAT!  This data 
66 is available via the web at: http://seamless.usgs.gov/website/seamless/
67
68 Once the region of the world has been selected at this site, select the
69 "Define Download Area By Coordinates" button under "Downloads".  Proceed
70 to request the download of the region(s) desired in 1 degree by 1 degree
71 regions only, and make sure bounding coordinates entered fall exactly on
72 whole numbers of latitude and longitude (no decimal fractions of a degree).
73
74 Select the "Add Area" button at the bottom.
75
76 On the next screen, select "Modify Data Request".  On the subsequent screen,
77 de-select the National Elevation Dataset (NED) format and select "SRTM 3 arc
78 sec - Shuttle Radar Topography Mission [Finished]".  Change the format from
79 ArcGrid to BIL, and from HTML to TXT.
80
81 Select the "Save Changes and Return To Summary" button.
82
83 Select the "Download" button, and save the file once it has been sent to
84 your web browser.
85
86 Uncompressing the file will generate a directory containing all files
87 contained within the downloaded archive.  Move into the directory and
88 invoke srtm2sdf as described above with the filename having the .bil
89 extension given as its argument.  Finally, move or copy the generated
90 .sdf file to your SPLAT! working directory.
91
92
93 srtm2sdf-hd
94 ===========
95 The srtm2sdf-hd utility operates in an identical manner as srtm2sdf,
96 but is used to generate HD SDF files from SRTM-1 one-arc second
97 resolution data files for use with SPLAT! HD.  SRTM-1 data files
98 are available for the United States and its territories and
99 possessions, and may be downloaded from:
100
101     ftp://e0srp01u.ecs.nasa.gov:21/srtm/version2/SRTM1/
102
103
104 usgs2sdf
105 ========
106 The usgs2sdf utility takes as an argument the name of an uncompressed
107 and record delimited Digital Elevation Model Data (DEM) downloaded from
108 the US Geological Survey, and generates a SPLAT Data File (SDF) compatible
109 with SPLAT! Software.  usgs2sdf may be invoked manually, or via the
110 postdownload script.
111
112
113 postdownload
114 ============
115 postdownload is a front-end to the usgs2sdf utility.  postdownload
116 takes as an argument the name of the gzipped Digital Elevation Model
117 (DEM) downloaded from the US Geological Survey (ie: wilmington-w.gz).
118 postdownload uncompresses the DEM file, adds necessary record delimiters,
119 and invokes usgs2sdf to produce a SPLAT! Data File (SDF).
120
121 USGS Digital Elevation Models may be downloaded from:
122
123     http://edcftp.cr.usgs.gov/pub/data/DEM/250/
124
125 Invoke postdownload with the name of each DEM file downloaded to
126 produce a database of SPLAT Data Files.
127
128
129 citydecoder
130 ===========
131 This utility reads U.S. Census Bureau files of Incorporated Places/Census
132 Designated Places, and generates city/site data files for use with SPLAT!
133 software.  Files for use with this utility are available for download
134 free of charge from:
135
136         http://www.census.gov/geo/www/cob/bdy_files.html.
137
138 Please select the ARC/INFO Ungenerate (ASCII) Metadata Cartographic Boundary
139 Files from this site and unzip them prior to importing them to citydecoder.
140 U.S. Census files are cataloged by the two digit FIPS code for the region
141 (state) they represent.  citydecoder takes as an argument the two-letter
142 file prefix plus the FIPS code of the region or state being processed.
143 For example:
144
145         citydecoder pl34
146
147 reads files "pl34_d00.dat" and "pl34_d00a.dat" that are extracted after
148 the downloaded file has been unzipped, and generates a list of city names
149 and geographical coordinates for the state of New Jersey (FIPS code 34).
150 This data may be sorted and written to a file (cities.nj.dat) in the
151 following manner:
152
153         citydecoder pl34 | sort > cities.nj.dat
154
155 A list of FIPS codes (fips.txt) is included under splat-1.3.0/utils
156 for your convenience.
157
158
159 fontdata
160 ========
161 The fontdata utility reads Slackware gzipped console font data
162 to create the fontdata.h file required for compilation of SPLAT!.
163 Font data of the type needed by this utility may be found under
164 /usr/lib/kbd/consolefonts (Slackware < 8), or under
165 /usr/share/kbd/consolefonts (Slackware >= 8.0).
166
167 A default fontdata.h file is already included in with SPLAT!, and is
168 a derivative of the s.fnt console font type available under Slackware.
169 fontdata takes as an argument the name of the file containing the
170 gzipped compressed console fonts:
171
172         fontdata s.fnt.gz
173
174
175 bearing
176 =======
177 The bearing utility reads a pair of .qth files specified on the command
178 line, and returns the azimuth bearing and great circle path distance between
179 the two points specified.  A -metric switch is available so that distances
180 can be provided in kilometers rather than statute miles.  SPLAT! provides
181 similar distance and bearing information between two specific site locations.
182 The bearing utility, however, provides the information quickly and easily
183 over great distances without having to run SPLAT!
184
185
186 Building The Utilities
187 ======================
188 Normally, these utilities are built and installed along with SPLAT!
189 when SPLAT!'s ./configure script is invoked.  However, if you modify
190 them and/or wish to build and install them separately, here is how it's
191 done.  First, invoke the "build" script to compile each or all utilities
192 in this directory by name.  For example:
193
194         ./build citydecoder
195
196 compiles citydecoder only, while
197
198         ./build all
199
200 compiles all utilities.
201
202
203 Installing The Utilities
204 ========================
205 Invoke the "install" script to install each or all utilities in this
206 directory by name.  For example:
207
208         ./install citydecoder
209
210 installs citydecoder only, while
211
212         ./install all
213
214 installs all utilities.
215
216 You need to be 'root' to install any or all of these utilities.
217
218 ---
219 John A. Magliacane, KD2BD
220 August 2008
221