Skip to contents

Construct a layer-level gdal_creation_opts() object for the FlatGeobuf driver. Only options you supply are emitted; values are validated against the driver's registered metadata.

Usage

fgb_creation_opts(
  spatial_index = NULL,
  temporary_dir = NULL,
  title = NULL,
  description = NULL,
  ...,
  .set_defaults = FALSE
)

Arguments

spatial_index

Value for SPATIAL_INDEX. Logical TRUE/FALSE (coerced to "YES"/"NO") controlling whether a packed Hilbert R-tree spatial index is written. GDAL default "YES".

temporary_dir

Value for TEMPORARY_DIR (path to an existing directory for temporary files; only used when SPATIAL_INDEX = TRUE. "/vsimem/" may be used for in-memory temporaries).

title

Value for TITLE (GDAL >= 3.9); dataset title (should be relatively short).

description

Value for DESCRIPTION (GDAL >= 3.9); dataset description (free-form long text).

...

Additional NAME = value options passed through verbatim alongside the typed arguments. They are coerced and validated against the driver metadata in the same way, and take precedence over a typed argument that sets the same option.

.set_defaults

Logical. If TRUE, options left unset (NULL) are filled with the driver's documented GDAL metadata defaults (via the relevant gdal_vector_driver_*_opts_defaults()); user-supplied values always take precedence. Defaults to FALSE.

Value

A layer-level gdal_creation_opts() object for the FlatGeobuf driver.

Examples

fgb_creation_opts(spatial_index = TRUE, title = "Parcels")
#> <gdal_creation_opts/gdal_opts>
#>  Driver: FlatGeobuf
#>  Creation Options: SPATIAL_INDEX=YES, TITLE=Parcels
#>  Command Line: --output-format 'FlatGeobuf' --layer-creation-option 'SPATIAL_INDEX=YES' --layer-creation-option 'TITLE=Parcels'