calc_mcp {aspace} | R Documentation |
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.
calc_mcp(id=1, destmat = activities, filename="MCP_Output.txt", verbose = FALSE, pct = 100, plot = TRUE, plotdest = TRUE)
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 <= pct <=100, the percentage of the MCP for which area is provided |
plot |
Boolean: the MCP will be plotted if set to TRUE |
plotdest |
Boolean: all points will be plotted if set to TRUE |
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.
The result is a LIST
MCP.area |
The area of the MCP in hectares |
MCP.pct |
The desired percentage of the MCP for which area is computed |
MCP.coords |
A matrix containing MCP vertices. Each row represents a unique point, the first column contains x-coordinates, and the second, y-coordinates |
This function can be used on its own (once) or repetitively in a loop to process grouped point data stored in a larger table. When used repetitively, be sure to increment the id parameter to ensure that each MCP has a unique identifier. The output ASCII coordinate file can be further processed using the makeshapes function to generate an ESRI Shapefile for MCP polygons.
Tarmo K. Remmel
Builds upon MCP functions available in the adehabitat package
mcp
,
calc_sdd
,
calc_sde
,
makeshapes
plot.new() calc_mcp(id=1, destmat = activities, filename="MCP_Output.txt", verbose = FALSE, pct = 100, plot = TRUE, plotdest = TRUE)