public final class cwnavigate
extends java.lang.Object
The navigation tool adds navigation corrections to 2D variables in an earth data file.
cwnavigate - adds navigation corrections to earth data.
cwnavigate [OPTIONS] {-t, --trans=ROWS/COLS} input
cwnavigate [OPTIONS] {-r, --rotate=ANGLE} input
cwnavigate [OPTIONS] {-a, --affine=A/B/C/D/E/F} input
cwnavigate [OPTIONS] {-R, --reset} input
-h, --help
-m, --match=PATTERN
-v, --verbose
--version
The navigation tool adds navigation corrections to 2D variables in an earth data file by setting navigation transform parameters. The most basic navigation transform consists of additive translation in the row and column data coordinates. As an example of translation, the following diagram shows coastlines in the earth image data as a '.' (period) symbol and coastlines derived from a GIS database as a '*' (star). Translation has been used to correct the position of the image data:
*** *** ... *** ***** *** ***** ... *** **... *** ** ... * .** ----> * ** . * ** * ** . **** row trans = 1 **** .... col trans = -2
A more generic navigation transform consists of a translation combined with a rotation or shear. To represent generic navigation transforms, an affine transform matrix is used to convert "desired" data coordinates to "actual" data coordinates as follows:
|row'| |a c e| |row| | | | | | | |col'| = |b d f| |col| | | | | | | | 1 | |0 0 1| | 1 |
where [a..f] are the affine transform matrix coefficients and (row',col') is the actual data coordinates at which the desired data value for (row,col) may be found.
To apply a navigation transform to a 2D variable, the existing navigation transform is read and the new transform is applied to it using matrix multiplication to create a combined transform. As an example, suppose that T1 is the initial navigation transform. The application of an additional transform T2 results in a new transform that is equivalent to:
T2 (T1 (row, col))
A navigation transform can be applied to a subset of 2D variables, or all variables in the file. Note that satellite channel data or channel-derived variables should be corrected with navigation but GIS-derived variables such as coastline and lat/lon grid graphics should not be corrected. Setting the navigation transform simply establishes a mapping between desired and actual data coordinates -- it does not change the gridded data values themselves. Once a navigation transform has been set, other CoastWatch tools in this package will take the transform into account when reading the data.
0 on success, > 0 on failure. Possible causes of errors:
The following example shows the navigation correction of a NOAA-15 CoastWatch HDF data file from the Gulf of Mexico:
phollema$ cwnavigate --trans -3/3 -v --match '(avhrr.*|cloud|sst)' 2002_328_1326_n15_ml.hdf cwnavigate: Reading input 2002_328_1326_n15_ml.hdf cwnavigate: Applying navigation correction to avhrr_ch1 cwnavigate: Applying navigation correction to avhrr_ch2 cwnavigate: Applying navigation correction to avhrr_ch4 cwnavigate: Applying navigation correction to cloud cwnavigate: Applying navigation correction to sst
Another example below shows the navigation correction of a NOAA-15 CoastWatch IMGMAP data file from the US east coast:
phollema$ cwnavigate --trans -2/1 -v 2002_326_1330_n15_er_c2.cwf cwnavigate: Reading input 2002_326_1330_n15_er_c2.cwf cwnavigate: Applying navigation correction
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] argv)
Performs the main function.
|