Engines¶
The engines module provides delineation engines for agricultural field boundary detection. Each engine wraps a different model or approach for extracting field boundary polygons.
engines ¶
Delineation engines for agricultural field boundary detection.
Each engine wraps a different model or approach for extracting field boundary polygons from satellite imagery.
DelineationEngine ¶
Bases: ABC
Abstract base class for delineation engines.
Subclasses must implement :meth:delineate to perform field boundary
extraction from a raster file.
Source code in agribound/engines/base.py
delineate
abstractmethod
¶
Run field boundary delineation on a raster file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
raster_path
|
str
|
Path to the input GeoTIFF (composite or local file). |
required |
config
|
AgriboundConfig
|
Pipeline configuration. |
required |
Returns:
| Type | Description |
|---|---|
GeoDataFrame
|
Field boundary polygons with at minimum a |
Source code in agribound/engines/base.py
validate_input ¶
Validate that the input raster is compatible with this engine.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
raster_path
|
str
|
Path to the input raster. |
required |
config
|
AgriboundConfig
|
Pipeline configuration. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the input is incompatible. |
Source code in agribound/engines/base.py
get_engine ¶
Factory function to get a delineation engine by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
engine_name
|
str
|
Engine name (e.g. |
required |
Returns:
| Type | Description |
|---|---|
DelineationEngine
|
Engine instance. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the engine name is not recognized. |
Source code in agribound/engines/base.py
list_engines ¶
List all available delineation engines and their metadata.
Returns:
| Type | Description |
|---|---|
dict[str, dict]
|
Dictionary mapping engine names to their metadata. |
Examples:
>>> from agribound import list_engines
>>> engines = list_engines()
>>> for name, info in engines.items():
... print(f"{name}: {info['approach']}")