revrt.models.routing.DriverZoneConfig#

class DriverZoneConfig(*, layer_name: str, where: str, options: DriverOptionRules = <factory>)[source]#

Bases: BaseModel

Config for one spatially varying driver rule zone

Driver zones define route-option multipliers or exclusions within a subset of the raster identified by layer_name and where.

You may specify the zone’s route-option multipliers as flat mapping of names to values instead of a nested options input.

The rest of this docstring is inserted by Pydantic and can be ignored.

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

layer_name

Layer in the cost file used to define the spatial driver mask

where

Comparison expression describing cells that belong to the zone

options

Per-option rules within this zone

layer_name: str#

Layer in the cost file used to define the spatial driver mask

where: str#

Comparison expression describing cells that belong to the zone

Any pixel matching where is treated as part of the zone.

Supported operators are ==, !=, >, >=, <, and <=, followed by a numeric threshold such as ">=15" or "!=0".

options: DriverOptionRules#

Per-option rules within this zone

The values can either be friction multipliers to apply while routing within this zone in that option or the keyword "excluded", which means the option is not allowed at all within this zone.