Hi Alex, Did you try the commands 'spsample' in R ?
For creating the grid form the shapefile, you can try something like: yourgrid <- spsample(yourshafilename.shp, type="regular", cellsize=yourcellsize, offset = c(0.5, 0.5)) I hope this helps. Kinds, Mauricio -- Linux user #454569 -- Ubuntu user #17469 2009/9/5 alexandre villers <[email protected]>: > Good evening, > > I'm a beginner with GRASS. In order to analyse a dataset on the spatial > distribution of a bird's species, I wanted to create many spatial grids (with > increasing cell size, from 500 to 15000 meters)and then count birds in each > cell. > > I started with > v.in.ogr to import a countour shape file for my observation window > v.to.rast (countour)followed by r.mask to limit the work on that contour limit > finally, v.mkgrid to create the grid with the required spatial resolution. > > I'm looping this with R and also added 10 different origins (lower left > corner of grids) in order to average counts, specially for large grids. > > The next step is to overlay within R, using the sp packages, the layer of > points and the grid. The problem (which, by taking the time of reflexion, > would have been clear before running the script !) is that some grid cells > are cut many times by the countour vector, leading to unique cells having > many different IDs (which I didn't want). > > So can I overlay that contour vector on a grid while keeping the cells > (intact) intersected by the countour limit (instead of clipping them) ? > > Hope I was clear enough... > > Best regards > > Alex > Alexandre Villers > PhD. Student > Team Biodiversity > CEBC CNRS > 79360 Beauvoir sur Niort > > > __________ Information from ESET Mail Security, version of virus signature > database 4398 (20090905) __________ > > The message was checked by ESET Mail Security. > http://www.eset.com > > > _______________________________________________ > grass-stats mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/grass-stats > _______________________________________________ grass-stats mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-stats
