[GRASS-dev] Re: question about i.vi

Michael Barton michael.barton at asu.edu
Wed Oct 12 13:16:14 EDT 2011


I think I know the answer to this. If so, it's a bug.

i.vi operating on CELL maps produces integer output. Since most of these calculations produce results between 0 and 1, the result truncates to 0. Vegetation indices should be float, but input imagery maps are usually CELL. So this typically produces maps with all 0 values. i.vi should convert to float (the equivalent of multiplying by 1.0 in r.mapcalc).

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity 
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 	480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax:          480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu



On Oct 12, 2011, at 9:56 AM, Michael Barton wrote:

> I just tried out the new i.vi in GRASS 7 and it doesn't seem to do anything.
> 
> I've tested it with the landsat images in the NC07 demo data set. I set the region to match the landsat images and ran:
> 
> i.vi --overwrite viname=NDVI red=lsat7_2000_30 at landsat nir=lsat7_2000_40 at landsat green=lsat7_2000_20 at landsat blue=lsat7_2000_10 at landsat chan5=lsat7_2000_50 at landsat chan7=lsat7_2000_70 at landsat output=GEMI_lsat7_2000
> 
> I get a map with all 0's
> 
> I got the same result with the GEMI and NDVI routines. Am I doing something wrong or is this a bug.
> 
> Michael
> ____________________
> C. Michael Barton
> Director, Center for Social Dynamics & Complexity 
> Professor of Anthropology, School of Human Evolution & Social Change
> Arizona State University
> 
> voice: 	480-965-6262 (SHESC), 480-727-9746 (CSDC)
> fax:          480-965-7671 (SHESC),  480-727-0709 (CSDC)
> www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20111012/2495fa21/attachment-0001.html


More information about the grass-dev mailing list