lawn_square_grid: Create a SquareGrid

Description Usage Arguments Value See Also Examples

View source: R/square_grid.R

Description

Takes a bounding box and a cell depth and returns a set of square data-Polygon's in a grid.

Usage

1
lawn_square_grid(extent, cellSide, units = "kilometers", mask = NULL)

Arguments

extent

(numeric) Extent in [minX, minY, maxX, maxY] order.

cellSide

(integer) dimension of each cell.

units

(character) Units to use for cellSide, one of 'miles' or 'kilometers'.

mask

(logical) if passed a Polygon or MultiPolygon, the grid Points will be created only inside it

Value

data-FeatureCollection grid of polygons.

See Also

Other interpolation: lawn_hex_grid(), lawn_isolines(), lawn_planepoint(), lawn_point_grid(), lawn_tin(), lawn_triangle_grid()

Examples

1
2
3
4
5
6
## Not run: 
lawn_square_grid(c(-95, 30 ,-85, 40), 30, 'miles')
lawn_square_grid(c(-95, 30 ,-85, 40), 10, 'miles')
lawn_square_grid(c(-95, 30 ,-85, 40), 3, 'miles')

## End(Not run)

lawn documentation built on Jan. 6, 2021, 5:07 p.m.