Format-agnostic tile abstraction supporting NPY, GeoTIFF, and Zarr storage.
Public fields
lon
Tile center longitude
lat
Tile center latitude
year
Data year
format
Storage format ("npy", "geotiff", or "zarr")
path
Path to the data file
scales_path
Path to scales file (for NPY format)
landmask_path
Path to landmask file
Methods
Create a new Tile object
Usage
Tile$new(
lon,
lat,
year,
format = "npy",
path = NULL,
scales_path = NULL,
landmask_path = NULL
)
Arguments
lon
Tile center longitude
lat
Tile center latitude
year
Data year
format
Storage format
path
Path to data file
scales_path
Path to scales file (for NPY)
landmask_path
Path to landmask file
Returns
A new Tile object
Method get_grid_name()
Get the grid name for this tile
Returns
Character string grid name
Method get_bounds()
Get the bounding box for this tile
Returns
Named list with xmin, ymin, xmax, ymax
Method get_bbox()
Get the bounding box as an sf bbox object
Method get_crs()
Get the CRS (Coordinate Reference System)
Returns
sf crs object (WGS84 for geographic, UTM for GeoTIFF)
Get the affine transform
Returns
Named list with resolution and origin info
Method get_dimensions()
Get tile dimensions
Returns
Named list with height, width, channels
Method is_available()
Check if data files are available
Usage
Tile$is_available(require_landmask = FALSE)
Arguments
require_landmask
Also require landmask to be available
Method load_embedding()
Load the embedding data
Returns
3D array with dimensions (height, width, channels)
Method contains_point()
Check if a point is within this tile
Usage
Tile$contains_point(lon, lat)
Arguments
lon
Longitude
lat
Latitude
Method sample_at_point()
Sample embedding at a specific point
Usage
Tile$sample_at_point(lon, lat)
Arguments
lon
Longitude
lat
Latitude
Returns
Numeric vector of embedding values (128 channels)
Method to_list()
Convert tile info to a list
Method clone()
The objects of this class are cloneable with this method.
Arguments
deep
Whether to make a deep clone.