Last data update: 2014.03.03

R: Produces a grid of locations inside the region boundary.
nodeFillingR Documentation

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)

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

...

arguments for the plot produced as a side effect.

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.

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

verticle and horizontal node spacing

hole.list

list of polygons representing holes in region

Author(s)

Ronald P. Barry <rpbarry@alaska.edu>

References

Ronald P. Barry, Julie McIntyre. Estimation 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.

Examples

plot.new()
data(polygon1)

nodeFillingOutput = nodeFilling(poly=polygon1,node.spacing=0.02)
plot(nodeFillingOutput)
formLatticeOutput = formLattice(nodeFillingOutput)
plot(formLatticeOutput)

Pointdata = csr(polygon1,100)
Pointdata = Pointdata[Pointdata[,1]<0.5,]
plot(rbind(polygon1,polygon1[1,]),type="l")
points(Pointdata,pch=19)

densityOut = createDensity(formLatticeOutput,PointPattern=Pointdata, 
  k=20,intensity=FALSE, sparse = TRUE)
plot(densityOut)

homerange(densityOut, percent = 0.95)



Results