Module stac_fastapi.extensions.core.aggregation.client¶
Aggregation extensions clients.
Classes¶
AsyncBaseAggregationClient¶
class AsyncBaseAggregationClient(
)
Defines an async pattern for implementing the STAC aggregation extension.
Ancestors (in MRO)¶
- abc.ABC
Methods¶
aggregate¶
def aggregate(
self,
collection_id: Optional[str] = None,
aggregations: Union[str, List[str], NoneType] = None,
collections: Optional[List[str]] = None,
ids: Optional[List[str]] = None,
bbox: Union[Tuple[Union[float, int], Union[float, int], Union[float, int], Union[float, int]], Tuple[Union[float, int], Union[float, int], Union[float, int], Union[float, int], Union[float, int], Union[float, int]], NoneType] = None,
intersects: Optional[Annotated[Union[geojson_pydantic.geometries.Point, geojson_pydantic.geometries.MultiPoint, geojson_pydantic.geometries.LineString, geojson_pydantic.geometries.MultiLineString, geojson_pydantic.geometries.Polygon, geojson_pydantic.geometries.MultiPolygon, geojson_pydantic.geometries.GeometryCollection], FieldInfo(annotation=NoneType, required=True, discriminator='type')]] = None,
datetime: Union[datetime.datetime, Tuple[datetime.datetime, datetime.datetime], Tuple[datetime.datetime, NoneType], Tuple[NoneType, datetime.datetime], NoneType] = None,
limit: Optional[int] = 10,
**kwargs
) -> stac_fastapi.extensions.core.aggregation.types.AggregationCollection
Return the aggregation buckets for a given search result
get_aggregations¶
def get_aggregations(
self,
collection_id: Optional[str] = None,
**kwargs
) -> stac_fastapi.extensions.core.aggregation.types.AggregationCollection
Get the aggregations available for the given collection_id.
If collection_id is None, returns the available aggregations over all collections.
BaseAggregationClient¶
class BaseAggregationClient(
)
Defines a pattern for implementing the STAC aggregation extension.
Ancestors (in MRO)¶
- abc.ABC
Methods¶
aggregate¶
def aggregate(
self,
collection_id: Optional[str] = None,
**kwargs
) -> stac_fastapi.extensions.core.aggregation.types.AggregationCollection
Return the aggregation buckets for a given search result
get_aggregations¶
def get_aggregations(
self,
collection_id: Optional[str] = None,
**kwargs
) -> stac_fastapi.extensions.core.aggregation.types.AggregationCollection
Get the aggregations available for the given collection_id.
If collection_id is None, returns the available aggregations over all collections.