eomatch.finder.sat2sat.Sat2SatMUFinder.to_matchup_set#
- Sat2SatMUFinder.to_matchup_set(mu_events: List[MatchupEvent]) List[MatchupEvent][source]#
Query scrappi for each event and build per-event
MatchupSetobjects.For each
MatchupEvent, one scrappi query is issued per platform. The query geometry is the configured site bounding box (min_lat/max_lat/min_lon/max_lonin the context) when one is set, falling back to the event’s own geometry otherwise — the event geometry from orbitx can be hundreds of km wide (returning products outside the site) or narrower than the site on one axis (missing products that do cover the site), whereas the event bbox has already passedfilter_events()so searching the full site bbox is safe.Products returned by scrappi are further filtered to those whose
platformmatches the platform the query was issued for — a collection can cover more than one platform (e.g.LANDSAT_C2L1, which contains both Landsat-8 and Landsat-9 products), so without this filter a query for one platform could return products for another. This relies on scrappi returningproduct.platformvalues in the same short-code form used byplatformsin the config and passed to orbitx (e.g.S2A,LS9) — seeparse_platform_from_namein scrappi’sBaseAPICallHandler.If the
provider_by_collectionconfig dict has an entry for a query’s collection, the query is tagged withprovider=<name>, which scrappi forwards unchanged to eodag’ssearch(). eodag disables its usual try-every-provider-in-priority-order fallback wheneverprovideris set, so this is a way to pin a specific eodag provider per collection for a run (e.g. to skip several providers that are known to be slow, unauthenticated, or unavailable for a given collection) without affecting other runs or other collections. Collections without an entry are queried with eodag’s normal provider fallback behaviour. A misconfigured provider name fails silently (no results, since fallback is disabled) rather than raising, so it is worth double-checking the provider name against your eodag config if a collection unexpectedly stops returning products after setting this.Products returned for each platform are combined via a Cartesian product; a combination becomes a
Matchuponly if every product geometrically overlaps and every pair’s time ranges are withintime_diff_thresholdof each other (seeall_products_within_time_diff()) – geometric overlap alone can accept pairings from different, unrelated crossovers of the same general area (see the identical check and its rationale into_matchup_set()). Events for which fewer than two platforms return products are skipped.- Parameters:
mu_events – list of
MatchupEventobjects to query.- Returns:
the same list with
matchup_setpopulated for events that produced at least one matchup.