Hi,
I want to randomly sample some points within a polygon. After reading the
bounday file to the SpatialPolygonsDataFrame, I found that I can only sample
them in the rectangular containing the polygon based on bbox.
bound <- readShapePoly("bound.shp")
plot(bound)
rand.points=rpoint(100,
win=as.owin(c(bo...@bbox[1],bo...@bbox[3],bo...@bbox[2],bo...@bbox[4])))
Can you help me sample them inside the boundary?
Thanks!
Best,
Shaofei
[[alternative HTML version deleted]]
_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo