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
Copy file name to clipboardExpand all lines: R/inspire_grid.R
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@
54
54
#' This automatic limiting can be overridden by setting `options(gridmaker.tile_multiplier)`.
55
55
#' **Note:** Parallel processing is not supported when `output_type = "spatraster"`.
56
56
#' Raster output will always run sequentially.
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 of available system memory. The available memory detection may fail on certain HPC (High Performance Computing) systems where jobs are allocated a fixed amount of memory that is less than the total system memory of the allocated node.
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). Using this argument allows manual override, which is recommended on certain HPC (High Performance Computing) systems where jobs are allocated a fixed amount of memory that is less than the total free memory of the allocated node.
58
58
#' @inheritParams inspire_grid_params
59
59
#'
60
60
#' @return If \code{dsn} is \code{NULL} (the default), an \code{sf} object, \code{data.frame},
#' Other formats not listed have not been tested and will generate a warning.
33
48
#' @param layer The name of the grid layer, passed directly to `sf::st_write`.
34
49
#' Its interpretation depends on the destination driver. For a GeoPackage
35
50
#' file, this will be the layer name. If \code{dsn} is a file path and `layer` is
@@ -39,6 +54,7 @@
39
54
#' When writing to spatial files via \code{dsn}, these are passed to \code{\link[sf]{st_write}}.
40
55
#' For \code{output_type = "spatraster"} writing, these are passed to \code{\link[terra]{writeRaster}}.
41
56
#' For streaming backends (`mirai` or sequential), this can include \code{max_cells_per_chunk} to control memory usage.
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).
# 3. Check for readr availability if text output is requested
402
+
# 3. Validate vector format supports append (required for chunked disk writes)
403
+
if (is_spatial_vector&&!is_text) {
404
+
if (ext%in%no_append_formats) {
405
+
# Explicitly unsupported formats
406
+
stop(
407
+
sprintf(
408
+
"Output type '%s' cannot be written to '.%s' format.\n The '.%s' format does not support appending to existing files.\n Supported vector formats: %s\n Or generate the grid in memory (dsn = NULL) and save manually.",
# Unknown/untested formats - provide a warning but more permissive
418
+
warning(
419
+
sprintf(
420
+
"Output type '%s' with '.%s' format has not been tested for append support.\n Tested formats: %s\n The operation may fail if this format does not support appending.",
0 commit comments