There are five cases to consider: 1. single output file, no add. 2. single input, single output file, no add. 3. single input, single output file, add. 4. two input, single output file. 5. one input, no output (update case) 6. one input, no output (update case), add The first case will create a VICAR file from the parameters with NL=1 NS=1 (i.e., a single pixel). This is handy as a holder of a GeoTIFF label. If a file exists already, it will be erased. The second case will put the parameters into the state label of a VICAR image file. If any state parameters exist, THEY WILL BE ERASED. This erasure includes ALL state labels, whether GeoTIFF related or not. The third case will add the parameters into the state label of a VICAR image file. If any state parameters exist, they are kept. A special case for TIECNVRT, an existing mapping will be deleted since it doesn't make sense to have two mappings. The fourth case will put the GeoTIFF state labels of the second VICAR input to the state label area of a VICAR image. If any state parameters exist, THEY WILL BE ERASED. This erasure includes ALL state labels, whether GeoTIFF related or not. The fifth case will put the parameters into the state label of a VICAR image file. If any state parameters exist, they are deleted. This case uses update on the vicar label and is the fastest method for large files. The sixth case will add the parameters into the state label of a VICAR image file. If any state parameters exist, they are kept. This case uses update on the vicar label and is the fastest method for large files.
The output will be a copy of the first input image with a GeoTIFF label inserted from the parameters or the second input image. If there is no first input, then the output will be a 1 x 1 image containing the GeoTIFF label from the parameters. The GeoTIFF label will be in the state area of the image.
The key-value pairs are expressed as "key=value". Double quotes
must be doubled inside the TAE double quotes (see example below).
Parenthetical documentation can be added as part of the strings.
The format is flattened out for VICAR label purposes. The higher
level descriptors such as GeoKeyDirectoryTag are not used in the
vicar table. They are restored when an external GeoTIFF label is
created. The following example is taken from 3.1.1 of the
GeoTIFF Format Specification REv 1 (see references).
geotiff=("ModelTiePointTag=(0,0,0,350807.4,5316081.3,0.0)", "ModelPixelScaleTag=(100.0,100.0,0.0)", "GTModelTypeGeoKey=1(ModelTypeProjected)", "GTRasterTypeGeoKey=1(RasterPixelIsArea)", "ProjectedCSTypeGeoKey=32660(PCS_WGS84-UTM-zone_60N)", "PCSCitationGeoKey=""UTM Zone 60 N with WGS84""")
Add can only be used in the single input cases.
The GeoTIFF standard implies that a mapped image can be represented
by a single tiepoint and a scale. Actually, the scale can include
negative values to indicate that the image storage is "flipped" from
the VICAR order (starting at the top left of the image and running
along the top in sample order, then down in line order), or a matrix
indicating that the image is rotated in addition. These
representations are very hard for the user to set up, so this
keyword will convert a simpler set of three tiepoints into a
tiepoint-scale-model format, using the model matrix only if needed
(i.e., the simplest format is decided automatically by GTGEN).
Only the first tiepoint is kept, and only the first three are used
to calculate. TIECNVRT cannot be used with the ADD keyword.
As an example, a DMA DTED can be input (without disturbing its
lines and samples format) by the following tiepoints:
"ModelTiePointTag=(0,0,0,121.0,25.0,0.0)"
"ModelTiePointTag=(1200,0,0,121.0,26.0,0.0)"
"ModelTiePointTag=(0,1200,0,122.0,25.0,0.0)"
DMA DTED also uses RasterPixelIsPoint, and has the rotation diagram
369
258
147
where 123 is the first line, 456 is the second line, etc.
The cross terms are simply set to zero. That is,
north = a * line + b * sample + c
east = d * line + e * sample + f
either (a,c) is set to (0,0) or (b,d) is. For a rectilinear
image, one of these pairs should be zero, but approximations
or rounding in the tiepoints cause one of the pairs to be small
numbers close to zero. Which pair is a function of the rotation
of the image.