gw_get_coords | R Documentation |
Converts point coordinates stored in an sf
object to columns for
both the x and y coordinates. Useful for storing spatial data in tabular form.
gw_get_coords(.data, names = c("x","y"), crs = 4269)
.data |
A |
names |
A vector with two column names, one for the x coordinate and one for the y coordinate. |
crs |
A numeric code corresponding to the desired coordinate system for the column output |
Based on a function written Josh M. London and described in a GitHub issue.
An updated object with two new columns based on the names provided in the names
argument.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.