brails.utils.spatial_join_methods.base module
This module defines abstract SpatialJoinMethods class.
Abstract base class for spatial join methods. |
- class brails.utils.spatial_join_methods.base.SpatialJoinMethods
Bases:
ABC
Abstract base class for spatial join methods.
- static execute(method_name: str, inventory1: AssetInventory, inventory2: AssetInventory) AssetInventory
Run a spatial join using the given method name.
- Args:
- method_name (str):
The name of the concrete join method class.
- inventory1 (AssetInventory):
The primary asset inventory.
- inventory2 (AssetInventory):
The secondary asset inventory to join with.
- Returns:
- AssetInventory:
Result of the spatial join.
- Raises:
- ValueError:
If the method is not found.
- classmethod join_inventories(inventory1: AssetInventory, inventory2: AssetInventory) AssetInventory
Perform a spatial join between two AssetInventory instances.
This method validates the inputs and delegates the join logic to the concrete subclass implementation.
- Args:
- inventory1 (AssetInventory):
The primary asset inventory.
- inventory2 (AssetInventory):
The secondary asset inventory to join with.
- Returns:
- AssetInventory:
A new AssetInventory instance resulting from the spatial join.
- Raises:
TypeError: If either input is not an instance of AssetInventory.