get_crs: Convert the CRS to a URI.

View source: R/crs.R

get_crsR Documentation

Convert the CRS to a URI.

Description

Given possible user-inputs to specify a CRS, check validity and then convert the CRS labels into a URI accepted by the OS Data Hub.

Usage

get_crs(x, returnType = c("uri", "number", "code"))

Arguments

x

(character or numeric) The CRS for the, either in the format "epsg:xxxx" or an EPSG number. e.g. British National Grid can be supplied as "epsg:27700" or 27700. Available CRS values are: EPSG:27700, EPSG:4326, EPSG:7405, EPSG:3857, and CRS84.

returnType

(character) Should the URI to the CRS be returned ('uri'), the EPSG number ('number'), or the string value ('code')? The default is 'uri'.

Value

Character string of a URI to the CRS specification.


osdatahub documentation built on April 11, 2025, 5:52 p.m.