ImportGEE: R6 Class for importing Google Earth Engine data to an OFPE...

ImportGEER Documentation

R6 Class for importing Google Earth Engine data to an OFPE database

Description

R6 class for for importing data collected from Google Earth Engine into an OFPE formatted database.

Public fields

dbCon

Database connection object connected to an OFPE formatted database, see DBCon class.

dat_path

Path to the Google Drive folder that contains the data for upload into the OFPE database.

file_names

Names of the files in the Google Drive folder.

overwrite

Logical, whether to overwrite the GEE data in the database.

farmers

The 'farmers' table from the 'all_farms' schema of an OFPE formatted database.

farms

The 'farms' table from the 'all_farms' schema of an OFPE formatted database.

Methods

Public methods


Method new()

Create a database importer object.

Usage
ImportGEE$new(dbCon, dat_path, overwrite)
Arguments
dbCon

Database connection object connected to an OFPE formatted database, see DBCon class.

dat_path

Path to the Google Drive folder that contains the data for upload into the OFPE database.

overwrite

Logical, whether to overwrite the GEE data in the database.

Returns

A new 'ImportGEE' object.


Method executeUpload()

Google Earth Engine data import execution.

Usage
ImportGEE$executeUpload()
Arguments
None

No arguments needed because of class instantiation.

Returns

See 'GEE' table in database.


Method .uploadGEE()

Uploads data to an OFPE formatted database from a Google Drive folder. The dot indicates that this function would be private if not for documentations sake.

Usage
ImportGEE$.uploadGEE(FILE, overwrite, db)
Arguments
FILE

Name of the data file to upload to the database.

overwrite

Logical, whether to overwrite when data already present.

db

Connection to an OFPE formatted database.

Returns

See 'GEE' table in database.


Method .getInfo()

Function for identifying information from the filenames exported from Google Drive

Usage
ImportGEE$.getInfo(name)
Arguments
name

Name of the data file to upload to the database.

Returns

Raster information.


Method .addColsToDB()

Adds columns to the data file importing to the database.

Usage
ImportGEE$.addColsToDB(info, name, db)
Arguments
info

Object holding all necessary information about the data.

name

The name of the column to add.

db

The connection to the OFPE database.

Returns

Columns added to database table.


Method clone()

The objects of this class are cloneable with this method.

Usage
ImportGEE$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

DBCon for the database connection class, and ImportOF for the associated on-farm data import class in the data import step.


paulhegedus/OFPE documentation built on Nov. 23, 2022, 5:09 a.m.