% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/aqp-interop-v0962.R
\name{pedon_to_spc}
\alias{pedon_to_spc}
\title{Convert a soilKey PedonRecord to an aqp SoilProfileCollection}
\usage{
pedon_to_spc(pedon)
}
\arguments{
\item{pedon}{A \code{\link{PedonRecord}}.}
}
\value{
A \code{aqp::SoilProfileCollection} with one site (the
  pedon) and one row per horizon.
}
\description{
The mapping respects aqp's expected column conventions and sets
the metadata required by \code{getArgillicBounds()},
\code{getCambicBounds()}, and \code{mollicEpipedon()}:
}
\details{
\itemize{
  \item \code{id} from \code{pedon$site$id}
  \item \code{top} / \code{bottom} from \code{top_cm} / \code{bottom_cm}
  \item \code{name} (designation) from \code{designation}
  \item \code{texcl} (texture class) derived via
        \code{\link{texture_class_from_pct}}
  \item \code{clay}, \code{silt}, \code{sand} from
        \code{clay_pct} / \code{silt_pct} / \code{sand_pct}
  \item \code{m_hue}, \code{m_value}, \code{m_chroma},
        \code{d_value}, \code{d_chroma} from
        \code{munsell_*_moist} and \code{munsell_*_dry}
}

Internal use; the soilKey diagnostics call this on the fly when
\code{engine = "aqp"}. Direct use is supported for users who want
to plug additional aqp algorithms (\code{slab}, \code{slice},
\code{glom}) into a soilKey workflow.
}
