revrt.models.cost_layers.MergeFrictionBarriers#
- class MergeFrictionBarriers(*, friction_layer: str, barrier_layer: str, output_layer_name: str | None = 'transmission_barrier', barrier_multiplier: float = 1000000.0)[source]#
Bases:
BaseModelConfig to combine friction and barriers and save to file
All barrier values are multiplied by a factor before merging with friction. The multiplier should be large enough that all barriers have a higher value than any possible friction.
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_fieldsConfiguration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Get extra fields set during validation.
model_fieldsReturns the set of fields that have been explicitly set on this model instance.
Name of friction layer
Name of barrier layer
Name of combined output layer
Value to multiply barrier layer by during merge with friction
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#
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.
- friction_layer: str#
Name of friction layer
A file with this name plus a ‘.tif’ extension must have just been created or had already existed in the tiff directory.
- barrier_layer: str#
Name of barrier layer
A file with this name plus a ‘.tif’ extension must have just been created or had already existed in the tiff directory.
- output_layer_name: str | None#
Name of combined output layer
By default,
BARRIER_H5_LAYER_NAME.