User's Guide

TAB2GOF

Convert a labeled table (LT) to a graphics overlay file (GOF)

Function:

Convert a labeled table (LT) to a graphics overlay file (GOF). A GOF may be one of four file types: polygon, line, point, or annotation. The corresponding LT for each GOF type consists of one or more files containing attributes and graphics data with the attribute information being optional. The data file containing the polygon, line, point, or annotation data is required and may contain attribute information as well.

Parameters:

INLT
Input labeled table. The name of the LT to be converted to a GOF. The LT may consist of one or multiple files. If there are multiple files, the first record of the master LT file contains a list of subfiles that are associated with it.

OUTGOF
Output graphics overlay file. The name of the file to contain the graphics information. The extension for the GOF is dependent on FTYPE. The full name of the GOF is assumed to be INGOF;GOF.POINT, INGOF;GOF.LINE, INGOF;GOF.POLY, or INGOF;GOF.ANNOT.

FTYPE
File type. The type of graphics overlay file to be created from a LT.


  = POINT:  Point file.  Graphics records from the
            LT are copied to a point GOF file.
  = LINE:   Line file.  Graphics records from the LT
            are copied to the line GOF file.
  = POLY:   Polygon file.  Graphics records from the
            LT are copied to the polygon GOF file.
  = ANNOT:  Annotation file.  Graphics records from the
            LT are copied to the annotation GOF file.

ALTTYPE(--)
Attribute labeled table type. The type of labeled table which contains the GOF attributes. The attribute file is optional and may be the same file as the data file. If allowed to default, the input attribute labeled table must have the following types.


     GOF Type		LT Type
     --------		-------
      POLY		REGATT
      LINE		ARCATT
      POINT		PNTATT
      ANNOT		ANTATT

DLTTYPE(--)
Data labeled table type. This is the type of labeled table which contains the point, line polygon or annotation data. The data file may be the same file as the attribute file. If allowed to default, the input data labeled table must have the following types.


     GOF Type		LT Type
     --------		-------
      POLY		REGXY
      LINE		ARCXY
      POINT		PNTXY
      ANNOT		ANTXY

LSCATR(--)
Line/sample coordinate attribute. The attribute names of the fields in the LT which define the line and sample coordinate values for the point location, line or polygon vertices or annotation location. If allowed to default, the attribute names are assumed to be X for sample location and Y for line location. Note that the line attribute is the first element of LSCATR and the sample attribute is the second element of LSCATR.

LABATR(--)
Label attribute. The attribute name of the field in the LT which defines the graphics element label. If allowed to default, the attribute name is assumed to be LABEL. If the label attribute name does not exist in the LT, no label is associated with the graphics elements.

NUMATR(--)
Number attribute. The attribute name of the field in the LT which defines the point, line, polygon, or annotation number. If allowed to default, the attribute name is based on FTYPE.


    GOF Type		NUMATR
    --------		------
    POINT		PNTNUM
    LINE		ARCNUM
    POLY		REGNUM
    ANNOT		ANNOTNUM

SIZATR(--)
Size attribute. The attribute name of the field in the LT which defines the annotation size. If allowed to default, the attribute name is assumed to be SIZE. This parameter is used only when FTYPE="ANNOT".

ANGATR(--)
Angle attribute. The attribute name of the field in the LT which defines the annotation angle. If allowed to default, the attribute name is assumed to be ANGLE. This parameter is used only when FTYPE="ANNOT".

TEXTATR(--)
Text attribute. The attribute name of the field in the LT which defines the annotation text. If allowed to default, the attribute name is assumed to be ANNOT. This parameter is used only when FTYPE="ANNOT".

ATRNAME(--)
Attribute names. A list of attribute names in the LT file that are to be copied to the GOF. By default, all attributes of the LT are copied into the GOF.

APPDFLG(YES)
Append flag. The user may specify whether or not to append data records to an existing GOF. If the GOF does not exists, this parameter is ignored.


  = YES:  Append.  Append data to existing GOF.
  = NO:   Do not append.  Do not append data to 
          existing GOF.

Examples:

  1. LAS> tab2gof inlt=phoenix outgof=phoenix ftype=poly numatr=polynum appdflg=no

    Polygon data from the labeled table PHOENIX;LT is transferred into the GOF named PHOENIX;GOF.POLY. Region (or polygon) numbers which are used to associate a given vertex with a polygon, are read from the labeled table attribute field POLYNUM. In addition to transferring the data, all attribute names and values are written to the GOF.

  2. LAS> tab2gof inlt=reftps;lt1 outgof=whitesands ftype=point alttype=pntxy lscatr=(imagey,imagex) atrname=(elev,zoom)

    Data from the labeled table REFTPS;LT1 is transferred into the GOF named WHITESANDS;GOF.POLY. Point coordinate values are read from the labeled table attribute fields IMAGEX and IMAGEY. By specifying ALTTYPE to be PNTXY, attributes values are read from the same file as the point data. Only the attributes ELEV and ZOOM along with their corresponding values are are written to the GOF.

Description/Algorithm:

The input labeled table may consist of one or more files. If there are multiple input files, one of the files may contain attribute names and values. Graphics data is required; therefore, one of the input files must contain point, line, polygon or annotation data. If there is a single input file, it must contain graphics data and may optionally contain attribute data (i.e., the attributes are optional).

TAB2GOF begins by determining the retrieving the parameters and opening the input labeled table (LT) and reading the definition records. The appropriate GOF type is then opened based on FTYPE.

If an attribute LT is specified or if attribute information is contained in the data file, information from the file is used to create/update the header record of the GOF. The list of attribute names in ATRNAME specifies those attributes to be processed when the LT is read. If an attribute name already exists in the GOF, error checking is done to ensure that the data type of the attribute in the LT and in the GOF are the same.

The attribute values and graphics data (polygon, line, point or annotation) are then read from the data LT and written into the GOF. After all records of the LT have been read and copied to the GOF, the LT file and GOF are closed and a standard completion message is written to the user's terminal.

Nonfatal Error Messages:

  1. [tab2gof-anotlen] Annotation truncated to 508 characters

    GOF annotation text strings are restricted to 508 characters. The text string is truncated prior to being written to the GOF.

  2. [tab2gof-attlen] Attribute truncated to 12 characters

    GOF attribute values are restricted to 12 characters. The attribute value is truncated prior to being written to the GOF.

  3. [tab2gof-attnam] Attribute <xxxxx> truncated to 8 characters

    GOF attribute names are restricted to 8 characters. The attribute name is truncated prior to being written to the GOF.

  4. [tab2gof-lablen] Label truncated to 15 characters

    GOF labels are restricted to 15 characters. The label is truncated prior to being written to the GOF.

Fatal Error Messages:

  1. [tab2gof-dtype] Attribute name <xxxxx> has different data types between GOF and LT

    A specified attribute name already exists in the GOF, but it has a different data type than the attribute in the LT.

  2. [tab2gof-fatal] Fatal error encountered

    A fatal error was encountered during processing. The error message that is displayed preceding this message is the specific error that was encountered.

  3. [tab2gof-invlt] Input file type <xxxxx> not found

    The input LT file type specified could not be found. The user should examine the LT file. If the LT file type does not correspond with one of the default file types, the user may specify the appropriate file type with ALTTYPE and DLTTYPE. See User Note 4 for default LT file types.

  4. [tab2gof-maxatt] Maximum number of attributes exceeded

    The GOF is restricted to 35 attributes. The user should rerun the program and specify the attributes to be transferred with ATRNAME.

  5. [tab2gof-nofind] LT attribute name <xxxxx> not found

    The specified attribute name was not found in the LT. Enter an attribute that exists in the LT.

  6. [tab2gof-notfnd] LT file type <xxxxx> not found

    A valid GOF attribute file type was found but its corresponding data file type was not. See User Note 4 for default LT file types.

  7. [tab2gof-scale] LT attribute <xxxxx> must be a scalar value

    The specified attribute was found but it has not been defined to be a scalar value. The specified attribute is required to be defined as a 1 x 1 matrix.

  8. [tab2gof-char] LT attribute <xxxxx> must have data type of character

    The specified attribute was found but it has an invalid data type. The specified attribute is required to have a data type of character (C).

  9. [tab2gof-alloc] Error allocating dynamic memory

    An error occurred allocating memory. Rerun, and if the error persists, contact the system manager.

User Notes:

  1. TAB2GOF automatically performs data type conversions when the data type of the labeled table field does not match that required for the GOF. The two exceptions to this are labels and annotation strings. These are required to be character strings.

  2. TAB2GOF is a part of the file interface system. Other programs related to TAB2GOF are:

        Program   Description
        -------   -----------
        GOF2TAB   Converts a GOF to a labeled table
        STAT2TAB  Converts a LAS statistics file to a labeled table
        TAB2STAT  Converts a labeled table to a LAS statistics file
    

    In addition to the previously listed programs, some TAE procedures have been written to transfer data from a source file to a destination file. These include the following programs:

        Program   Description
        -------   -----------
        GOF2STAT  Converts a GOF to a LAS statistics file
        STAT2GOF  Converts a LAS statistics file to a GOF 
    

  3. The default corresponding GOF and LT file types are listed in the following table:

        GOF File Type      LT File Types
        -------------      -------------
        Polygon            REGATT, REGXY
        Line               ARCATT, ARCXY
        Point              PNTATT, PNTXY
        Annotation         ANNOTATT, ANNOTXY
    
    
    The following table lists the default LT attribute names for each of the LT file types:

        Attribute    
        Name         LT File Types
        ---------    -------------
        REGNUM       REGATT, REGXY
        ARCNUM       ARCATT, ARCXY
        LABEL	 REGATT, ARCATT
        X            REGXY, ARCXY
                     PNTXY, ANNOTXY
        Y            REGXY, ARCXY
                     PNTXY, ANNOTXY
        SIZE         ANNOTXY
        ANGLE        ANNOTXY
        ANNOT        ANNOTXY