genplanner.TerritoryZone¶
- class genplanner.TerritoryZone(kind, name=<property object>, min_block_area=20000)[source]¶
A concrete territorial zone definition.
- TerritoryZone represents a specific zone within a territory plan. It has:
a kind (from
TerritoryZoneKind),a human-readable name,
a minimum block area constraint (min_block_area).
The zone’s min_area is defined as min_block_area, making it compatible with generic area constraints used elsewhere in the pipeline.
- kind¶
Zone kind (Enum or a value convertible to it).
- name¶
Non-empty zone name.
- min_block_area¶
Minimum allowed area for generated blocks for this zone. Must be > 0.
- Raises:
ValueError – If kind is invalid, name is empty, or min_block_area <= 0.
- Parameters:
kind (TerritoryZoneKind)
name (str)
min_block_area (float)
- __init__(kind, name=<property object>, min_block_area=20000)¶
- Parameters:
kind (TerritoryZoneKind)
name (str)
min_block_area (float)
- Return type:
None
Methods
__init__(kind[, name, min_block_area])validate()Validate and normalize zone fields.
Attributes
min_areaMinimum area constraint for this zone.