Dear R User ,

Sorry for this email, but i have a problem with overlay in sp.

I have to shape file one is a points shape file (clip_point, with "pH"
value) the second is a Polygons shapefile (plots, with ID number of plot)

clip_point <- readOGR(".", "clip_point")
proj4string(clip_point) <- CRS("+init=epsg:26911")
names(clip_point)[4] = "pH"
str(clip_point)

plots <- readOGR(".", "plots")
proj4string(plots) <- CRS("+init=epsg:26911")
str(plots)

I wish to overlay both shapefiles to have a data.frame with ID and pH value
(in other words, find all points insiede the plot x)

clip_point.ov <- overlay(plots["ID"],clip_point["pH"] )

when I try this solution I have a data.frame with the total numebr of
clip_point but with only the ID and not pH value.

data.frame':   2992 obs. of  1 variable:
 $ ID: int  15 15 15 15 15 15 15 15 15 15 ...

thanks a lot and sorry for this question

Gianni

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to