U.S. Fish and Wildlife
Service


Unix Data to PC Format Data (general):
DLG data to ArcView Shapefile format data (needs Unix to DOS conversion first):

While there is extensive DLG data available on the Internet or from inexpensive CD-ROMS, most of the data is in Unix format, and cannot be directly into PC based GIS programs. Utilities exist to aid in the conversions, but are generally scattered over a number of sites, with minimal documentation. The first section below outlines the steps to uncompress UNIX data using the Gunzip and Tar utilities (DOS versions). The second section steps through specifically converting DLG data to an ArcView Shapefile format. Options are given both for USGS DLG data and the NWI DLG data. Originators of the utilities, or sites from which they were downloaded or linked are credited wherever possible; this is a compilation of existing utilities, not new programming.

The last section references attribute definitions for the USGS DLG data, and includes Internet address for both NWI data and USGS data. The attribute information for NWI data comes with the data when you download it. The attribute information for the USGS data is incomplete when you download the data (i.e. there are only numeric codes, no label information as to what those codes mean). The files available here in Word format list attribute information for hydrography, hypsography, transportation, boundary, and public land survey information at the 1:100,000 scale. Attribute information for the other scales is similar but not identical. The complete DLG documentation files are available online from USGS via a browser Choose the correct scale (24, 100, 2mil) to get to the documentation once there. The file names generally start with DUG for "Data User's Guide". The files are VERY large (300-600 Kb); the files offered here are pieces of one appendix.

Many of the utilities and script files available for download below are compressed using the DOS compression utility Pkzip (if it ends with a zip extension, it is compressed this way). If you do not have a copy of the Pkunzip utility you can download a self-extracting copy of the utility and by clicking here. Just type pkzipdoc and it will uncompress. To get a list of the command parameters just type pkunzip without any other commands, and you will get a simple list. Basic unzipping syntax is pkunzip filename.


Unix Data to PC Format Data:

1- Most UNIX data on the Internet has been compressed using the Gzip utility. Files compressed this way almost always end with a GZ extension or a TGZ extension. This utility is the UNIX equivalent of Pkzip. To uncompress a file, you will need to use the Gunzip command. The simplest format, and one which works most of the time, is "gunzip -d filename" (without the ""). To download a copy of this utility and documentation click here.

2- Some UNIX data will also have been "tarred". Data in this format will have a "tar" extension when it has been uncompressed. This occurred generally when multiple files are needed to create a complete coverage (for example SDTS data can use up to 29 files per coverage). The Tar command is also used on some system to archive data that needs to remain together. To extract data that has been "tarred" you need the Tar utility. The most common usage of the command is "tar -vxf filename" (without the ""). To download a copy of the utility and documentation click here.


DLG data to ArcView Shapefile format data (needs Unix to DOS conversion first):

1- Once you have the data uncompressed and untarred, there is an additional step needed for DLG data. Other types of Unix data may need other processing steps; this relates specifically to USGS and NWI data in the DLG optional format. DLG data can be viewed using almost any editor or word processor. It is ASCII characters. For PC based GIS systems to use the data, however, each line can be no longer that 80 characters. The Unix data does not have carriage returns at the end of each line that DOS will recognize (Unix uses a different ASCII character to indicate carriage return). There are a number of ways to make sure each line is 80 characters long. The chop utility offered here is a simple program that only does that task. This file originally came from the GIS Utilities section on the BLM GIS homepage, put together by Sol Katz http://www.geocommunicator.gov/GeoComm/index.shtm. The basic command line for executing the program is "chop 80 <oldfile> newfile" (without the "", but the <> around the oldfile IS needed).

2- While many PC-based GIS programs will directly import the DLG file at this point, ArcView software will not. An additional step is needed. To provide a service to FWS staff using ArcView, NWI created a script file and simple exercise that can be used to convert the NWI DLG data to a Shapefile that ArcView will read. You can download the entire script file, exercise, and sample data from their site. If you just want to download the exercise and script file (no sample data) click here. The file ex1.txt give directions for loading and compiling the script file. Simply substitute whatever data file you are using. The directions were written for ArcView 2.1, but will work for 3.0 as well. The only difference is in step #22; in the legend editor you will need to select unique value' before you can select attribute from the field pull down menu.

NWI data files location

3- The script file that NWI used above was edited from an avenue file, made available at another utility site on the WWW . There are a number of other utilities and AML's at the site if you are interested. The USGS DLG to Shapefile script and general directions for using it can be downloaded by clicking here. The file usgsexer.txt was created from the NWI ex1.txt, and gives the basic steps for loading and running the avenue script dlg20a.ave.

USGS DLG data files location


USGS DLG Attribute Data information

Attribute information for a number of DLG data layers can be found on the DLG Tools page. Currently there are Word documentation files and Dbase III lookup files. This information has been updated with the most current USGS documentation, and should be valid for all scales of DLG data, as well as SDTS attribute data. Information on the following DLG layers is available now:


For additional information regarding this Web page, contact Chris Lett, in the Division of Information Resources and Technology Management, at Chris_Lett@fws.gov


Return to the GIS Activities Home Page
Visit the U.S. Fish and Wildlife Service Home Page

Keywords=GIS, data, metadata, steering, boundary, realty, refuge
Last Modified January 03, 2001 10:30 AM