% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spmesh.R
\name{inla.CRSargs}
\alias{inla.CRSargs}
\alias{inla.as.list.CRS}
\alias{inla.as.list.CRSargs}
\alias{inla.as.CRS.list}
\alias{inla.as.CRSargs.list}
\title{Show expanded CRS arguments}
\usage{
inla.CRSargs(x, ...)

inla.as.CRSargs.list(x, ...)

inla.as.list.CRSargs(x, ...)

inla.as.list.CRS(x, ...)

inla.as.CRS.list(x, ...)
}
\arguments{
\item{x}{An \code{sp::CRS} or \code{inla.CRS} object (for
\code{inla.CRSargs} and \code{inla.as.list.CRS}), a character string (for
\code{inla.as.list.CRSargs}), or a list (for \code{inla.as.CRS.list} and
\code{inla.as.CRSargs.list}).}

\item{\dots}{Additional arguments passed on to other methods.}
}
\value{
For \code{inla.CRSargs} and \code{inla.as.CRSargs.list}, a character
string with PROJ.4 arguments.

For \code{inla.as.list.CRS} and \code{inla.as.list.CRSargs}, a list of
name/value pairs.

For \code{inla.as.CRS.list}, a \code{CRS} or \code{inla.CRS} object.
}
\description{
Wrapper for \code{sp::CRS} and \code{inla.CRS} objects to extract the
coordinate reference system argument string.
Should no longer be used with PROJ6/rgdal3;
see \code{\link[=inla.crs_get_wkt]{inla.crs_get_wkt()}}
}
\details{
\itemize{
\item \code{inla.as.CRSargs.list}: CRS proj4 string for name=value pair list
}

\itemize{
\item \code{inla.as.list.CRSargs}: List of name=value pairs from CRS proj4 string
}
}
\examples{

if (require(rgdal)) {
    crs0 <- inla.CRS("longlat")
    p4s <- inla.CRSargs(crs0)
    lst <- inla.as.list.CRSargs(p4s)
    crs1 <- inla.as.CRS.list(lst)
    lst$a <- 2
    crs2 <- inla.CRS(p4s, args = lst)
    print(inla.CRSargs(crs0))
    print(inla.CRSargs(crs1))
    print(inla.CRSargs(crs2))
}
}
\seealso{
\code{\link[rgdal:CRS-class]{rgdal::CRSargs()}}, \code{\link[=inla.CRS]{inla.CRS()}}
}
\author{
Finn Lindgren \href{mailto:finn.lindgren@gmail.com}{finn.lindgren@gmail.com}
}
