[GRASS-dev] [GRASS GIS] #2098: i.vi gari wrong formula?

#2098: i.vi gari wrong formula?
-----------------------+----------------------------------------------------
Reporter: kristinah | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Default | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: All |
-----------------------+----------------------------------------------------
The formula for GARI in the manual
(http://grass.osgeo.org/grass70/manuals/i.vi.html) seems to be wrong. As
it is now, the result would always be 1.

It is
"
GARI = ( nirchan - (greenchan-(bluechan - redchan))) /
( nirchan- (greenchan-(bluechan - redchan)))
"

It should be (e.g. according to
http://www.indexdatabase.de/db/i-single.php?id=363)
"
GARI = ( nirchan - (greenchan-(bluechan - redchan))) /
( nirchan- (greenchan+(bluechan - redchan)))
"

As the formula in the manual seems to be taken from code, the code might
be wrong as well. I did not test the function, only read the manual
online.

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

From the code:

result = (nirchan - (greenchan - (bluechan - redchan)))/(nirchan - (greenchan - (bluechan + redchan)));

···

On 10 October 2013 00:07, GRASS GIS <trac@osgeo.org> wrote:

#2098: i.vi gari wrong formula?
-----------------------±---------------------------------------------------
Reporter: kristinah | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Default | Version: unspecified
Keywords: | Platform: Unspecified
Cpu: All |
-----------------------±---------------------------------------------------
The formula for GARI in the manual
(http://grass.osgeo.org/grass70/manuals/i.vi.html) seems to be wrong. As
it is now, the result would always be 1.

It is
"
GARI = ( nirchan - (greenchan-(bluechan - redchan))) /
( nirchan- (greenchan-(bluechan - redchan)))
"

It should be (e.g. according to
http://www.indexdatabase.de/db/i-single.php?id=363)
"
GARI = ( nirchan - (greenchan-(bluechan - redchan))) /
( nirchan- (greenchan+(bluechan - redchan)))
"

As the formula in the manual seems to be taken from code, the code might
be wrong as well. I did not test the function, only read the manual
online.


Ticket URL: <https://trac.osgeo.org/grass/ticket/2098>
GRASS GIS <http://grass.osgeo.org>


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

#2098: i.vi gari wrong formula?
--------------------------+-------------------------------------------------
  Reporter: kristinah | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.4
Component: Default | Version: unspecified
Resolution: fixed | Keywords:
  Platform: Unspecified | Cpu: All
--------------------------+-------------------------------------------------
Changes (by ychemin):

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

Comment:

Changed the formula according to the indexdatabase website

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

#2098: i.vi gari wrong formula?
--------------------------+-------------------------------------------------
  Reporter: kristinah | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Imagery | Version: svn-trunk
Resolution: fixed | Keywords: i.vi
  Platform: Unspecified | Cpu: All
--------------------------+-------------------------------------------------
Changes (by neteler):

  * keywords: => i.vi
  * version: unspecified => svn-trunk
  * component: Default => Imagery
  * milestone: 6.4.4 => 7.0.0

Comment:

For the record: r57967 and r57968

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

#2098: i.vi gari wrong formula?
--------------------------+-------------------------------------------------
  Reporter: kristinah | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.0.0
Component: Imagery | Version: svn-trunk
Resolution: | Keywords: i.vi
  Platform: Unspecified | Cpu: All
--------------------------+-------------------------------------------------
Changes (by kristinah):

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

Comment:

Actually, the formula I provided was also wrong. The correct formula has
the "+" in a different position

GARI = ( nirchan - (greenchan- (bluechan - redchan))) /
( nirchan + (greenchan - (bluechan - redchan)))

This was taken from the article where the formula was actually defined:
Gitelson, Anatoly A.; Kaufman, Yoram J.; Merzlyak, Mark N. (1996)
Use of a green channel in remote sensing of global vegetation from EOS-
MODIS
Remote Sensing of Environment 58 (3), 289-298.
DOI: 10.1016/s0034-4257(96)00072-7

When reading the explanation about the meaning of the index in this
article, it became clear to me, that "indexdatabase.de" must be wrong.

Sorry for pointing you in the wrong direction first!

Replying to [ticket:2098 kristinah]:
> The formula for GARI in the manual
(http://grass.osgeo.org/grass70/manuals/i.vi.html) seems to be wrong. As
it is now, the result would always be 1.
>
> It is
> "
> GARI = ( nirchan - (greenchan-(bluechan - redchan))) /
> ( nirchan- (greenchan-(bluechan - redchan)))
> "
>
> It should be (e.g. according to
http://www.indexdatabase.de/db/i-single.php?id=363)
> "
> GARI = ( nirchan - (greenchan-(bluechan - redchan))) /
> ( nirchan- (greenchan+(bluechan - redchan)))
> "
>
> As the formula in the manual seems to be taken from code, the code might
be wrong as well. I did not test the function, only read the manual
online.

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

#2098: i.vi gari wrong formula?
--------------------------+-------------------------------------------------
  Reporter: kristinah | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Imagery | Version: svn-trunk
Resolution: fixed | Keywords: i.vi
  Platform: Unspecified | Cpu: All
--------------------------+-------------------------------------------------
Changes (by lucadelu):

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

Comment:

Replying to [comment:3 kristinah]:
> Actually, the formula I provided was also wrong. The correct formula has
the "+" in a different position
>
> GARI = ( nirchan - (greenchan- (bluechan - redchan))) /
> ( nirchan + (greenchan - (bluechan - redchan)))
>
> This was taken from the article where the formula was actually defined:
> Gitelson, Anatoly A.; Kaufman, Yoram J.; Merzlyak, Mark N. (1996)
> Use of a green channel in remote sensing of global vegetation from EOS-
MODIS
> Remote Sensing of Environment 58 (3), 289-298.
> DOI: 10.1016/s0034-4257(96)00072-7
>
> When reading the explanation about the meaning of the index in this
article, it became clear to me, that "indexdatabase.de" must be wrong.
>
> Sorry for pointing you in the wrong direction first!
>

I update GARI formula in i.vi and related documentation in r58389
I close the ticket, please reopen if needed

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