bbox2poly | R Documentation |
Convert a bounding box to polygon
bbox2poly(bbox)
bbox |
object of class bbox from sf |
An sfc object from the sf package
## Not run:
library(sf)
wk <- wikilake::lake_wiki("Gull Lake (Michigan)")
pnt <- st_as_sf(wk, coords = c("Lon", "Lat"), crs = 4326)
pnt <- st_transform(pnt, st_crs(vpu_shp))
qry <- nhd_plus_query(wk$Lon, wk$Lat,
dsn = c("NHDWaterbody"), buffer_dist = 0.05)
wbd <- qry$sp$NHDWaterbody[which.max(st_area(qry$sp$NHDWaterbody)), ]
bbox2poly(st_bbox(wbd))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.