public final class cwinfo
extends java.lang.Object
The information utility dumps earth data information in a display-friendly format.
cwinfo - prints earth data file information.
cwinfo [OPTIONS] input
-h, --help
-t, --transform
-c, --coord
-e, --edge
-l, --locFormat=TYPE
-v, --verbose
--version
The information utility dumps earth data information in a display-friendly format. The global earth information is printed such as satellite name, sensor, date, and earth transform information. The name of each variable is printed along with its data type, dimensions, scaling factor, and so on. For more detailed printing of generic HDF file contents, use the HDF hdp command.
When the --transform option is used, various additional earth transform information is printed. Let nc and nr be the x and y coordinate dimensions respectively, and mc=(nc-1)/2, mr=(nr-1)/2 be the midpoint coordinates. Note that indexing is zero-based and coordinates refer to the pixel center. Then the following information is computed:
When the --coord option is used, Common Data Model coordinate systems are printed if available. Generally this style of coordinate system information is only available for files read by the NetCDF Java library.
0 on success, > 0 on failure. Possible causes of errors:
The following shows an information dump of a CoastWatch HDF file from the West Coast:
phollema$ cwinfo 2002_197_1100_n16_wn.hdf Contents of file 2002_197_1100_n16_wn.hdf Global information: Satellite: noaa-16 Sensor: avhrr Date: 2002/07/16 JD 197 Time: 11:00:08 UTC Pass type: night Projection type: mapped Map projection: mercator Map affine: 0 -1469.95 1469.95 0 -15012623.67 6367109.52 Origin: USDOC/NOAA/NESDIS CoastWatch Variable information: Variable Type Dimensions Units Scale Offset avhrr_ch3 short 1024x1024 temp_deg_c 0.01 0 avhrr_ch4 short 1024x1024 temp_deg_c 0.01 0 avhrr_ch5 short 1024x1024 temp_deg_c 0.01 0 sst short 1024x1024 temp_deg_c 0.01 0 cloud byte 1024x1024 - - - sat_zenith short 1024x1024 - 0.0001 0 graphics byte 1024x1024 - - -
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATE_FMT
Default date format.
|
static java.lang.String |
DATE_TIME_FMT
Default date/time format.
|
static java.lang.String |
TIME_FMT
Default time format.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] argv)
Performs the main function.
|
static void |
printCoordSystems(EarthDataReader reader,
java.io.PrintStream stream)
Prints Common Data Model (CDM) style coordinate system
information including level and time index information.
|
static void |
printGlobal(EarthDataReader reader,
java.io.PrintStream stream)
Prints the global file information.
|
static void |
printInfo(EarthDataReader reader,
java.io.PrintStream stream)
Prints the information from the specified file.
|
static void |
printTransform(EarthDataReader reader,
java.io.PrintStream stream,
boolean useEdges)
Prints earth transform data from the specified file.
|
static void |
printTransform(EarthDataReader reader,
java.io.PrintStream stream,
boolean useEdges,
int locFormat)
Prints Earth transform data from the specified file.
|
static void |
printVariables(EarthDataReader reader,
java.io.PrintStream stream)
Prints the variable information.
|
public static final java.lang.String DATE_FMT
public static final java.lang.String TIME_FMT
public static final java.lang.String DATE_TIME_FMT
public static void main(java.lang.String[] argv) throws java.io.IOException
argv
- the list of command line parameters.java.io.IOException
public static void printTransform(EarthDataReader reader, java.io.PrintStream stream, boolean useEdges)
reader
- the earth data reader object to use.stream
- the output stream for printing.useEdges
- true to use actual edges for location values,
false to use center of edge pixels.printTransform(EarthDataReader,PrintStream,boolean)
public static void printTransform(EarthDataReader reader, java.io.PrintStream stream, boolean useEdges, int locFormat)
reader
- the Earth data reader object to use.stream
- the output stream for printing.useEdges
- true to use actual edges for location values,
false to use center of edge pixels.locFormat
- the Earth location format code,
see EarthLocation.format(int)
.public static void printCoordSystems(EarthDataReader reader, java.io.PrintStream stream) throws java.io.IOException
reader
- the earth data reader object to use.stream
- the output stream for printing.java.io.IOException
public static void printInfo(EarthDataReader reader, java.io.PrintStream stream)
reader
- the earth data reader object to use.stream
- the output stream for printing.public static void printGlobal(EarthDataReader reader, java.io.PrintStream stream) throws java.io.IOException
reader
- the earth data reader object to use.stream
- the output stream for printing.java.io.IOException
- if an error occurred printing to the stream.public static void printVariables(EarthDataReader reader, java.io.PrintStream stream) throws java.io.IOException
reader
- the earth data reader object to use.stream
- the output stream for printing.java.io.IOException
- if an error occurred printing to the stream.