salem.GeoDataset

class salem.GeoDataset(grid, time=None)[source]

Interface for georeferenced datasets.

A GeoDataset is a formalism for gridded data arrays, which are usually stored in geotiffs or netcdf files. It provides an interface to realise subsets, compute regions of interest and more.

A GeoDataset makes more sense if it is subclassed for real files, such as GeoTiff or GeoNetCDF. In that case, the implemetations must make use of the subset indexes provided in the sub_x, sub_y and sub_t properties.

__init__(grid, time=None)[source]

Set-up the georeferencing, time is optional. Parameters: grid: a salem.Grid object which represents the underlying data time: if the data has a time dimension

Methods

__init__(grid[, time])

Set-up the georeferencing, time is optional.

get_vardata([var_id])

Interface to implement by subclasses, taking sub_x, sub_y and sub_t into account.

set_period([t0, t1])

Set a period of interest for the dataset.

set_roi([shape, geometry, crs, grid, ...])

Set a region of interest for the dataset.

set_subset([corners, crs, toroi, margin])

Set a subset for the dataset.

Attributes

roi

Mask of the ROI (same size as subset).

time

Time array