project_coordinates: Convert from Lat-Long to UTM

View source: R/project_coordinates.R

project_coordinatesR Documentation

Convert from Lat-Long to UTM

Description

project_coordinates converts from Latitude-Longitude to Universal Transverse Mercator projections for a given location

Usage

project_coordinates(
  X,
  Y,
  projargs = NA,
  origargs = "+proj=longlat +datum=WGS84",
  zone = NA,
  flip_around_dateline = FALSE,
  silent = FALSE
)

Arguments

X

vector of horizontal-coordinates (e.g., longitude by default)

Y

vector of vertical-coordinates (e.g., latitude by default)

projargs

A character string of projection arguments; the arguments must be entered exactly as in the PROJ.4 documentation; if the projection is unknown, use as.character(NA), it may be missing or an empty string of zero length and will then set to the missing value. With rgdal built with PROJ >= 6 and GDAL >= 3, the +init= key may only be used with value epsg:<code>. From sp version 1.4-4, the string associated with the SRS_string argument may be entered as-is and will be set as SRS_string if the projargs argument does not begin with a + (suggested by Mikko Vihtakari).

zone

DEPRECATED INPUT; UTM zone (integer between 1 and 60) or alphanumeric CRS code used by package rgdal to convert latitude-longitude coordinates to projection in kilometers; zone=NA uses UTM and automatically detects the appropriate zone

flip_around_dateline

DEPRECATED INPUT; boolean specifying whether to flip Lat-Lon locations around the dateline, and then retransform back (only useful if Lat-Lon straddle the dateline)

Value

A data frame with the following columns

X

The horizonal coordinates after projection (e.g., Eastings in UTM kilometers by default)

Y

The vertical coordinates after projection (e.g., Northings in UTM kilometers by default)


James-Thorson/FishStatsUtils documentation built on Feb. 6, 2024, 4:26 a.m.