Schemas¶
aereo.schemas ¶
aereo.schemas - Pandera schema component.
Public API for pandera schemas used for validating dataframes.
ArtifactSchema ¶
Bases: GridSchema
Schema for artifacts created during extraction.
Inherits all fields from :class:GridSchema.
| ATTRIBUTE | DESCRIPTION |
|---|---|
id | Unique identifier for the artifact. TYPE: |
source_ids | Comma-separated list of source identifiers that contributed to the artifact. TYPE: |
start_time | Start time of the data acquisition for the artifact. TYPE: |
end_time | End time of the data acquisition for the artifact. TYPE: |
uri | URI or reference to the artifact's location (e.g., file path, cloud storage URL). TYPE: |
geometry | Spatial geometry of the artifact (e.g., footprint). TYPE: |
collection | Identifier for the collection this artifact belongs to, which can be used for organizational and metadata purposes. TYPE: |
empty_geodataframe classmethod ¶
empty_geodataframe()
Return an empty GeoDataFrame with ArtifactSchema columns.
| RETURNS | DESCRIPTION |
|---|---|
GeoDataFrame['ArtifactSchema'] | An empty validated GeoDataFrame with the correct schema columns, |
GeoDataFrame['ArtifactSchema'] | including a geometry column. |
Source code in components/aereo/schemas/core.py
@classmethod
def empty_geodataframe(cls) -> GeoDataFrame["ArtifactSchema"]:
"""Return an empty GeoDataFrame with ArtifactSchema columns.
Returns:
An empty validated GeoDataFrame with the correct schema columns,
including a geometry column.
"""
columns = list(cls.to_schema().columns.keys())
if "geometry" not in columns:
columns.append("geometry")
gdf = gpd.GeoDataFrame(columns=columns, geometry="geometry")
return cast(GeoDataFrame["ArtifactSchema"], cls.validate(gdf))
AssetSchema ¶
Bases: DataFrameModel
Schema for search results returned by the search hook.
This schema defines the expected structure of the GeoDataFrame returned by search implementations. It includes fields for collection identifiers, spatial geometry, temporal information, and any additional metadata needed for task preparation and extraction.
| ATTRIBUTE | DESCRIPTION |
|---|---|
id | Unique identifier for the search result (e.g., a product ID). TYPE: |
collection | Identifier for the collection this result belongs to. TYPE: |
geometry | Spatial geometry of the result (e.g., footprint). TYPE: |
start_time | Start time of the data acquisition. TYPE: |
end_time | End time of the data acquisition. TYPE: |
href | URL or reference to the data source for extraction. TYPE: |
crs | Native coordinate reference system of the asset (e.g., "EPSG:32633"). When present, all assets in an TYPE: |
GridSchema ¶
Bases: DataFrameModel
Schema for grid dataframes used in the aereo plugin system.
This schema defines the expected structure of the GeoDataFrame representing the spatial grid used for task preparation and artifact organization. It includes fields for grid cell identifiers, spatial geometry, and any additional metadata needed for task preparation and artifact management.
| ATTRIBUTE | DESCRIPTION |
|---|---|
grid_cell | Unique identifier for the grid cell (e.g., "0U_0R"). TYPE: |
grid_dist | Distance in meters that defines the size of the grid cell. TYPE: |
cell_geometry | Spatial geometry of the grid cell (e.g., footprint). TYPE: |
cell_utm_crs | EPSG code for the UTM coordinate reference system corresponding to the grid_cell. TYPE: |
cell_utm_footprint | Spatial geometry of the grid_cell footprint in the UTM coordinate reference system. TYPE: |