Description Usage Arguments Value Author(s) Examples
This function takes as input a set of geographic points, as a SpatialPointsDataFrame. For each point in the input object, it genereates a regular grid of points surrounding it, of chosen dimensions. This is useful for setting up an array of repeat sampling locations, for example, for assessing vegetation condition or canopy cover, for a sequence of geographic locations.
1 | grid_points(points, spacing = 25, gridsize = 3)
|
points |
A SpatialPointsDataFrame object, which can be loaded from a shapefile using the |
spacing |
The spacing between lines of the grid. The default is 25. This value is expressed in the same coordinate system as the input spatial data, so be aware that for data in geographic (latitude/longitude) projections, this value represents degrees. |
gridsize |
The number of rows/columns in the grid, for example, the default value of 3 will produce a 3x3 grid of nine points surrounding the centre point. |
A SpatialPointsDataFrame object containing the grid of points.
Grant Williamson
1 2 3 4 | data(SplashDams)
plot(SplashDams)
gridded = grid_points(SplashDams,0.03,3)
plot(gridded)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.