reVeal.grid.BaseGrid#
- class BaseGrid(res=None, bounds=None, crs=None, template=None)[source]#
Bases:
objectGrid base class
Initialize a Grid instance from a template or input parameters.
- Parameters:
res (float) – Resolution of the grid (i.e., size of each grid cell along one dimension) measured in units of the specified CRS. Required if template=None. Ignored if template is provided. Default is None.
crs (str) – Coordinate reference system (CRS) for the grid. Required if template=None. If template is provided, the grid will be reprojected to this CRS. Default is None.
bounds (tuple, optional) – The spatial bounds for the grid in the format [xmin, ymin, xmax, ymax], in units of crs (or the template CRS). Required if template=None. If template is provided, the grid will be subset to the cells intersecting the specified bounds. Default is None.
template (str, optional) – Path to a template file for the grid. Input template should be a vector polygon dataset. Default is None.
Methods