Skip to content

extract values to points

3 messages · Paul Hiemstra, Robert J. Hijmans, Frauke Barthold

#
Hi,

Funny to see how you can do things in multiple ways in R :). To add to 
the possibilities, you could probably also get this functionality using 
R and Grass.

I would personally recommend to use overlay() as you don't have to 
install anything apart from the sp package, unlike using rsaga and SAGA. 
Especially if the only thing you want is to do an overlay. When there 
was other SAGA specific functionality you needed, SAGA would be a good 
option. In addition to not having to install a lot of software, 
overlay() has been used extensively, this in contrast to the raster 
package which is still experimental. But this is strictly my personal 
opinion ofcourse :).

cheers,
Paul
Kamran Safi Radolfzell wrote:

  
    
#
Just for the record. this is how I would do this with the raster
package (Kamran's example should work, but seems a bit unnecessarily
complex; just what we are trying to avoid with that package :):

install.packages("raster", repos="http://R-Forge.R-project.org")
library(raster)

xy <- your matrix
raster <- rasterFromFile("C:/yourfile")
v <- xyValues(raster, xy)

xyv <- cbind(xy, v)

Robert
On Tue, Mar 10, 2009 at 7:50 PM, Paul Hiemstra <p.hiemstra at geo.uu.nl> wrote:
1 day later