dd2utm: Decimal degrees to Universal Transverse Mercator

Description Usage Arguments Value Author(s) References Examples

Description

A function to convert decimal degrees into universal transverse mercator coordinate system. This is an R implementation of the formulas provided by Prof. Steven Dutch.

Usage

1
dd2utm(id, long, lat, data)

Arguments

id

The column number containing the identifier for each row. This 'identifier' may be the name of a population/provenance or could be a sequence of numbers

long

The column number containing the logitude decimal degree coordinates

lat

The column number containing the latitude decimal degree coordinates

data

The data frame containing the latitude/longitude coodinates. This can be of either class 'data.frame' or 'matrix'

Value

An object of class 'data.frame' containing four columns:

id

The identifier from the original data file

north

The north UTM coordinate

east

The east UTM coordinate

zone

The zone which the latitudes originate. Zone ranges from 1 (180 to 147 W) to 60

Author(s)

P.A. Harrison

References

CFF Karney (2010) Transverse Mercator with an accuracy of a few nanometers, http://arxiv.org/abs/1002.1417v3

http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM

Examples

1
2
3
4
5
6
7
8
9
# Create a data frame
tmp <- data.frame(id = "test", longitude = 147.4686, latitude = -42.008)

# Run function
PUCA::dd2utm(id = 1, long = 2, lat = 3, data = tmp)

# Output
#     id   north     east zone
# 1 test 5349229 538803.5   55

peteraharrison/PUCA documentation built on Sept. 16, 2019, 7:56 a.m.