Dealing with .tar.gz files

8 March 2000
DEMs (available for Virginia from http://edcwww.cr.usgs.gov/doc/edchome/ndcdb/7_min_dem/states/VA.html)are in SDTS format and are compressed. I have found that turning them into a form that ArcView can handle is a complicated process, though there may be shortcuts I haven't discovered yet. I fear that this procedure isn't available in public labs (students can't get to the SDTS Raster to Grid utility), and the whole thing does rely on having ArcView 3.2 and Spatial Analyst. Just so I don't have to reinvent the wheel every time I have to do this, here's my step-by-step process, using *Windows, *the Mac, and *Liberty (**BUT see the note at the end!!):
  1. I use the Mac to retrieve the compressed SDTS files I want, placing them in a temporary desktop folder. The file names are long and unhelpful, so I change them to something mnemonically less tortuous (keeping the _tar.gz suffix)
  2. I have a directory on Liberty to contain files I'm gunzipping and tarring (/compress), in which I store the files created by the process temporarily... so the first step is to rm *.DDF to clear out space for the next decompression.
  3. I use Fetch to retrieve a .tar.gzip file from the desktop folder and place it in the /compress folder on Liberty (NB: specify binary transfer, and raw data, or else you get garbage)
  4. at the system prompt, enter these two commands:
    gunzip -f filename.gz
    tar -xf filename
    This produces a bunch of .DDF files, which must then be Fetched to an appropriately-named folder on the Mac desktop, then moved to an appropriate network drive (Miley or whatever)
  5. the .DDF files have a 4-digit number as the first 4 characters of their file name, which is necessary for the next step...
  6. from the ArcView entry in the Windows Start menu, choose "SDTS Raster to Grid", which will produce a dialog box (instructions at http://home.wlu.edu/~blackmerh/maps/sdtsconv.html)which runs a DOS program that converts the DEM to an ArcView-useable grid theme.

Late-breaking news (9 Mar 2000): I discovered that the Windows unzipping utilities will actually work, with a bit of legerdemain that's undocumented in any place I can find:
Any of the utilities (WinZip, PentaZip, etc.) will handle the .gz and produce a file with a name ending in _tar. If one then renames the file as .tar and then runs the EXTRACT function on that, the tar'd files are revealed. So all that stuff about Liberty and the Mac turns out to be unnecessary.

The problem of running the Raster-to-Grid conversion in the lab setting still remains.