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:

The zone’s min_area is defined as min_block_area, making it compatible with generic area constraints used elsewhere in the pipeline.

Variables:
Raises:

ValueError – If kind is invalid, name is empty, or min_block_area <= 0.

property min_area

Minimum area constraint for this zone.

Returns:

Minimum block area.

Return type:

float

validate()[source]

Validate and normalize zone fields.

Ensures:
  • kind is a TerritoryZoneKind (attempts coercion from string/other),

  • name is a non-empty string,

  • min_block_area is a positive number.

Raises:

ValueError – If kind cannot be coerced, name is empty, or min_block_area <= 0.