% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{bru_safe_terra}
\alias{bru_safe_terra}
\title{Check for potential \code{terra} installation issues}
\usage{
bru_safe_terra(quietly = FALSE, minimum_version = "1.7-66")
}
\arguments{
\item{quietly}{logical; if \code{TRUE}, prints diagnostic messages. Default
\code{FALSE}}

\item{minimum_version}{character; the minimum required version.
Default 1.7-66 (should always match the requirement in the package
DESCRIPTION)}
}
\value{
Returns (invisibly) \code{FALSE} if a potential issue is detected, and
give a message if \code{quietly} is \code{FALSE}. Otherwise returns \code{TRUE}
}
\description{
Loads the terra package with \code{requireNamespace("terra", quietly = TRUE)},
and checks whether \code{eval_spatial()} successfully extracts non-NA values.
NA values may appear when there is a GDAL/PROJ installation issue that causes
it to not find the \code{proj.db} database file.

For use in package tests and examples that depend on \code{terra}.
}
\examples{
\dontrun{
if (bru_safe_terra()) {
  # Run terra dependent calculations
}
}

}
\keyword{internal}
