Learn R Programming

aspace (version 2.5)

calc_mcp: Computing the Minimum Convex Polygon (MCP)

Description

This function computes the Minimum Convex Polygon (MCP) from a set of points. The MCP is the minimum area polygon containing a set of point locations.

Usage

calc_mcp(id=1, points = activities, filename="MCP_Output.txt", 
verbose = FALSE, pct = 100)

Arguments

id
Provide a unique integer to identify an MCP from others that you may construct with other data points
points
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

Value

  • The returned result is a list:
  • MCP.areaThe area of the MCP in square kilometers
  • MCP.pctThe desired percentage of the MCP for which the 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

plot_mcp, mcp, calc_sdd, calc_sde, calc_box, makeshapes

Examples

Run this code
calc_mcp(id=1, points = activities, filename="MCP_Output.txt", 
verbose = FALSE, pct = 100)

Run the code above in your browser using DataLab