diff --git a/NEWS.md b/NEWS.md index 60b05272..bdf49d1a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,7 +9,8 @@ and in concatenation of reason string when `wide_reason=TRUE` - Now works properly on STATSGO data sets for individual states or CONUS. Previously tabular data would be transferred but spatial data were not. - `downloadSSURGO()` gains `db` 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 return `mukey` in first column position; for parity with other `get_SDA*` methods recently updated/already doing this, making it easier to use these columns for raster attribute tables via `terra::set.levels()` - + - SoilProfileCollection objects now include a time stamp in their metadata, accessed as: `metadata(x)$created` (#235) + # soilDB 2.7.10 (2023-11-16) - `fetchSDA_spatial()` gains `geom.src="mlrapolygon"` for obtaining Major Land Resource Area (MLRA) polygon boundaries. When using this geometry source `x` is a vector of `MLRARSYM` (MLRA Symbols). diff --git a/R/fetchKSSL.R b/R/fetchKSSL.R index f8f8f13e..01859253 100644 --- a/R/fetchKSSL.R +++ b/R/fetchKSSL.R @@ -407,6 +407,7 @@ fetchKSSL <- function(series=NA, bbox=NA, mlra=NA, pedlabsampnum=NA, pedon_id=NA ## set metadata # TODO: check before clobbering / consider standard var name metadata(h)$origin <- 'KSSL via Soilweb / fetchKSSL' + metadata(h)$created <- Sys.time() # cleaning up the results diff --git a/R/fetchNASIS_components.R b/R/fetchNASIS_components.R index fca205da..69a4d894 100644 --- a/R/fetchNASIS_components.R +++ b/R/fetchNASIS_components.R @@ -172,6 +172,7 @@ # set metadata m <- metadata(f.chorizon) m$origin <- 'NASIS components' + m$created <- Sys.time() metadata(f.chorizon) <- m # set optional hz designation and texture slots diff --git a/R/fetchNASIS_pedons.R b/R/fetchNASIS_pedons.R index 9262ce4d..70fa3081 100644 --- a/R/fetchNASIS_pedons.R +++ b/R/fetchNASIS_pedons.R @@ -245,6 +245,7 @@ # set metadata m <- metadata(hz_data) m$origin <- 'NASIS pedons' + m$created <- Sys.time() metadata(hz_data) <- m # print any messages on possible data quality problems: diff --git a/R/fetchNASIS_report.R b/R/fetchNASIS_report.R index 6417c304..2fd659bb 100644 --- a/R/fetchNASIS_report.R +++ b/R/fetchNASIS_report.R @@ -132,6 +132,7 @@ # set metadata m <- metadata(h) m$origin <- "NASIS pedons (export)" + m$created <- Sys.time() metadata(h) <- m # set NASIS-specific horizon identifier diff --git a/R/fetchOSD.R b/R/fetchOSD.R index 974de359..5f10ff33 100644 --- a/R/fetchOSD.R +++ b/R/fetchOSD.R @@ -291,7 +291,8 @@ fetchOSD <- function(soils, colorState = 'moist', extended = FALSE) { ## safely set metadata # TODO: check before clobbering / consider standard var name metadata(h)$origin <- 'OSD via Soilweb / fetchOSD' - + metadata(h)$created <- Sys.time() + # set optional hz designation and texture slots hzdesgnname(h) <- "hzname" hztexclname(h) <- "texture_class"