Dataset class
Dataset class
Details
Definition for the Dataset class.
Note that this method has no effect if the dataset does not have file path on disk.
Public fields
idcharacteridentifier.spatial_pathcharacterfile path.attribute_pathcharacterfile path.boundary_pathcharacterfile path.spatial_dataNULL,sf::st_sf(), orterra::rast()object.attribute_dataNULL, ortibble::tibble()object.boundary_dataNULL, orMatrix::sparseMatrix()orNAobject.
Methods
Method new()
Create a Dataset object.
Usage
Dataset$new(
id,
spatial_path,
attribute_path,
boundary_path,
spatial_data,
attribute_data,
boundary_data
)Arguments
idcharactervalue.spatial_pathcharacterfile path.attribute_pathcharacterfile path.boundary_pathcharacterfile path.spatial_datasf::st_sf(), orterra::rast()object.attribute_datatibble::tibble()object.boundary_dataMatrix::sparseMatrix()object or NA.
Method write()
Write the data to disk.
Method get_bbox()
Get the bounding box.
Method get_index()
Get a data from the dataset at an index.
Returns
sf::st_as_sf() or terra::rast() object.
Method update_bm()
Updates old boundary matrix to new format.
Returns
Matrix::sparseMatrix() object.