OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
resam_viirs.cpp
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * NAME: resam_viirs.cpp
4  *
5  * DESCRIPTION: Application to resample VIIRS GEO and resample and
6  * fill bowtie regions of L1B files for easier L2 processing.
7  *
8  *
9  * REFERENCES:
10  *
11  * REVISION HISTORY:
12  * DATE: PR# AUTHOR Description
13  * -------- ------ -------- -----------------
14  * o2-17-2019 S. Anderson
15  *
16  * NOTES (MISCELLANEOUS) SECTION:
17  * none
18  *
19  **************************************************************************/
20 
21 #include <iostream>
22 #include <libgen.h>
23 #include <DDOptions.h>
24 #include "resam_viirs/RsViirs.h"
25 
26 //-----------------------------------------------------------------------------
27 //
28 // Main Function
29 //
30 //-----------------------------------------------------------------------------
31 
32 int main(int argc, char* argv[]) {
33  int status = RS_SUCCESS;
34 
37 
38  //char softwareVersion[200];
39  //sprintf(softwareVersion, "%d.%d.%d-r%d", L3MAPGEN_VERSION_MAJOR,
40  //L3MAPGEN_VERSION_MINOR, L3MAPGEN_VERSION_PATCH_LEVEL, SVN_REVISION);
41  init_options(list, "3.1");
42  if (argc == 1) {
44  exit(1);
45  }
46  read_options(list, argc, argv);
47 
48  RsViirs* rs = new RsViirs();
49  rs->history_ = get_history(argc, argv);
50  rs->source_files_ = get_source();
51 
52  status = rs->process();
53  if (status != RS_SUCCESS) {
54  std::cerr << "Main:: Resampling processing failure for " << argv[1]
55  << std::endl;
56  exit(EXIT_FAILURE);
57  }
58 
59  std::cerr << "Main:: Resampling complete for "
60  << get_option(INPUT_L1B) << std::endl;
61 
62  delete rs;
63 
64  return (status);
65 }
66 
void read_options(clo_optionList_t *list, int argc, char *argv[])
Definition: DDOptions.cpp:576
int status
Definition: l1_czcs_hdf.c:32
list(APPEND LIBS ${PGSTK_LIBRARIES}) add_executable(atteph_info_modis atteph_info_modis.c) target_link_libraries(atteph_info_modis $
Definition: CMakeLists.txt:7
string history_
Definition: RsViirs.h:105
void clo_setEnablePositionOptions(int val)
Definition: clo.c:1685
string get_option(const string &name)
Definition: DDOptions.cpp:211
const string INPUT_L1B
Definition: DDOptions.cpp:40
clo_optionList_t * clo_createList()
Definition: clo.c:532
string get_history(int argc, char *argv[])
Definition: DDOptions.cpp:496
void clo_printUsage(clo_optionList_t *list)
Definition: clo.c:1988
void init_options(clo_optionList_t *list, const char *softwareVersion)
Definition: DDOptions.cpp:535
int process()
Definition: RsViirs.cpp:127
string source_files_
Definition: RsViirs.h:106
int main(int argc, char *argv[])
Definition: resam_viirs.cpp:32
string get_source()
Definition: DDOptions.cpp:462