lawn_circle | R Documentation |
Takes a data-Point and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision
lawn_circle(center, radius, steps = FALSE, units = "kilometers", lint = FALSE)
center |
The center, a data-Feature<(data-Point)> |
radius |
(integer) Radius of the circle. |
steps |
(integer) Number of steps. |
units |
(character) Miles, kilometers (default), degrees, or radians |
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-Feature<(data-Polygon)>
Other assertions:
lawn_dissolve()
,
lawn_tesselate()
pt <- '{ "type": "Feature", "properties": { "marker-color": "#0f0" }, "geometry": { "type": "Point", "coordinates": [-75.343, 39.984] } }' lawn_circle(pt, radius = 5, steps = 10) ## Not run: lawn_circle(pt, radius = 5, steps = 10) %>% view lawn_circle(pt, radius = 4, steps = 10) %>% view lawn_circle(pt, radius = 3, steps = 10) %>% view lawn_circle(pt, radius = 10, steps = 10) %>% view lawn_circle(pt, radius = 5, steps = 5) %>% view lawn_circle(pt, radius = 5, steps = 4) %>% view ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.