DLGREAD -- Read DLG from Text File

Reads vector data from a USGS (United States Geological Survey) Optional DLG (Digital Line Graph) Distribution Format text file (1:24000-Scale and 1:100000-Scale) to a PCIDSK database vector segment.

Note: DLGREAD does NOT read Standard DLG Distribution Format nor 1:2000000-Scale Optional DLG Distribution Format text files.

Note: DLGREAD requires that a new-line be present after each record. DLG files which do not contain a new-line may be converted using the UNIX command dd.

 e.g.:  "dd if=filein.dlg cbs=80 conv=unblock of=fileout.dlg"
See Also: DLGWRIT, MIDLG

PARAMETERS

DLGREAD is controlled by the following global parameters:

Name     Prompt                                  Count     Type
TFILE    Text File Name                          1-64      Char
FILO     Database Output File Name               1-64      Char
DBSN     Database Segment Name                   1-8       Char
DBSD     Database Segment Descriptor             0-64      Char

The following parameter receives output:

LASC     Last Segment Created                    0-1       Int

FILO

Specifies the name of the PCIDSK image file on which the vector segment is created. FILO must exist before running DLGREAD, but does not have to contain any image data.

 EASI>FILO="filespec"

TFILE

  Valid Values:   <filename, max. 64 characters>
  Default:        <none>
Specifies the name of the input text file (DLG format), from which the data values are read.

DBSN

  Valid Values:   <string, max. 8 characters>
  Default:        DLGREAD
Specifies a segment name that will be assigned to the new output Vector segment.

DBSD

  Valid Values:   <string, max. 64 characters>
  Default:        <none>
Specifies a character descriptor for the new output vector segment (string describing contents or origin of data).

LASC

This parameter is updated with the segment number for the new vector segment created by this program.

DETAILS

DLGREAD is used to read vector (line) information from USGS (United States Geological Survey) Optional DLG (Digital Line Graph) Distribution Text File Format (TFILE) for 1:24000-Scale and 1:100000-Scale. Standard DLG Distribution Format and 1:2000000-Scale (Albers equal-area conic projection metres) Optional DLG Distribution Format text files are not supported.

Although the topology of the DLG is not retained, DLGREAD strives to retain as much information as possible. Line records are retained and node/area information is skipped. However, this information is partially retained, since lines will bound areas and node information is included in lines.

When DLGREAD is run, a new vector segment (type VEC:116) is created on the PCIDSK file (FILO) to hold the information. Parameter LASC will be updated with the number of the newly created vector segment number when DLGREAD completes. The PCIDSK file must exist, but does not have to have any image data (see EXAMPLE). The vector segment will be given a name (DBSN) and description (DBSD) specified by the user.

If the line has a Major and Minor attribute code associated with it, these are combined and saved in the Attribute field in the output vector record. The Minor code will be the last four digits, while the Major code will be the remaining high-order digits. For example, if the line has a Major code of 050 and a Minor code of 0200 (this is the code for a shoreline), these are combined to produce 500200, which is stored in the attribute field for the line structure in the vector segment. If there are more than one set of Major and Minor attribute codes in the input DLG line record, only the first set is retained.

The map scale, the name of the source map, and the overlay category are saved in the history descriptor for the vector segment. The segment history descriptor may be checked by specifying DTYP="FULL" and running ASL after the DLGREAD run.

EXAMPLE

The text DLG format file (TFILE) will be read to PCI database image file. DLGREAD requires that an image file exists before the program is run, it doesn't matter whether the file has imagery or not. In the example, an image file with no imagery is created to append the created vector segment to. The database size (DBSZ) is given the minimum values. (DBSZ would be important if you are going to store image or bitmap data on the file at some later date, but does not affect vector segments for this example.) The number of channels (DBNC) is set to zero to indicate that there is no imagery in the database. ASL is run after the DLGREAD run to check that the correct DLG was read. For example, the segment history could be "1: 24000/LAKE MATHEWS, CA/BOUNDARIES (18 and 19)".

 EASI>FILE="dlgtest.pix"
 EASI>DBSZ=1,1
 EASI>DBNC=0
 EASI>RUN CIM

 EASI>FILO=FILE
 EASI>TFILE="Lake_Mathews_Boundaries.dlg"
 EASI>DBSN="BOUNDS"
 EASI>DBSD="Lake Mathews, CA - Boundaries"
 EASI>RUN DLGREAD

 EASI>DTYP="FULL"
 EASI>RUN ASL

About PCI Help Gateway