project_df: Project a data frame with geographic coordinates to a...

View source: R/spatial.R

project_dfR Documentation

Project a data frame with geographic coordinates to a different coordinate reference system (CRS) while retaining the original coordinates.

Description

Project a data frame with geographic coordinates to a different coordinate reference system (CRS) while retaining the original coordinates.

Usage

project_df(df, from = 4326, to)

Arguments

df

A data frame with geographic coordinates (latitude and longitude, in decimal degrees) and a WGS84 CRS (4326).

from

The original geographic CRS.

to

The new projected CRS.

Value

The original data frame and new columns for X and Y in a second CRS.

Examples

project_df(df, from = 4326, to = 3310)

kstierhoff/atm documentation built on Jan. 30, 2025, 11:21 p.m.