sf_bbox_misc | R Documentation |
Simple bounding box functions that you can use to:
sf_bbox_asp(bbox, orientation = FALSE) sf_bbox_point(bbox, point = NULL) sf_bbox_dist(bbox, from, to, units = NULL, drop = TRUE) sf_bbox_xdist(bbox, units = NULL, drop = TRUE) sf_bbox_ydist(bbox, units = NULL, drop = TRUE) sf_bbox_diagdist(bbox, units = NULL, drop = TRUE) sf_bbox_transform(bbox, crs = NULL) sf_bbox_to_sf(bbox, sf_col = "geometry") sf_bbox_to_sfc(bbox) sf_bbox_to_wkt(bbox) sf_bbox_to_lonlat_query(bbox, coords = c("longitude", "latitude"), crs = 4326) sf_bbox_shift( bbox, x_nudge = 0, y_nudge = 0, side = c("all", "top", "bottom", "left", "right"), dir = NULL ) sf_bbox_contract(bbox, x_nudge = 0, y_nudge = 0) sf_bbox_expand(bbox, x_nudge = 0, y_nudge = 0)
bbox |
A bbox object. |
orientation |
If |
point |
Length 2 character vector representing a coordinate pair at a corner, midpoint, or center of the bounding box ("xmin", "ymin", "xmax", "ymax", "xmid", "ymid") |
from, to |
xy pairs (e.g. c("xmax", "ymax) defining points to measure distance from and to. |
units |
The units to return for sf_bbox_dist. Defaults to NULL. |
drop |
If |
crs |
coordinate reference system to use for query; default 4326 |
sf_col |
name to use for geometry column after converting to simple feature object; defaults to "geometry". |
coords |
query column names with coordinates. e,g, c("X", "Y") or c("lat", "lon") |
x_nudge, y_nudge |
Length 1 or 2 numeric vector; unitless. |
side |
one or more sides to shift: "top", "bottom", "left", "right", or "all" |
dir |
If "in", contract the |
Measure distances (sf_bbox_dist, sf_bbox_xdist, sf_bbox_ydist, and sf_bbox_diagdist)
Get an aspect ratio or orientation (sf_bbox_asp) (counts asp between 0.9 and 1.1 as "square")
Return a point from any of the corners, center, or midpoints (sf_bbox_point)
Transform the coordinate reference system (sf_bbox_transform)
Convert a bounding box to a SQL style query (sf_bbox_to_lonlat_query), well known text (sf_bbox_to_wkt), or a simple feature object (sf_bbox_to_sf)
Shift, expand, or contract a bounding box (sf_bbox_shift, sf_bbox_expand, sf_bbox_contract)
The only functions with additional parameters are sf_bbox_to_lonlat_query and sf_bbox_dist. All other functions only take a bbox parameter.
sf object
sf::st_as_sf()
,sf::st_as_sfc()
sfx::st_extent()
Other dist:
convert_dist_scale()
,
convert_dist_units()
,
get_measurements
,
is_dist_units()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.