sen2r (version 1.2.1)

gdal_formats_db: Create the database of GDAL supported formats

Description

The internal function checks if gdal_formats.json (the database of spectral indices) already exists; if not, it downloads source files and creates it. Since on Windows there is an issue in reading the extension of a GDAL driver with reticulate functions when the package sen2r was already charged, this function can be used only from from Linux. It is not necessary, since a gdal_formats.json file is present in the package, but can be used to update the list in accordance with the formats actually managed by your GDAL installation.

Usage

gdal_formats_db(gdalDrivers, json_path = NA, force = FALSE)

Arguments

gdalDrivers

Function gdalDrivers() from package rgdal, which must be passed manually (this is a workaround to avoid importing rgdal as dependency).

json_path

(optional) The path of the output JSON file. Warning: to create a file which will be usable by the package, this option must be left to NA (default location is within the package installation). Edit this only to create the file in another place for external use.

force

(optional) Logical: if FALSE (default), the db is created only if missing or not updated; if TRUE, it is created in any case..

Value

NULL (the function is called for its side effects)