rs_server_common/utils/missions.md¶
Combine AUXIP/PRIP mission restrictions without losing constellation/serial associations.
For example, S1A and S2B must remain two pairs: splitting them into independent constellation and serial lists would also allow S1B and S2A.
extract_missions(query)
¶
Return non-mission criteria and the intersection of all mission restrictions.
Accept internal pairs, complete STAC platform names and legacy OData fields. The input dict is preserved; absent restrictions yield None, disjoint ones yield ().
Source code in docs/rs-server/services/common/rs_server_common/utils/missions.py
intersect_missions(left, right)
¶
Keep identities allowed by both selections, resolving wildcards to concrete values.
For example, ("SENTINEL-1", None) intersected with ("SENTINEL-1", "A") yields ("SENTINEL-1", "A"). Conflicting constellations or serials cannot match.
Source code in docs/rs-server/services/common/rs_server_common/utils/missions.py
matches_mission(entity, missions)
¶
Check an OData product's collection membership using the same pairs as station filtering.
Source code in docs/rs-server/services/common/rs_server_common/utils/missions.py
mission_search_params(missions)
¶
Convert pairs to EODAG parameters while preserving their exact meaning.
Independent attribute filters are sufficient for a full Cartesian product. Otherwise, return an internal OData fragment with OR between complete pairs.
Source code in docs/rs-server/services/common/rs_server_common/utils/missions.py
normalize_missions(missions)
¶
Uppercase and deduplicate complete pairs, sorting them for stable comparisons and filters.