Releases: ncss-tech/soilDB
soilDB 2.8.5
soilDB 2.8.5 (2024-11-04)
fetchLDM()
add support forarea_type
argument with local database connections (dsn
argument)fetchSCAN()
updates:- Added new help file on NASIS database sources; see
?NASISLocalDatabase
(#360) get_SDA_*()
function updates related to consistent parameters for miscellaneous areas and minor components (#361)fetchSOLUS()
: New function for downloading data from Soil Landscapes of the United States 100-meter (SOLUS100) soil property maps project repository (#362)fetchNASIS()
more consistent QC messages and output for multiple site observations and lab samples- Updated SoilProfileCollection data sets (
loafercreek
,gopheridge
,mineralKing
) for aqp 2.1.x object definition and recent changes tofetchNASIS()
(#363)
What's Changed
- fetchSCAN: return all above-ground sensors by @brownag in #359
- Scan metadata updates by @dylanbeaudette in #357
- Add helpfile on NASIS Local Database sources by @brownag in #360
get_SDA_*()
function updates by @brownag in #361- Update SoilProfileCollection datasets for aqp 2.1.x by @brownag in #363
- Add
fetchSOLUS()
by @brownag in #362
Full Changelog: 2.8.4...2.8.5
soilDB 2.8.4
soilDB 2.8.4 (2024-08-19)
createSSURGO()
bug fixes following changes in 2.8.3- generating
gpkg_contents
for GeoPackage files failed to add entries for "features" data_type filename
argument not properly handled in some cases
- generating
SDA_query()
handle another possible failure point in error handling codecreateStaticNASIS()
useodbc::dbListFields()
instead ofodbc::odbcConnectionColumns()
- fetchNASIS Vignette
Full Changelog: 2.8.3...2.8.4
soilDB 2.8.3
soilDB 2.8.3 (2024-06-11)
- Updates to SoilWeb web coverage services
- ISSR800 authoritative grid system altered slightly
ISSR800.wcs()
andsoilColor.wcs()
now set color table internally when possible- updated source data: ISSR800 (FY24) and soil color (FY23)
SDA_query()
updates- Better messaging on error
- Handle try-error result more gracefully in high-level functions (#352)
createSSURGO()
: added support for creating DuckDB, PostgreSQL, and other DBI-compatible databases (#352) viaconn
argumentfetchSDA()
andget_chorizon_from_SDA()
concatenate multipletexcl
using a comma when a texture group contains multiple texture classes (e.g. stratified textures) (fixes #353)fetchNASIS()
/.formatLandformString()
: appendgeomfmod
column to landscape, landform, and microfeature strings where present; thanks to Gabriel Benitez for suggestionfetchNASIS()
/get_extended_data_from_NASIS_db()
: fix conversion of codes to labels for microrelieffetchSCAN()
: fix header format; thanks to @dschlaep for reporting and providing a fix
What's Changed
- SDA_query: handle API failures with more grace by @brownag in #351
- createSSURGO: add support for creating DuckDB and other DBI-compatible databases by @brownag in #352
- get_chorizon_from_SDA: concatenate many:1 texcl, lieutex within RV chtexturegrp by @brownag in #353
Full Changelog: 2.8.2...2.8.3
soilDB 2.8.2
soilDB 2.8.2 (2024-04-22)
- SoilWeb Web Coverage Service MUKEY grid data source (used for
mukey.wcs()
) and metadata have been updated for FY2024- Note that ISSR800 WCS (
ISSR800.wcs()
source) is still using FY2023/FY2022 data
- Note that ISSR800 WCS (
get_SDA_coecoclass()
default data returned for methods "Dominant Component", "Dominant Condition" and "None" now includelocalphase
columnget_soilseries_from_NASIS()
andget_competing_soilseries_from_NASIS()
: addSS
argument for parity with all other NASIS "get" methods- default to
FALSE
for backward compatibility/common use cases
- default to
get_site_data_from_NASIS_db()
gains Frost Free Days, MAP, REAP, MAAT, MAST, MSAT, MSST, MWAT, MWST, and Parent Material Group Name; thanks to Zach Van Abbema for suggestion- Changes in column names related to Area table /
"areasymbol"
(#272); thanks to Zach Van Abbema for suggestionget_site_data_from_NASIS_db()
: Add state, county, and MLRA areasymbol references ("site_state"
,"site_county"
,"site_mlra"
)get_mapunit_from_NASIS_db()
: Add dominant MLRA areasymbol reference column"lmapunit_mlra"
get_soilseries_from_NASIS()
: replaceareasymbol
column to use relationship-style name"soilseries_typelocst"
(minor breaking change)
fetchSDA_spatial()
: Add support for querying mapunit point ("mupoint"
), mapunit line ("muline"
), special feature point ("featpoint"
), special feature line ("featline"
) bymukey
orfeatkey
, geometry type selectable viageom.src
argumentSDA_spatialQuery()
: Add support for querying mapunit point ("mupoint"
), mapunit line ("muline"
), special feature point ("featpoint"
), special feature line ("featline"
) for a spatial extent, geometry type selectable viawhat
argumentsimplifyFragmentData()
/simplifyArtifactData()
efficiency improvement when all records are missing data
What's Changed
- Update and refactor
SDA_spatialQuery()
by @brownag in #344 - fetchSDA_spatial: Implement
geom.src
"mupoint"
,"muline"
,"featpoint"
and"featline"
support by @brownag in #345 - SDA_spatialQuery: implement
what
'mupoint'
,'muline'
,'featpoint'
,'featline'
by @brownag in #346
Full Changelog: 2.8.1...2.8.2
soilDB 2.8.1
soilDB 2.8.1 (2024-01-09)
get_mapunit_from_NASIS()
,get_lmuaoverlap_from_NASIS()
andget_legend_from_NASIS()
gainareatypename
argument used for filtering legends byareatypename
.- Default results include
"Non-MLRA Soil Survey Area"
and"MLRA Soil Survey Area"
. Set toNULL
for no filter.
- Default results include
- Fixed bugs in
waterDayYear()
andsummarizeSoilTemperature()
for leap years (#333) fetchSoilGrids()
upgrades- Fixed a bug with
data.frame
output - Requests for more than 5 sites now include a call to
Sys.sleep()
to conform with ISRIC "Fair Use" policy - Upgraded SoilProfileCollection spatial promotion for aqp 2.0+
- Added 10 kPa, 33 kPa and 1500 kPa water content estimates to default variable sets for point and grid queries
- Fixed a bug with
fetchSDA_spatial()
gains ability to query mapunit delineations by Ecological Site ID (by.col="ecoclassid"
)get_SDA_coecoclass()
defaultecoclasstypename
is nowc("NRCS Rangeland Site", "NRCS Forestland Site")
, as this is the most common type of aggregation and is least prone to producing unusual composition-related errors due to duplications- Fixed bug related to merging tables/integer data type
- Fixed bug in calculation of "Not assigned" fraction of mapunits which could result in negative aggregate component percentages below the default threshold
What's Changed
Full Changelog: 2.8.0...2.8.1
soilDB 2.8.0
soilDB 2.8.0 (2023-12-22)
- Minimum {aqp} version set to v2.0.2. This is due to changes in the namespace related to
aqp::col2Munsell()
, to "encourage" users to update to the more efficient routines provided in {aqp} 2+ (if they haven't already), and prepare for future updates in the 2.x series. - Fix bugs in
get_SDA_interpretation()
whendsn
refers to a local SQLite source and in concatenation of reason string whenwide_reason=TRUE
. Thanks to Kevin Wolz (@kevinwolz) createSSURGO()
updates:- Breaking change: Now uses the standard SSURGO layer names for spatial data (e.g.
"mupolygon"
rather than"soilmu_a"
). - Creates indices for foreign keys and other columns important for data analysis, dramatically improving the performance of standard queries on SQLite sources.
- Now works properly on STATSGO data sets for individual states or CONUS. Previously tabular data would be transferred but spatial data were not.
- Breaking change: Now uses the standard SSURGO layer names for spatial data (e.g.
downloadSSURGO()
gainsdb
argument which gives ability to download STATSGO by state or all of US from Web Soil Survey. Thanks to Meghan Krueger for suggestion.get_SDA_property()
: weighted average/dominant component numeric methods now returnmukey
in first column position; for parity with otherget_SDA*
methods recently updated/already doing this, making it easier to use these columns for raster attribute tables viaterra::set.levels()
fetchNASIS(lab=TRUE)
fixed a bug when multiplephlabresults
records are present for a single horizon, but one or both is missing bottom depth. Thanks to Meyer Bohn (@MollicMeyer) for reporting.- SoilProfileCollection objects now include a time stamp in their metadata, accessed as:
metadata(x)$created
(#235) - Added
area_type
argument tofetchLDM()
for non-SSA area queries (#328) - Added
grid
argument tofetchSoilGrids()
for downloading Cloud-Optimized GeoTIFF subsets for spatial extent (#329) fetchOSD()
now automatically batches requests into sets of 100 series, allowing arbitrarily large requests to be made (#239)
What's Changed
- Testing new aqp::col2Munsell() replacing aqp::rgb2munsell() by @dylanbeaudette in #325
- soilDB v2.8.0 by @brownag in #327
- fetchLDM: add
area_type
argument for non-SSA area queries by @brownag in #328 - fetchSoilGrids: add
grid
argument for downloading COG subsets for extent by @brownag in #329
Full Changelog: 2.7.10...2.8.0
soilDB 2.7.10
soilDB 2.7.10 (2023-11-16)
-
fetchSDA_spatial()
gainsgeom.src="mlrapolygon"
for obtaining Major Land Resource Area (MLRA) polygon boundaries. When using this geometry sourcex
is a vector ofMLRARSYM
(MLRA Symbols).- The geometry source is the MLRA Geographic Database v5.2 (2022) which is not (yet) part of Soil Data Access. Instead of SDA, GDAL utilities are used to read a zipped ESRI Shapefile from a remote URL: https://www.nrcs.usda.gov/sites/default/files/2022-10/MLRA_52_2022.zip. Therefore, most additional
fetchSDA_spatial()
arguments are not currently supported for the MLRA geometry source. In the future amlrapolygon
table may be added to SDA (analogous tomupolygon
andsapolygon
), and the function will be updated accordingly at that time.
- The geometry source is the MLRA Geographic Database v5.2 (2022) which is not (yet) part of Soil Data Access. Instead of SDA, GDAL utilities are used to read a zipped ESRI Shapefile from a remote URL: https://www.nrcs.usda.gov/sites/default/files/2022-10/MLRA_52_2022.zip. Therefore, most additional
-
Web coverage services and related raster attribute tables provided by SoilWeb (
mukey.wcs()
etc.) are now using the SoilWeb load-balancer URL -
get_SDA_coecoclass()
gainsmethod="all"
for aggregating information about ecological sites and related components. The method performs a condition-based aggregation for each ecological site condition in the map unit, producing a "wide" data.frame result with as many columns as needed to portray all site conditions. -
fetchLDM()
gains new argumentWHERE
for supplying a custom SQL where clause for selecting sites of interest. For example:fetchLDM(WHERE = "CASE WHEN corr_name IS NOT NULL THEN LOWER(corr_name) ELSE LOWER(samp_name) END = 'musick'")
soilDB 2.7.9 (2023-09-01)
- Added new
method
options forfetchSDA_spatial()
. Aggregation grouping is controlled by theby.col
argument. This works for mapunit and survey area polygon geometries, aggregating all polygons in the group for eachmukey
,nationalmusym
,lkey
, orareasymbol
extent. method="extent"
method calculates a bounding rectanglemethod="convexhull"
calculates the convex hullmethod="union"
returns a MULTIPOLYGONmethod="collection"
returns a GEOMETRYCOLLECTION
Bug Fixes
-
Bug fix for
get_vegplot_transpoints_from_NASIS_db()
; using wrong record ID for transect points -
get_NASIS_table_name_by_purpose()
now includes"pointplantcoverdetails"
,"plantprodquadratdetails"
in the"vegetation"
table purpose group
What's Changed
- fetchSDA_spatial: add new T-SQL aggregate geometry methods by @brownag in #299
- fetchSDA_spatial: add
geom.src='mlrapolygon'
by @brownag in #302 get_SDA_interpretation()
: add subrule ratings to "reason" field by @brownag in #308mukey.wcs()
: fix areas containing all NoData and resolution for AOI at edge of WCS extent by @brownag in #306- get_SDA_coecoclass: add
method="all"
by @brownag in #301 - alignment of WCS results with authoritative grid topology by @brownag in #313
Full Changelog: 2.7.8...2.7.10
soilDB 2.7.8
soilDB 2.7.8 (2023-08-29)
-
Added new SoilWeb "Web Coverage Service" vignette (https://ncss-tech.github.io/soilDB/articles/wcs-ssurgo.html) related to creating thematic maps using grids of mapunit keys from SoilWeb with aggregated tabular data from Soil Data Access.
-
get_SDA_*()
functions now all returnmukey
values in first column -
mukey.wcs()
gains a 30m gridded version of Hawaii and Puerto Rico SSURGO data viadb="HI_SSURGO"
anddb="PR_SSURGO"
, respectively. -
get_vegplot_data_from_NASIS_db()
: now uses LEFT join to plant table so that empty records can be diagnosed; thanks to @natearoe for suggestion -
Added new NASIS query functions for vegetation transect point and quadrat details:
get_vegplot_prodquadrats_from_NASIS_db()
andget_vegplot_transpoints_from_NASIS_db()
; thanks to Zach Van Abbema for suggestion
Bug Fixes
-
get_SDA_property(method="Dominant Component (Numeric)")
now includes minors by default, fixing issues with STATSGO mapunits that have no major components flagged. (@dylanbeaudette) -
get_component_data_from_NASIS_db()
: removed duplicatedhydricrating
column, also now includes climate columns with standard names. This is a continuation of the idea that custom aliases for standard NASIS columns are deprecated (#242) -
.pickBestEcosite()
now considersrecord_when_last_updated
in lieu of correlation date; this stabilizes sort order from SQLite snapshot v.s. NASIS local database sources (#295) -
get_component_from_GDB()
: fixes for batching over component geomorphic description and parent material group @smroecker -
get_mapunit_from_SDA()
: handle possibility of mapunit-level SDA query failure
What's Changed
- Add vegetation transect point and quadrat details by @brownag in #285
- fetchVegdata: LEFT join to plant table by @brownag in #287
- Use LEFT join for component parent material and geomorph by @brownag in #289
- Testing fix for #292 by @brownag in #293
- Add draft WCS vignette by @brownag in #290
- .soilDB_curl_get_JSON: suppress messages properly by @brownag in #297
- Fix some SDA-related errors by @brownag in #298
- Remove {scales} from Suggests by @brownag in #288
Full Changelog: 2.7.7...2.7.8
soilDB 2.7.7
soilDB 2.7.7 (2023-03-10)
Enhancements
-
fetchNASIS(from="pedons")
andget_site_data_from_NASIS_db()
now returnsiteobsiid
column (@natearoe) -
mukey.wcs()
gains experimental gridded STATSGO layer (300m) -
Add
get_NASIS_table_metadata()
for returning information about columns in NASIS tables. -
simplifyFragment/ArtifactData()
: downgrade warnings -
get_cosoilmoist_from_SDA()
:mukey
andcokey
now included whenduplicates=TRUE
; thanks to @andypaolucci for catching this -
fetchSoilGrids()
-
Add
SpatVector
coercion for input locations (already supported sf/sp classes) -
Add handling for messages from API about erroneous input
-
-
Add
fetchNASIS("pedons")
columns vignette -
Add
get_NASIS_table_metadata()
and optional argumentinclude_description
forget_NASIS_metadata()
andget_NASIS_column_metadata()
-
get_SDA_cosurfmorph()
+get_SDA_pmgroupname()
: support for including or excluding misc. areas viamiscellaneous_areas
argument -
get_site_data_from_NASIS_db()
:-
Omit "multiple horizontal datums" warning
-
Remove calculated X/Y long/lat + add proper NASIS alias for long/lat
-
Add
siteothvegclass
id/name - add tables to default lookup/site sets
-
Bug fixes
-
dbQueryNASIS(..., close=TRUE)
now callsdbDisconnect()
on.exit()
(ensuring connections get closed on error) -
fetchSCAN()
:-
2x requests when
timeseries
argument not specified -
Account for no results (e.g. year = 1800)
-
Bug fix in vectorization when daily + hourly data requested
-
-
downloadSSURGO()
:-
Handle
SDA_query()
with invalid syntax inWHERE
clause -
Fix for
include_template=FALSE
-
-
createSSURGO()
- Attribute tables are now added to
gpkg_contents
when outputfilename
is a GeoPackage
- Attribute tables are now added to
-
Fix for
.get_comonth_from_SDA()
-
Fix selected set (
SS
argument) forget_ecosite_history_from_NASIS_db()
inget_site_data_from_NASIS_db()
-
get_SDA_pmgroupname
: returnNA
(not "NULL") for empty/missingpmgroupname
whensimplify=TRUE
-
SDA_spatialQuery()
:-
geomIntersection=TRUE
withdb="SAPOLYGON"
now correctly labels theareasymbol
column (previously wasmukey
) to matchgeomIntersection=FALSE
and SDA schema -
Bounding box extent polygons are now only calculated for
SpatRaster
(notSpatVector
) input
-
What's Changed
- get_site_data_from_NASIS_db: Add siteothvegclass id/name by @brownag in #280
- Improving support for
get_SDA*()
component filters by @brownag in #259 - Table and Column Metadata by @brownag in #278
- Add
get_ecosite_history_from_NASIS_db()
by @brownag in #281 - createSSURGO: add minimal gpkg_contents entries for attribute tables by @brownag in #283
Full Changelog: 2.7.6...2.7.7
soilDB 2.7.6
soilDB 2.7.6
-
All references to
soilDB.env
have been replaced with a function that returns that environment object (get_soilDB_env()
); thanks to @MollicMeyer for identifying this as a problem in #277. This object used to be exported but was unintentionally omitted from NAMESPACE; this has been fixed. -
fetchNASIS(lab=TRUE)
bug fix related to many:1 relationships between lab samples and morphologic horizons with all-missing columns having logical datatype (#277) -
Added
get_SRI()
andfetchSRI()
functions for accessing USFS Region 6 Soil Resource Inventory information from https://ecoshare.info/; thanks to @joshualerickson for the contribution (#274) -
fetchLDM()
now sets the horizon designation metadata like other fetch* functions that return SoilProfileCollection objects (@dylanbeaudette) -
mukey.wcs()
fix spurious warnings occasionally given due to minor differences (rounding) of grid dimensions -
{curl} has been moved from Suggests to Imports
-
simplfyFragmentData()
alias forsimplifyFragmentData()
removed (@infotroph)
What's Changed
- soil resource inventory functions by @joshualerickson in #274
- Fix apparent typo in simplifyFragmentData alias by @infotroph in #279
New Contributors
- @joshualerickson made their first contribution in #274
- @infotroph made their first contribution in #279
Full Changelog: 2.7.5...2.7.6