eomatch.mu_stac.MatchupCatalogue.add_matchup_asset#
- MatchupCatalogue.add_matchup_asset(matchup: Matchup, asset_key: str, file_path: str, media_type: str | None = None, title: str | None = None, roles: List[str] | None = None) bool[source]#
Add or replace a STAC asset on a matchup Item in the catalogue.
Also updates
matchup.assetsso the in-memory object stays in sync.- Parameters:
matchup – the
Matchupwhose catalogue Item to update.asset_key – asset key, e.g.
"data","thumbnail".file_path – path or URL to use as the asset’s
href.media_type – MIME type for the asset; auto-detected from the file extension if
None.title – human-readable title for the asset; defaults to the filename.
roles – STAC asset roles, e.g.
["thumbnail"].
- Returns:
Trueif the item was found and updated,Falseif not found.