calc_mcp {aspace}R Documentation

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 <= pct <=100, the percentage of the MCP for which area is provided

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.

Value

The returned result is a list:

MCP.area The area of the MCP in square kilometers
MCP.pct The desired percentage of the MCP for which the 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

Note

Results are stored in the r.MCP object (required for graphical visualization using plot_mcp). 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.

Author(s)

Randy Bui, Ron N. Buliung, Tarmo K. Remmel

References

Builds upon MCP functions available in the adehabitat package

See Also

plot_mcp, mcp, calc_sdd, calc_sde, calc_box, makeshapes

Examples

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

[Package aspace version 2.2 Index]