Dear list, I have a SpatialGridDataFrame, whose SRS is EPSG:32632: "+init=epsg:32632 +proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs +towgs84=0,0,0"
I am willing to overlay these grid values over point locations defined in a SpatialPixelsDataFrame with a different SRS using the overlay method (overlaying grids over points in the same SRS gave me no problem until now). Now instead I need to transform the point locations to EPSG:32632 and then overlay: > my.ov <- overlay(my.grid, spTransform(mySpatialPixels, > CRS=CRS(proj4string(my.grid)))) [looking at methods?sp::overlay, transforming the grid to the points SRS would coerce the grid itself into points, and then the overlay method would not be useful anymore] But then the output "my.ov" is filled with NAs only. I checked the bbox of the overlay inputs, and they overlap: > bbox(my.grid) min max coords.x1 513000 911000 coords.x2 4844000 5002000 > bbox(mySpatialPixels) min max x 499880.9 822436.4 y 4816908.3 5045694.8 Any hint is appreciated. Thank you guys. /Piero http://r-sig-geo.2731867.n2.nabble.com/file/n6265018/overlay.png -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/sp-overlay-problem-tp6265018p6265018.html Sent from the R-sig-geo mailing list archive at Nabble.com. _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo