Retrieving and Unpacking SDTS Data Tutorial and Users Manual June 23, 1998 Neither the U.S. Government nor any agency thereof nor any of their employees make any warranty, expressed or implied, or assume any legal responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed herein or represent that its use would not infringe privately owned rights. Reference to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the U.S. Government or any agency thereof. 1. Introduction. . . . . . . . . . . . . . . . . . . . . . .1 2. Overview of DLG/SDTS and DEM/SDTS Data. . . . . . . . . .2 2.1 SDTS Overview. . . . . . . . . . . . . . . . . . .2 2.2 Mass Conversion of USGS Data to SDTS . . . . . . .2 2.3 Sales and Distribution Policies. . . . . . . . . .3 2.4 SDTS data organization . . . . . . . . . . . . . .3 2.4.1 DLG/SDTS Data . . . . . . . . . . . . . . .3 2.4.2 DEM/SDTS Data . . . . . . . . . . . . . . .4 3. Summary of Data Retrieval Procedures . . . . . . . . . .4 3.1 DLG/SDTS Data . . . . . . . . . . . . . . . . . . .4 3.2 DEM/SDTS Data . . . . . . . . . . . . . . . . . . .5 4. Detailed Instructions for Retrieving SDTS Data . . . . .5 4.1 Create Local Directory . . . . . . . . . . . . . .6 4.2 Find and Retrieve Data . . . . . . . . . . . . . .6 4.2.1 Find and Retrieve DLG/SDTS Data . . . . . .6 4.2.1.1 DLG/SDTS Transportation Overlay: A Special Case7 4.2.1.2 Retrieve the DLG/SDTS Master Data Dictionary7 4.2.2 Find and Retrieve DEM/SDTS Data. . . . . . .8 4.3 Unzip and Untar. . . . . . . . . . . . . . . . . .8 4.3.1 WinZip. . . . . . . . . . . . . . . . . . .9 4.3.2 Other tar and zip utilities . . . . . . . 10 4.3.2.1 DOS tar and zip utilities . . . . . 10 4.3.2.2 UNIX tar and zip utilities. . . . . 10 4.3.2.3 NT tar and zip utilities. . . . . . 10 5. Problems Downloading Data. . . . . . . . . . . . . . . 10 5.1 FTP . . . . . . . . . . . . . . . . . . . . . . . 10 6. Conclusions and Points of Contact. . . . . . . . . . . 11 1. Introduction Two digital cartographic products of the U.S. Geological Survey (USGS) are vector (DLG) and terrain elevation (DEM) data in the Spatial Data Transfer Standard (SDTS) format. The USGS distributes these data sets over the Internet as a means of promoting the standard. The SDTS is a relatively new format that has been mandated for federal use. Numerous software packages from vendors such as ESRI, Integraph and ERDAS are able to accept data in this format. This document is a detailed explanation of procedures for downloading and unpacking USGS SDTS data. DLG data sets were created by reformatting digital line graph optional (DLG-O) data as SDTS. DEM data sets were created by reformatting existing data sets to the SDTS format. These conversions include adding metadata to each transfer, but do not necessarily include any update or other content changes to the spatial data. This document can be used as a companion to: - dlgv32 -- Windows 95 Display Software for DLG, DEM, and DRG Data (users manual, version 3.5), or - dem3d -- Windows 95 Display Software for DEM Data (users manual, version 2.0b) The procedures described here may also be beneficial to users of other software. See http://mcmcweb.er.usgs.gov/viewers for additional information about dlgv32 or dem3d. 2. Overview of DLG/SDTS and DEM/SDTS Data 2.1 SDTS Overview The SDTS was designed by a group of people representing government agencies, universities, and private companies that all saw a requirement for a robust way of transferring earth- referenced spatial data between dissimilar computer systems with the potential for no information loss. After 12 years of discussion, development, review, and testing, the resulting SDTS was approved as Federal Information Processing Standard (FIPS) 173, and now also as FGDC-STD 002. Compliance with SDTS, also known as FIPS 173, is now mandatory for all federal agencies. SDTS is a transfer standard that embraces the idea of self-contained transfers; spatial data, attributes, georeferencing, a data quality report, a data dictionary, and other supporting metadata are all included in the transfer. The SDTS is a standard. Standards are documents that specify rules; they are neither software nor databases. The SDTS is a standard for data transfer, as opposed to a standard for data processing. SDTS does not replace existing Geographic Information System (GIS) processing formats. The SDTS is designed specifically for spatial data. Other standards exist for other kinds of data (digital images, documents, electronic signals, etc.). The National Mapping Division of the USGS is the maintenance agency for the standard. Please visit the SDTS web site at http://mcmcweb.er.usgs.gov/sdts for more information . A single-document overview of SDTS is available at: ftp://sdts.er.usgs.gov/pub/sdts/articles/ascii/overview.doc or, ftp://sdts.er.usgs.gov/pub/sdts/articles/ps/overview.ps 2.2 Mass Conversion of USGS Data to SDTS In 1995 the USGS began converting digital cartographic data holdings to SDTS. 1:24,000-scale (or 7.5 minute) DEM data were converted in early 1998. Conversion of other DEM scales have not yet been completed. The 1:2,000,000-scale DLG data were revised in 1995 and are now available in SDTS. This includes coverage of the conterminous United States for the following categories of data: hydrography, transportation, boundaries (county names are included with the transfer), United States Public Lands Survey System, and manmade features. All 1:100,000-scale DLG files have been converted to SDTS format. This includes national coverage of the hydrography and transportation overlays, with partial coverage of other layers. All 1:24,000-scale DLG files have been converted to SDTS format. Coverage varies between overlays at this scale, but no overlay has complete coverage. "All files" means all files for which DLG data have been produced. Coverage of 1:24,000 and 1:100,000- scale DLG data is not complete. 2.3 Sales and Distribution Policies Most USGS data are neither online nor free. SDTS data are a significant exception to this policy. Other exceptions include 1:100,000-scale DLG-O and 1:250,000-scale native format DEM data. Production, pricing, and distribution policies for native DLG-O and native DEM data have not changed due to the availability of SDTS data. Data in native format are still available from the same sources at the same prices. Because of data conversion problems, there are a small number of data sets that are available in native format but not available in SDTS. All DEM data now offered in SDTS format are still available in native format 2.4 SDTS data organization 2.4.1 DLG/SDTS Data DLG-O data are derived from standard USGS topographic quadrangles. The packaging of DLG- O data reflects this: each physical file covers the geographic area of some part of a standard quadrangle, and contains a feature set that approximates the ink colors of a standard published map. Similarly, DLG/SDTS data are derived directly from DLG-O data, and reflect the DLG-O data packaging. Each SDTS transfer has the same geographic coverage and same spatial data content as the DLG-O it was derived from. This packaging is not dictated by the SDTS; the standard would allow (for example) all road and hydrography data for a county to be contained in one transfer, but reorganizing the data this way would have required a large and costly production operation, instead of a relatively simple data reformat. A side effect is that the DLG/SDTS data appear more fragmented and complex than necessary. This is not a characteristic of the SDTS, but of policy decisions made when the USGS mass converted DLG-O data to SDTS format. 2.4.2 DEM/SDTS Data DEM data are derived from standard USGS topographic quadrangles. The packaging of DEM data reflects this: each physical file covers the geographic area of some part of a standard quadrangle, Similarly, DEM/SDTS data are derived directly from DEM data, and reflect the DEM data packaging. Each SDTS Data transfer has the same geographic coverage and same spatial content as the original source DEM. 3. Summary of Data Retrieval Procedures DLG/SDTS and DEM/SDTS data are held on an ftp site. The base address for DLG/SDTS data is ftp://edcftp.cr.usgs.gov/pub/data/DLG The base address for DEM/SDTS data is ftp://edcftp.cr.usgs.gov/pub/data/DEM 3.1 DLG/SDTS Data There are three sub-directories in the DLG FTP site; one for each of the three data scales. These three scales are: 100K holds 1:100,000-scale data. The directory contains an SDTS master data dictionary for this scale, a readme file, and 26 subdirectories, one for each letter of the alphabet. Each of these subdirectories holds the 1:100,000-scale quadrangles whose names start with that letter. 2M holds 1:2,000,000-scale data. The directory contains an SDTS master data dictionary for this scale, a readme file, and 50 subdirectories, one for each state. LARGE_SCALE holds 1:24,000-scale data. The directory contains an SDTS master data dictionary for this scale, a readme file, and 26 subdirectories, one for each letter of the alphabet. Each of these subdirectories holds the 1:24,000-scale quadrangles whose names start with that letter. Each data sub-directory in turn has several more levels of directories that reflect DLG overlays, data versions, and physical packaging. The USGS GeoData web page, at http://edcwww.cr.usgs.gov/doc/edchome/ndcdb/ndcdb.html provides a user interface to the ftp site. The web page provides several different "views" of the data, including lists by state, by name, and searching by graphic index. All of these views eventually lead to the lowest level of the ftp directory structure. The Global Land Information System (GLIS), at http://edcwww.cr.usgs.gov/webglis provides another way to reach these data. GLIS provides relatively powerful data search tools. An SDTS transfer is composed of multiple files. DLG/SDTS transfers have been combined into one physical file with the tar utility, and then compressed using gzip. See section 4.3 for details. 3.2 DEM/SDTS Data There are four sub-directories in the DEM FTP site. At this time, only 7.5-minute DEMs are in the SDTS format. 15min contains no data at this time. It will hold data based on 2 by 3-arc-second spacing. Coverage of one DEM corresponds to a 1:63,360-scale quadrangle, used primarily for Alaska. 250 holds data based on 3 by 3-arc-second spacing. This directory is populated with data in native DEM format. It contains a readme file, and 26 subdirectories, one for each letter of the alphabet. Each of these subdirectories holds the 1:250,000-scale quadrangles whose names start with that letter. 30min contains no data at this time. It will hold 1:100,000-scale data, also known as 2-arc- second. 7.5 minute has the same coverage as the standard USGS 7.5-minute cell. In some cases, this is not an exact match of the corresponding topographic map. DEMs never contain overedge data for slivers of land just beyond the cell boundary. This directory is populated with data in SDTS format. It contains a readme file and 26 subdirectories, one for each letter of the alphabet. Each of these subdirectories holds the 1:24,000 or 1:25,000-scale quadrangles whose names start with that letter. The USGS GeoData web page, at http://edcwww.cr.usgs.gov/doc/edchome/ndcdb/ndcdb.html provides a user interface to the ftp site. This web page provides several different "views" of the data, including lists by state, by name, and searching by graphic index. The Global Land Information System (GLIS), located at http://edcwww.cr.usgs.gov/webglis provides another way to reach these data. GLIS provides relatively powerful data search tools. All of these views eventually lead to the lowest level of the ftp directory structure. An SDTS transfer is composed of multiple files. DEM/SDTS transfers have been combined into one physical file with the tar utility, and then compressed using gzip. See section 4.3 for details. Each DEM transfer contains a data dictionary; there is no separate master data dictionary to be downloaded. 4. Detailed Instructions for Retrieving SDTS Data This section contains step-by-step instructions for retrieving, unpacking, and organizing DLG/SDTS and DEM/SDTS data. The Conifer, CO 1:24,000-scale quadrangle is used as an example of DLG data. The Big Bull Mountain, CO 7.5-minute quadrangle is used as an example of DEM data. Procedures for the other scales are similar, but vary slightly because of different product characteristics. These examples show how to find data using "FTP via graphics" capabilities on the GeoData web page. Users who know what they are looking for and know how to use ftp client software may wish to skip these procedures and go directly to the ftp site described in section 3. Reading section 4.3 is strongly recommended before doing this. 4.1 Create Local Directory Create directories (or folders) on your local computer to hold downloaded files. For the purposes of these examples, we will assume you are using a computer with the Windows 95 operating system installed. If you plan to use multiple quadrangles, it is important to organize the data in a file structure that will help you keep track of all data. Create an additional subdirectory for each quadrangle. An SDTS transfer typically contains many files. Keeping transfers separate by putting each quadrangle in its own directory is necessary because of the way files within a DLG/SDTS or DEM/SDTS transfer are named. Storing multiple quadrangles in one directory may result in file collisions, where one file may overwrite another with the same naming convention. For the DLG/SDTS example, create a directory named c:\data\sdts\conifer. For the DEM/SDTS example, create a directory named c:\data\sdts\big_bull 4.2 Find and Retrieve Data 4.2.1 Find and Retrieve DLG/SDTS Data A Master Data Dictionary (MDD) must be downloaded for each scale of DLG data (100K, 2M, and Large Scale) data you intend to use. Detailed instructions are included in section 4.2.1.2, below. To download a specific data set, follow these procedures: 1. Go to the USGS GeoData page at http://edcwww.cr.usgs.gov/doc/edchome/ndcdb/ndcdb.html 2. Scroll down the page to Large Scale Digital Line Graphs (DLG) - SDTS format only. 3. Since the name of the quadrangle is known, the data could be found by selecting either FTP via Alphabetical List or FTP via State. However, it is common to not know exact quadrangle names: Select FTP via Graphics. 4. Select Conterminous 48 states. 5. A simple map of the U.S. appears. Click on the state of Colorado. 6. A map of Colorado appears, with 1-degree lines of latitude and longitude. Click near the center of the 1-degree cell immediately west of Denver and immediately south of Boulder. The next display will show approximately 30 7.5-minute quadrangles, centered on where you clicked your mouse. 7. Click on the 7.5-minute cell labeled Conifer, CO. 8. A "list" of one quadrangle appears. (Other paths to this page may produce lists of more quadrangles.) Select the link to Conifer, CO. A list of nine directories will then appear. Each directory corresponds to one DLG overlay. Conifer is used in this example because all nine overlays are available. This is unusual for 1:24,000-scale data; most quadrangles have fewer than nine overlays finished. 9. Select the second overlay (in this example), hydrography. 10. Select version_1, the most recent version. The file D3910530_hy0s.1.sdts.tar.gz contains the SDTS transfer for the hydrography layer of the Conifer, CO quadrangle. For an explanation of the file naming convention, see http://edcftp.cr.usgs.gov/pub/data/DLG/LARGE_SCALE/00README 11. Select the file D3910530_hy0s.1.sdts.tar.gz for downloading 12. Save it to the c:\data\sdts\conifer folder. The file can be renamed (for example, conifer.tar.gz). Retaining the .tar.gz extensions is strongly recommended. Some browsers will attempt to rename this file for you. In some cases, this renaming causes problems for decompression software. One common case is a rename from *.tar.gz to *_tar.gz, which confuses the WinZip decompression program. Repeat steps 9 through 12 for all overlays of interest. 4.2.1.1 DLG/SDTS Transportation Overlay: A Special Case While you're at the FTP site getting data for the conifer, CO quadrangle, pull up the transportation subdirectory, and click on version_1. You will see that it contains three DLG/SDTS transfers: roads (the rd0s file), railroads (the rr0s) file), and miscellaneous transportation (for airports, pipelines, etc)(the mt0s file). All DLG-O 1:24,000-scale sales units are packaged this way, and that packaging was retained in the SDTS version of the data: three separate SDTS transportation transfers were created for each quadrangle. The data for these transfers must be kept in separate directories. Untaring two or more transportation transfers for the same quad in the same directory will cause file collisions and loss of data. If you intend to use more than one of these three transportation layers, create subdirectories for each of them. For example, c:\data\sdts\conifer\railroad. This step need not be done before downloading the data, but must be done before unzipping and untaring the data (section 4.3). In 1:100,000 and 1:2,000,000 DLG data, the three transportation overlays are combined into one file, and therefore comprise only one SDTS transfer. Creation of additional transportation subdirectories is not necessary for these scales. 4.2.1.2 Retrieve the DLG/SDTS Master Data Dictionary Each SDTS transfer is required to have a data dictionary, specific to that particular transfer's scale. Because the DLG/SDTS data were created by reformatting DLG-O data, the same data dictionary can be used for all data sets of the same scale. Rather than include this dictionary with each transfer, one data dictionary is stored for all transfers at the top of the ftp directory tree. To retrieve the MDD: 1. Go to http://edcftp.cr.usgs.gov/doc/edchome/ndcdb/ndcdb.html 2. Scroll down the page to Large Scale Digital Line Graphs (DLG) - SDTS format only. 3. Click on single tar file. 4. Save it to the c:\data\sdts\conifer folder This file must be unzipped and untared like other SDTS data. Placement of the data dictionary files may be software dependent. If using dlgv32, the files may be placed in any directory on your hard drive, including the directory that holds the other SDTS data files. If using ESRI Arc/Info, place the data dictionary files in the masterdd directory as specified by ESRI documentation. 4.2.2 Find and Retrieve DEM/SDTS Data 1. Go to the USGS GeoData page at http://edcwww.cr.usgs.gov/doc/edchome/ndcdb/ndcdb.html 2. Scroll down the page to 7.5-Minute Digital Elevation Model (DEM) - SDTS format only. 3. Since the name of the quadrangle is known, the data we're looking for could be found by selecting either FTP via Alphabetical List or FTP via State. Since it's common to not know exact quadrangle names, make the selection FTP via Graphics. 4. A simple map of the U.S. appears. Click on the state of Colorado. 5. A map of Colorado appears, with 1-degree lines of latitude and longitude. Click on the bullet right next to Colorado Springs. The next display will show approximately 30 7.5-minute quadrangles, centered on this mouse click. 6. Click on the 7.5-minute cell labeled Big Bull Mountain, CO. 7. A "list" of one quadrangle appears. (Other paths to this page may produce lists of more quadrangles.) Select the link to Big Bull Mountain, CO. The file 30.1.1.934296.tar.gz contains the SDTS transfer for Big Bull Mountain, CO. For an explanation of the file naming convention, see http://edcftp.cr.usgs.gov/pub/data/DEM/7.5min/00README 8. Select the file 30.1.1.934296.tar.gz for downloading. 9. Save it to the c:\data\sdts\big_bull folder. The file can be renamed (for example, bigbull.tar.gz). Retaining the .tar.gz extensions is strongly recommended. Some browsers will attempt to rename this file for you. In some cases, this renaming causes problems for decompression software. One common case is a rename from *.tar.gz to *_tar.gz, which confuses the WinZip decompression program. 4.3 Unzip and Untar The DLG/SDTS and DEM/SDTS data were designed in 1994, before the release of Windows 95 and before most PCs were powerful enough to use GIS data. The data were designed for the scientific computers of the time, which were mostly UNIX workstations. The files in each SDTS transfer were combined into one file with the UNIX tar utility, and this combined file was then compressed using the gnu-zip (gzip) utility. This technique for combining and compressing files is common on the UNIX operating system. Tar and gzip are not as common in the PC world, but a variety of freeware, shareware, and commercial implementations of these utilities exist for all PC operating systems. 4.3.1 WinZip One of the most common PC compression programs is the shareware program WinZip ( http://www.winzip.com). WinZip will unzip and untar DLG/SDTSand DEM/SDTS files if proper procedures are followed. These instructions are for WinZip 6.3 for Windows 95, using the WinZip Classic interface (as opposed to the Wizard; this is a user-selectable option in WinZip). Ensure that the file has a name of the form *.tar.gz NOT *_tar.gz 1. Start WinZip 2. From the toolbar, select Options 3. Select configuration. 4. There is a checkbox labeled "TAR file smart CR/LF translation". Ensure that this box is not checked. 5. Select OK to exit configuration. 6. Select Open from the tool bar. A popup window appears. 7. In the "Types of files" subwindow, select All Archives. 8. Navigate to the local directory you created earlier (c:\data\sdts\conifer for DLG/SDTS data or c:\data\sdts\big_bull for DEM/SDTS data) . A list of the files downloaded from the USGS GeoData site should be visible. Select one of these files and click Open. 9. A window appears with the message "Archive contains one file .decompress it to a temporary folder and open it?" Select Yes. 10. A list of .ddf files will appear. These are the files contained in the SDTS transfer. To select all files in the transfer, click on the first file, then shift-click on the last file. 11. Select Extract from the tool bar. 12. A popup window labeled "Extract" appears. Enter, or navigate to, the path and directory that you want to place the data into. The extracted files are stored in the same directory as the compressed files, so enter (or navigate to) the local directory you created earlier (c:\data\sdts\conifer for DLG/SDTS data or c:\data\sdts\big_bull for DEM/SDTS data), then click the Extract button. This will unzip and untar the files. NOTE: Do not rename files extracted from the tar file. The files in an SDTS transfer are referenced by name in other files of the transfer. Renaming .ddf files will break these relationships. 4.3.2 Other tar and zip utilities Tar and gzip for DOS, UNIX, and NT operating systems are available in the GNU utilities from the Free Software Foundation. Software locations for each operating system listed below. 4.3.2.1 DOS tar and zip utilities Copies of these can be retrieved from ftp://ftpmcmc.er.usgs.gov/pub/sdts/software/tools/tar.exe ftp://ftpmcmc.er.usgs.gov/pub/sdts/software/tools/gunzip.exe These must be run in a DOS window, using the following syntax: to Unzip: \gunzip to Untar: \tar xvf where is the path to the directory that contains the gunzip and tar executables. 4.3.2.2 UNIX tar and zip utilities Copies of these can be retrieved from ftp://ftpmcmc.er.usgs.gov/pub/sdts/software/tools/tar ftp://ftpmcmc.er.usgs.gov/pub/sdts/software/tools/gunzip 4.3.2.3 NT tar and zip utilities Copies of these can be retrieved from ftp://ftpmcmc.er.usgs.gov/pub/sdts/software/tools/winnt/tar.exe ftp://ftpmcmc.er.usgs.gov/pub/sdts/software/tools/winnt/gunzip.exe 5. Problems Downloading Data The availability of free SDTS data has caused severe overloads on the GeoData server and relatively frequent periods of down time. Until hardware upgrades can be applied, we can only suggest trying at "off times" of the day. Unfortunately, the USGS does not have the staff to provide tutorial support for commercial software. If you cannot access these data through your browser, we recommend either: - studying your software documentation for anonymous ftp configuration procedures, or - using an ftp utility instead of a browser. 5.1 FTP Different brands and versions of web browsers implement anonymous ftp differently. The USGS has tested a number of browsers on the ftp site described in this paper and believes that the data can be accessed through most browsers. However, the default browser configurations are not always correct for anonymous ftp access, and in some cases changing those configurations is somewhat difficult. Some sites where ftp utilities can be downloaded and purchased are: http://www.cuteftp.com http://www.ftpx.com As an alternative, users of Win95 or WinNT can ftp data using the Run function on the Start Menu: Type ftp://edcftp.cr.usgs.gov and select OK. Login: anonymous Password: your e-mail address in the form name@domain From there, make the following choices: pub/data/DEM/7.5min/B/big_bull_mountain_CO (this will get you to the DEM/SDTS data set we used in our example earlier) At this point the user is able to navigate to the layer to be downloaded. To change the data transfer type to binary, type binary. To specify which directory the data is to be downloaded to, type lcd name of directory. To download the data, type get name of file. To exit, type quit. 6. Conclusions and Points of Contact DLG/SDTS and DEM/SDTS data are relatively new. The design of these data could and will be improved for future data production. The data are usable in their current form if proper procedures are followed and appropriate software is available. For more information about SDTS, see http://mcmcweb.er.usgs.gov/sdts. To make comments or ask specific questions about SDTS or the USGS implementation of DLG/SDTS, send mail to sdts@usgs.gov For information about dlgv32, USGS freeware for Windows 95 that will display DLG/SDTS data, see http://mcmcweb.er.usgs.gov/viewers.