Skip to content

Commit

Permalink
Updating the utils readme
Browse files Browse the repository at this point in the history
Converted to markdown format
  • Loading branch information
Peter Watkins committed Feb 26, 2020
1 parent 59d4458 commit 1bcfb28
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 87 deletions.
1 change: 0 additions & 1 deletion README2

This file was deleted.

1 change: 1 addition & 0 deletions README_utils.md
125 changes: 39 additions & 86 deletions utils/README → utils/README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,48 @@
================
SPLAT! Utilities
================
# SPLAT! Utilities

Utilities for use with SPLAT! software are found under the
splat-1.4.1/utils directory. They include the following:
`utils` directory. They include the following:


srtm2sdf
========
The srtm2sdf utility generates SPLAT Data Files (SDFs) from STS-99
## srtm2sdf
The `srtm2sdf` utility generates SPLAT Data Files (SDFs) from STS-99
Space Shuttle Topography Mission (SRTM) elevation data files. This
data is of a much higher quality than that contained in older USGS
Digital Elevation Models of the same resolution. However, many SRTM
Version 2 elevation models contain data "spikes", "voids", and "wells"
that are the consequence of the radar mapping process.

The srtm2sdf utility has the ability to detect and replace SRTM data
outliers with equivalent usgs2sdf derived SDF data (see usgs2sdf below).
The `srtm2sdf` utility has the ability to detect and replace SRTM data
outliers with equivalent usgs2sdf derived SDF data (see `usgs2sdf` below).
If such data is not available, SRTM outliers are handled either through
adjacent pixel averaging, or by threshold limiting using user-specified
limits. Of all three methods, the USGS-derived SDF replacement method
yields the best results.

The srtm2sdf utility processes SRTM-3 3-arc second resolution data
The `srtm2sdf` utility processes SRTM-3 3-arc second resolution data
or use with SPLAT! operating in standard definition mode.

SRTM-3 Version 2 Elevation Data files may be downloaded from:

http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/

Files available at this site are ZIP compressed, and must be
uncompressed (using "unzip", or "gunzip -S .zip") prior to being
processed by srtm2sdf.
uncompressed (using `unzip`, or `gunzip -S .zip`) prior to being
processed by `srtm2sdf`.

The srtm2sdf utility accepts command-line options as follows:
The `srtm2sdf` utility accepts command-line options as follows:

-d: used to specify the directory path to the location of usgs2sdf
-d: used to specify the directory path to the location of `usgs2sdf`
derived SDF files that are to be used to replace outliers found
in the SRTM data file. The -d option overrides the default path
specified in your $HOME/.splat_path file.
in the SRTM data file. The `-d` option overrides the default path
specified in your `$HOME/.splat_path file`.

-n: used to specify the elevation (in meters) below which SRTM data
is either replaced with usgs2sdf-derived SDF data, or averaged
is either replaced with `usgs2sdf`-derived SDF data, or averaged
among adjacent elevation data points. The default threshold for
the replacement limit is sea-level (0 meters). Unless elevations
below sea-level are known to exist for the region being
processed by the srtm2sdf utility, the -n option need not be
processed by the `srtm2sdf` utility, the `-n` option need not be
specified.

Some examples of srtm2sdf use:
Expand Down Expand Up @@ -90,9 +87,8 @@ extension given as its argument. Finally, move or copy the generated
.sdf file to your SPLAT! working directory.


srtm2sdf-hd
===========
The srtm2sdf-hd utility operates in an identical manner as srtm2sdf,
## srtm2sdf-hd
The `srtm2sdf-hd` utility operates in an identical manner as `srtm2sdf`,
but is used to generate HD SDF files from SRTM-1 one-arc second
resolution data files for use with SPLAT! HD. SRTM-1 data files
are available for the United States and its territories and
Expand All @@ -101,33 +97,30 @@ possessions, and may be downloaded from:
http://dds.cr.usgs.gov/srtm/version2_1/SRTM1/


usgs2sdf
========
The usgs2sdf utility takes as an argument the name of an uncompressed
## usgs2sdf
The `usgs2sdf` utility takes as an argument the name of an uncompressed
and record delimited Digital Elevation Model Data (DEM) downloaded from
the US Geological Survey, and generates a SPLAT Data File (SDF) compatible
with SPLAT! Software. usgs2sdf may be invoked manually, or via the
with SPLAT! Software. `usgs2sdf` may be invoked manually, or via the
postdownload script.


postdownload
============
postdownload is a front-end to the usgs2sdf utility. postdownload
## postdownload
`postdownload` is a front-end to the usgs2sdf utility. `postdownload`
takes as an argument the name of the gzipped Digital Elevation Model
(DEM) downloaded from the US Geological Survey (ie: wilmington-w.gz).
postdownload uncompresses the DEM file, adds necessary record delimiters,
and invokes usgs2sdf to produce a SPLAT! Data File (SDF).
`postdownload` uncompresses the DEM file, adds necessary record delimiters,
and invokes `usgs2sdf` to produce a SPLAT! Data File (SDF).

USGS Digital Elevation Models may be downloaded from:

http://edcftp.cr.usgs.gov/pub/data/DEM/250/

Invoke postdownload with the name of each DEM file downloaded to
Invoke `postdownload` with the name of each DEM file downloaded to
produce a database of SPLAT Data Files.


citydecoder
===========
## citydecoder
This utility reads certain U.S. Census Bureau files to produce city/site
data files that can be imported into SPLAT! software to annotate
SPLAT!-generated maps. Incorporated Places/Census Designated Places
Expand All @@ -145,11 +138,11 @@ http://web.archive.org/web/20130331172800/http://www.census.gov/geo/www/cob/cs20

(Formerly: http://www.census.gov/geo/www/cob/cs2000.html)

and processed with the citydecoder utility.
and processed with the `citydecoder` utility.

Please select the ARC/INFO Ungenerate (ASCII) Metadata Cartographic Boundary
Files from these sites and unzip them prior to processing them with
citydecoder:
`citydecoder`:

unzip -a pl34_d00_ascii.zip
unzip -a cs34_d00_ascii.zip
Expand All @@ -158,7 +151,7 @@ U.S. Census files are cataloged by the two digit FIPS code for the region
(state) they represent. A list of FIPS codes is included in fips.txt
under splat-1.4.1/utils for your convenience.

citydecoder takes as an argument the two-letter file prefix plus the FIPS
`citydecoder` takes as an argument the two-letter file prefix plus the FIPS
code of the region or state being processed. For example:

citydecoder pl34
Expand All @@ -171,12 +164,12 @@ sorted and written to a file (cities.nj.dat) in the following manner:
citydecoder pl34 | sort > cities.nj.dat

In a similar manner, unzipped County Subdivision files may be processed
with the citydecoder utility to produce a file containing locations and
with the `citydecoder` utility to produce a file containing locations and
names of towns, townships, and boroughs:

citydecoder cs34 | sort > townships.nj.dat

citydecoder can also process more than one file or file type per invocation,
`citydecoder` can also process more than one file or file type per invocation,
and produce a merged output file as follows:

citydecoder pl34 cs34 | sort > everything.in.nj.dat
Expand All @@ -186,66 +179,26 @@ will be reflected in the merged output file, so some manual editing of
the output file may be necessary.


fontdata
========
The fontdata utility reads Slackware gzipped console font data
to create the fontdata.h file required for compilation of SPLAT!.
## fontdata
The `fontdata` utility reads Slackware gzipped console font data
to create the `fontdata.h` file required for compilation of SPLAT!.
Font data of the type needed by this utility may be found under
/usr/lib/kbd/consolefonts (Slackware < 8), or under
/usr/share/kbd/consolefonts (Slackware >= 8.0).
`/usr/lib/kbd/consolefonts` (Slackware < 8), or under
`/usr/share/kbd/consolefonts` (Slackware >= 8.0).

A default fontdata.h file is already included in with SPLAT!, and is
A default `fontdata.h` file is already included in with SPLAT!, and is
a derivative of the s.fnt console font type available under Slackware.
fontdata takes as an argument the name of the file containing the
gzipped compressed console fonts:

fontdata s.fnt.gz


bearing
=======
## bearing
The bearing utility reads a pair of .qth files specified on the command
line, and returns the azimuth bearing and great circle path distance between
the two points specified. A -metric switch is available so that distances
the two points specified. A `-metric` switch is available so that distances
can be provided in kilometers rather than statute miles. SPLAT! provides
similar distance and bearing information between two specific site locations.
The bearing utility, however, provides the information quickly and easily
over great distances without having to run SPLAT!


Building The Utilities
======================
Normally, these utilities are built and installed along with SPLAT!
when SPLAT!'s ./configure script is invoked. However, if you modify
them and/or wish to build and install them separately, here is how it's
done. First, invoke the "build" script to compile each or all utilities
in this directory by name. For example:

./build citydecoder

compiles citydecoder only, while

./build all

compiles all utilities.


Installing The Utilities
========================
Invoke the "install" script to install each or all utilities in this
directory by name. For example:

./install citydecoder

installs citydecoder only, while

./install all

installs all utilities.

You need to be 'root' to install any or all of these utilities.

---
John A. Magliacane, KD2BD
January 2014

0 comments on commit 1bcfb28

Please sign in to comment.