A function to compute which cells are touching an owin or spatial polygons object
touchingowin(x, y, w)
grid centroids in x-direction note this will be expanded into a GRID of (x,y) values in the function
grid centroids in y-direction note this will be expanded into a GRID of (x,y) values in the function
an owin or SpatialPolygons object
vector of TRUE or FALSE according to whether the cell