eomatch.Matchup.from_stac_item#
- classmethod Matchup.from_stac_item(item: Item, context: Any | None = None) Matchup[source]#
Reconstruct a Matchup from a STAC Item.
Source ProductItems are rebuilt from the
derived_fromlink targets, viaproduct_item_from_stac()– pass context (e.g. the owningMatchupCatalogue’s owncontext) so a rebuilt product’s own.contextcarries whatever config it was originally found with (credentials,api.offline_archive_pathsfor an offline-archive-backed collection, …) – without it,product.download_product()/resolve_product_path()fall back to a bare default context and can’t re-locate a product outside scrappi’s organised online-download layout (e.g. GISTDA THEOS-1’s own offline archive), silently guessing the wrong path instead. context omitted leaves this exactly as before: no filesystem/API configuration – callproduct.set_api()/product.set_fs()yourself before attempting a download. The item’spropertiesdict (e.g. enricher-computedroi_cloud_cover,collocation_area_km2,insitu_time_diff_nearest_s) is copied onto the returned Matchup’s ownproperties– seerun(), which merges it into the built DataTree’s root attributes.- Parameters:
item – STAC Item produced by
to_stac_item().context – optional context to build each rebuilt product’s own
.contextfrom.
- Returns:
Matchup object.