eodag icon indicating copy to clipboard operation
eodag copied to clipboard

Add S2_MSI_L1C productType to the USGS provider

Open vidlb opened this issue 1 year ago • 4 comments

When trying to download Sentinel2 images using the USGS provider, the "S2_MSI_L1C" product type is not recognized, even though it is available using the earth explorer website.

It would be great to add this one (and more precisely in my case I'd like that because I only got a bunch of failure when trying to do that using the peps provider...).

vidlb avatar Jul 22 '22 15:07 vidlb

thanks for the suggestion @vidlb , even if it is not pre-configured you can already search for any productType on providers.

In this case, we also need to fix some issues with our usgs api plugin, and also progress bars.

But you can already search and download for S2_MSI_L1C on USGS:

from eodag import EODataAccessGateway, setup_logging
# disable progress bar until issue with integer id from USGS+S2_MSI_L1C is fixed
setup_logging(verbose=2, no_progress_bar=True)
dag = EODataAccessGateway()
dag.set_preferred_provider("usgs")
other_kwargs = {}
products, products_count = dag.search(productType="SENTINEL_2A", **other_kwargs)
products[0].download()

Please note that SENTINEL_2A comes from the USGS EarthExplorer product type identifier reference list. As it is unknown spelled like this by eodag, it will be used with the generic product type configuration.

  • [x] an issue is opened to fix the bug related to int product identifier with progress bars, see https://github.com/CS-SI/eodag/issues/488 , and setup_logging doc to temporally disable progress bars

sbrunato avatar Jul 26 '22 09:07 sbrunato

@vidlb you can also try using one of the following providers, already configured with S2_MSI_L1C:

>>> dag.available_providers("S2_MSI_L1C")
['astraea_eod', 'aws_eos', 'creodias', 'earth_search', 'earth_search_gcs', 'mundi', 'onda', 'peps', 'sobloo']

sbrunato avatar Jul 26 '22 12:07 sbrunato

@sbrunato thanks for the suggestion, but I miss credentials, is any of these service is free of charge (other than peps) ?

vidlb avatar Jul 27 '22 08:07 vidlb

@sbrunato thanks for the suggestion, but I miss credentials, is any of these service is free of charge (other than peps) ?

  • creodias, mundi, onda, peps, sobloo are free, you just need to register
  • for earth_search_gcs you need credentials for google cloud storage
  • for astraea_eod, aws_eos, earth_search you need to pay using AWS credentials

For more details, see provider registration documentation

sbrunato avatar Jul 27 '22 09:07 sbrunato