Skip to contents

Coverts latitude and longitude to a grid reference and/or easting and northing.

Usage

gps_latlon2gr(
  latitude,
  longitude,
  out_projection = "OSGB",
  return_type = "both"
)

Arguments

latitude

a vector of numerics giving latitudes

longitude

a vector of numerics giving longitudes

out_projection

a string giving the desired output projection, either "OSGB" or "OSNI". Defaults to "OSGB".

return_type

a string defining what information the funtion should return. If "both" (default), grid reference and easting/northing are returned. If "en", only easting and northing are returned. If gr, only grid reference is returned

Value

A dataframe of results are returned

Examples


gps_latlon2gr(51.60233, -1.111254)
#>        GRIDREF EASTING NORTHING
#> 1 SU6164989650  461649   189650