Add Points shp attributes to Polygon shp by Point location (as Spatial Join in ArcGIS

المشرف العام

Administrator
طاقم الإدارة
I have a set of points in .shp (ESRI, available here: http://ulozto.cz/xGqRVFrR/voronoi-zip). I would like to calculate Voronoi tesselation from the points, thus create polygons. So far, so good. However, points attribute table is not transferred automatically in R to Voronoi tesselation polygons during calculation (as is the case in ArsGIS).

Thus, depending points' spatial location I want to add points' attributes to my new Voronoi's polygons. I tried to used function

over(diagram.poly, bod.sp) but it creates data.frame, not polygon.

Please,


  1. how to automatically add points' attributes to Voronoi polygon OR
  2. how to use resulting data.frame as my polygon's attribute table?
I'm sure it is pretty trivial task but I still can't find my answer ! Thank you for your help,

my code:

# exemple with my data library(sp) library(deldir) library(rgdal) library(maptools) # set directory wd
 
أعلى