st_bbox_ext | R Documentation |
Takes an area as an sf object or a bounding box and returns a bounding box that matches the provided aspect ratio and contains the area or bounding box provided.
st_bbox_ext( x = NULL, dist = NULL, diag_ratio = NULL, asp = NULL, unit = NULL, crs = NULL, class = "bbox", null.ok = TRUE ) st_bbox_asp(x = NULL, asp = NULL, class = "bbox")
x |
An object sf, bbox, sfc, raster, or sp object or a data frame that can be converted to an sf object or a list of sf, bbox, or sfc objects. st_bbox_asp also supports vectors in the same format as a bbox object. |
dist |
buffer distance in units. Optional. |
diag_ratio |
ratio of diagonal distance of area's bounding box used as
buffer distance. e.g. if the diagonal distance is 3000 meters and the
"diag_ratio = 0.1" a 300 meter will be used. Ignored when |
asp |
Aspect ratio of width to height as a numeric value (e.g. 0.33) or
character (e.g. "1:3"). If numeric, |
unit |
Units for buffer. Supported options include "meter", "foot", "kilometer", and "mile", "nautical mile" Common abbreviations (e.g. "km" instead of "kilometer") are also supported. Distance in units is converted to units matching GDAL units for x; defaults to "meter" |
crs |
Coordinate reference system of bounding box to return |
class |
Class of object to return (sf or bbox); defaults to "bbox". |
null.ok |
If |
Common aspect ratios include "1:1" (1), "4:6" (0.666), "8.5:11", "16:9" (1.777). The asp parameter supports both numeric values and character strings with ratios matching the format of "width:height".
Class bbox
object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.