These functions connect to a database that houses a datacube.

database_connect(..., object = F)

database_get_active()

Arguments

...

optional arguments to index or configure a connection.

object

logical, whether the connection should be returned or not.

Value

None or the connection of class 'datacube.api.core.Datacube', if object = T

Examples

if (FALSE) { library(odcr) # connect to a database, store the Daatcube connection internally (default and recommended) database_connect(app = "Sentinel_2") # retrieve the current connection as an object dc <- database_get_active() # or return a Datacube object dc <- database_connect(app = "Sentinel_2", object = TRUE) }