[Deprecated] utm_to_ll() was deprecated in favor of convert_utm_to_ll() to enforce a consistent naming scheme for functions across the package and to conform with the tidyverse style guide.

utm_to_ll takes your dataframe with UTM coordinates in separate Easting and Northing columns, and adds on an additional two columns with the converted decimalLatitude and decimalLongitude coordinates using the reference coordinate system WGS84.

utm_to_ll(df, EastingCol, NorthingCol, zone, datum = "WGS84")

Arguments

df
  • The dataframe with UTM coordinates you would like to convert. Input the name of your dataframe.

EastingCol
  • The name of your Easting UTM column. Input the name in quotations, ie. "EastingCol".

NorthingCol
  • The name of your Northing UTM column. Input the name in quotations, ie. "NorthingCol".

zone
  • The UTM Zone. Input the zone number in quotations, ie. "17".

datum
  • The datum used in the coordinate reference system of your coordinates. Input in quotations, ie. "WGS84"

Value

The function returns your dataframe, mutated with an additional two columns of decimal Longitude and decimal Latitude.

Details

Define the name of your dataframe, the easting and northing columns within it, the UTM zone within which those coordinates are located, and the reference coordinate system (datum). UTM Northing and Easting columns must be in separate columns prior to running the function. If a datum is not defined, the function will default to "WGS84". If there are missing coordinates in your dataframe they will be preserved, however they will be moved to the end of your dataframe. Note that some parameter names are not in snake_case but instead reflect DarwinCore naming conventions.

Examples

if (FALSE) { # \dontrun{
utm_to_ll(
  df = mydataframe,
  EastingCol = "EastingCoords",
  NorthingCol = "NorthingCoords",
  zone = "17",
  datum = "WGS84"
)
} # }