DATASERV (kgeom) functions


LIBRARY ROUTINE

kgeom_read_header - read a geometry object header

LIBRARY CALL

kgeom_object *
kgeom_read_header(char *filename)

INPUT

OUTPUT

none

RETURN VALUE

new geometry object structure on success, NULL otherwise

DESCRIPTION

This routine will open a file and try to read a geometry header. If the file does not contain a valid geometry header, then it will be closed and nothing will be returned. If it does contain a valid header, then a new object will be returned containing the valid open fid.

In general, the kgeom_read_object() function should be used instead of this function. This function has been made public to provide complete flexibility for reading a geometry object. It should only be used when you wish to read a geometry object primitive-by-primitive. More information on this is available in the kgeom_read_primitive() man page.

A geometry object, when written to a file basically consists of a geometry header, geometry object data, and geometry primitive data. This routine allows you to read only the geometry header.

Functionally, the kgeom_read_object() routine is equivalent to a call to kgeom_read_header, followed by calls to kgeom_read_object_and_primitives() and kgeom_done_reading().

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$DATASERV/objects/library/kgeom/src/object.c

SEE ALSO

kgeom(3), kgeom_read_object

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.