[GRASS-dev] [GRASS GIS] #3932: i.vi: NDWI unnecessarily requires red band

#3932: i.vi: NDWI unnecessarily requires red band
---------------------+---------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.8.1
Component: Imagery | Version: git-releasebranch78
Keywords: i.vi | CPU: All
Platform: All |
---------------------+---------------------------------
i.vi requires a red band in any case, even if e.g. NDWI does not need one.
So, in order to make the module run, a map has to be given also for the
red band. That seems like unexpected behavior to me.
Maybe better to leave all input bands optional and add a check for the
requested VI if required bands are provided...

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3932&gt;
GRASS GIS <https://grass.osgeo.org>

https://github.com/OSGeo/grass/pull/178/commits

···

Dr. Yann Chemin
+33 7 83 85 5234
JRC, Ispra, IT

#3932: i.vi: NDWI unnecessarily requires red band
----------------------+---------------------------------
  Reporter: sbl | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.1
Component: Imagery | Version: git-releasebranch78
Resolution: | Keywords: i.vi
       CPU: All | Platform: All
----------------------+---------------------------------

Comment (by neteler):

Addressed in https://github.com/OSGeo/grass/pull/179

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3932#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3932: i.vi: NDWI unnecessarily requires red band
----------------------+---------------------------------
  Reporter: sbl | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.1
Component: Imagery | Version: git-releasebranch78
Resolution: | Keywords: i.vi
       CPU: All | Platform: All
----------------------+---------------------------------

Comment (by neteler):

Related: also the i.wi addon should be likewise updated:

https://github.com/OSGeo/grass-
addons/blob/master/grass7/imagery/i.wi/main.c

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3932#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3932: i.vi: NDWI unnecessarily requires red band
----------------------+---------------------------------
  Reporter: sbl | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.8.1
Component: Imagery | Version: git-releasebranch78
Resolution: fixed | Keywords: i.vi
       CPU: All | Platform: All
----------------------+---------------------------------
Changes (by neteler):

* status: new => closed
* resolution: => fixed

Comment:

Fixed in

- master:
https://github.com/OSGeo/grass/commit/c6aa071a25af372bae76915ade947494e8986d53
- relbranch78:
https://github.com/OSGeo/grass/commit/1905421fe757dfc1121b6ec7bffebfa0f0cbfd99

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3932#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3932: i.vi: NDWI unnecessarily requires red band
----------------------+---------------------------------
  Reporter: sbl | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.8.1
Component: Imagery | Version: git-releasebranch78
Resolution: fixed | Keywords: i.vi
       CPU: All | Platform: All
----------------------+---------------------------------

Comment (by sbl):

Personally, I would say, ideally, i.vi and i.wi would be merged into one
module e.g. i.spectral.index, where computation of all sorts of spectral
indices is collected...

That would be most convenient for users and it would reduce maintenance
burden (though the modules would have to be merged first of course). Worth
a new ticket?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3932#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>