I need to do some raster algebra on some large rasters. right now they are ascii files. I'm a complete R novice. Can anyone point me towards a good source for figuring out how to get my data into R and how to do very simple raster manipulations? no advice is too simple for this guy. appreciate any help that is out there Jason Robinson
raster algebra in R
7 messages · Jason Robinson, stephen sefick, milton ruser +1 more
Have a look at the spatial task view. I use GRASS GIS for raster processing, and maybe this would be helpful-http://grass.osgeo.org/. hth, Stephen Sefick
On Fri, Jul 31, 2009 at 1:21 PM, Jason Robinson<litobrancha at yahoo.com> wrote:
I need to do some raster algebra on some large rasters. ?right now they are ascii files. ?I'm a complete R novice. ?Can anyone point me towards a good source for figuring out how to get my data into R and how to do very simple raster manipulations? ?no advice is too simple for this guy. ?appreciate any help that is out there Jason Robinson
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Stephen Sefick Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090731/b01c2813/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090731/e2360eb7/attachment.pl>
You can try the raster package, available from R-forge:
install.packages("raster", repos="http://R-Forge.R-project.org")
It has very simple raster algebra
r1 <- raster('myfile1.asc')
r2 <- raster('myfile2.asc')
r3 <- r1 + sqrt(r2) + 1
etc.
Robert
On Fri, Jul 31, 2009 at 11:21 AM, Jason Robinson<litobrancha at yahoo.com> wrote:
I need to do some raster algebra on some large rasters. ?right now they are ascii files. ?I'm a complete R novice. ?Can anyone point me towards a good source for figuring out how to get my data into R and how to do very simple raster manipulations? ?no advice is too simple for this guy. ?appreciate any help that is out there Jason Robinson
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090731/20b57430/attachment.pl>
Here is a sample script where the results are saved to an ascii file.
r1 <- raster('myfile1.asc')
r2 <- raster('myfile2.asc')
r3 <- r1 + sqrt(r2) + 1
filename(r3) <- 'output.asc'
r3 <- writeRaster(r3, filetype='ascii')
On Fri, Jul 31, 2009 at 2:24 PM, milton ruser<milton.ruser at gmail.com> wrote:
Oops. Yes! Sorry, I forgot to mention this! Robert, cold you just write a example out output a .asc file? Just to keep this thread complete. bests milton On Fri, Jul 31, 2009 at 5:20 PM, Robert J. Hijmans <r.hijmans at gmail.com> wrote:
You can try the raster package, available from R-forge:
install.packages("raster", repos="http://R-Forge.R-project.org")
It has very simple raster algebra
r1 <- raster('myfile1.asc')
r2 <- raster('myfile2.asc')
r3 <- r1 + sqrt(r2) + 1
etc.
Robert
On Fri, Jul 31, 2009 at 11:21 AM, Jason Robinson<litobrancha at yahoo.com>
wrote:
I need to do some raster algebra on some large rasters. ?right now they are ascii files. ?I'm a complete R novice. ?Can anyone point me towards a good source for figuring out how to get my data into R and how to do very simple raster manipulations? ?no advice is too simple for this guy. ?appreciate any help that is out there Jason Robinson
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo