Skip to content

Several productTypes in one request #1577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
chadelmas opened this issue Mar 26, 2025 · 1 comment
Open

Several productTypes in one request #1577

chadelmas opened this issue Mar 26, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@chadelmas
Copy link

It would be useful to be able to query multiple product types in a single request (search or download).

For now, I use the same criteria (except the product type) twice, to request SWOT products with provider hydroweb_next for each processing.

Example :
What I do now (on an example)

dag = eodag.EODataAccessGateway()
dag.set_preferred_provider("hydroweb_next")
search_criteria = {
    "productType": "SWOT_L2_HR_RIVERSP_REACH",
    "start": "2024-01-01",
    "end": "2024-10-31",
    "geom": {
        "lonmin": bbox[0],
        "latmin": bbox[1],
        "lonmax": bbox[2],
        "latmax": bbox[3],
    },
}
results_reach = dag.search(**search_criteria)
search_criteria["productType"] = "SWOT_L2_HR_RIVERSP_NODE"
results_node = dag.search(**search_criteria)

What it could be :

dag = eodag.EODataAccessGateway()
dag.set_preferred_provider("hydroweb_next")
search_criteria = {
    "productType": ["SWOT_L2_HR_RIVERSP_REACH", "SWOT_L2_HR_RIVERSP_NODE"],
    "start": "2024-01-01",
    "end": "2024-10-31",
    "geom": {
        "lonmin": bbox[0],
        "latmin": bbox[1],
        "lonmax": bbox[2],
        "latmax": bbox[3],
    },
}
results = dag.search(**search_criteria)
@chadelmas chadelmas added the enhancement New feature or request label Mar 26, 2025
@sbrunato
Copy link
Collaborator

sbrunato commented Apr 1, 2025

Thanks for the suggestion @chadelmas. The tricky part of this feature would be to handle pagination and sort properly for providers that do not support cross-collections search natively

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants