R/rhrValidEpsg.R

Defines functions rhrValidEpsg

Documented in rhrValidEpsg

##' Validate EPSG code
##'
##' Takes an EPSG checks if it is valid
##' @title rhrValidEpsg
##' @param epsg EPSG code
##' @export
rhrValidEpsg <- function(epsg) {
  rhrEPSGs <- rgdal::make_EPSG()
  if (is.null(epsg)) {
    return(FALSE)
  }
  if (as.character(epsg) %in% rhrEPSGs$code) {
    return(TRUE)
  } else {
    return(FALSE)
  }
}
jmsigner/rhr documentation built on June 26, 2020, 8:59 a.m.