chull_poly {stppSim} | R Documentation |
Boundary surrounding a set of points
Description
Generates a boundary (polygon) around a set of points, using Convex Hull technique (Eddy, W. F, 1977).
Usage
chull_poly(xycoords,
crsys = NULL)
Arguments
xycoords |
(matrix) A 2-column
coordinate vectors of points: |
crsys |
Optional string specifying the coordinate reference system (crs) of the resulting boundary, e.g., the crs string "+proj=longlat +datum=WGS84" transform the resulting boundary to wgs84 system. |
Details
Draws an arbitrary boundary around spatial points by joining the outer-most points by lines.
Value
Returns a "SpatialPolygonsDataFrame" object representing the boundary surround the spatial points
References
Eddy, W. F. (1977). A new convex hull algorithm for planar sets. ACM Transactions on Mathematical Software, 3, 398–403.10.1145/355759.355766.
Examples
data(xyt_data)
#extract xy coordinates only
xy <- matrix(as.numeric(xyt_data[,1:2]),,2)
bry <- chull_poly(xy, crsys = NULL)
#visualise result
#plot(bry) #to plot
#points(xy[,1], xy[,2], add=TRUE)
[Package stppSim version 1.3.4 Index]