CS-SI/eodag-cube

Not working for S3_EFR from creodias

Closed this issue · 4 comments

This is my code to download the S3_EFR from Creodia,
I can download all products but I am facing with error to get data directly from the sourec.
from eodag import EODataAccessGateway
import os
from rasterio.crs import CRS
workspace=''
import geopandas as gpd
dag = EODataAccessGateway()
os.environ["EODAG__creodias__AUTH__CREDENTIALS__USERNAME"] = "sdgstgts"
os.environ["EODAG__creodias__AUTH__CREDENTIALS__PASSWORD"] = "sdfgfg"
os.environ["EODAG__creodias__DOWNLOAD__OUTPUTS_PREFIX"] = os.path.abspath(workspace)
dag.set_preferred_provider('creodias')
footprint = gpd.read_file(area.geojson')
product_type = "S3_EFR"
start, end = '2019-07-01','2019-07-15'
dag.set_preferred_provider("creodias")
search_results, _ = dag.search(productType=product_type, geom=footprint, start=start, end=end)

data = search_results[1].get_data(
crs=CRS.from_epsg(4326),
resolution=0.0001,
band="Oa08_radiance",
extent=footprint
)

NotImplementedError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_14684/3045824912.py in
----> 1 data = search_results[1].get_data(
2 crs=CRS.from_epsg(4326),
3 resolution=0.0006,
4 band="Oa08_radiance",
5 extent=footprint

~\Anaconda3\envs\GEEXR\lib\site-packages\eodag_cube\api\product_product.py in get_data(self, band, crs, resolution, extent, **rioxr_kwargs)
91 fail_value = xr.DataArray(np.empty(0))
92 try:
---> 93 dataset_address = self.driver.get_data_address(self, band)
94 except UnsupportedDatasetAddressScheme:
95 logger.warning(

~\Anaconda3\envs\GEEXR\lib\site-packages\eodag\api\product\drivers\base.py in get_data_address(self, eo_product, band)
33 :raises: :class:~eodag.utils.exceptions.UnsupportedDatasetAddressScheme
34 """
---> 35 raise NotImplementedError
36
37

NotImplementedError:

Hello @saeedojaghi and thanks for your feedback.
Unfortunately there is no driver implemented for this kind of product yet (see DRIVERS).

We can imagine that a driver on the model of S2_MSI_L1C could be developed for these needs. We did not plan do work on this in the near future, but PRs are obviously welcome!

Thanks @saeedojaghi but when looking at it I finally decided to implement a generic driver for products that cannot be directly streamed and need to be downloaded first.
Work is in progress, there will be an eodag-cube update soon!