Re: [R-sig-Geo] deleting grid points outside boundary

2009-05-25 Thread Edzer Pebesma
Raphael, you could read your shapefile with readOGR in package rgdal, then use function overlay to find the points in the polygon, along the lines of: # grd is your full, rectangular grid # polygon is the shapefile you read require(sp) fullgrid(grd) = FALSE sel = !is.na(overlay(grd, polygon)) grd

[R-sig-Geo] deleting grid points outside boundary

2009-05-25 Thread Viscarra Rossel, Raphael (CLW, Black Mountain)
Hello, I have been using gstat to krige maps over my study area. The area is irregularly shaped and has quite a complex boundary. I have made a regular (square) grid that covers my study area and made my estimates on this grid. Now that I have my maps, I would like to 'mask out' or delete the