shape_buffered_from_shapefile - add buffer around shape
Source:R/shapefile_xyz.R
shape_buffered_from_shapefile.Rd
shape_buffered_from_shapefile - add buffer around shape
Arguments
- shapefile
spatial object like areas at high risk or areas with facilities to be analyzed
- radius.miles
width of buffer to add to shapefile (in case dist is a units object, it should be convertible to arc_degree if x has geographic coordinates, and to st_crs(x)$units otherwise)
- crs
used in st_transform() default is crs = 4269 or Geodetic CRS NAD83
- ...
passed to st_buffer()
Value
same format as sf::st_buffer()
returns
Details
Just a wrapper for sf::st_buffer()
Examples
# Within 3 miles of the county borders
fips_counties_from_state_abbrev("DE")[1]
x = shapes_counties_from_countyfips("10001")
xtra = shape_buffered_from_shapefile(x, radius.miles = 3)
map_shapes_leaflet(x) %>%
map_shapes_leaflet_proxy(xtra, color = "black")