reVX.config.transmission_layer_creation.TransmissionLayerCreationConfig

class TransmissionLayerCreationConfig(*, template_raster_fpath: Annotated[Path, PathType(path_type=file)], h5_fpath: Annotated[Path, PathType(path_type=file)], layer_dir: Annotated[Path, PathType(path_type=dir)] = PosixPath('.'), masks_dir: Annotated[Path, PathType(path_type=dir)] = PosixPath('.'), output_tiff_dir: Annotated[Path, PathType(path_type=dir)] = PosixPath('.'), layers: List[LayerConfig] | None = None, dry_costs: DryCosts | None = None, merge_friction_and_barriers: MergeFrictionBarriers | None = None, cell_size: int = 90)[source]

Bases: BaseModel

Definition of friction, barrier, and costs processing JSON config file.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Methods

Attributes

model_computed_fields

model_fields

template_raster_fpath

Template raster GeoTIFF for shape and profile

h5_fpath

H5 to store results in.

layer_dir

Directory to look for GeoTIFFs in, in addition to '.'

masks_dir

Optional path for mask GeoTIFFs.

output_tiff_dir

Directory to store output tiff files in.

layers

Optional configuration for layers to be built.

dry_costs

Optional dry cost layer.

merge_friction_and_barriers

Optional config to merge friction barriers.

cell_size

Side length of each cell, in meters.

template_raster_fpath: Annotated[Path, PathType(path_type=file)]

Template raster GeoTIFF for shape and profile

h5_fpath: Annotated[Path, PathType(path_type=file)]

H5 to store results in.

layer_dir: Annotated[Path, PathType(path_type=dir)]

Directory to look for GeoTIFFs in, in addition to ‘.’

masks_dir: Annotated[Path, PathType(path_type=dir)]

Optional path for mask GeoTIFFs.

output_tiff_dir: Annotated[Path, PathType(path_type=dir)]

Directory to store output tiff files in.

layers: List[LayerConfig] | None

Optional configuration for layers to be built.

At least one of layers, dry_costs, or merge_friction_and_barriers must be defined.

dry_costs: DryCosts | None

Optional dry cost layer.

At least one of layers, dry_costs, or merge_friction_and_barriers must be defined.

merge_friction_and_barriers: MergeFrictionBarriers | None

Optional config to merge friction barriers.

At least one of layers, dry_costs, or merge_friction_and_barriers must be defined.

cell_size: int

Side length of each cell, in meters.

Cells are assumed to be square. By default, CELL_SIZE.