aspace (version 0.1)

calc.mcp: Compute and plot a Minimum Convex Polygon (MCP)

Description

The geographical extent of a set of points on a Cartesian plane can be described using a Minimum Convex Polygon (MCP). The MCP is the minimum area polygon containing a set of point locations.

Usage

calc.mcp(id=1, destmat = activities, filename="MCP_Output.txt", verbose = FALSE, pct = 100, plot = TRUE, plotdest = TRUE)

Arguments

id
Provide a unique integer to identify this MCP from others you may construct with other data points
destmat
Two-column matrix or data frame of point coordinates
filename
A character name for an ASCII output file
verbose
Boolean: set to TRUE if extended processing feedback is wanted
pct
Integer 0
plot
Boolean: the MCP will be plotted if set to TRUE
plotdest
Boolean: all points will be plotted if set to TRUE

Value

  • The result is a LIST
  • MCP.areaThe area of the MCP in hectares
  • MCP.pctThe desired percentage of the MCP for which area is computed
  • MCP.coordsA matrix containing MCP vertices. Each row represents a unique point, the first column contains x-coordinates, and the second, y-coordinates

Details

This function is most powerful when used repetitively within a loop to compute the MCP for subsets of points stored in a large data table.

References

Builds upon MCP functions available in the adehabitat package

See Also

mcp, calc.sdd, calc.sde, makeshapes

Examples

Run this code
plot.new()
  calc.mcp(id=1, destmat = activities, filename="MCP_Output.txt", verbose = FALSE, pct = 100, plot = TRUE, plotdest = TRUE)

Run the code above in your browser using DataLab