Help for GT2TCL
PURPOSE:
gt2tcl gets a value (int, double, or string) and puts it into
a TAE TCL variable. The value is a GeoTIFF parameter in the
VICAR label. These are always found in the VICAR state label
under the property "GEOTIFF".
If the selection is not found, or wrong type, etc., a special value
of -999 (int) -999.0 (real) or "-999" (character string) is output
to the TAE TCL variable.
Multiple occurrences of the GeoTIFF keyword are selected by the
parameter element (since VICAR calls these elements) and which
item in a vector is handled by the parameter sequence.
EXECUTION:
Examples
gt2tcl AUSTRALIA val=s1 keyword=GTRASTERTYPEGEOKEY vtype=0
gets the rastertype from the file AUSTRALIA and puts
into the TCL variable s1 as a string
gt2tcl AUSTRALIA val=n1 keyword=GTRASTERTYPEGEOKEY vtype=4
gets the rastertype from the file AUSTRALIA and puts
into the TCL variable n1 as an integer (converts
the string to an integer)
OPERATION:
gt2tcl reads the part of the VICAR label that contains the
GeoTIFF information and tries to find the keyword (case
insensitive). When found, the value is placed in the output
parameter. Type conversion is performed according to the user
request in the parameter vtype.
Any errors cause -999 (int), -999.0 (real), or "-999" (string)
to be placed in the output parameter.
TIMING:
Less than one second.
ORIGINAL PROGRAMMER: A. Zobrist 03 June 2000
COGNIZANT PROGRAMMER: Barbara McGuffie 03 June 2000
REVISION HISTORY
2000-06-03 AZ Initial version
2007-12-28 WLB Switched to USES_ANSI_C AND LIB_CARTO; misc cleanup
2015-11-01 WLB Migrated to MIPL
PARAMETERS:
INP
VICAR input file name
KEYWORD
The GeoTIFF keyword; case
insensitive
VAL
TAE TCL name without &, gets
the found value or -999
VTYPE
0 - string
2 - integer
4 - integer
7 - double
8 - double
ELEMENT
for selecting when there are
multiple of same GeoTIFF kwd
SEQUENCE
for selecting when there is
a vector of values
See Examples:
Cognizant Programmer: