Learn R Programming

lawn (version 0.1.7)

lawn_square_grid: 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, cellWidth, units)

Arguments

extent
(numeric) extent in [minX, minY, maxX, maxY] order
cellWidth
(integer) width of each cell
units
(character) units to use for cellWidth, one of 'miles' or 'kilometers'

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

Run this code
lawn_square_grid(c(-77.3876, 38.7198, -76.9482, 39.0277), 30, 'miles')
lawn_square_grid(c(-77.3876, 38.7198, -76.9482, 39.0277), 10, 'miles')
lawn_square_grid(c(-77.3876, 38.7198, -76.9482, 39.0277), 3, 'miles')

Run the code above in your browser using DataLab