Skip to content

Commit

Permalink
i.vi: red band not required and GUI section modified (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yann Chemin authored and neteler committed Nov 6, 2019
1 parent 63d0825 commit c6aa071
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions imagery/i.vi/main.c
Expand Up @@ -98,12 +98,6 @@ int main(int argc, char *argv[])
"and some indices require additional bands.");

/* Define the different options */
opt.red = G_define_standard_option(G_OPT_R_INPUT);
opt.red->key = "red";
opt.red->label =
_("Name of input red channel surface reflectance map");
opt.red->description = _("Range: [0.0;1.0]");

opt.output = G_define_standard_option(G_OPT_R_OUTPUT);

opt.viname = G_define_option();
Expand Down Expand Up @@ -137,29 +131,37 @@ int main(int argc, char *argv[])
opt.viname->answer = "ndvi";
opt.viname->key_desc = _("type");

opt.red = G_define_standard_option(G_OPT_R_INPUT);
opt.red->key = "red";
opt.red->required = NO;
opt.red->label =
_("Name of input red channel surface reflectance map");
opt.red->description = _("Range: [0.0;1.0]");
opt.red->guisection = _("Inputs");

opt.nir = G_define_standard_option(G_OPT_R_INPUT);
opt.nir->key = "nir";
opt.nir->required = NO;
opt.nir->label =
_("Name of input nir channel surface reflectance map");
opt.nir->description = _("Range: [0.0;1.0]");
opt.nir->guisection = _("Optional inputs");
opt.nir->guisection = _("Inputs");

opt.green = G_define_standard_option(G_OPT_R_INPUT);
opt.green->key = "green";
opt.green->required = NO;
opt.green->label =
_("Name of input green channel surface reflectance map");
opt.green->description = _("Range: [0.0;1.0]");
opt.green->guisection = _("Optional inputs");
opt.green->guisection = _("Inputs");

opt.blue = G_define_standard_option(G_OPT_R_INPUT);
opt.blue->key = "blue";
opt.blue->required = NO;
opt.blue->label =
_("Name of input blue channel surface reflectance map");
opt.blue->description = _("Range: [0.0;1.0]");
opt.blue->guisection = _("Optional inputs");
opt.blue->guisection = _("Inputs");

/* TODO: the naming is suboptimal as specific to Landsat-7 */
opt.chan5 = G_define_standard_option(G_OPT_R_INPUT);
Expand All @@ -168,7 +170,7 @@ int main(int argc, char *argv[])
opt.chan5->label =
_("Name of input 5th channel surface reflectance map");
opt.chan5->description = _("Range: [0.0;1.0]");
opt.chan5->guisection = _("Optional inputs");
opt.chan5->guisection = _("Inputs");

/* TODO: the naming is suboptimal as specific to Landsat-7 */
opt.chan7 = G_define_standard_option(G_OPT_R_INPUT);
Expand All @@ -177,7 +179,7 @@ int main(int argc, char *argv[])
opt.chan7->label =
_("Name of input 7th channel surface reflectance map");
opt.chan7->description = _("Range: [0.0;1.0]");
opt.chan7->guisection = _("Optional inputs");
opt.chan7->guisection = _("Inputs");

opt.sl_slope = G_define_option();
opt.sl_slope->key = "soil_line_slope";
Expand Down

0 comments on commit c6aa071

Please sign in to comment.