mbr: Calculate the bounding box for a set of points

Description Usage Arguments Details Value See Also Examples

Description

mbr uses a fast convex hull algorithm to calculate the minimum bounding rectangle.

Usage

1

Arguments

points

a two-dimensional matrix of points

Details

The code was adapted from the code posted here https://gis.stackexchange.com/a/174577

Value

data.frame of vertices of the minimum bounding rectangle

See Also

boundingbox

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 

points <- matrix(rnorm(1000), ncol=2) 
box <- mbr(points)

plot(points,pch=20)
polygon(box,border='red')



## End(Not run)

sumtxt/cartotools documentation built on May 26, 2019, 5:30 a.m.