forked from ExternalVendorCode/Signal-Server
Initial Commit
This commit is contained in:
@@ -107,15 +107,15 @@ 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 signalserver. usgs2sdf may be invoked manually, or via the
|
||||
postdownload script.
|
||||
postdownload.sh script.
|
||||
|
||||
|
||||
postdownload
|
||||
============
|
||||
postdownload is a front-end to the usgs2sdf utility. postdownload
|
||||
postdownload.sh
|
||||
===============
|
||||
postdownload.sh is a front-end to the usgs2sdf utility. postdownload.sh
|
||||
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,
|
||||
postdownload.sh 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:
|
||||
|
4
utils/sdf/convert_sdf.sh
Executable file
4
utils/sdf/convert_sdf.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
for file in *hgt
|
||||
do
|
||||
sudo ./srtm2sdf -d /dev/null $file
|
||||
done
|
4
utils/sdf/convert_sdf_hd.sh
Executable file
4
utils/sdf/convert_sdf_hd.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
for file in *hgt
|
||||
do
|
||||
sudo ./srtm2sdf-hd -d /dev/null $file
|
||||
done
|
33
utils/sdf/postdownload.sh
Executable file
33
utils/sdf/postdownload.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Simple script for processing of downloaded undelimited gzipped
|
||||
# USGS DEM files, and converting them to SPLAT Data Files.
|
||||
# Written by John A. Magliacane, KD2BD May 2002.
|
||||
# Last modified on Sunday 01-Mar-09.
|
||||
|
||||
if [ "$#" = "0" ]; then
|
||||
echo
|
||||
echo "This utility reads downloaded gzipped USGS DEM"
|
||||
echo "files and generates equivalent SPLAT Data Files (SDFs)."
|
||||
echo
|
||||
echo "Files compatible with this SPLAT! utility may be"
|
||||
echo "obtained at:"
|
||||
echo
|
||||
echo "http://edcftp.cr.usgs.gov/pub/data/DEM/250/"
|
||||
echo
|
||||
echo "Usage: postdownload.sh wilmington-w.gz"
|
||||
echo
|
||||
else
|
||||
# gunzip the downloaded file...
|
||||
echo -n "Uncompressing $1..."
|
||||
gunzip -c $1 > unzipped_file
|
||||
echo
|
||||
echo "Adding record delimiters..."
|
||||
dd if=unzipped_file of=delimited_file ibs=4096 cbs=1024 conv=unblock
|
||||
# Invoke usgs2sdf to generate a SPLAT Data File...
|
||||
usgs2sdf delimited_file
|
||||
echo -n "Removing temp files..."
|
||||
rm delimited_file unzipped_file
|
||||
echo
|
||||
echo "Done!"
|
||||
fi
|
Reference in New Issue
Block a user