reV.supply_curve.aggregation.BaseAggregation

class BaseAggregation(excl_fpath, tm_dset, excl_dict=None, area_filter_kernel='queen', min_area=None, resolution=64, excl_area=None, res_fpath=None, gids=None, pre_extract_inclusions=False)[source]

Bases: ABC

Abstract supply curve points aggregation framework based on only an exclusion file and techmap.

Parameters:
  • excl_fpath (str | list | tuple) – Filepath to exclusions h5 with techmap dataset (can be one or more filepaths).

  • tm_dset (str) – Dataset name in the techmap file containing the exclusions-to-resource mapping data.

  • excl_dict (dict | None) – Dictionary of exclusion keyword arugments of the format {layer_dset_name: {kwarg: value}} where layer_dset_name is a dataset in the exclusion h5 file and kwarg is a keyword argument to the reV.supply_curve.exclusions.LayerMask class. by default None

  • area_filter_kernel (str, optional) – Contiguous area filter method to use on final exclusions mask, by default “queen”

  • min_area (float, optional) – Minimum required contiguous area filter in sq-km, by default None

  • resolution (int, optional) – SC resolution, must be input in combination with gid. Prefered option is to use the row/col slices to define the SC point instead, by default None

  • excl_area (float, optional) – Area of an exclusion pixel in km2. None will try to infer the area from the profile transform attribute in excl_fpath, by default None

  • gids (list, optional) – List of supply curve point gids to get summary for (can use to subset if running in parallel), or None for all gids in the SC extent, by default None

  • pre_extract_inclusions (bool, optional) – Optional flag to pre-extract/compute the inclusion mask from the provided excl_dict, by default False. Typically faster to compute the inclusion mask on the fly with parallel workers.

Methods

Attributes

gids

1D array of supply curve point gids to aggregate

shape

Get the shape of the full exclusions raster.

property gids

1D array of supply curve point gids to aggregate

Returns:

ndarray

property shape

Get the shape of the full exclusions raster.

Returns:

tuple