[R-sig-Geo] comparing raster and vector data with Grass/R

Edzer J. Pebesma e.pebesma at geo.uu.nl
Wed Mar 7 22:33:28 CET 2007

Roger Bivand wrote:
> On Wed, 7 Mar 2007, Schmitt Thierry wrote:
>> I am struggling to overlay spatialLinesDataFrame and
>> SpatialGridDataFrame. The overlay method doesn't allow me to do so.
> There is no overlay method, you would need to write one, or interpolate 
> points along your lines and overlay the resulting point object on the 
> raster.

There is an spsample method for lines which returns points, on random or 
regular intervals. You could then overlay these points.

What exactly did you have in mind an overlay function for lines and 
grids would do? In "Geographic information analysis" David O'Sullivan 
and David Unwin suggest that any two types of spatial data can be 
overlaid, leaving finding of examples as an example to the reader. I'm 
still struggling with a few!

More information about the R-sig-Geo mailing list