3 # Simple script for processing of downloaded undelimited gzipped
4 # USGS DEM files, and converting them to SPLAT Data Files.
5 # Written by John A. Magliacane, KD2BD May 2002.
6 # Last modified on Friday 24-Mar-06.
10 echo "This utility reads downloaded gzipped USGS DEM"
11 echo "files and generates equivalent SPLAT Data Files (SDFs)."
13 echo "Files compatible with this SPLAT! utility may be"
16 echo "http://edcftp.cr.usgs.gov/pub/data/DEM/250/"
18 echo "Usage: postdownload wilmington-w.gz"
21 # gunzip the downloaded file...
22 echo -n "Uncompressing $1..."
23 gunzip -c $1 > unzipped_file
25 echo "Adding record delimiters..."
26 dd if=unzipped_file of=delimited_file ibs=4096 cbs=1024 conv=unblock
27 # Invoke usgs2sdf to generate a SPLAT Data File...
28 usgs2sdf delimited_file
29 echo -n "Removing temp files..."
30 rm delimited_file unzipped_file