##' epsg
##'
##' The epsg of various crs
##'
##' @return numeric value
##' @param x A character
##' @param ... other arguements
epsg <- function(x = c("sweref99", "RT90", "WGS84")) {
x <- match.arg(x)
switch(x,
sweref99 = return(3006),
RT90 = return(3021),
WGS84 = return(4326))
}
##' sweref99
##'
##' The proj4str of sweref99
##'
##' @export
##' @return a string
sweref99 <- function() {
paste0("+init=epsg:", epsg("sweref99"))
}
##' RT90
##'
##' The proj4str of RT90
##'
##' @export
##' @return a string
RT90 <- function() {
paste0("+init=epsg:", epsg("RT90"))
}
##' WGS84
##'
##' The proj4str of WGS84
##'
##' @export
##' @return a string
WGS84 <- function() {
paste0("+init=epsg:", epsg("WGS84"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.