reVX.least_cost_xmission.layers.base.BaseLayerCreator
- class BaseLayerCreator(io_handler: LayeredTransmissionH5, mask=None, 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:
ABC
Abstract Base Class to create and save transmission routing layers
- Parameters:
io_handler (
LayeredTransmissionH5
) – Transmission layer IO handlermask (ndarray, optional) – Array representing mask for layer values. Only optional if subclass implementation handles masks differently (e.g. the LayerCreator class). By default,
None
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
(*args, **kwargs)Build layer
Attributes
Layer shape.