2 # Simple script for processing of downloaded undelimited gzipped
3 # USGS DEM files, and converting them to SPLAT Data Files.
4 # Written by John A. Magliacane, KD2BD May 2002
8 echo "This utility reads downloaded gzipped USGS DEM"
9 echo "files and generates equivalent SPLAT Data Files (SDFs)."
11 echo "Files compatible with this SPLAT! utility may be"
12 echo "obtained via anonymous ftp at:"
14 echo -e "\tedcftp.cr.usgs.gov"
16 echo "in the pub/data/DEM/250 subdirectory, or via http at:"
18 echo -e "\tedcwww.cr.usgs.gov/glis/hyper/guide/1_dgr_dem#dem7"
20 echo "Usage: postdownload wilmington-w.gz"
23 # gunzip the downloaded file...
24 echo -n "Uncompressing $1..."
25 gunzip -c $1 > unzipped_file
27 echo "Adding record delimiters..."
28 dd if=unzipped_file of=delimited_file ibs=4096 cbs=1024 conv=unblock
29 # Invoke usgs2sdf to generate a SPLAT Data File...
30 usgs2sdf delimited_file
31 echo -n "Removing temp files..."
32 rm delimited_file unzipped_file