Takes a geographic object or bounding box as an input and outputs a bounding box, represented as a bounding box, corner points or rectangular polygon.
geo_bb( shp, scale_factor = 1, distance = 0, output = c("polygon", "points", "bb") )
| shp | Spatial object (from sf or sp packages) |
|---|---|
| scale_factor | Numeric vector determining how much the bounding box will grow or shrink. Two numbers refer to extending the bounding box in x and y dimensions, respectively. If the value is 1, the output size will be the same as the input. |
| distance | Distance in metres to extend the bounding box by |
| output | Type of object returned (polygon by default) |
bb_scale
Other geo:
bbox_scale(),
gclip(),
geo_bb_matrix(),
mapshape_available(),
mapshape(),
quadrant(),
reproject()
# Simple features implementation: shp <- routes_fast_sf shp_bb <- geo_bb(shp, distance = 100)#>#>#> Warning: CRS object has comment, which is lost in output