Learn R Programming

RSurvey (version 0.6-0)

Autocrop: Autocrop Spatial Domain

Description

Approximate the shape of an area defined by a set of points in a plane.

Usage

Autocrop(mesh, max.len, max.itr)

Arguments

mesh
tri; a Delaunay triangulation.
max.len
numeric; maximum arc length for a triangle.
max.itr
integer; maximum number of iterations.

Value

  • Returns a polygon object of class gpc.poly.

Details

This subroutine uses a Delaunay triangulation to approximate the shape of an area defined by a set of arbitrarily distributed points in a plane. All triangles with arc lengths greater than an established maximum length are removed; a polygon is created from the union of the remaining triangles.

See Also

AutocropPolygon, tri.mesh

Examples

Run this code
data(tritest)
mesh <- tri.mesh(tritest$x, tritest$y)
plot(mesh)
ply <- Autocrop(mesh, max.len = 0.5, max.itr = 100)
plot(ply, add = TRUE, poly.args = list(col = 2))

Run the code above in your browser using DataLab