lawn_square_grid: Create a SquareGrid

View source: R/square_grid.R

lawn_square_gridR Documentation

Create a SquareGrid

Description

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

Usage

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

## 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)

ropensci/lawn documentation built on May 18, 2022, 9:58 a.m.