% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/diagnostics-properties-wrb.R
\name{leptic_features}
\alias{leptic_features}
\title{Leptic features (WRB 2022)}
\usage{
leptic_features(pedon, max_depth = 25, min_coarse_pct = NULL, engine = NULL)
}
\arguments{
\item{pedon}{A \code{\link{PedonRecord}}.}

\item{max_depth}{Maximum depth (cm) at which continuous rock or
rock-dominated material must appear (default 25).}

\item{min_coarse_pct}{Minimum coarse-fragment percent for the
coarse-fragments path (default 90 in soilkey engine, 50
in aqp engine; \code{NULL} picks a default per engine).}

\item{engine}{One of \code{"soilkey"} (default; strict 90\\%
cfvo threshold) or \code{"aqp"} (LUCAS-friendly relaxed
50\\% cfvo path \emph{plus} a thin-topsoil-with-rock path
requiring positive evidence of rock contact -- v0.9.66
tightening). The thin-topsoil path fires only when a
horizon ending within \code{max_depth} also satisfies
\emph{at least one} of: (a) designation contains "R"
(e.g.\ AR, BR, Cr, R, Rk), (b)
\code{coarse_fragments_pct >= 30} (gravelly), or
(c) a deeper horizon is R/Cr-designated. Users with a
strong external prior (e.g.\ a parent-material survey
that documents rock < 25 cm but did not record it in
the horizon table) can opt back into the original
v0.9.65 loose behaviour with
\code{options(soilKey.leptic_assume_rock_below = TRUE)}.
\code{NULL} (the default) reads
\code{getOption("soilKey.diagnostic_engine")}.}
}
\value{
A \code{\link{DiagnosticResult}}.
}
\description{
Tests whether continuous rock or rock-like material occurs within
\code{max_depth} cm of the surface. Two alternative paths qualify
per WRB 2022:
\enumerate{
  \item \strong{Designation}: a layer at depth <= \code{max_depth}
        with designation matching \code{"^R"} or \code{"^Cr"}
        (continuous rock or weathered rock-like substrate).
  \item \strong{Coarse fragments}: a layer at depth <= \code{max_depth}
        with coarse_fragments_pct >= \code{min_coarse_pct} (default
        90\% by volume), interpreted as rock-dominated even when not
        R / Cr-designated.
}
Either path qualifies.
}
\references{
IUSS Working Group WRB (2022), Chapter 5, Leptosols.
}
