[R-sig-Geo] Generate a vector of names of intersecting polgons

Steven Ranney steven.ranney at gmail.com
Tue Oct 28 01:43:52 CET 2014


All -

As a disclaimer, I admit that I am relatively new to spatial data
manipulation with R.  I am familiar with some of the more basic functions
and packages but need some guidance.

What I want to do:

I have two .shp files, shpA and shpB, both of which contain many polygons.
I would like to overlay shpA on shpB and get a vector of the polygon names
in shpB that intersect with polygons in shpA.  In a perfect world, I would
then be able to join the vector of names to each polygon in shpA as a new
attribute.

I tried using over() but over() didn't like the fact that both of my .shp
files were SpatialPolygonsDataFrames.

Is there a simple way to do this?  Can anyone offer some advice?

Thanks -

SR
Steven H. Ranney

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list