-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_crs.Rd
39 lines (36 loc) · 1 KB
/
check_crs.Rd
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{check_crs}
\alias{check_crs}
\title{Check coordinate reference systems match}
\usage{
check_crs(...)
}
\arguments{
\item{...}{Objects of \code{\link[sp]{CRS-class}} or from which \code{\link[sp]{CRS-class}} object(s) can be extracted (via \code{\link[raster]{crs}}).}
}
\description{
This function checks that coordinate reference systems (CRS) match.
}
\details{
The first (`baseline') CRS is compared against that for every other input. \code{NULL} inputs are ignored. For any mismatches, an instructive warning is returned alongside the details of each mismatch.
}
\examples{
\dontrun{
# The function can accept spatial objects
check_crs(dat_gebco, dat_coast)
check_crs(
dat_gebco,
dat_coast,
raster::raster(matrix(1))
)
# The function can accept CRS objects
check_crs(dat_gebco, sp::CRS(as.character(NA)))
# The function can accept NULL elements
check_crs(dat_gebco, NULL)
}
}
\author{
Edward Lavender
}
\keyword{internal}