Re: [R-sig-Geo] Spatial join of a point and polygon shapefile

2007-11-02 Thread Johan Van de Wauw
This is what I usually do: (points is a dataframe with x and y columns) library("sp") coordinates(points)=~x+y polygon<-readShapePoly("shapefile.shp") a<-overlay(points,polygon) # a will contain the id's of the polygons per point # . to get the attributes for every point I use: polygon[a,[EMAIL PR

Re: [R-sig-Geo] Spatial join of a point and polygon shapefile

2007-11-02 Thread Roger Bivand
On Fri, 2 Nov 2007, Honey Giroday wrote: > > Hi everyone > I am a new useR running R on a Windows platform with Emacs. I have been > searching package manuals and email archives trying to solve this > problem but have been unable to find a solution. Your help with this is > appreciated. > >

[R-sig-Geo] Spatial join of a point and polygon shapefile

2007-11-02 Thread Honey Giroday
Hi everyone I am a new useR running R on a Windows platform with Emacs. I have been searching package manuals and email archives trying to solve this problem but have been unable to find a solution. Your help with this is appreciated. I have generated random points within a polygon shapefile