blocksnet.enums
- class blocksnet.enums.LandUse(value)[source]
Bases:
Enum
An enumeration.
- RESIDENTIAL = 'residential'
- BUSINESS = 'business'
- RECREATION = 'recreation'
- INDUSTRIAL = 'industrial'
- TRANSPORT = 'transport'
- SPECIAL = 'special'
- AGRICULTURE = 'agriculture'
- class blocksnet.enums.BlockCategory(value)[source]
Bases:
Enum
An enumeration.
- INVALID = 'invalid'
- NORMAL = 'normal'
- LARGE = 'large'
- class blocksnet.enums.LandUseCategory(value)[source]
Bases:
Enum
Enumeration class representing different categories of land use.
This enum defines three main categories of land use: urban, non-urban, and industrial. It provides methods to convert between LandUse objects and LandUseCategory instances.
- URBAN = 'urban'
- NON_URBAN = 'non_urban'
- INDUSTRIAL = 'industrial'
- classmethod from_land_use(lu: LandUse) LandUseCategory | None [source]
Convert a LandUse object to a LandUseCategory instance.
- Args:
lu: A LandUse object to be converted to a category.
- Returns:
The corresponding LandUseCategory instance if found, None otherwise.
- to_land_use() set[blocksnet.enums.land_use.LandUse] [source]
Convert the LandUseCategory to a set of LandUse objects.
This method uses a reverse mapping (created on first call) to find all LandUse objects that belong to this category.
- Returns:
A set of LandUse objects that belong to this category.
- class blocksnet.enums.SettlementCategory(value)[source]
Bases:
Enum
An enumeration.
- TOWN = 'town'
- SUBURB = 'suburb'
- VILLAGE = 'village'
Modules