reVX.least_cost_xmission.layers.dry_cost_creator.DryCostCreator

class DryCostCreator(io_handler: LayeredTransmissionH5, mask, output_tiff_dir='.', dtype: dtype[Any] | None | Type[Any] | _SupportsDType[dtype[Any]] | str | Tuple[Any, int] | Tuple[Any, SupportsIndex | Sequence[SupportsIndex]] | List[Any] | _DTypeDict | Tuple[Any, Any] = 'float32', cell_size=90)[source]

Bases: BaseLayerCreator

Class to create and save dry transmission cost layers

Parameters:
  • io_handler (LayeredTransmissionH5) – Transmission layer IO handler

  • mask (ndarray) – Array representing mask for layer values.

  • output_tiff_dir (path-like, optional) – Directory where cost layers should be saved as GeoTIFF. By default, ".".

  • dtype (np.dtype, optional) – Data type for final dataset. By default, float32.

  • cell_size (int, optional) – Side length of each cell, in meters. Cells are assumed to be square. By default, CELL_SIZE.

Methods

build(iso_region_tiff, nlcd_tiff, slope_tiff)

Build cost rasters using base line costs and multipliers.

Attributes

shape

Layer shape.

build(iso_region_tiff: str, nlcd_tiff: str, slope_tiff: str, cost_configs: str | Dict | None = None, default_mults: IsoMultipliers | None = None, extra_tiffs: List[str] | None = None)[source]

Build cost rasters using base line costs and multipliers. Save to GeoTIFF.

Parameters:
  • iso_region_tiff (str) – Path to the ISO region GeoTIFF

  • nlcd_tiff (str) – Path to the National Land Coverage Database GeoTIFF

  • slope_tiff (str) – Path to the slope GeoTIFF. Slope is in decimal percent.

  • cost_configs (dict | str, optional) – Dictionary or path to json file contianing dictionary with Xmission cost configuration values. Valid configuration keys are:

    • “base_line_costs”

    • “iso_lookup”

    • “iso_multipliers”

    • “land_use_classes”

    • “new_substation_costs”

    • “power_classes”

    • “power_to_voltage”

    • “transformer_costs”

    • “upgrade_substation_costs”

    Each of these keys should point to a dictionary or a path to a separate json file contianing a dictionary of configurations for each section.

  • default_mults (IsoMultipliers, optional) – Multipliers for regions not specified in iso_mults_fpath. by default None

  • extra_tiffs (list, optional) – Optional list of extra GeoTIFFs to add to cost H5 file (e.g. a transmission barrier file). By default, None, which does not add any extra layers.

property shape

Layer shape.

Type:

tuple