You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add include_rat option and streaming SpatRaster disk writing; add stream_grid_raster & parquet helpers, update docs/tests and include HDF in format validation
Copy file name to clipboardExpand all lines: R/inspire_grid_params.R
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,25 @@
55
55
#' For \code{output_type = "spatraster"} writing, these are passed to \code{\link[terra]{writeRaster}}.
56
56
#' For streaming backends (`mirai` or sequential), this can include \code{max_cells_per_chunk} to control memory usage.
57
57
#' @param max_memory_gb A numeric value. Maximum memory in gigabytes to use for grid creation. Default is `NULL`, in which case there is an automatic limit based on **available free system memory** (not total system RAM).
58
+
#' @param include_rat Logical. If `TRUE`, generate a Raster Attribute Table (RAT)
59
+
#' mapping numeric cell IDs to INSPIRE grid ID strings. Default is `FALSE`.
60
+
#'
61
+
#' **What is a RAT?** A Raster Attribute Table stores metadata (like INSPIRE IDs)
62
+
#' for each unique raster value. Without RAT, raster cells contain only numeric
63
+
#' IDs (1, 2, 3...). With RAT, software like QGIS/R can display the IDs as
64
+
#' human-readable labels.
65
+
#'
66
+
#' **Format-specific behavior:**
67
+
#' \itemize{
68
+
#' \item **GeoTIFF (.tif):** RAT stored in `.tif.aux.xml` sidecar file (XML).
69
+
#' **Warning:** This sidecar can be **larger than the TIFF itself** for large
70
+
#' grids. For chunked/streaming writes, requires a second pass (slower).
71
+
#' Consider NetCDF or KEA formats for large grids with labels.
72
+
#' \item **NetCDF (.nc), KEA (.kea):** RAT embedded natively. **Recommended**
73
+
#' for large grids requiring labels.
74
+
#' \item **HDF5 (.hdf):** RAT **not supported**. An error is raised if
0 commit comments