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

SRAL Level 1 products are reported erroneously as naming convention violations #5

Open
sustr4 opened this issue Aug 12, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@sustr4
Copy link

sustr4 commented Aug 12, 2022

Describe the bug
Sentinel 3 SRAL Level 1 products are erroneously reported as violating the Sentinel 3 naming convention. This affects all SRAL Level 1 products, i.e., products with titles starting with S3?_SR_1_.

To reproduce
Steps to reproduce the behavior:

curl -JOn "https://apihub.copernicus.eu/apihub/odata/v1/Products('f29adb61-3929-4cfd-b205-626dfbd3e418')/\$value"
unzip S3A_SR_1_SRA_A__20220802T194015_20220802T203045_20220804T083726_3029_088_170______PS1_O_ST_004.zip
stac sentinel3 create-item S3A_SR_1_SRA_A__20220802T194015_20220802T203045_20220804T083726_3029_088_170______PS1_O_ST_004.SEN3 ./

Said procedure fails, full dump is shown bellow.

Expected behavior
One of two things should happen:

  1. Processing should fail gracefully, reporting product type as recognized but unsupported, or, even better
  2. SRAL Level 1 products should be properly recognized and supported.

Screenshots and shell session dumps

$ ~/.local/bin/stac sentinel3 create-item S3A_SR_1_SRA_A__20220802T194015_20220802T203045_20220804T083726_3029_088_170______PS1_O_ST_004.SEN3 ./
Traceback (most recent call last):
  File "/home/debian/.local/bin/stac", line 8, in <module>
    sys.exit(run_cli())
  File "/home/debian/.local/lib/python3.9/site-packages/stactools/cli/cli.py", line 40, in run_cli
    cli(prog_name='stac')
  File "/home/debian/.local/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/debian/.local/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/debian/.local/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/debian/.local/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/debian/.local/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/debian/.local/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/debian/.local/lib/python3.9/site-packages/stactools/sentinel3/commands.py", line 33, in create_item_command
    item = create_item(src)
  File "/home/debian/.local/lib/python3.9/site-packages/stactools/sentinel3/stac.py", line 48, in create_item
    fill_eo_properties(eo, metalinks.product_metadata_href)
  File "/home/debian/.local/lib/python3.9/site-packages/stactools/sentinel3/properties.py", line 73, in fill_eo_properties
    raise ValueError("Unexpected value found at "
ValueError: Unexpected value found at S3A_SR_1_SRA_A__20220802T194015_20220802T203045_20220804T083726_3029_088_170______PS1_O_ST_004.SEN3: this was expected to follow the sentinel 3 naming convention, including ending in .SEN3

Additional context
I am considering opening a separate feature request for this product type.

@sustr4 sustr4 added the bug Something isn't working label Aug 12, 2022
@Johaney-s
Copy link

Any updates on this? I am also struggling with this particular naming convention on SR_1 products.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants