st_add_coordinates {eks} | R Documentation |
Add coordinates as attributes to geospatial data
Description
Add coordinates as attributes to geospatial data.
Usage
st_add_coordinates(x, as_sf=FALSE, as_tibble=FALSE, rename=TRUE)
Arguments
x |
|
as_sf |
flag for output as |
as_tibble |
flag for output as tibble. Default is TRUE. |
rename |
flag to rename output from |
Details
The sf::st_coordinates
is applied to obtain the longitude and latitude coordinates.
Value
The longitude and latitude of the point geometry are added as attributes.
Examples
data(grevilleasf)
hakeoides <- dplyr::filter(grevilleasf, species=="hakeoides")
hakeoides_coord <- st_add_coordinates(hakeoides)
[Package eks version 1.0.5 Index]