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
- id
- characteridentifier.
- spatial_path
- characterfile path.
- attribute_path
- characterfile path.
- boundary_path
- characterfile path.
- spatial_data
- NULL,- sf::st_sf(), or- terra::rast()object.
- attribute_data
- NULL, or- tibble::tibble()object.
- boundary_data
- NULL, or- Matrix::sparseMatrix()or- NAobject.
Methods
Method new()
Create a Dataset object.
Usage
Dataset$new(
  id,
  spatial_path,
  attribute_path,
  boundary_path,
  spatial_data,
  attribute_data,
  boundary_data
)Arguments
- id
- charactervalue.
- spatial_path
- characterfile path.
- attribute_path
- characterfile path.
- boundary_path
- characterfile path.
- spatial_data
- sf::st_sf(), or- terra::rast()object.
- attribute_data
- tibble::tibble()object.
- boundary_data
- Matrix::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.