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 = "centroid",
crs = NULL,
keep_all = TRUE,
drop = TRUE,
call = caller_env()
)
get_minmax(x, crs = NULL, keep_all = TRUE, drop = TRUE)Arguments
- x
A
sf,bbox, orsfcobject.- coords
Column names to use for coordinates in results, Default:
NULL; which is set to c("lon", "lat") bycheck_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; defaults toTRUE.- drop
If
TRUEand x is an sf object, drop the geometry Default:TRUE.- call
The execution environment of a currently running function, e.g.
caller_env(). The function will be mentioned in error messages as the source of the error. See thecallargument ofabort()for more information.
