Sources
- class spectral_indices.sources.DataSource(name: str = <factory>, catalog: str = <factory>, collection_name: str = <factory>, modifier: callable = None, masks: ~typing.Dict[str, str] = {}, bands: ~typing.List[str] = <factory>, sensor_name: str = <factory>)[source]
DataSource wraps all informations for a source of remote sensing data accessible trhough STAC catalog.
- Parameters:
name (str) – Name of the data source.
catalog (str) – URL of data source STAC catalog.
collection_name (str) – Name of the collection in the STAC catalog.
adaptater (BandAdaptater) – Band adaptater to map data source assets to gloabl Band definition.
modifier (callable) – Function to sign assets.
sensor (str) – Name of the sensor in index database.
bands (
List[str]) – Available assets from this STAC collection.
- property collection: CollectionClient
Return whole collection information as Collection (pystac).
- fetch_collection(bbox: BoundingBox, timestamps: str | date | List[str | date]) ItemCollection[source]
Fetch a collection of items from a STAC catalog.
- Parameters:
bbox (
BoundingBox) – BoundingBox that represent extent of the items to query.timestamps (
Union[Union[str, date],List[Union[str,date]]]) – Timestamps to query items from.
- Returns:
Return ItemCollection (simplestac extended) according to query.
- Return type:
ItemCollection
- class spectral_indices.sources.DataSourceFactory[source]
Registry to store Data sources and make it accessible through CLI.
- classmethod get(name: str) DataSource[source]
Gather a data source from registry using it’s name.
- classmethod register(builder: DataSource) DataSource[source]
Register Data source. This can be used as a decorator.
- Parameters:
builder (
DataSource) – Data source builder.- Returns:
Return class builder.
- Return type:
DataSource