st_add_coordinates | R Documentation |
Add coordinates as attributes to geospatial data.
st_add_coordinates(x, as_sf=FALSE, as_tibble=FALSE, rename=TRUE)
x |
|
as_sf |
flag for output as |
as_tibble |
flag for output as tibble. Default is TRUE. |
rename |
flag to rename output from |
The sf::st_coordinates
is applied to obtain the longitude and latitude coordinates.
The longitude and latitude of the point geometry are added as attributes.
data(grevilleasf)
hakeoides <- dplyr::filter(grevilleasf, species=="hakeoides")
hakeoides_coord <- st_add_coordinates(hakeoides)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.