public final class cwstats
extends java.lang.Object
The statistics utility calculates a number of statistics for each variable in an earth data file.
cwstats - calculates earth data file statistics.
cwstats [OPTIONS] input
-h, --help
-i, --region=LAT/LON/RADIUS
-l, --limit=STARTROW/STARTCOL/ENDROW/ENDCOL
-m, --match=PATTERN
-p, --polygon=FILE
-s, --stride=N
-S, --sample=FACTOR
--version
The statistics utility calculates a number of statistics for each variable in an earth data file:
To speed up the statistics calculations, a subset of the data values in each variable may be specified using either the --stride or --sample options, and one of the --limit, --region, or --polygon options. The --match option may also be used to limit the statistics calculations to a subset of the variables.
0 on success, > 0 on failure. Possible causes of errors:
The following shows a statistics calculation on a CoastWatch HDF file from the Great Lakes:
phollema$ cwstats 2002_197_1719_n16_gr.hdf Variable Count Valid Min Max Mean Stdev avhrr_ch1 1048576 483728 3.49 74.36 13.059646 11.371605 avhrr_ch2 1048576 483728 1.97 71.35 18.520041 9.844144 avhrr_ch3a 1048576 483728 0.53 52.84 14.664213 8.88201 avhrr_ch4 1048576 483728 -44.8 31.55 11.052207 13.683309 avhrr_ch5 1048576 483728 -45.48 27.05 7.978351 13.185983 sst 1048576 483728 -44.51 51.43 20.166333 16.714169 cloud 1048576 1048576 0 127 23.24175 37.179013 sat_zenith 1048576 483728 0.36 0.7 0.466376 0.077153 sun_zenith 1048576 483728 0.87 0.95 0.907019 0.022209 rel_azimuth 1048576 483728 -0.58 -0.33 -0.465731 0.058149 graphics 1048576 1048576 0 14 6.84576 2.931459
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] argv)
Performs the main function.
|
static void |
printStats(EarthDataReader reader,
DataLocation start,
DataLocation end,
java.awt.Shape polygon,
int stride,
double sample,
java.lang.String match)
Prints the variable statistics information.
|
public static void main(java.lang.String[] argv)
argv
- the list of command line parameters.public static void printStats(EarthDataReader reader, DataLocation start, DataLocation end, java.awt.Shape polygon, int stride, double sample, java.lang.String match)
reader
- the earth data reader object to use.start
- the starting data location, or null for the
beginning of the data.end
- the ending data location, or null for the end of the
data.polygon
- the polygon to use for constraining the statistics
calculation, or null to use the values of start and end.stride
- the sampling stride for each variable.sample
- the sampling factor for each variable, or
Double.NaN
if the sampling stride should be used.match
- the variable name matching pattern, or null for
all variables.DataVariable.getStatistics(DataLocation,DataLocation,int[])
,
DataVariable.getStatistics(DataLocation,DataLocation,double)
,
DataVariable.getStatistics(int[])
,
DataVariable.getStatistics(double)