[GRASS-stats] Raster maps from GRASS to R and back to GRASS?

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Tue Apr 21 18:58:23 EDT 2009


Thank you very much for your time Roger :-)

Nikos:
> >  I can't "solve" the random-NULL production of writeRAST6. I tried
> > again with only 3 bands which are identical with respect to their
> > extent/resolution/etc.


Roger:
> The NAs you show in the fake2 image are in band 7 (b7) and propagate 
> correctly, b7 shown after import to R;

Right: _after_ import to R. They are just _999_ values prior importing
in R.


> They are getting there because the NODATA= argument is not given, and is 
> being set to 999. I've committed a fix to sourceforge CVS, but setting 
> NODATA= manually is generally a good idea.

But why is "NODATA=" set to 999? It's a bug, right?

# reading the help page of readRAST6()
?readRAST6

---%<---
NODATA: by default NULL, in which case it is set to one less than
          'floor()'of the data values, otherwise an integer NODATA
          value (required to be integer by GRASS r.out.bin)
---%<---


Kindest regards, Nikos
---
> > References
> > [1] grass location containint three MODIS surface reflectance bands:
> > https://git.berlios.de/cgi-bin/gitweb.cgi?p=gregis;a=blob_plain;f=peloponnesos/modis_peloponnese_postfire07.zip;hb=peloponnese

> > [2] http://imageshack.gr/view.php?file=owj2xu833u6678c3zvch.png
> > [3] http://imageshack.gr/view.php?file=n65vfvoo07t3njywfjjo.png
> > [4] http://imageshack.gr/view.php?file=sb9l315wazoeue0rgrj9.png



More information about the grass-stats mailing list