Skip to content
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

Absence of VZA , SZA #27

Closed
saeedojaghi opened this issue Jan 3, 2022 · 16 comments
Closed

Absence of VZA , SZA #27

saeedojaghi opened this issue Jan 3, 2022 · 16 comments

Comments

@saeedojaghi
Copy link

Hi,
I am trying to read the S2 and S3 to xarray format. there is no problem with the reflectance dataset but got the metadata like VZA, SZA they do not include anything.

@sbrunato
Copy link
Collaborator

sbrunato commented Jan 4, 2022

Hello @saeedojaghi , and best wishes for 2022. All the available metadata should be available in the search results (EOProduct.properties).
Metadata is not included in the returned xarray.DataArray but this is something that can be implemented in eodag-cube, updating xarray.DataArray.attrs with EOProduct.properties. Does that sound good to you ?

@saeedojaghi
Copy link
Author

Hello @saeedojaghi , and best wishes for 2022. All the available metadata should be available in the search results (EOProduct.properties). Metadata is not included in the returned xarray.DataArray but this is something that can be implemented in eodag-cube, updating xarray.DataArray.attrs with EOProduct.properties. Does that sound good to you ?

@saeedojaghi
Copy link
Author

saeedojaghi commented Jan 4, 2022

Happy new year sbrunato,I wish the best for you.
Maybe it is not true to say that view zenith angle(VZA) is metadata because it is associated data with raw of Sentinle3, which is recorded for each pixel.But metadata is about the all image.I need geometrical information like as SZA VZA for each pixel. They should be like addaitional band behind the reflectance or bands.
But I checed all of the provider they just provide reflectance or radiance values as bands and nothing about VZA or SZA

@sbrunato
Copy link
Collaborator

sbrunato commented Jan 4, 2022

The problem here is that the search results you obtain with eodag do not contain the data you want.
The productType that matches your needs may not be configured in eodag yet.
For example, if you search on creodias, the configured product types are:

>>> [pt for pt in dag.list_product_types("creodias") if pt["platform"] == "SENTINEL3"]
[{'ID': 'S3_EFR',
  'abstract': '',
  'instrument': 'OLCI',
  'platform': 'SENTINEL3',
  'platformSerialIdentifier': 'S3A,S3B',
  'processingLevel': 'L1',
  'keywords': 'OLCI,SENTINEL,SENTINEL3,S3,S3A,S3B,L1,EFR',
  'sensorType': 'OPTICAL',
  'license': 'proprietary',
  'title': 'SENTINEL3 EFR',
  'missionStartDate': '2016-02-16T00:00:00Z'},
 {'ID': 'S3_ERR',
  'abstract': '',
  'instrument': 'OLCI',
  'platform': 'SENTINEL3',
  'platformSerialIdentifier': 'S3A,S3B',
  'processingLevel': 'L1,L2',
  'keywords': 'OLCI,SENTINEL,SENTINEL3,S3,S3A,S3B,L1,L2,ERR',
  'sensorType': 'OPTICAL',
  'license': 'proprietary',
  'title': 'SENTINEL3 ERR',
  'missionStartDate': '2016-02-16T00:00:00Z'},
 {'ID': 'S3_LAN',
  'abstract': 'LAN or SR_2_LAN___ (peps)',
  'instrument': 'SRAL',
  'platform': 'SENTINEL3',
  'platformSerialIdentifier': 'S3A,S3B',
  'processingLevel': 'L2',
  'keywords': 'SRAL,SENTINEL,SENTINEL3,S3,S3A,S3B,L2,LAN',
  'sensorType': 'RADAR',
  'license': 'proprietary',
  'title': 'SENTINEL3 SRAL Level-2 LAN',
  'missionStartDate': '2016-02-16T00:00:00Z'},
 {'ID': 'S3_OLCI_L2LFR',
  'abstract': 'The OLCI Level-2 Land Full Resolution (OL_2_LFR) products contain land and atmospheric geophysical products at Full\nresolution with a spatial sampling of approximately 300 m. The products are assumed to be computed in Near Real\nTime (NRT) (i.e. delivered to users less than 3 hours after acquisition), in Non-Time Critical (NTC) (i.e.\nwithin 1 month after acquisition) or in re-processed NTC.\nDetails at https://sentinel.esa.int/web/sentinel/user-guides/sentinel-3-olci/product-types/level-2-land\n',
  'instrument': 'OLCI',
  'platform': 'SENTINEL3',
  'platformSerialIdentifier': 'S3A,S3B',
  'processingLevel': 'L2',
  'keywords': 'OLCI,SENTINEL,SENTINEL3,S3,S3A,S3B,L2,L2LFR,LFR',
  'sensorType': 'OPTICAL',
  'license': 'proprietary',
  'title': 'SENTINEL3 OLCI Level-2 Land Full Resolution',
  'missionStartDate': '2016-02-16T00:00:00Z'},
 {'ID': 'S3_OLCI_L2LRR',
  'abstract': 'The OLCI Level-2 Land Reduced Resolution (OL_2_LRR) products contain land and atmospheric geophysical products\nat Reduced resolution with a spatial sampling of approximately 1.2 km. The products are assumed to be computed\nin Near Real Time (NRT) (i.e. delivered to users less than 3 hours after acquisition), in Non-Time Critical\n(NTC) (i.e. within 1 month after acquisition) or in re-processed NTC.\nDetails at https://sentinel.esa.int/web/sentinel/user-guides/sentinel-3-olci/product-types/level-2-land\n',
  'instrument': 'OLCI',
  'platform': 'SENTINEL3',
  'platformSerialIdentifier': 'S3A,S3B',
  'processingLevel': 'L2',
  'keywords': 'OLCI,SENTINEL,SENTINEL3,S3,S3A,S3B,L2,L2LRR,LRR',
  'sensorType': 'OPTICAL',
  'license': 'proprietary',
  'title': 'SENTINEL3 OLCI Level-2 Land Reduced Resolution',
  'missionStartDate': '2016-02-16T00:00:00Z'},
 {'ID': 'S3_SLSTR_L1RBT',
  'abstract': 'SLSTR Level-1 observation mode products consisting of full resolution,\ngeolocated, co-located nadir and along track view, Top of Atmosphere\n(TOA) brightness temperatures (in the case of thermal IR channels) or\nradiances (in the case of visible, NIR and SWIR channels) from all\nSLSTR channels, and quality flags, pixel classification information\nand meteorological annotations\n',
  'instrument': 'SLSTR',
  'platform': 'SENTINEL3',
  'platformSerialIdentifier': 'S3A,S3B',
  'processingLevel': 'L1',
  'keywords': 'SLSTR,SENTINEL,SENTINEL3,S3,S3A,S3B,L1,L1RBT,RBT',
  'sensorType': 'OPTICAL',
  'license': 'proprietary',
  'title': 'SENTINEL3 SLSTR Level-1',
  'missionStartDate': '2016-02-16T00:00:00Z'},
 {'ID': 'S3_SLSTR_L2LST',
  'abstract': 'The SLSTR Level-2 LST product provides land surface parameters generated on the wide 1 km measurement grid.\nIt contains measurement file with Land Surface Temperature (LST) values with associated parameters (LST\nparameters are computed and provided for each pixel (re-gridded or orphan) included in the 1 km measurement grid)\n',
  'instrument': 'SLSTR',
  'platform': 'SENTINEL3',
  'platformSerialIdentifier': 'S3A,S3B',
  'processingLevel': 'L2',
  'keywords': 'SLSTR,SENTINEL,SENTINEL3,S3,S3A,S3B,L2,L2LST,LST',
  'sensorType': 'OPTICAL',
  'license': 'proprietary',
  'title': 'SENTINEL3 SLSTR Level-2 LST',
  'missionStartDate': '2016-02-16T00:00:00Z'},
 {'ID': 'S3_SRA',
  'abstract': '',
  'instrument': 'SRAL',
  'platform': 'SENTINEL3',
  'platformSerialIdentifier': 'S3A,S3B',
  'processingLevel': 'L1',
  'keywords': 'SRA,SRAL,SENTINEL,SENTINEL3,S3,S3A,S3B,L1',
  'sensorType': 'RADAR',
  'license': 'proprietary',
  'title': 'SENTINEL3 SRAL Level-1',
  'missionStartDate': '2016-02-16T00:00:00Z'},
 {'ID': 'S3_SRA_A_BS',
  'abstract': '',
  'instrument': 'SRAL',
  'platform': 'SENTINEL3',
  'platformSerialIdentifier': 'S3A,S3B',
  'processingLevel': 'L1',
  'keywords': 'SRA,SRAL,SENTINEL,SENTINEL3,S3,S3A,S3B,L1,BS',
  'sensorType': 'RADAR',
  'license': 'proprietary',
  'title': 'SENTINEL3 SRAL Level-1',
  'missionStartDate': '2016-02-16T00:00:00Z'},
 {'ID': 'S3_SRA_BS',
  'abstract': '',
  'instrument': 'SRAL',
  'platform': 'SENTINEL3',
  'platformSerialIdentifier': 'S3A,S3B',
  'processingLevel': 'L1',
  'keywords': 'SRA,SRAL,SENTINEL,SENTINEL3,S3,S3A,S3B,L1,BS',
  'sensorType': 'RADAR',
  'license': 'proprietary',
  'title': 'SENTINEL3 SRAL Level-1',
  'missionStartDate': '2016-02-16T00:00:00Z'},
 {'ID': 'S3_WAT',
  'abstract': '',
  'instrument': 'SRAL',
  'platform': 'SENTINEL3',
  'platformSerialIdentifier': 'S3A,S3B',
  'processingLevel': 'L2',
  'keywords': 'SRAL,SENTINEL,SENTINEL3,S3,S3A,S3B,L2,WAT',
  'sensorType': 'RADAR',
  'license': 'proprietary',
  'title': 'SENTINEL3 SRAL Level-2 WAT',
  'missionStartDate': '2016-02-16T00:00:00Z'}]

If none of them matches your needs, can you please give us some information on this missing product type, going to https://finder.creodias.eu/ and report us which instrument, processing level, product type, etc would give you the data you want.
Thanks

related to #168

@sbrunato sbrunato changed the title Absenence of VZA , SZA Absence of VZA , SZA Jan 4, 2022
@saeedojaghi
Copy link
Author

saeedojaghi commented Jan 4, 2022

Hi again, thank you for your reply.
I am looking for S3_EFR, which is provided by creodias and onda. when you download through API, they include everything and you have a full package, however when you want to convert them directly to xarray dataset without downloading that case you just have access to the reflectance dataset.

@sbrunato
Copy link
Collaborator

sbrunato commented Jan 5, 2022

This data seems to be included in tie_geometries. Does this work getting data for this band on you side ?

image

@saeedojaghi
Copy link
Author

saeedojaghi commented Jan 5, 2022

Hi Sylvain,
Thank you for your answer, I tried to run the same code that you provided, but it is strange that why it makes the CRS error , I tried to fix it (second image) but it does not work .

image

image

@sbrunato
Copy link
Collaborator

sbrunato commented Jan 5, 2022

#25 and #26 will be needed for this.
For the moment a new release has not been published yet (but it will soon), so you'll need to use develop branch to test it.

Install following https://github.com/CS-SI/eodag-cube#contribute or

pip install git+https://github.com/CS-SI/eodag-cube.git@develop

@saeedojaghi
Copy link
Author

saeedojaghi commented Jan 5, 2022

I really appreciate it, Sylvain,
Finally, I fixed it. But as you know, to get the data, we have to download it first.
How is it possible without downloading the data, we reach the data through the cloud API in the form of xarray ??

Thank you in advance

@saeedojaghi
Copy link
Author

I think there is another problem when you want to put the extent parameter in get_data and crop the data, the output is empty.
Do you have any comments on this problem?
Thank you

@saeedojaghi
Copy link
Author

This data seems to be included in tie_geometries. Does this work getting data for this band on you side ?

image

As I said before it works now, nut I have another problem when I want to get_data from 'instrument_data' it does not work and give the following error:
image

@sbrunato
Copy link
Collaborator

sbrunato commented Jan 7, 2022

But as you know, to get the data, we have to download it first.
How is it possible without downloading the data, we reach the data through the cloud API in the form of xarray ??

For the moment, zipped products have to be downloaded first for providers like onda or creodias because they do not provide a direct access to bands.
Using STAC providers (astraea_eod, usgs_satapi_aws, earth_search) data can be accessed per band without downloading the full product.

@sbrunato
Copy link
Collaborator

sbrunato commented Jan 7, 2022

I think there is another problem when you want to put the extent parameter in get_data and crop the data, the output is empty.

This is because you get an error. If you look in the logs, you will see:

[ERROR   ] (_product         ) The transformation is already "north up" or a transformation between pixel/line and georeferenced coordinates cannot be computed for /path/to/Oa08_radiance.nc. There is no affine transformation and no GCPs. Specify transformation option SRC_METHOD=NO_GEOTRANSFORM to bypass this check.

Projection information is lacking as is for this data to enable on-the-fly cropping with get_data()

@sbrunato
Copy link
Collaborator

sbrunato commented Jan 7, 2022

when I want to get_data from 'instrument_data' it does not work and give the following error:.

I also encounter the same issue with this band and opened a separate issue, see #28

@saeedojaghi
Copy link
Author

saeedojaghi commented Jan 7, 2022

STAC providers

Do you have any suggestions for this problem?
I think we have to georeference the downloaded NetCDF file and then crop it

@sbrunato
Copy link
Collaborator

sbrunato commented Oct 3, 2023

Do you have any suggestions for this problem?
I think we have to georeference the downloaded NetCDF file and then crop it

eodag-cube cannot georeference the data. So yes, you should get the whole NetCDF and georeference then crop it out of eodag-cube

@sbrunato sbrunato closed this as completed Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants