A function to generate an inflated bbox for input to Kernel Density function
inflate_bbox.Rd
generate a bounding box based on a sf/sp (readable) object
Arguments
- sp_obj
Either an sf object or an sf-readable file. See sf::st_drivers() for available drivers. used as the basis for the bounding box.
- value
A numeric distance (in the units of the spatial object) to inflate the bounds by.
- wgs
Boolean to determine if box should be defined in WGS84 CRS. default is TRUE as this plays more nicely with ggspatial...
Examples
# generate inflated (by 10m) bounding box for ROBT feeding signs
inflate_bbox(RivOtter_FeedSigns, 10)
#> Simple feature collection with 1 feature and 0 fields
#> Geometry type: POLYGON
#> Dimension: XY
#> Bounding box: xmin: 305466.8 ymin: 82137.99 xmax: 322774.8 ymax: 114169.4
#> Projected CRS: OSGB 1936 / British National Grid
#> geometry
#> 1 POLYGON ((305466.8 82137.99...