GSDA:Decompressing Files

From XMS Wiki
Jump to: navigation, search

Background

Most compressed files are *.zip files and may have a .zip file extension at the end of the filename. Some compressed files such as 7.5-minute DEM files are downloaded as a *.tar.gz file type, and the 1:250,000 DEMs are downloaded as *.gz files. Compressed files must be decompressed before using them in WMS or elsewhere. Decompression steps are slightly different for different types of compressed files. The general steps for decompressing any of these files are:

  1. Download an decompression utility (if you haven't already).
  2. Decompressing the file(s).



Downloading a Decompression Utility

You can download an evaluation version of WinZip (www.winzip.com) or other Public Domain zip / unzip programs to decompress your files. Try using any popular internet search engine to find other decompression software (a powerful, free decompression program is ZipGenius, which can be downloaded from www.zipgenius.it).




Decompressing a Typical *.zip File

WinZip

  • Find the compressed file.
  • Either start WinZip and open your file, or simply double-click on the compressed file and WinZip should start automatically. The file(s) will be shown in the WinZip window.
  • Select Extract.
  • Choose the destination folder and select Extract again. The decompressed file(s) should now be in the destination folder.
The Quick Method
  • Right-click on the compressed file and choose Extract to folder (followed by the current path).
The decompressed files are extracted to a folder with the same name as your compressed file, located in the same directory as the compressed file. You may need to refresh the directory view in order to see the new folder.


Decompressing and Untarring a *.gz or *.tgz file

You can decompress a *.gz or *.tgz compressed file with WinZip or with the "GZIP and Tar" utility—the procedures for each method are as follows::

WinZip

The file name should have a file extension of *.gz or *.tgz. If not, rename it accordingly,

  • Double-click on the compressed file to Start WinZip,:* Choose YES when asked "should WinZip decompress it to a temporary folder and open it?"
  • Click the Extract button at the top,
  • Enter a location in the "extract to" field where you want to save the extracted files,
  • Click the Extract button,
The Quick Method
  • Right-click on the compressed file and choose Extract to folder (followed by the current path),
  • Choose YES when asked "should WinZip decompress it to a temporary folder and open it?"
The decompressed files are extracted to a folder with the same name as your compressed file, located in the same directory as the compressed file. You may need to refresh the directory view in order to see the new folder.

Gzip and Tar

  • Rename the file to remove the numbers and periods. The file name can only have 8 characters in the name and 3 characters in the suffix. The file should be <filename.gz>
  • Open a MS DOS window.
  • Go to the directory where you saved the programs gzip.exe and tar.exe. Your DEM file needs to be in this same directory.
  • To decompress the file type... <gzip -d filename>.
  • To untar the file type... < tar -xvf filename>.
  • You should have about 18 files, most with the *.ddf file extension.