revrt.models.cost_layers.TransmissionLayerCreationConfig#

class TransmissionLayerCreationConfig(*, template_file: Annotated[Path, PathType(path_type=file)], routing_file: Path, input_layer_dir: Annotated[Path, PathType(path_type=dir)] = PosixPath('.'), masks_dir: Path = PosixPath('.'), output_tiff_dir: Path = PosixPath('.'), layers: list[LayerConfig] | None = None, dry_costs: DryCosts | None = None, merge_friction_and_barriers: MergeFrictionBarriers | None = None)[source]#

Bases: BaseModel

Config for transmission layer creation

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_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_extra

Get extra fields set during validation.

model_fields

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

template_file

Template GeoTIFF/Zarr file for shape, profile, and transform

routing_file

Layer file to store results in

input_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

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

property model_extra: dict[str, Any] | None#

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

property model_fields_set: set[str]#

Returns the set of fields that have been explicitly set on this model instance.

Returns:
A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

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

Template GeoTIFF/Zarr file for shape, profile, and transform

routing_file: Path#

Layer file to store results in

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

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

masks_dir: Path#

Optional path for mask GeoTIFFs

output_tiff_dir: Path#

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.