Dear All, I have a raster map of the class 'SpatialPointsDataFrame' and coordinates of the class 'SpatialPoints'. I would like to retrieve the values that are contained in the raster map at the specific locations given by the coordinates. Can anyone help me out? Kind regards, Katrin Fleischer
I'm not that familiar with this type of data. I just had a similar issue, but had a GIS person do it in Arc view. But maybe try some of the following functions? Match %in% Plus I'll forward U the replies I got to my post Good luck :-) -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of kfleis at falw.vu.nl Sent: Tuesday, 20 July 2010 9:42 PM To: r-help at r-project.org Subject: [R] data from SpatialGridDataFrame Dear All, I have a raster map of the class 'SpatialPointsDataFrame' and coordinates of the class 'SpatialPoints'. I would like to retrieve the values that are contained in the raster map at the specific locations given by the coordinates. Can anyone help me out? Kind regards, Katrin Fleischer ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
see ?sp::overlay and section 5.2 of Applied Spatial Data Analysis with R I see there is now also raster::overlay, but I can't claim experience with that funciton (however my impression is that the raster package is a powerful tool for working with potentially very large rasters in R). hth, Kingsford On Tue, Jul 20, 2010 at 6:12 AM, <kfleis at falw.vu.nl> wrote:> Dear All, > > I have a raster map of the class 'SpatialPointsDataFrame' and coordinates > of the class 'SpatialPoints'. I would like to retrieve the values that are > contained in the raster map at the specific locations given by the > coordinates. > > Can anyone help me out? > > Kind regards, > Katrin Fleischer > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >