gBoundingPoints but only returns the indices of points contained within a bounding box
A set of bounding coordinates in matrix form like those returned from
Rather than returning the spatial object, this give the indices of points within a bounding box. It's more useful for re-merging attributes (Since gBoundingPoints strips a SpatialPointsDataFrame to a SpatialPoints object). Or, better still, subsetting.
Note: all inputs should be of class
gWhichPoints(points.spdf, bbox(container_polygon)) all_the_points_spdf[gWhichPoints(all_the_points.spdf, bbox(container_polygon)), ]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.