File: compareCRS.Rd

package info (click to toggle)
r-cran-raster 3.6-31-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,300 kB
  • sloc: cpp: 2,367; ansic: 1,572; sh: 13; makefile: 2
file content (45 lines) | stat: -rw-r--r-- 1,198 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
\name{compareCRS}

\alias{compareCRS}


\title{ Partially compare two CRS objects }

\description{
Compare CRS objects 
}

\usage{
compareCRS(x, y, unknown=FALSE, verbatim=FALSE, verbose=FALSE)
}

\arguments{
  \item{x}{CRS object, or object from which it can be extracted with \code{\link{projection}}, or PROJ.4 format character string}
  \item{y}{same as \code{x}}
  \item{unknown}{logical. Return \code{TRUE} if \code{x} or \code{y} is \code{TRUE}}
  \item{verbatim}{logical. If \code{TRUE} compare \code{x} and \code{y}, verbatim (not partially)}
  \item{verbose}{logical. If \code{TRUE}, messages about the comparison may be printed}
}


\value{
logical
}


\seealso{\code{sp::identicalCRS},  \code{\link{crs} }}


\examples{ 
compareCRS("+proj=lcc +lat_1=48 +lat_2=33 +lon_0=-100 +ellps=WGS84",
  "+proj=longlat +datum=WGS84")
compareCRS("+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0",
  "+proj=longlat +datum=WGS84")
compareCRS("+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0", 
  "+proj=longlat +datum=WGS84", verbatim=TRUE)
compareCRS("+proj=longlat +datum=WGS84", NA)
compareCRS("+proj=longlat +datum=WGS84", NA, unknown=TRUE)
}

\keyword{ spatial }