Agus, > Is there a way > of assigning the tif file to an R raster object and then just use > reclass() and R would > read the file by pieces as needed? That's what I would like to...
That is exactly what is intended with reclass(). Something like this : r <- raster('mytiffile.tif') m <- matrix(0,1000,1, 1000, Inf, NA, ncol=2) rc <- reclass(r, m, ...) Robert On Tue, May 19, 2009 at 1:36 AM, Agustin Lobo <alobolis...@gmail.com> wrote: > I have to reclassify a large (> 8000x8000 pixels) geotif raster. I normally > would do it through grass (or saga) but would like to try the raster > package in R. > The problem is that I'm a bit confused on how to do it. My understanding > of the package > is that it provides a way to operate in the rasters by pieces, not having > to read the whole thing into memory. I've seen there's a function reclass() > but how do I actually read the raster? If I use readAll() this is going > to be as > using readGDAL() directly, so this is not the way. Do I have to use > a for() of readRows(), then reclass()? This seems a bit low-level. Is > there a way > of assigning the tif file to an R raster object and then just use > reclass() and R would > read the file by pieces as needed? That's what I would like to... > > Agus > > > > _______________________________________________ > R-sig-Geo mailing list > R-sig-Geo@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-geo > > _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo