Description Usage Arguments Author(s) See Also Examples
Calculates a buffer for input features for a given radius.
1 | lawn_buffer(input, dist, units = "kilometers", lint = FALSE)
|
input |
A data-Feature or data-FeatureCollection |
dist |
(integer/numeric) Distance used to buffer the input. |
units |
(character) Units of the |
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: |
Jeff Hollister hollister.jeff@epa.gov
Other transformations:
lawn_bezier()
,
lawn_concave()
,
lawn_convex()
,
lawn_difference()
,
lawn_intersect()
,
lawn_merge()
,
lawn_simplify()
,
lawn_union()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | # From a Point
pt <- '{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-90.548630, 14.616599]
}
}'
lawn_buffer(pt, 5)
# From a FeatureCollection
dat <- lawn_random(n = 100)
lawn_buffer(dat, 100)
# From a Feature
dat <- '{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[
[-112.072391,46.586591],
[-112.072391,46.61761],
[-112.028102,46.61761],
[-112.028102,46.586591],
[-112.072391,46.586591]
]]
}
}'
lawn_buffer(dat, 1, "miles")
# buffer a point
lawn_buffer(lawn_point(c(-74.50,40)), 100, "meters")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.