Go to the documentation of this file.
11 #define PROG_NAME "get_product_info"
19 if (strcmp(productInfo->paramDesignator,
"none") == 0) {
20 printf(
"%s%s\n", productInfo->prefix, productInfo->suffix);
22 printf(
"%snnn%s\n", productInfo->prefix, productInfo->suffix);
39 if (numWavelengths == -1) {
40 printf(
"-E- Could not lookup sensor %d wavelengths\n",
sensor);
48 if (strcmp(productInfo->paramDesignator,
"none") == 0) {
49 printf(
"%s%s\n", productInfo->prefix, productInfo->suffix);
50 }
else if (strcmp(productInfo->paramDesignator,
"wave") == 0) {
52 for (
i = 0;
i < numWavelengths;
i++) {
53 if((iwave[
i] > productInfo->paramWaveMin) && (iwave[
i] < productInfo->paramWaveMax)) {
54 printf(
"%s%d%s\n", productInfo->prefix, iwave[
i], productInfo->suffix);
58 printf(
"%snnn%s\n", productInfo->prefix, productInfo->suffix);
66 if (strcmp(productInfo->paramDesignator,
"none") == 0) {
67 printf(
"%s%s,", productInfo->prefix, productInfo->suffix);
69 printf(
"%snnn%s,", productInfo->prefix, productInfo->suffix);
72 printf(
"%s,", productInfo->paramDesignator);
73 printf(
"%d,", productInfo->paramWaveMin);
74 printf(
"%d,", productInfo->paramWaveMax);
76 printf(
"%s,", productInfo->dataType);
77 printf(
"%g,", productInfo->scaleFactor);
78 printf(
"%g,", productInfo->addOffset);
79 printf(
"%g,", productInfo->fillValue);
80 printf(
"%g,", productInfo->validMin);
81 printf(
"%g,", productInfo->validMax);
83 printf(
"%s,", productInfo->displayScale);
84 printf(
"%g,", productInfo->displayMin);
85 printf(
"%g,", productInfo->displayMax);
87 printf(
"\"%s\",", productInfo->units);
88 printf(
"%s,", productInfo->standardName);
89 printf(
"%s,", productInfo->palette);
90 printf(
"%s,", productInfo->category);
91 printf(
"\"%s\",", productInfo->reference);
92 printf(
"\"%s\",", productInfo->description);
93 printf(
"\"%s\",", productInfo->comment);
103 printf(
"paramDesignator,");
104 printf(
"paramWaveMin,");
105 printf(
"paramWaveMax,");
108 printf(
"scaleFactor,");
109 printf(
"addOffset,");
110 printf(
"fillValue,");
114 printf(
"displayScale,");
115 printf(
"displayMin,");
116 printf(
"displayMax,");
119 printf(
"standardName,");
122 printf(
"reference,");
123 printf(
"description,");
135 int main(
int argc,
char *argv[]) {
141 strcpy(helpStr,
"Program to list products or detailed information about a single product\n");
142 strcat(helpStr,
"Usage: ");
144 strcat(helpStr,
" [option=val] <productName>\nOptions:");
156 if (numPositionOptions > 1) {
157 printf(
"-E- Too many parameters on the command line\n");
176 if (sensorId == -1) {
177 printf(
"-E- Could not find sensor \"%s\"\n", sensorName);
196 if (numPositionOptions == 0) {
197 printf(
"-E- A product name needs to be given on the command line\n");
205 printf(
"sensorName=%s\n", sensorName);
210 printf(
"-E- Product \"%s\" is not a valid product\n", productName);
clo_option_t * clo_addOption(clo_optionList_t *list, const char *key, enum clo_dataType_t dataType, const char *defaultVal, const char *desc)
void freeProductInfo(productInfo_t *info)
char * clo_getString(clo_optionList_t *list, const char *key)
void clo_readArgs(clo_optionList_t *list, int argc, char *argv[])
list(APPEND LIBS ${PGSTK_LIBRARIES}) add_executable(atteph_info_modis atteph_info_modis.c) target_link_libraries(atteph_info_modis $
void getFirstProductInfo(productInfo_t *info)
void clo_setEnablePositionOptions(int val)
void printProductInfo(const char *productFullName, const productInfo_t *info)
int sensorName2SensorId(const char *name)
void clo_setVersion2(const char *programName, const char *versionStr)
clo_optionList_t * clo_createList()
void clo_setHelpStr(const char *str)
productInfo_t * allocateProductInfo()
char * clo_getPositionString(clo_optionList_t *list, int pos)
void clo_printUsage(clo_optionList_t *list)
void printProductCSV(productInfo_t *productInfo)
int main(int argc, char *argv[])
int findProductInfo(const char *productName, int sensorId, productInfo_t *info)
const char * sensorId2SensorName(int sensorId)
void clo_setEnableParOption(int val)
int clo_getPositionNumOptions(clo_optionList_t *list)
int32_t rdsensorinfo(int32_t, int32_t, const char *, void **)
int clo_getBool(clo_optionList_t *list, const char *key)
void printProductListSensor(int sensor)
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")
int getNextProductInfo(productInfo_t *info)
void printProductListCSV()