View source: R/st_buffer_ext.R
st_buffer_ext | R Documentation |
Return an sf object with a buffer based on dist
or a proportion of the
diagonal distance defined by diag_ratio
. If x uses geographic coordinates,
the coordinate reference system is transformed into EPSG:3857 and then
transformed back into the original CRS after the buffer has been applied.
st_buffer_ext( x, dist = NULL, diag_ratio = NULL, unit = "meter", dist_limits = NULL, single_side = FALSE, ... ) st_edge(x, dist = NULL, diag_ratio = NULL, unit = "meter", ...)
x |
sf or 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 |
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" |
dist_limits |
Numeric vector of any length (minimum and maximum values used as lower and upper limits on distance buffer). Units must match the provided units; defaults to NULL. |
single_side |
If |
... |
additional parameters passed to |
st_edge is a variation on st_buffer_ext where dist or diag_ratio is used to define the width of the edge to return either outside the existing geometry (for positive dist values) or inside the existing geometry (for negative dist values).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.