An extended version of sf::st_coordinates that supports binding coordinates to the object, optionally dropping the geometry, and returning wkt or a point on surface (geometry = "surface point") instead of the centroid.
Usage
get_coords(
x,
coords = NULL,
geometry = NULL,
crs = NULL,
keep_all = TRUE,
drop = TRUE
)
get_minmax(x, crs = NULL, keep_all = TRUE, drop = TRUE)
Arguments
- x
sf
,bbox
, orsfc
object- coords
Column names to use for coordinates in results, Default:
NULL
; which is set to c("lon", "lat") by check_coords- geometry
geometry to use for coordinates "centroid", "surface point", or alternatively "wkt"; defaults to
NULL
("centroid")- crs
Coordinate reference system to use for coordinates; defaults to
NULL
.- keep_all
If
TRUE
, bind the coordinates columns to the provided object x, Default:TRUE
.- drop
If
TRUE
and x is an sf object, drop the geometry Default:TRUE
.