Description Usage Arguments Value
View source: R/smooth.hull.sp.r
Calculate a smooth hull around a set of points Calculate a smooth polygon around a set of points using Bezier curves, with the smooth polygon passing through the vertices of the convex hull containing the set of points once bezier control points are added the polygon is smoothed using chaikin's corner cutting algorithm add buffer if desired inspired by the following answers from stackexchange Dan H's answer: https://gis.stackexchange.com/questions/24827/smoothing-polygons-in-contour-map/24929#24929 John Hughes's answer: https://math.stackexchange.com/questions/656500/given-a-point-slope-and-a-distance-along-that-slope-easily-find-a-second-p https://stackoverflow.com/questions/42630703/create-buffer-around-spatial-data-in-r/42641283
1 | smooth.hull.sp(pts, crs.ll, buffer.ll, d.scalar = 0.15)
|
pts |
List/Data Frame with two entries: one for x and one for y |
crs.ll |
Character string of the crs for the current lat-lon projections |
buffer.ll |
Size of buffer in degrees of lat/lon |
d.scalar |
ratio bounded by (0,0.5) and controls the tightness of smooth to the original chull points |
A spatial polygon object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.