[GRASS-stats] Raster maps from GRASS to R and back to GRASS?
Nikos Alexandris
nikos.alexandris at felis.uni-freiburg.de
Wed Apr 22 03:40:19 EDT 2009
Nikos:
> >> But why is "NODATA=" set to 999? It's a bug, right?
> > Hmmm... one last thing: I see that it works properly only if some
> > out-of-range value is assigned to "NODATA=" (e.g. NODATA=-9999), right?
> > Setting NODATA=NULL is nonsense I guess.
Roger:
> No, not nonsense. It is a default like any other. Working out what is in
> range is not easy - it is based on r.info -r, but has to take edge cases
> into account. The current "buglet" - the bug is the user not specifying
> NODATA manually -
:D
> was that in using parseGRASS in very recent releases,
> one further layer of string to numeric conversion was needed to avoid the
> value being set to 999 when the min and max values from r.info -r were not
> "seen" as numeric.
> There have been several similar 999 problems before, all can be avoided by
> setting the NODATA= argument manually. For these bands, setting it
> negative will always be OK, and setting manually also saves time, because
> the heuristic doesn't have to be used. In general, NODATA= will simply
> handle the NULL values correctly - the problem with any non-null value
> given is that it may actually occur in the data in the current region.
> Check out the CVS source from sourceforge - project r-spatial, module
> spgrass6, it will work with your data.
Thanks for your efforts Roger. I think I have to postpone for now
trying-out the latest source code (or maybe I'll try it out tonight).
I would like to note that I skimmed several times through "Applied
Spatial Data Analysis with R" [1] but I did not find any concrete
comment about the "NODATA=" option. Maybe I wasn't careful enough...
Kindest regards, Nikos
---
[1] Applied Spatial Data Analysis with R, Series: Use R
Bivand, Roger S., Pebesma, Edzer J., Gómez-Rubio, Virgilio
2008, XIV, 378 p., Softcover
ISBN: 978-0-387-78170-9
More information about the grass-stats
mailing list