Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x <- sapply(c(1:max(greens[,1])), function() {
- # build polygon for row's green
- poly.x <- greens[greens[,1] == hole, 2]
- poly.y <- greens[greens[,1] == hole, 3]
- # get candidate points
- p.x <- gps[,3]
- p.y <- gps[,4]
- require(sp)
- # Finally increment the score for those positions in the green
- gps[which(point.in.polygon(p.x,p.y,poly.x,poly.y) != 0),ncol(gps)] <- gps[which(point.in.polygon(p.x,p.y,poly.x,poly.y) != 0),ncol(gps)] + 0.2
Add Comment
Please, Sign In to add comment