[GRASS-SVN] r66631 - grass/trunk/imagery/i.modis.qc
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Oct 28 01:47:11 PDT 2015
Author: ychemin
Date: 2015-10-28 01:47:11 -0700 (Wed, 28 Oct 2015)
New Revision: 66631
Modified:
grass/trunk/imagery/i.modis.qc/main.c
Log:
Bug fix to constrain band number check only to 09 and 43 products
Modified: grass/trunk/imagery/i.modis.qc/main.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/main.c 2015-10-28 08:42:39 UTC (rev 66630)
+++ grass/trunk/imagery/i.modis.qc/main.c 2015-10-28 08:47:11 UTC (rev 66631)
@@ -339,7 +339,12 @@
G_fatal_error(_("This bit flag is only available for MOD09Q1 @ 250m products"));
if (!strcmp(qcflag, "data_quality")) {
- if (bandno < 1 || bandno > 7)
+ if ((bandno < 1 || bandno > 7)
+ && (!(strcmp(product, "mod09Q1"))
+ || !(strcmp(product, "mod09A1"))
+ || !(strcmp(product, "mod09CMG"))
+ || !(strcmp(product, "myd09CMG"))
+ || !(strcmp(product, "mcd43B2q"))))
G_fatal_error(_("Band number out of allowed range [1-7]"));
if (!strcmp(product, "mod09Q1") && bandno > 2)
G_fatal_error(_("mod09Q1 product only has 2 bands"));
More information about the grass-commit
mailing list