gw_get_coords: Extract Coordinates from sf Object

Description Usage Arguments Details Value

View source: R/geocode.R

Description

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.

Usage

1
gw_get_coords(.data, names = c("x","y"), crs = 4269)

Arguments

.data

A sf object

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

Details

Based on a function written Josh M. London and described in a GitHub issue.

Value

An updated object with two new columns based on the names provided in the names argument.


slu-openGIS/gateway documentation built on March 22, 2019, 5:49 p.m.