To include a bounding box without drawing it, use shadow_spatial()
on the
original object.
# S3 method for bbox
layer_spatial(data, mapping = aes(), ..., detail = 30)
# S3 method for bbox
annotation_spatial(data, mapping = aes(), ..., detail = 30)
# S3 method for bbox
shadow_spatial(data, ..., detail = 30)
A bounding box generated by sf::st_bbox()
A mapping, created using aes.
Passed to geom_sf
Passed to sf::st_segmentize()
: the number of line segments
per quadrant of the bounding box. Increase this number for a smoother
projected bounding box.
# \donttest{
library(ggplot2)
load_longlake_data(which = c("longlake_waterdf", "longlake_depthdf"))
ggplot() +
layer_spatial(sf::st_bbox(longlake_waterdf)) +
layer_spatial(longlake_depthdf)
# use shadow_spatial() to include the geographic area of an object
# without drawing it
ggplot() +
shadow_spatial(longlake_waterdf) +
layer_spatial(longlake_depthdf)
# }