Skip to content

Instantly share code, notes, and snippets.

@pbaylis
Created May 27, 2019 18:33
Show Gist options
  • Save pbaylis/40043fc6c73a607084a36ee491ff602d to your computer and use it in GitHub Desktop.
Save pbaylis/40043fc6c73a607084a36ee491ff602d to your computer and use it in GitHub Desktop.
Points in polygons with sf
points.shp <- points.shp[apply(sf::st_intersects(points.shp, polys), 1, any),]
@pbaylis
Copy link
Author

pbaylis commented May 27, 2019

Need to have the same projection, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment