c_gofopn - Opens a graphics overlay file

SYNTAX

#include <sys/file.h>
#include "worgen.h"
#include "gof.h"
FUNCTION c_gofopn (fd, hostname, goflasnm, type, access, cflag)

     int		*fd;
     char		*hostname;
     char		*goflasnm;
     char		*type;
     int		*access;
     int		*cflag;

PARAMETERS

fd (output, integer)

File descriptor to be used by other GOF functions.

hostname (input/output, character, length (*))

On input, hostname should contain the host file name of the image whose associated GOF is to be opened. On output, hostname will contain the host name of the GOF.

goflasnm (output, character, length (*))

The LAS name of the GOF opened.

type (input, character, length (*))

The type of GOF to be opened. Valid values are:

     = POINT: for graphics points
     = LINE:  for graphics line
     = POLY:  for graphics polygons
     = ANNOT: for graphics annotation

access (input, integer)

Specifies how the file will be accessed. Valid values are:

     = IREAD:   open file for read only
     = IWRITE:  open new file for read/write
     = IUPDATE: open existing file for read/write

cflag (output, integer)

Creation flag. If cflag is FALSE the routine did not have to create the GOF. If TRUE the routine created a new GOF.

DESCRIPTION

c_gofopn() is used to open a graphics overlay file. If access is not set to READ, and the file does not exist, a new GOF will be created with a null header record.

RETURN VALUE

c_gofopn() returns

     E_SUCC (0)  --> successful completion
     E_FAIL (-1) --> operation failed

SPECIAL CONSIDERATIONS

c_gofopn() is C callable only.