Skip to content

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: Series[String]

source_ids

Comma-separated list of source identifiers that contributed to the artifact.

TYPE: Series[String]

start_time

Start time of the data acquisition for the artifact.

TYPE: Series[DateTime]

end_time

End time of the data acquisition for the artifact.

TYPE: Series[DateTime]

uri

URI or reference to the artifact's location (e.g., file path, cloud storage URL).

TYPE: Series[String]

geometry

Spatial geometry of the artifact (e.g., footprint).

TYPE: GeoSeries

collection

Identifier for the collection this artifact belongs to, which can be used for organizational and metadata purposes.

TYPE: Series[String]

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: Series[String]

collection

Identifier for the collection this result belongs to.

TYPE: Series[String]

geometry

Spatial geometry of the result (e.g., footprint).

TYPE: GeoSeries

start_time

Start time of the data acquisition.

TYPE: Series[DateTime]

end_time

End time of the data acquisition.

TYPE: Series[DateTime]

href

URL or reference to the data source for extraction.

TYPE: Series[String]

crs

Native coordinate reference system of the asset (e.g., "EPSG:32633"). When present, all assets in an ExtractionTask must share the same value so the reader can return a single xr.Dataset in native CRS.

TYPE: Series[String]

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: Series[String]

grid_dist

Distance in meters that defines the size of the grid cell.

TYPE: Series[Int]

cell_geometry

Spatial geometry of the grid cell (e.g., footprint).

TYPE: GeoSeries

cell_utm_crs

EPSG code for the UTM coordinate reference system corresponding to the grid_cell.

TYPE: Series[String]

cell_utm_footprint

Spatial geometry of the grid_cell footprint in the UTM coordinate reference system.

TYPE: GeoSeries