transform_data_frame_crs: Transform data frame to new coordinate reference system

View source: R/transform_data_frame_crs.R

transform_data_frame_crsR Documentation

Transform data frame to new coordinate reference system

Description

Transform data frame to new coordinate reference system

Usage

transform_data_frame_crs(
  x,
  coords = c("x", "y"),
  in.crs = "+proj=longlat",
  out.crs,
  only.new.coords = FALSE
)

Arguments

x

Input data frame.

coords

Vector of names of coordinate column with order longitude and latitude. Default c("x", "y")

in.crs

Coordinate reference system for input data frame. Default = '+proj=longlat'

out.crs

Coordinate reference system for data frame to return. Default = '+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs'

only.new.coords

Should only the new coordinates be returned without the input data frame? Default = FALSE

Value

Returns the input data frame with coordinates converted, or a data frame containing just the coordinates, if only.new.coords == TRUE.

Author(s)

Sean K. Rohan, sean.rohan@noaa.gov


afsc-gap-products/akgfmaps documentation built on April 14, 2025, 7:13 p.m.