lawn_bezier | R Documentation |
Takes a data-LineString and returns a curved version by applying a Bezier http://en.wikipedia.org/wiki/Bezier_spline spline algorithm.
lawn_bezier(line, resolution = 10000L, sharpness = 0.85, lint = FALSE)
line |
A data-Feature with a single data-LineString |
resolution |
Time in milliseconds between points |
sharpness |
A measure of how curvy the path should be between splines |
lint |
(logical) Lint or not. Uses geojsonhint. Takes up increasing
time as the object to get linted increases in size, so probably use by
default for small objects, but not for large if you know they are good
geojson objects. Default: |
A data-LineString curved line.
Other transformations:
lawn_buffer()
,
lawn_concave()
,
lawn_convex()
,
lawn_difference()
,
lawn_intersect()
,
lawn_merge()
,
lawn_simplify()
,
lawn_union()
pts <- '[ [-21.964416, 64.148203], [-21.956176, 64.141316], [-21.93901, 64.135924], [-21.927337, 64.136673] ]' lawn_bezier(lawn_linestring(pts)) lawn_bezier(lawn_linestring(pts), 9000L) lawn_bezier(lawn_linestring(pts), 9000L, 0.65) ## Not run: lawn_bezier(lawn_linestring(pts)) %>% view lawn_featurecollection(list(lawn_linestring(pts), lawn_bezier(lawn_linestring(pts)))) %>% view ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.