Learn R Programming

lawn (version 0.6.0)

lawn_point_grid: Create a PointGrid

Description

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

Usage

lawn_point_grid(extent, cellSide, units = "kilometers", mask = NULL)

Arguments

extent

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

cellSide

(integer) the distance between points

units

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

mask

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

Value

data-FeatureCollection grid of points.

See Also

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

Examples

Run this code
# NOT RUN {
lawn_point_grid(c(-77.3876, 38.7198, -76.9482, 39.0277), 30, 'miles')
lawn_point_grid(c(-77.3876, 38.7198, -76.9482, 39.0277), 10, 'miles')
lawn_point_grid(c(-77.3876, 38.7198, -76.9482, 39.0277), 3, 'miles')
# }

Run the code above in your browser using DataLab