make_grids | R Documentation |
Generates a system of square grids over an area (boundary shapefile).
make_grids(poly, size = 350,
show_output = FALSE, interactive = FALSE)
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: |
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.
Returns a "SpatialPolygonsDataFrames" object representing a system of square grids covering the polygon area.
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.