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

Viscarra Rossel, Raphael (CLW, Black Mountain) raphael.viscarra-rossel at csiro.au
Mon May 25 10:24:16 CEST 2009


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  
areas in my map that are outside my study area - i.e. where I don't  
have any data, where the interpolations don't make sense. Essentially,  
I want to end up only with the estimates over my study area.

As I said, the boundary of the study area is quite complex so the  
chull method will not work well. I have seen a few posts where this  
was suggested.

I have the xy coordinates for the boundary (and a shape file) for the   
study area. I am wondering whether I could overlay it over the grid  
with my estimates and then use it to remove the bits on the grid that  
I don't want and so end up with a map of only the estimates over my  
study area.

Could someone help with this please?

Cheers

R.



More information about the R-sig-Geo mailing list