User's Guide

DELGOF

Deletes records or attributes from a graphics overlay file (GOF)

Function:

Deletes records or attributes from a graphics overlay file (GOF). Subcommand-REC deletes records from a specified GOF. Records maybe deleted by specifying a record number or attribute name and value. Subcommand ATT-deletes a list of attribute names from a GOF.

Parameters:

Subcommand -REC:
Deletes records from a GOF by specified record number or by attribute name and value.

INFILE
Input file. The input GOF. The appropriate extension will be appended to this name based on FTYPE.

OUTFILE
Output file. The output GOF. The appropriate extension will be appended to this name based on FTYPE. If set to NULL, all deletions will be made from the input GOF.

FTYPE
File type. The type of GOF from which records are to be deleted.

  = POINT: Point file.  Delete records from a point GOF
	   INFILE;GOF.POINT.
  = LINE:  Line file.  Delete records from a line GOF 
	   INFILE;GOF.LINE.
  = POLY:  Polygon file.  Delete records from a polygon GOF
	   INFILE;GOF.POLY.
  = ANNOT: Annotation file.  Delete records from an 
	   annotation GOF, INFILE;GOF.ANNOT.

RECNUM(-- )
Record numbers. The record numbers of the items to be deleted. If NULL, only those records specified by ATRVAL are deleted.

ATRVAL(--)
Attribute values. Allows attribute names with corresponding attribute values to be specified. To delete records by attribute value, specify the attribute name and value in the form:

	ATTRIBUTE NAME:ATTRIBUTE VALUE

(Note that a colon with no blank spaces must be used
to separate the attribute name from the attribute
value.)

ATTRIBUTE NAME is an 8-character name that must be defined in the GOF being processed. ATTRIBUTE VALUE is a 12-character string that must be a valid value for the data type defined for ATTRIBUTE NAME. If NULL, only those records specified by RECNUM are deleted.

Subcommand -ATT:
Deletes the specified attributes from a GOF.

INFILE
Input file. The input GOF. The appropriate extension will be appended to this name based on FTYPE.

OUTFILE
Output file. The output GOF. The appropriate extension will be appended to this name based on FTYPE. If set to NULL, all deletions will be made from the input GOF.

FTYPE
File type. The type of GOF from which attributes are to be deleted.

  = POINT: Point file.  Delete attributes from a point GOF
           INFILE;GOF.POINT.
  = LINE:  Line file.  Delete attributes from a line GOF
           INFILE;GOF.LINE.
  = POLY:  Polygon file.  Delete attributes from a polygon GOF
	   INFILE;GOF.POLY.
  = ANNOT: Annotation file.  Delete attributes from an 
           annotation GOF INFILE;GOF.ANNOT.

ATRNAME
Attribute names. A list of attribute names to be deleted from the output GOF. If any of the names do not exist, an error occurs. Note that when an attribute name is deleted, all attribute values referring to that name are also deleted.

Examples:

  1. LAS> delgof-rec infile=mckinley outfile=mckinley2 ftype=annot recnum=(1,5,9) atrval=(font:1,color:dkblue)

    MCKINLEY;GOF.ANNOT is copied to MCKINLEY2:GOF.ANNOT and records 1, 5, and 9 and records with a font value of 1 or a color of DKBLUE are deleted from the annotation GOF, MCKINLEY2;GOF.ANNOT.

  2. LAS> delgof-att infile=graph outfile=-- ftype=poly atrname=(class,site)

    The attributes CLASS and SITE are deleted from the polygon GOF, GRAPH;GOF.POLY. Any attribute values corresponding to the deleted attribute names are also deleted.

Description/Algorithm:

The input GOF name is defined as INFILE;GOF.FTYPE and verified. If OUTFILE is not NULL, INFILE;GOF.FTYPE is copied to OUTFILE;GOF.FTYPE, and all deletions are made on the output GOF; otherwise, all deletions are made on the input GOF.

For DELGOF-REC the GOF is opened. Verification is then made that the record numbers specified are valid for the GOF, the attribute names specified are defined for the GOF, and the proper syntax was used to enter the attribute names and values. If any verification fails, an error message is displayed, the process terminates, and no records are deleted. After the input is validated, records specified by RECNUM and/or ATRVAL are deleted. When more than one attribute name and/or value is specified, a logical OR is performed when determining whether the record is to be deleted, i.e., if RECORD has ATRVAL(1) or ATRVAL(2) ... or ATRVAL(N), it is deleted.

For DELGOF-ATT the GOF is opened. Verification is then made that the attribute names specified are defined for the GOF. If verification fails, an error message is displayed, the process terminates, and no attributes are deleted. After the attributes are validated, attributes specified in ATRNAME are deleted from the GOF. The attribute values associated with the attribute names ar also deleted from the GOF records.

Nonfatal Error Messages:

    None.

Fatal Error Messages:

  1. [delgof-fatal] Fatal error encountered

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

  2. [delgof-invrec] Record number <XXXX> does not exist

    The record number <XXXX> specified by RECNUM was not found in the input GOF. Run DSPGOF to list the record numbers an input GOF.

  3. [delgof-nospec] No record number or attribute value specified

    Either RECNUM or ATRVAL must be specified . Rerun DELGOF with RECNUM and/or ATRVAL specified.

  4. [delgof-notfnd] Attribute name <XXXX> not found

    The attribute name specified is not defined for the GOF being processed. Run DSPGOF to list the defined attribute names for an input GOF.

User Notes:

  1. DSPGOF may be used to determine which records or attributes of a GOF should be deleted.

  2. Records and attributes are physically deleted from the GOF files with no option to abort when outfile is NULL.

  3. If OUTFILE is specified DELGOF calls CPYGOF to copy the input file. All deletions are done from the new GOF.

  4. Related functions are CPYGOF, DSPGOF, and XID.