sand.results
- sand.results.Collection(selection: list[str], collec_table: DataFrame) DataFrame[source]
Extract a selection of collections from a reference table as pandas DataFrame
This function filters a reference table of collections to include only the requested collections, verifying that all requested collections exist.
- Parameters:
selection (list[str]) – List of collection names to select
collec_table (pd.DataFrame) – Reference table containing collection information. Must have a ‘Name’ column containing collection names.
- Returns:
- Filtered table containing only the selected collections,
sorted by collection name
- Return type:
pd.DataFrame
- Raises:
AssertionError – If any requested collection name is not found in the reference table
Example
>>> ref_table = pd.DataFrame({ ... 'Name': ['LANDSAT-5-TM', 'SENTINEL-2', 'VENUS'], ... 'Level': [1, 2, 1] ... }) >>> selected = Collection(['LANDSAT-5-TM', 'VENUS'], ref_table) >>> print(selected['Name']) 0 LANDSAT-5-TM 1 VENUS
- class sand.results.SandProduct(product_id: str, date: str, metadata: dict, index: str = None)[source]
Bases:
object- date: str
- index: str = None
- metadata: dict
- product_id: str
- class sand.results.SandQuery(json_values: list[SandProduct])[source]
Bases:
objectFormat a list of product dictionaries.
This class is fully serializable using pickle for saving and loading query results.
- Parameters:
json_value (list[dict]) – List of dictionaries, each representing a product with keys like ‘id’, ‘name’, ‘links’, etc.