public class cwgraphics
extends java.lang.Object
The graphics tool creates earth data annotation graphics.
cwgraphics - creates earth data annotation graphics.
cwgraphics [OPTIONS] input
cwgraphics [OPTIONS] input output
-c, --coast=PLANE
-g, --grid=PLANE
-h, --help
-l, --land=PLANE
-p, --political=PLANE
-v, --verbose
-V, --variable=NAME
--version
The graphics tool creates earth data annotation graphics in the form of a byte-valued variable. Each output byte in the new variable contains 8 bits, one for each of 8 possible graphics planes numbered 1 to 8 from the least significant bit to the most significant bit. The graphics planes are independent of one another and encode a bitmask for graphical data annotation, where a bit value of 0 is interpreted as 'off' and a bit value of 1 as 'on'. In this way, 8 separate binary bitmasks may be encoded into one byte value. For example a pixel with graphics planes 2, 3, and 4 on is encoded as:
Binary value = 00001110 Decimal value = 14
Following the standard convention for graphics planes in CoastWatch product files, the default behaviour places latitude/longitude grid graphics in plane 2, coast line graphics in plane 3, and land mask graphics in plane 4. Coast lines are derived from GSHHS coast line data, and land polygons are filled GSHHS polygons (see http://www.ngdc.noaa.gov/mgg/shorelines/gshhs.html). The default output variable name is 'graphics'. These defaults may be changed using command line options to alter the planes used for each type of annotation, to exclude or add some types of annotation, and to change the output variable name.
Once the graphics planes are created, they may be used as overlay graphics for rendered earth data images. The graphics byte data may be exported using the cwexport tool for use in other software packages, or may be used in the cwrender tool with the --bitmask option.
0 on success, > 0 on failure. Possible causes of errors:
The following shows the creation of a standard set of graphics planes using cwgraphics. The file being acted upon is a CoastWatch HDF file created using the graphical cwmaster tool:
phollema$ cwgraphics -v bc_coast.hdf cwgraphics: Reading input bc_coast.hdf cwgraphics: Creating graphics variable cwgraphics: Rendering overlay at plane 2 cwgraphics: Rendering overlay at plane 3 cwgraphics: Rendering overlay at plane 4
Another example below shows the alteration of the default options. Only coast line and political line graphics are rendered to plane 1, and the output variable is named 'geography':
phollema$ cwgraphics -v --land 0 --grid 0 --coast 1 --political 1 --variable geography bc_coast.hdf cwgraphics: Reading input bc_coast.hdf cwgraphics: Creating geography variable cwgraphics: Rendering overlay at plane 1 cwgraphics: Rendering overlay at plane 1 cwgraphics: Rendering overlay at plane 1
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] argv)
Performs the main function.
|