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, inventory1, inventory2)
Run a spatial join using the given method name.
- Parameters:
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:
Result of the spatial join.
- Return type:
- Raises:
ValueError – If the method is not found.
- classmethod join_inventories(inventory1, inventory2)
Perform a spatial join between two AssetInventory instances.
This method validates the inputs and delegates the join logic to the concrete subclass implementation.
- Parameters:
inventory1 (AssetInventory) – The primary asset inventory.
inventory2 (AssetInventory) – The secondary asset inventory to join with.
- Returns:
A new AssetInventory instance resulting from the spatial join.
- Return type:
- Raises:
TypeError – If either input is not an instance of AssetInventory.