lawn_point_grid: Create a PointGrid

View source: R/point_grid.R

lawn_point_gridR Documentation

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.

Note

parameters centered and bboxIsMask removed

See Also

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

Examples

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

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