49
49
static void get_data_files(string data_directory, vector<string> &filenames)
51
int retval = walk_dir(data_directory, ".\\.$", WS_DOTFILES|WS_DEFAULT|WS_MATCHDIRS,filenames);
52
walk_dir(data_directory, ".\\.$",
53
WS_DOTFILES|WS_DEFAULT|WS_MATCHDIRS,filenames);
54
fprintf(stderr,"Directory '%s' Error %d: %s\n", data_directory.c_str(),errno,strerror(errno));
56
fprintf(stderr,"Directory '%s' Error %d: %s\n",
57
data_directory.c_str(),errno,strerror(errno));
57
60
case WALK_NAMETOOLONG: {
58
fprintf(stderr,"Directory name '%s' is too long\n", data_directory.c_str());
61
fprintf(stderr,"Directory name '%s' is too long\n",
62
data_directory.c_str());
61
65
case WALK_BADPATTERN: {
76
81
opt->addUsage("Example: ");
77
opt->addUsage(" cgg --start 1970 --end 2012 --sites data/sites.html --dir data --filename test.png");
82
opt->addUsage(" cgg --start 1970 --end 2012 --sites data/sites.html " \
83
"--dir data --filename test.png");
78
84
opt->addUsage(" ");
79
85
opt->addUsage("Usage: ");
81
87
opt->addUsage(" --start <year> Starting year for the plot");
82
88
opt->addUsage(" --end <year> Ending year for the plot");
83
opt->addUsage(" --gas <name> The type of gas to be plotted, eg. co2");
84
opt->addUsage(" --method <P|D|G|T|S|N|F> Method by which the sample was taken");
85
opt->addUsage(" --dir <directory> Directory containing CGG data");
86
opt->addUsage(" --dataversion <version> Version number of the CCG data format");
87
opt->addUsage(" --sites <file> HTML file containing site codes and locations");
88
opt->addUsage(" --sitecodes <list> List of site codes to be plotted");
89
opt->addUsage(" --filename <file> Filename for the image to save");
90
opt->addUsage(" --minmax Show minimum and maximum values");
91
opt->addUsage(" --monthly Plot monthly rather than yearly");
92
opt->addUsage(" --area <N,W,N,W> Plot within a geographical area");
93
opt->addUsage(" --latitudes <min,max> Plot within a min and max latitude band");
89
opt->addUsage(" --gas <name> " \
90
"The type of gas to be plotted, eg. co2");
91
opt->addUsage(" --method <P|D|G|T|S|N|F> " \
92
"Method by which the sample was taken");
93
opt->addUsage(" --dir <directory> " \
94
"Directory containing CGG data");
95
opt->addUsage(" --dataversion <version> " \
96
"Version number of the CCG data format");
97
opt->addUsage(" --sites <file> " \
98
"HTML file containing site codes and locations");
99
opt->addUsage(" --sitecodes <list> " \
100
"List of site codes to be plotted");
101
opt->addUsage(" --filename <file> " \
102
"Filename for the image to save");
103
opt->addUsage(" --minmax " \
104
"Show minimum and maximum values");
105
opt->addUsage(" --monthly " \
106
"Plot monthly rather than yearly");
107
opt->addUsage(" --area <N,W,N,W> " \
108
"Plot within a geographical area");
109
opt->addUsage(" --latitudes <min,max> " \
110
"Plot within a min and max latitude band");
94
111
opt->addUsage(" --altitudes Plot altitudes");
95
112
opt->addUsage(" --change Plot rates of change");
96
opt->addUsage(" --distribution Plot the distribution of measurements");
97
opt->addUsage(" --subhorizontal <value> Horizontal position of the subtitle in the range 0.0 - 1.0");
98
opt->addUsage(" --subvertical <value> Vertical position of the subtitle in the range 0.0 - 1.0");
113
opt->addUsage(" --distribution " \
114
"Plot the distribution of measurements");
115
opt->addUsage(" --subhorizontal <value> " \
116
"Horizontal position of the subtitle in the range 0.0 - 1.0");
117
opt->addUsage(" --subvertical <value> " \
118
"Vertical position of the subtitle in the range 0.0 - 1.0");
99
119
opt->addUsage(" --runningaverage Show a running average");
100
opt->addUsage(" --label <name> Label for the vertical axis of the graph");
120
opt->addUsage(" --label <name> " \
121
"Label for the vertical axis of the graph");
101
122
opt->addUsage(" --kmlsites <filename> Save sites in KML format");
102
123
opt->addUsage(" --kmlsamples <filename> Save samples in KML format");
103
124
opt->addUsage(" -V --version Show version number");