Before starting any work, it is easier to download all the files used in the conversion steps. They come from a variety of sites; Internet address, file names, and links can be found below. A standard browser can be used to download files from any of the sites, including the FTP sites.
Getting the files you need
USGS EROS Data Center: ftp://edcftp.cr.usgs.gov/pub/data/
This site contains the SDTS data files, both the master data dictionary files and the
specific data files for each quad. There is a README file that gives site specific
guidance. You need the following files from this site:
1- 00MasterDD_LRG_SDTS_tar.zip (master data dictionary for 1:24,000 data)
2- Desired data file(s); these are organized alphabetically, by quad name, with the
following conventions:
SDTS transfers are stored as compressed "tar" archive files. Each transfer
contains a complete set of files, for a specific layer and version, covering a quadrangle.
The transfer naming convention is as follows:
XXX.layer.V.sdts.tar.gz.
- XXX = unique quadrangle identifier which consists of quad SE coordinates preceded
by a D
- layer = data category name abbreviation (such as bd for boundary) followed by 0
(zero) and "s " (for 7.5 minute) or "f" (for 15 minute)
- V = file version (1-current, 2-historic)
- SDTS = denotes that the data is in SDTS format
- tar = represents "tar" file
- gz = refers to the "gzip" compression
USGS Midcontinent Data Center: http://thor-f5.er.usgs.gov/sdts/software/dlg3/
This site contains documentation on SDTS data. You only need one file: the DLG-3 SDTS
Transfer Description manual, describing in detail the .ddf modules and attribute codes.
This is the file at the end of the above address.
BLM Geospatial Staff : ftp://ftp.blm.gov/pub/gis/sdts
This site contains public domain conversion routines written and/or compiled by Sol Katz.
You will need several files to do the actual SDTS to DLG conversion. Most of the
files are zipped to facilitate downloads - the Index file will identify the files if you
are unsure.
(Note - links have been added here to zipped copies of the executables as the BLM ftp site is having problems. Use PKzip or WinZip to uncompress.)
1- SDTS2DLG.exe
2- SDTS.txt, SDTS_FAQ.txt (documentation)
3- DLGBLD.exe
4- DOSXMSF.exe
5- ATTR2DAT.exe
6- PCATDUMP.exe
ArcView program site: http://www.pierssen.com/arcview/arcview.htm
This site has a number of ArcView utilities. You only need one file: DLG21A.ave, the
script to convert DLG format data to a Shapefile. This is an updated version of the
script file, and should remove the need to run the 'chop' file (part of the uncompressing
data reference below).
U.S. Fish and Wildlife Service Tools for Using DLG Data: http://www.fws.gov/data/gisconv/dlgtools.html
This sites contains background information on various types of DLG data. You will need the
appropriate DBase III files (hydrology, etc) to get the needed lookup tables with longer
descriptions of the attributes in addition to the numeric codes.
Avenue Script to create DBF files: http://www.fws.gov/data/gisconv/dlgattin.zip
Right click on the link to download the zipped avenue script. This script will
take the output from the BLM programs and create the DBF files needed to link
attributes in ArcView.
Uncompressing the data
There are a number of ways to extract or uncompress the files. WinZip used with the "TAR file Smart CR/LF conversion" turned off will work. Another option is to use gunzip with the -d option, then tar with the -vxf option to decompress and extract the files. See http://www.fws.gov/data/gisconv/gisconv.html for more detailed directions on that method. Please note - at least some versions of gunzip will not deal with long UNIX names; you need to rename the file using an 8.3 DOS naming convention. Decompress and extract the data files and the MasterDD file in the same directory.
After uncompressing the files there will be many files in the directory. These files are discussed in detail in the complete SDTS Transfer Description. For a summary, you can download the SDTS Overview document (extracted and summarized from the Transfer Description and other USGS documents) at http://www.fws.gov/data/gisconv/sdtssum.html . The next step is to convert the DDF files to DLG format, using the SDTS2DLG.exe and other BLM programs. This program and all the BLM executables should be run at the DOS prompt, preferably in the same directory as the .DDF files being converting. Please pay attention to the notes below on naming conventions, as they will help you avoid problems when running the ArcView scripts later.
1- Type SDTS2DLG and enter the required info when prompted:
a. First enter the first 4 characters (TR01 for transportation files, HY01 for hydrology,
etc.)
b. Enter an output file name ( hyav, rdav, etc)
c. Enter the digits in positions 7 and 8 of the file being converting. This is usually 01
but may vary for 1;100,000 scale or other multiple layers. The file names will contain LE,
NA, NE, NO, NP, or PC, depending on the type of geographic feature being referenced such
as line (LE) or polygon (PC). See table 2 in the SDTS Transfer Overview for more
information on these files.
d. This program creates two files. If the output file name was hyav, the files will
be called hyav.dlg and hyav.dla. Whatever names you choose in this program, you need
to consistently use the same naming conventions for steps 2, 3, and 4 below as well or the
Avenue scripts will not run properly. The name does not matter as much as the format
and consistency. In this example hyav indicates hydrology for the Arvada quad.
NOTE: SDTSLDLG is an alternative file that works better for some of the manmade and survey and control points data. It can be downloaded at http://www.fws.gov/data/gisconv/sdtsldlg.zip This program was also written by Sol Katz, to try and deal with some of the irregularities of certain types of SDTS data. The commands and prompts are the same as above.
2. Type DLGBLD at the DOS prompt (reminder - Win 31. or Win95, NOT NT 4.0) in the
active directory to add missing linkage records. When prompted enter the existing DLG file
name (the output from step b above), and then a new file name.
a. Type DLGBLD
b. Enter the first file name with an extension: hyav.dlg
c. Enter a new file name with an extension: hyav2.dlg
d. Once this program has created a new DLG file with attribute linkages, you can delete
the original file (hyav.dlg). You should then rename the new file (hyav2.dlg) to the
original file name (hyav.dlg). This can be done anytime before running the Avenue
scripts.
NOTE: Even using the SDTSLDLG, runing DLGBLD on the manmade data files still does not work consistently. It ceases to function when it encounters area data in the DLG file. Despite this fact, once the rest of the programs are run and the data converted to a shape file, the point data appears to be accurate. The polygon dat file, however, would not open (this may be due to the number of arcs..... or not). Stay tuned.
3. Convert the Feature Attribute Modules to .dat files. These files have the attribute codes. Their names will contain the key letters listed below, which vary with the type of data:
AHPF - Hypsography
AHYF - Hydrography
ASCF - Vegetative Surface Cover
ANVF - Non-vegetative Features
ABDF - Boundaries
ASMF - Survey Control and Markers
ARDF - Roads and Trails
ARRF - Railroads
AMTF - Pipelines, Transmission Lines, and Miscellaneous Transportation Features
AMSF - Manmade Features
APLF - U.S. Public Land Survey System
To convert the files type ATTR2DAT, enter the entire file name including the .ddf
extension when prompted, and give the output file a name when prompted - the .dat
extension is appended by the program.
a. Type ATTR2DAT
b. Enter the input file name (in this example hy01ahyf.ddf)
c. Enter the output file name (here Hyavahyf which becomes Hyavahyf.dat) Note the
use again of the letters Hyav in front of the module key letters (ahyf here for
hydrology). This naming consistency is required.
There are other Primary Attribute Modules that are different from feature attribute modules. They are listed in Table 5, in the SDTS Transfer Overview document. An example would be the route numbers, found in TR01ARDM.DDF for the Transportation Module. ATTR2DAT also works for those modules. Tips on relating the resulting file to the main data file will be given in the individual notes for each type of data.
4. Use PCATDUMP for any data types that have area (Polygon) data. This program
creates a file equivalent in format to the .dla file created along with the .dlg file in
Step 1. This file will be used later to link polygon attribute data.
a. Type PCATDUMP in the active subdirectory.
b. Enter the first 4 characters (TR01 for transportation files, HY01 for hydrology, etc.)
of the ddf file name.
c. Enter an output file name and use pol.dat as the last three letters and file extension
(hyavpol.dat in this example). Again, be consistent in the naming.
c. Enter the digits in positions 7 and 8 of the file being converting. This is usually 01
but may vary for 1;100,000 scale or other multiple layers. The file will be in the format
xxxPC##.ddf.
It may be easier to keep all of the files (executables, .DDF, output files) in a master "conversion" directory and once the steps above are completed copy them to a destination directory. The only files you need to copy are hyav.dlg, hyav.dla, hyavpol.dat, hyavahyf.scm and hyavahyf.dat. All the remaining conversions are done by two Avenue script files in ArcView.
ArcView Steps
For all data sets you will first need to create DBF files from the DAT and DLA files listed above. The next step will be to create shapefiles from the DLG file. For data with point, line and/or area components you will need to create more than one shapefile. The steps for creating the files and associating the attributes are very similar for all types of data. Step by step directions for creation of the DBF files, point or line shapefiles, and area (polygon) shapefiles are given below .
NOTE: When converting the non-vegetative features and the vegetative surface cover features, only the polygon files had major and minor codes after running through the steps below. For the survey control markers,only the point file had information. For the manmade features, only the point file would draw, although the table for the polygon file showed considerable information.
DBF files
1. Using the dlgattin.ave script, create DBF files that contain the attribute information.
- open ArcView and double click on the scripts icon in the project window.
- from the Script pull down menu select load text file.
- move to the directory where you placed the script, from list files of type choose text
file, and select dlgattin.ave
- from the Script pull down menu select compile.
- from the Script pull down menu select run.
- when the box pops up and asks for the file name enter all the letters (with the path if
needed) EXCEPT the .dlg portion of the file (EG c:\project\hyav).
- tab to the next entry field and enter the attribute string (ahyf for hydrology) and
nothing else.
- click okay - the script should run and create hyavahyf.dbf, hyavpol.dbf, and hyavdla.dbf
in this example.
Point or Line Data
1. Using the DLG21a.ave script, convert the DLG files to shape files.
- open ArcView and double click on the scripts icon in the project window.
- from the Script pull down menu select load text file.
- move to the directory where you placed the script, from list files of type choose text
file, and select dlg20a.ave
- from the Script pull down menu select compile.
- from the Script pull down menu select run.
- from the menu box select your sample dlg data (output from step 3 above - here
hyav.dlg).
- from the feature menu box select point, line or polygon.
- answer yes to the skip first polygon? pop up question if you selected polygon.
- give a name to the output shape file when prompted (here hyav.shp)
2. Add the shapefile to a view, being sure to set Map Units to Meters.
3. Highlight the tables menu and add tables hyavdla.dbf and hyavahyf.dbf. Also add the
appropriate attribute lookup table (sdtshyd.dbf, sdtstran.dbf etc )
4. Open the Attribute Table to hyav.shp as well as the tables added in Step 3.
5. Join the tables (the attribute table is the destination table) using the 4th column,
dlaseqno of hyavdla.dbf (sequential numbers) with the MINOR1 column of the Attribute
table.
6. Join hyavahyf.dbf with the Attribute table using column 1, datseqid (sequential
numbers) with the column attid. That column now immediately precedes the fileid column
(ARDF, AHYF, etc.) in the attribute table.
7. Join the lookup table to the attribute table by linking the sdtsdlg column in the
attribute table and the sdtsdlg column in the lookup table.
8. In View, set legend type to unique value and select Description to get actual values
for the features. Assign desired line weights, colors, etc.
Area Data
9. Create the polygon shape file as in Step 1 above, add the shape file to the view
(hyavp.shp in this example) along with it's attribute table and the file hyavpol.dbf.
10. Open the attribute table for hyavp.shp, the file hyavpol.dbf, hyavahyf.dbf, and the
lookup table sdtshyd.dbf.
11. Join hyavpol.dbf to the attribute table using recidpol and the ID field in the
attribute table.
12. Join hyavahyf.dbf to the attribute table using datseqid and attidpol..
13. Join the lookup table to the attribute table using the sdtsdlg column in the attribute
table and the sdtsdlg column in the lookup table.
14. In View, set legend type to unique value and select Description to get actual values
for the features. Assign desired line weights, colors, etc
Several checks were done converting the original DLG 1:100,000 data and the SDTS data for the same area to shape files. The features (lines, points, etc) matched very well. The attributes differed some, mostly due to the fact certain older attribute codes are not used in the SDTS files. Checks have also been run on the 1:24,000 data using this method and the SDTSIMPORT command in Arc/Info, with good agreement.
Summary of the steps in this conversion process:
1- Download data and executables - make sure to get the master data dictionary too
2- Extract the files (uncompress)
3- Run SDTS2DLG, DLGBLD, PCATDUMP, and ATTR2DAT (as many time as needed)
4- In ArcView, convert .dla and .dat files to .dbf files using script
5- In ArcView, convert DLG files to SHP files, using scripts
6- Join the various tables to add the attribute descriptions
For additional information regarding this Web page, contact Deb Southworth Green, in the Division of Information Technology Management, at Deb_Green@fws.gov
Return to the GIS Activities Home Page
Visit the U.S. Fish and Wildlife Service Home Page
Keywords=GIS, data, SDTS, conversion
Last Modified January 04, 2001 07:29 AM