ukair_get_coordinates: Get Easting and Northing coordinates from DEFRA

Description Usage Arguments Details Value Examples

View source: R/ukair_get_coordinates.R

Description

This function takes as input the UK AIR ID and returns Easting and Northing coordinates (British National Grid, EPSG:27700).

Usage

1

Arguments

ids

contains the station identification code defined by DEFRA. It can be: a) an alphanumeric string, b) a vector of strings or c) a data frame. In the latter case, the column containing the codes should be named "UK.AIR.ID", all the other columns will be ignored.

Details

If the input is a data frame with some of the columns named "UK.AIR.ID", "Northing" and "Easting", the function only infills missing Northing/Easting values (if available on the relevant webpage).

Value

A data.frame containing at least five columns named "UK.AIR.ID", "Easting", "Northing", "Latitude" and "Longitude".

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 ## Not run: 
 # Case a: alphanumeric string
 ukair_get_coordinates("UKA12536")

 # Case b: vector of strings
 ukair_get_coordinates(c("UKA15910", "UKA15956", "UKA16663", "UKA16097"))

 # Case c: data frame
 ukair_get_coordinates(ukair_catalogue()[1:10,])
 
## End(Not run)

rdefra documentation built on April 14, 2020, 6:43 p.m.