[GRASS-user] log(0)-error in r.mapcalculator
Patrick S.
patrick_GIS at gmx.ch
Thu Nov 8 01:50:49 PST 2012
Dear List,
I keep getting a log(0) error in r.mapcalculator, even if I enlarge the
data. This seems to be a bug as I controlled the same data with R and
get (non-infinity) values. Does r.mapcalculator eventually truncate the
results of formulas to some integer values?
logit-expression: log(((A/100)/(1-(A/100)))
To avoid error of log(0) I enlarged the data by 0.00001, 1 and 5 but
keep getting the error.
I run it out of R with:
param<-list(amap="r_slope_perc",
formula="log(((A+0.00001)/100)/(1-(A/100))) ",
outfile="r_slope_perc_logit")
execGRASS("r.mapcalculator", parameters=param, flags=c("overwrite"))
(r.mapcalculator amap="r_slope_perc",
formula="log(((A+0.00001)/100)/(1-(A/100)))"
outfile="r_slope_perc_logit" --overwrite)
Any ideas why this happens?
Patrick
More information about the grass-user
mailing list