sdts2cov.README (version 2.0) This file contains instructions for running sdts2cov.aml. This AML is used to convert SDTS 1:24K, 1:100K, and 1:2M DLG-3 data into ARC coverages. It joins all of the attribute modules to the coverage's feature attribute tables. Without this AML, the ARC command SDTSIMPORT produces coverages that have feature attributes residing in separate "normalized" tables, some of which contain "one to many" relationships. Although this is an efficient way of storing the attributes, it makes retrieving the attributes tedious and the manual processing can be very complicated for the novice ARC/INFO user. This AML simplifies or "denormalizes" the attribute structure by attaching all of the attributes from the attribute modules directly to the feature attribute tables. This is not as efficient, because many of the attributes get duplicated, but it makes accessing the attributes much easier. Before sdts2cov.aml can be used, you must first have a workspace to store the coverage(s) to be created and have the SDTS transfer directories set up. Each SDTS transfer is made up of several .DDF files and should be kept in its own directory. If you are downloading the SDTS data sets from the USGS web page, you will have to uncompress and untar the files before you can use them. If you do not have the gunzip and tar utilities needed to do this, you may download them from the following site: ftp://sdts.er.usgs.gov/pub/sdts/software/tools You will also need to have a directory set up called masterdd containing the Master Data Dictionary which can be downloaded from the same USGS web page as the SDTS data sets and will also be a compressed tar file. The masterdd directory should be in the same location as the transfer directories. The following example shows how the directories can be set up. In this example, I have created an ARC/INFO workspace called chicago. Within this workspace I have setup a separate directory for each SDTS transfer along with the master data dictionary. Each of these directories contains .DDF files. chicago ________________________________|________________________________ | | | | | | chicbound chichydro chichypso chicplss chictrans masterdd For 1:100K and 1:2M the "PIPE & TRANS LINES", "ROADS AND TRAILS", and "RAILROADS" themes are combined into a single "TRANSPORTATION" transfer, as in the chictrans directory in the example above. For 1:24K these three themes are each in a separate transfer, so using the example above, you might have a chicroad, chicrail, and/or a chicmtran directory instead of the chictrans directory. There is no required naming convention for the transfer directories, but you need to be aware of how the AML names the coverages so that the transfer directory and coverage names do not coincide. Before you run sdts2cov.aml you will need to know the "transfer prefix" for the SDTS transfer you are going to convert. This prefix is the first four characters common to each .DDF file in the transfer directory. For example, if the files are named HY01????.DDF then HY01 is the transfer prefix. After you have determined the transfer prefix, you may want to use the ARC command SDTSINFO to get information about the contents of the transfer, such as the number of features, the number of data layers, etc. You will need to be in the chicago workspace before you can run the AML. This does not mean that the AML has to reside in the chicago workspace. You can specify a path on the command line when running an AML or use the &AMLPATH directive to add a search directory. example -> Arc: w c:\mysdtsdir\chicago The syntax for sdts2cov.aml is as follows: &run sdts2cov {-COMBINE} {-DEFINE} {-DROPITEMS} {-LAYERS } - a four character prefix common to all files in the SDTS transfer. The prefix may include a pathname to a directory. If no directory pathname is given, the files in the transfer will be read from the current workspace. - up to six character prefix that will be common to all coverages produced from the SDTS transfer. This value can NOT contain a path to another workspace. All will be created in the workspace you are in when you run the AML. The two character DLG theme abbreviation will be appended to the prefix to create the output coverage name. For transfers that contain multiple layers per theme, the layer number will be appended after the DLG theme abbreviation. For transers that contain multiple themes, each theme will be numbered separately starting at 01, so the coverage layer number may not be the same as the layer number in the transfer. For example, there is a "TRANSPORTATION" (TR) transfer containing three themes: "PIPE & TRANS LINES" (MT), "ROADS AND TRAILS" (RD), and "RAILROADS" (RR). There are 12 total layers (four per theme), so each output coverage created will be numbered from 01 to 04 for each of the three themes. Point coverages created will be suffixed with an 'x'. {-COMBINE} - an optional argument used to combine all specified layers into a single polygon-arc-node coverage for each category contained in the transfer. The neatlines between the adjacent layers are removed and the duplicate label points left after the lines are removed are also deleted. The point coverages (if they exist) are also combined for each category. The actual combination of the layers occurs last, after the individual layer coverages have been created. The individual layer coverages are not removed by the AML. The combined coverages are named in the following format (the 'c' stands for combined): c (polygon-arc-node) cx (point) {-DEFINE} - an optional argument used to join an item called ENTITY_DEF to the feature attribute tables, which is the short definition of the 7 digit DLG code contained in the ENTITY_LABEL item. A special INFO table called ENTDEF.TAB is required for this option to work. This table can be downloaded from the same site as this AML in ARC export format (entdef.e00). You should either place the entdef.e00 export file in the same directory as sdts2cov.aml so that it can be automatically imported into your workspace whenever it is needed, or you can import it into your workspace manually. To import it manually the syntax is: IMPORT INFO entdef.e00 entdef.tab The full definition of the ENTITY_LABEL code is contained in the master data dictionary INFO tables created by the ARC command SDTSIMPORT. These definitions can be accessed by setting up relates from the FAT to the DDDF table and from the DDDF table to the DDDF2 table. Most of the definitions are several records long, so you will have to use a cursor to get the entire definition. {-DROPITEMS} - an optional argument used to drop any items joined to the feature attribute tables that contain "Not Applied" values for the entire coverage. For character items, the "Not Applied" value is represented by a blank. For numeric items, it is the smallest number that can be used according to the item definition, which will be a negative value containing all nines. {-LAYERS } - an optional argument used to specify which transfer layers (if multiple layers exist) are to be imported. The default is to import ALL layers in the transfer, so it is NOT necessary to use this option unless you only want some of the layers. The is a list of layer numbers that are separated by commas and are in ascending order. This list can NOT contain blank spaces. You may also specify a range by using two periods between a lower and a higher number. The layers specified in the layer list must exist in the SDTS transfer. The following examples are equivalent: EXAMPLE 1: -LAYERS 1..4,6,8,11,14..18,21 EXAMPLE 2: -LAYERS 1,2,3,4,6,8,11,14,15,16,17,18,21 NOTES: The arguments contained within the < > symbols are required and must be specified in the correct order. The hyphenated arguments contained within the { } symbols are optional and can be specified in any order. If a coverage name used by the AML already exists in the workspace, then the AML will create a workspace under the current workspace, prefixed by the word "save", and attempt to move the coverage there. You are now ready to run sdts2cov.aml. The following example demonstrates how to convert the chicago hydrography SDTS transfer into coverages. The transfer files are residing in a directory called chichydro and the transfer prefix is HY01. &r sdts2cov chichydro/hy01 chic If this were a 1:24K transfer, the following coverage(s) would be created. The point coverage is only created if point features exist. chichy - containing polygon, line, and node features chichyx - containing point features If this were a 1:100K transfer, at least four coverages would be created. There could be more if point features exist, the transfer contains multiple themes, and/or the 30' x 60' block was divided into more than four pieces. chichy01 chichy01x chichy02 chichy02x chichy03 chichy03x chichy04 chichy04x If the -COMBINE option is used: &r sdts2cov chichydro/hy01 chic -combine there would be two more coverages created in addition to the ones listed above: chichyc chichycx Also, one could specify that just a single layer (layer 3) be imported: &r sdts2cov chichydro/hy01 chic -layers 3 ------------------------------------------------------------------------------- **** FOR ADDITIONAL INFORMATION VISIT THE SDTS **** **** WEB SITE OR E-MAIL THE SDTS TASK FORCE **** POINT OF CONTACT: U.S. Geological Survey | E-mail: sdts@usgs.gov SDTS Task Force, MS 821 | Web: http://mcmcweb.er.usgs.gov/sdts 1400 Independence Road | FTP: sdts.er.usgs.gov (144.47.162.236)