fetchNASIS {soilDB} | R Documentation |
Fetch commonly used site/pedon/horizon data from a PedonPC or local NASIS database, return as a SoilProfileCollection object.
fetchNASIS(rmHzErrors = TRUE, nullFragsAreZero=TRUE) fetchNASIS_component_data() getHzErrorsNASIS(strict=TRUE)
rmHzErrors |
should pedons with horizonation errors be removed from the results? (default: TRUE) |
nullFragsAreZero |
should fragment volumes of NULL be interpreted as 0? (default: TRUE), see details |
strict |
should horizonation by strictly enforced? (TRUE) |
The value of nullFragsAreZero
will have a significant impact on the rock fragment fractions returned by fetchNASIS
. Set nullFragsAreZero = FALSE
in those cases where there are many data-gaps and NULL rock fragment values should be interpretated as NULLs. Set nullFragsAreZero = TRUE
in those cases where NULL rock fragment values should be interpreted as 0.
This function attempts to do most of the boilerplate work when extracting site/pedon/horizon data from a local NASIS database. Pedons that are missing horizon data, or have errors in their horizonation are excluded from the returned object, however, their IDs are printed on the console. Pedons with combination horizons (e.g. B/C) are erroneously marked as errors due to the way in which they are stored in NASIS as two overlapping horizon records.
See getHzErrorsNASIS
for a simple approach to identifying pedons with problematic horizonation.
a SoilProfileCollection class object
This function currently works only on Windows, and requires a 'nasis_local' ODBC connection.
D. E. Beaudette and J. M. Skovlin
## Not run:
##D # query depends on some pedon data, queried against the national database
##D # note that you must setup this connection ahead of time
##D f <- fetchNASIS()
##D
##D # plot only those profiles with densic contact
##D plot(f[which(f$densic.contact), ], name='hzname')
##D
##D # get basic component data from local NASIS, after performing a
##D # DMU-* query against the national database
##D fc <- fetchNASIS_component_data()
## End(Not run)