File: postdownload

package info (click to toggle)
splat 1.4.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,332 kB
  • sloc: cpp: 8,650; ansic: 993; sh: 442; lisp: 244; makefile: 31
file content (34 lines) | stat: -rwxr-xr-x 950 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/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 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