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.

  • 0: equivalent to a precision of 100 km.

  • 1: equivalent to a precision of 10 km.

  • 2: equivalent to a precision of 1 km.

  • 3 (the default): equivalent to a precision of 100 m.

  • 4: equivalent to a precision of 10 m.

  • 5: equivalent to a precision of 1 m.

precision

An integer, the precision of the Irish grid references in metres: 1, 10, 100, 1000, 10000, or 100000. Overrides digits.

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)

[Package igr version 0.1.1 Index]