View source: R/points_to_poly.R
points_to_poly | R Documentation |
create polygon from series of points
points_to_poly(pts, method = "concave")
pts |
a matrix of latitute and longitude points, or a data.frame with
|
method |
a string specifying the shape of the polygon, defaults as
|
creates a automatically generated footprint from a series of points
a data.frame of latitude and longitude points representing the spatial footprint of the data
Jordan S. Read
## Not run: #'file_nm <- system.file(package='mdextract','ext','data_gbif_1.csv') example_points <- read.table(file=file_nm,header=T,sep=',') point_matrix <- matrix(as.numeric(c(example_points$decimalLongitude,example_points$decimalLatitude)), nrow=nrow(example_points),ncol=2) poly <- pointsToPoly(point_matrix,method="concave") plot(point_matrix) lines(poly) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.