gpkg_write {gpkg}R Documentation

Write data to a GeoPackage

Description

Write data to a GeoPackage

Usage

gpkg_write(
  x,
  destfile,
  table_name = NULL,
  datatype = "FLT4S",
  append = FALSE,
  overwrite = FALSE,
  NoData = NULL,
  gdal_options = NULL,
  ...
)

Arguments

x

Vector of source file path(s), or a list containing one or more SpatRaster, SpatRasterCollection, or SpatVectorProxy objects.

destfile

Character. Path to output GeoPackage

table_name

Character. Default NULL name is derived from source file. Required if x is a data.frame.

datatype

Data type. Defaults to "FLT4S" for GeoTIFF files, "INT2U" otherwise. See documentation for terra::writeRaster().

append

Append to existing data source? Default: FALSE. Setting append=TRUE overrides overwrite=TRUE

overwrite

Overwrite existing data source? Default FALSE.

NoData

Value to use as GDAL NoData Value

gdal_options

Additional gdal_options, passed to terra::writeRaster()

...

Additional arguments are passed as GeoPackage "creation options." See Details.

Details

Additional, non-default GeoPackage creation options can be specified as arguments to this function. The full list of creation options can be viewed here or in the gpkg_creation_options dataset. The name of the argument is creation_option and the value is selected from one of the elements of values for that option.

Value

Logical. TRUE on successful write of at least one grid.

See Also

gpkg_creation_options


[Package gpkg version 0.0.8 Index]