sf (version 0.3-4)

st_makegrid: Make a rectangular grid of polygons over the bounding box of a sf or sfc object

Description

Make a rectangular grid of polygons over the bounding box of a sf or sfc object

Usage

st_makegrid(x, cellsize = c(diff(st_bbox(x)[c(1, 3)]), diff(st_bbox(x)[c(2,
  4)]))/n, offset = st_bbox(x)[1:2], n = c(10, 10))

Arguments

x
object of class sf or sfc
cellsize
target cellsize
offset
numeric of lengt 2; lower left corner coordinates (x, y) of the grid
n
integer of length 1 or 2, number of grid cells in x and y direction (columns, rows)