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: BaseModel

Config 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_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.

friction_layer

Name of friction layer

barrier_layer

Name of barrier layer

output_layer_name

Name of combined output layer

barrier_multiplier

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.

barrier_multiplier: float#

Value to multiply barrier layer by during merge with friction

The multiplier should be large enough that all barriers have a higher value than any possible friction.