blocksnet.enums.land_use_category

Classes

LandUseCategory(value)

Enumeration class representing different categories of land use.

class blocksnet.enums.land_use_category.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.