[GRASS-stats] Raster maps from GRASS to R and back to GRASS?
Roger Bivand
Roger.Bivand at nhh.no
Wed Apr 22 03:00:21 EDT 2009
On Wed, 22 Apr 2009, Nikos Alexandris wrote:
>
> Roger:
>> I've committed a fix to sourceforge CVS, but setting
>>> NODATA= manually is generally a good idea.
>
>
> 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.
>
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 - 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.
Roger
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the grass-stats
mailing list