hexgrid: Build an hexagonal grid

Description Usage Arguments Details Value Author(s)

View source: R/hexgrid.R

Description

Builds an hexagonal grid over a spatial object using a convex hull.

Usage

1
hexgrid(x,width=NULL,n=NULL,buffer=NULL,convex=TRUE,seed=1)

Arguments

x

A spatial object, ideally projected.

width

Approximate width of hexagonal cell

n

Number of divisions to approximately split the convex hull along the x direction.

buffer

Width of a buffer around the convex hull of x to extend the grid

convex

Keep cells over convex hull or over x objects?

seed

A seed to obtain the same grid since it is based on spsample.

Details

When x is not projected, it is projected using laea and centered on mean x and y values and given back with the initial CRS. Better to input projected data anyway for displaying...

Value

A SpatialPolygonsDataFrame hexagonal grid overlapping x.

Author(s)

Francois Rousseu


frousseu/FRutils documentation built on April 8, 2021, 3:03 p.m.