| make_grids {stppSim} | R Documentation |
Make square grids
Description
Generates a system of square grids over an area (boundary shapefile).
Usage
make_grids(poly, size = 350,
show_output = FALSE, interactive = FALSE)
Arguments
poly |
(as |
size |
Size of square grids to be
created. For example, the input |
show_output |
(logical) Display the output.
Default: |
interactive |
(logical) to show
interactive map of the grids generated.
Default: |
Details
Generates a square grid system in a shapefile
format (in the same crs as the input poly).
If interactive argument is TRUE, an interactive
map is shown from which the centroid coordinates
of any grid can be displayed by hovering the mouse
over the grid. If internet connection is
available on the PC, a basemap (OpenStreetmap) is
added to help identify places.
Value
Returns a "SpatialPolygonsDataFrames" object representing a system of square grids covering the polygon area.
Examples
#load boundary of Camden
load(file = system.file("extdata", "camden.rda",
package="stppSim"))
boundary = camden$boundary
make_grids(poly=boundary, size = 350,
show_output = FALSE, interactive = FALSE)