Learn R Programming

lawn (version 0.5.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",
  centered = TRUE, bboxIsMask = FALSE)

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

centered

(logical) adjust points position to center the grid into bbox. This parameter is going to be removed in the next major release, having the output always centered into bbox. Default: TRUE

bboxIsMask

if TRUE, and bbox is a Polygon or MultiPolygon, the grid Point will be created only if inside the bbox Polygon(s). Default: FALSE

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