[GRASS5] r.mapcalc and float()
Markus Neteler
neteler at itc.it
Sun May 2 16:19:41 EDT 2004
Hi,
while calculating the NDVI I found following r.mapcalc
behaviour:
r.mapcalc "ndvi=float((lsat.4 - lsat.3)/(lsat.4+lsat.3))"
r.info -r ndvi
min=0.000000
max=0.000000
-> not desired
r.mapcalc "ndvi=float(1.0* (lsat.4 - lsat.3)/(lsat.4+lsat.3))"
r.info -r ndvi
min=-0.473684
max=0.672727
-> looks fine, but multiplication with 1. required
Is there a chance to change r.mapcalc to produce float
when using float()?
Thanks
Markus
More information about the grass-dev
mailing list