SDTS -> DEM Conversion Program

    Contents

    • What is SDTS?
    • Where to get SDTS data
    • Initial processing of SDTS data
    • Converting the SDTS data
    • Example 1 (interactive user entry)
    • Example 2 (command-line parameters only)

    Document Index


    What is SDTS?

    The U. S. Geological Survey (USGS) has converted all of most of the 1:24,000-scale (7.5-min quad size) Digital Elevation Models (DEMs) to the new Spatial Data Transfer Standard (SDTS). In an effort to encourage users to use the new data product, USGS is making available, for a limited time and free of charge, DEM data in the newer SDTS format. SDTS is a spatial data transfer standard applicable to virtually all spatial data, not just to raster-type data, such as DEMs. A complete description of the SDTS standard, including links to much additional information, can be found at the SDTS home page.

    Where to get SDTS data

    The GIS Data Depot web site is now the primary method by which users can download SDTS-formatted DEM data. One can download, without charge, any of the USGS DEMs, although the drawback is that the free distribution is limited to a lower data transfer bandwidth. For a small fee, one can purchase the ability to download the same data at much higher bandwidths. in addition, one can purchase DEM data on CD-ROM for large regions.

    Initial processing of the SDTS data

    The SDTS-formatted data are supplied as a gzip-compressed tar file. In order to use such a file, one needs to have Gnu gzip (to decompress the data file) installed as well as tar, which is needed to extract all the SDTS data files from the archive

    After decompressing and unarchiving the SDTS-formatted data, there should be a raster data file having a file name such as XXXXCEL0.DDF, where the XXXX represents any four characters from the character set (A-Z, 0-9). This file contains the DEM information, and will be required by the conversion program.

    Converting the SDTS data

    The conversion program SDTS2DEM, originally written by the late Sol Katz of the U. S. Bureau of Land Management, converts the SDTS-formatted DEM data to the older DEM format read by DEMREAD, for example. Commercial software such as Golden Software's SURFER program can also read the older DEM format. The conversion program is now maintained by Greg Townsend of the University of Arizona; see his SDTS2DEM web page for more more information, including the source code for the program. SDTS2DEM is a command-line utility, simplifiying the task of converting many SDTS-formatted DEMs, if desired. If options are not provided on the command line, the user is queried for the options. An example is presented below. In this example, an SDTS-formatted data set for the Guaje Mountain, New Mexico, 7.5' DEM has been provided. After decompressing the downloaded file and unarchiving the resulting tar file, the directory structure is the following:

     2-26-99   4:51a     <DIR>           0  .
     2-26-99   4:51a     <DIR>           0  ..
    12-11-97  11:34a      1881           0  1127CATD.DDF
    12-11-97  11:34a      1965           0  1127CATS.DDF
    12-11-97  11:34a    391674           0  1127CEL0.DDF
    12-11-97  11:30a       347           0  1127DDDF.DDF
    12-11-97  11:30a       691           0  1127DDOM.DDF
    12-11-97  11:30a       287           0  1127DDSH.DDF
    12-11-97  11:30a       320           0  1127DQAA.DDF
    12-11-97  11:30a      2716           0  1127DQCG.DDF
    12-11-97  11:30a      4381           0  1127DQHL.DDF
    12-11-97  11:30a      1416           0  1127DQLC.DDF
    12-11-97  11:30a      3907           0  1127DQPA.DDF
    12-11-97  11:30a       620           0  1127IDEN.DDF
    12-11-97  11:30a       354           0  1127IREF.DDF
    12-11-97  11:30a       286           0  1127LDEF.DDF
    12-11-97  11:30a       497           0  1127RSDF.DDF
    12-11-97  11:30a       395           0  1127SPDM.DDF
    12-11-97  11:34a      1594           0  1127STAT.DDF
    12-11-97  11:30a       475           0  1127XREF.DDF
    12-11-97  11:34a      2244           0  README.7.5min
    12-11-97  11:34a      1621           0  UCOMMENT.txt
           23 file(s)     417671 bytes used

    Note that the actual raster data making up the DEM are in the file 1127CEL0.DDF. The other files contain various forms of other information about the DEM data. Below is shown an example of executing SDTS2DEM. Note that the -n option is used; this option instructs the code to insert a newline after evry 1024 characters in the output DEM.  Note that the DEMREAD utility, which INNERTC needs as a pre-processor for DEM files, will handle DEM data either with or without the newlines. User entries are shown in blue.

    [G:\terrain\sdts\testdata] ..\sdts2dem -n

            ******************************************************************
            *                                                                *
            *             Spatial Data Transfer Standard (SDTS)              *
            *                  SDTS ==> DEM Utility                          *
            *                   SDTS2DEM  ver .013                           *
            *             Another GIS translation tool from                  *
            *            Sol Katz (skatz@blm.gov), Nov 1998.                 *
            *                                                                *
            *   gcc+EMX port by Allen Cogbill (acogbill@ibm.net), 3/98.      *
            *                                                                *
            ******************************************************************
     

    Usage: sdts2dem [-n] [base_input_name] [base_output_file] [cell id]
                -n:  put newlines at end of 1024-char line [default is NO newline].
        input file:  first 4 chars in base file name  (ABCDxxxx.ddf)
       output file:  output file without .DEM extension
           cell id:  characters in position 7 and 8 of filename (usually, 'L0')

    Enter first 4 charcters of the base SDTS file name: 1127

    Enter base output file name (exclude any extension): GuajeMountain

    Enter the 2 chars in position 7-8 of the CELL file name (usually L0): L0
    Summary of SDTS/DEM Data Files
    Title = GUAJE MOUNTAIN, NM - 24000  LAT:: 35.875 LONG:: -106.25 SCALE:: 24000
    Date = 19971211
    Range:  max= 3272, min= 1999, void= -32767, fill= -32766
    Cell Width:              30.000000
    Cell Height:             30.000000
    Projection:              UTM
    Zone:                    13
    Total rows = 467, Total columns= 382
     

    Writing output DEM file...

    100% done.

        Final Output USGS DEM:

    Min:               1999
    Max:               3272
    Missing Value:    -9999
    Missing Count:        0
    Rows:               467
    Cols:               382

       Quad Boundary
    SW    375872.53   3970757.25
    NW    376067.84   3984622.25
    NE    387335.00   3984470.50
    SE    387157.44   3970605.50

    Done.


    An alternative method  of executing the utility is shown below. In this example, no user input is required, as all the necessary information is provided on the command-line. Note that the -n option flag (if used) must be provided as the first command-line parameter.

    [G:\terrain\sdts\testdata]..\sdts2dem -n 1127 GuajeMountain L0

            ******************************************************************
            *                                                                *
            *             Spatial Data Transfer Standard (SDTS)              *
            *                  SDTS ==> DEM Utility                          *
            *                   SDTS2DEM  ver .013                           *
            *             Another GIS translation tool from                  *
            *            Sol Katz (skatz@blm.gov), Nov 1998.                 *
            *                                                                *
            *   gcc+EMX port by Allen Cogbill (acogbill@ibm.net), 3/98.      *
            *                                                                *
            ******************************************************************

    Summary of SDTS/DEM Data Files
    Title = GUAJE MOUNTAIN, NM - 24000  LAT:: 35.875 LONG:: -106.25 SCALE:: 24000
    Date = 19971211
    Range:  max= 3272, min= 1999, void= -32767, fill= -32766
    Cell Width:              30.000000
    Cell Height:             30.000000
    Projection:              UTM
    Zone:                    13
    Total rows = 467, Total columns= 382

    Writing output DEM file...

    100% done.

        Final Output USGS DEM:

    Min:               1999
    Max:               3272
    Missing Value:    -9999
    Missing Count:        0
    Rows:               467
    Cols:               382

       Quad Boundary
    SW    375872.53   3970757.25
    NW    376067.84   3984622.25
    NE    387335.00   3984470.50
    SE    387157.44   3970605.50

    Done.



    Table of Contents


    Copyright 2012, Geophysical Software, Inc.

    Last modified 24 August 2012