ig_to_igr {igr} | R Documentation |
Convert Irish Grid coordinates to Irish grid references
Description
ig_to_igr()
converts valid Irish Grid(EPSG:29903) coordinates to Irish grid
references at the specified precision.
Usage
ig_to_igr(x, digits = 3, precision = NULL, sep = "")
Arguments
x |
A matrix containing Irish Grid X and Y coordinates in the first and second columns respectively. |
digits |
An integer, the number of digits for both easting and northing in the Irish grid references.
|
precision |
An integer, the precision of the Irish grid references in
metres: |
sep |
A character string to separate the 100 km grid letter, easting, and northing. |
Details
Either digits
or precision
must be specified. precision
overrides
digits
.
Value
A character vector of Irish grid references.
Examples
# A matrix of three Irish Grid coordinates
m <- matrix(c(0, 412300, 0, 98700, 456000, 0), byrow = TRUE, ncol = 2)
m
# Convert to Irish grid references
ig_to_igr(m)
# Insert a space between the 100 km grid letter, easting, and northing
ig_to_igr(m, sep = " ")
# Convert into Irish grid references with 4 digit easting and northing (10 m precision)
ig_to_igr(m, digits = 4)
# Convert into Irish grid references with 1 km precision (2 digit easting and northing)
ig_to_igr(m, precision = 1000)