
dlg2viff(1)                  Khoros                   dlg2viff(1)

PROGRAM
     dlg2viff - Convert a DLG format vector file to VIFF format.

SYNTAX
     dlg2viff

     -i             Input DLG File

     [-o1]          Output File For DLG Category #1

     [-o2]          Output File For DLG Category #2

     [-o3]          Output File For DLG Category #3

     [-o4]          Output File For DLG Category #4

     [-x]           Number Of Columns In The Output Image

     [-l]           location options:
                    0 (No Location Data),
                    1 (Sparse Location Data),
                    or 2 (Full Location Data)
                       [default = 0]

     [-V]           Gives the version for dlg2viff

     [-U]           Gives the usage for dlg2viff

     [-P]           Prompts for command line options

     [-A [file1]]   Creates the answer file called dlg2viff.ans
                    or file1

     [-a [file1]]   Uses dlg2viff.ans or file1 as the answer file

DESCRIPTION
     dlg2viff converts an optional format digital line graph file
     to VIFF raster format.

     A DLG file may contain several categories of data.  Each
     category contains data of different types.  For instance,
     the first category might be roads and the second category
     streams.  Dlg2viff will create a separate output file for
     each category in the in the input DLG file.  The input DLG
     file may not contain more that four categories.  Most often
     DLG files are created with a single category, so this should
     not be a problem.

     This program reads the vector data (points and lines) and
     plots them in the viff raster output image.  DLG data asso-
     ciates pairs of attributes with the points and lines to
     describe each feature.  Each pair of attributes contains a
     major attribute and a minor attribute.  For example, the
     major attribute may specify fresh water, and the minor
     attribute could specify a small stream.  Each output file
     that dlg2viff writes will contain a separate data band for
     each pair of attributes that occur in its DLG category.  If
     three pairs of attributes are present in the DLG category
     for roads, then the output viff file for roads will have
     four bands in it.  The first band in an output viff image is
     always reserved for features with no attributes associated
     with them.  The last three bands will each contain data
     associated with the three pairs of attributes.  The attri-
     butes that go with each data band are stored in the map for
     that band.  The map for each band has one row and two
     columns, one for each attribute, with the major attribute
     stored in the first column.  Each attribute is stored in a
     short (2 byte) field.

     The output images are written in bit format.  This is possi-
     ble because for a given band there is only one pair of
     attributes.  For each pixel in the band, there is either a
     feature present for that pair of attributes or there is not.
     A binary 0 or 1 is suitable to represent this.  The number
     of columns in the output images is given by the -x option on
     the command line.  The number of rows will then be deter-
     mined by the size of the geographical region covered by the
     DLG data.  This is done automatically so the output image
     will be scaled correctly.

     There are three options for location data in the output
     files which may be specified using the -l option on the com-
     mand line.  The default option (-l 0) is that no location
     data will be written.  This is best when the map created is
     to be displayed as an image, because the location data will
     be ignored by most programs.  The second option (-l 1) is
     that sparse location data will be written with the output
     images.  Since the output images are bit overlays, there is
     no data associated with the zero-valued pixels in the image.
     All the data in the image is contained in the maps and the
     pixels with a non-zero value.  For this reason all of the
     zero pixels in the image may be discarded.  When sparse
     location data is selected, the zero-valued pixels in the
     image will be discarded and locations will be written for
     the remaining non-zero pixels.  This is advantageous because
     of the reduced size of the output files, but requires a
     display package (such as xprism3) which is capable of using
     explicit location data.  The final location option (-l 2)
     writes an explicit location for each pixel in the output
     image.  The image is not thinned as in the second option.
     All pixels, including zeros, are saved and each is assigned
     a location.  This option can result in very large output
     files.

REQUIRED ARGUMENTS
     -i     type: infile
            desc: Input DLG File

OPTIONAL ARGUMENTS
     -o1    type: outfile
            desc: Output File For DLG Category #1

     -o2    type: outfile
            desc: Output File For DLG Category #2

     -o3    type: outfile
            desc: Output File For DLG Category #3

     -o4    type: outfile
            desc: Output File For DLG Category #4

     -x     type: integer
            desc: Number Of Columns In The Output Image
            default: 512
            bounds: value > 0

     -l     type: integer
            desc: location options
            allowed values:
            0 (No Location Data),
            1 (Sparse Location Data),
            or 2 (Full Location Data)

EXAMPLES
     dlg2viff -i dlg.file -o1 cat1.xv -o2 cat2.xv -x 256 -l 1

     This command reads the DLG format data in dlg.file, converts
     it to raster data, and writes it to the viff output files.
     The features in the first DLG category will be written to
     the viff file cat1.xv, and the features in the second DLG
     category will be written to the viff file cat2.xv.  The out-
     put images will have 256 columns, and the number of rows
     will be calculated so the output maps will be scaled
     correctly.  The -l 1 option specifies that sparse locations
     will be included in the output image.

SEE ALSO
     intro(1), verror(3), vgparms(3), vutils(3), ldlg2viff(3)
     vmapdlg(1), vlayer(1)

RESTRICTIONS
     dlg2viff can only read optional format DLG files.  The DLG
     files are restricted to four or fewer DLG categories.  This
     program reads fixed format data files, so it is very sensi-
     tive to correct formatting in the input DLG files.

COPYRIGHT
     Copyright 1991, University of New Mexico.  All rights
     reserved.

Khoros                    Release: 1.0                          1

