[GRASS-user] EVI algorithm

Hi,

I am trying to implement the EVI algorithm, using r.mapcalc. But I do not know how to deal with the result, because its values exceeds the [-1, 1] interval. Do you know if there is the need to bring all the values within this interval (meaning that values < -1 will be equaled to -1, and values > 1 will be assigned to 1)?
Or maybe you could guide me to another approach for the EVI algorithm.

Thanks,
Danut

On Wed, Jul 4, 2012 at 8:26 AM, Danut Mihon <danut_mihon@yahoo.com> wrote:

Hi,

I am trying to implement the EVI algorithm, using r.mapcalc. But I do not
know how to deal with the result, because its values exceeds the [-1, 1]
interval. Do you know if there is the need to bring all the values within
this interval (meaning that values < -1 will be equaled to -1, and values >
1 will be assigned to 1)?
Or maybe you could guide me to another approach for the EVI algorithm.

Danut,

please post your formula (r.mapcalc string) - perhaps we can spot the problem.

Markus

On Wed, Jul 4, 2012 at 10:34 AM, Danut Mihon <danut_mihon@yahoo.com> wrote:

Here is the code:

r.in.gdal input=band1 output=in1 location=intermediary
g.gisenv set=LOCATION_NAME=intermediary
r.in.gdal input=band3 output=in2
r.in.gdal input=band4 output=in3
r.mapcalc aux="(2.5*(image2-image1)/(image2+ 6.0 *image1-7.5 *image0+1.0))"
r.colors map=output rules=evi
r.out.tiff input=output output=out1.tif
r.out.gdal input=output output=out1.tif

OK, looks right to me comparing with the link below.
But...

On Thu, Jul 5, 2012 at 9:13 AM, Danut Mihon <danut_mihon@yahoo.com> wrote:

the EVI formula is on this page
(http://en.wikipedia.org/wiki/Enhanced_vegetation_index).

What is the range of the input images? MODIS data are usually
scaled. Did you rescale outside of GRASS beforehand?

Markus

(please do "reply-all")

On Fri, Jul 13, 2012 at 10:09 AM, Danut Mihon <danut_mihon@yahoo.com> wrote:

Hi,

I am not aware of scaling the images before importing them into GRASS. The
range for all three inputs in [0, 255].

Where do the maps come from?

The EVI result is between [-1, 1],
but here comes the strange part:
- the areas with rich vegetation have values close to -1
- the urban areas correspond to higher values (e.g. 0.2)

In fact, unusual and like "reverted".

It should be the other way around. One solution is to multiply all values
with -1, but I do not think that this is a general solution. Maybe you have
some better ideas to guide to.

It does not make much sense because NDVI/EVI do not need any reverting.

Maybe these seem "silly" questions to you, be I am a novice in GRASS.

Not silly at all. I suspect an input data problem but would need to see
one of these input maps (I worked successfully with MODIS EVI in GRASS).

Markus