Learn R Programming

latticeDensity (version 1.2.7)

nodeFilling: Produces a grid of locations inside the region boundary.

Description

nodeFilling produces a grid of locations that are the nodes in the diffusion process.

Usage

nodeFilling(poly, node_spacing, hole_list = NULL)

Value

An object of type nodeFillingOutput is produced.

  • EW_locs EW coordinates for the contour plot.

  • NS_locs NS coordinates for the contour plot.

  • nodes Matrix of node locations.

  • poly Matrix of vertices of boundary polygon.

  • node_spacing Vertical and horizontal node spacing.

  • hole_list List of polygons representing holes in region.

Arguments

poly

A matrix that contains the vertices of the bounding polygon.

node_spacing

The distance between grid locations.

hole_list

Optional list of holes to be removed from the region

Author

Ronald P. Barry

Details

nodeFilling superimposes a square grid of points over the region, with spacing given by the parameter node_spacing. The points contained in the region are retained. The output, a nodeFillingOutput object, contains the boundaries of the region (and holes), the set of nodes, and EW and NS coordinates necessary for creating a contour plot. Note that there is no check to see that the holes are contained in the region, and that they don't intersect.

References

Ronald P. Barry, Julie McIntyre. Estimating animal densities and home range in regions with irregular boundaries and holes: A lattice-based alternative to the kernel density estimator. Ecological Modelling 222 (2011) 1666-1672. <doi:10.1016/j.ecolmodel.2011.02.016>

Examples

Run this code
plot.new()
data(polygon1)
nodeFillingOutput <- nodeFilling(poly=polygon1,node_spacing=0.02)
plot(nodeFillingOutput)
formLatticeOutput <- formLattice(nodeFillingOutput)
plot(formLatticeOutput)

Run the code above in your browser using DataLab