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

Sun Elevation computation problem #158

Open
jteulade opened this issue Jun 17, 2024 · 0 comments
Open

Sun Elevation computation problem #158

jteulade opened this issue Jun 17, 2024 · 0 comments
Labels
0.22.0 For version 0.22.0 bug Something isn't working

Comments

@jteulade
Copy link
Contributor

For this product s3://sertit-projects-archives/projects/2024/Incendies_HP/2016_2017_Incendies_HautesPyrenees/02IMAGES/POST/RAW/S3/S3A_SL_1_RBT____20161230T221009_20161230T221309_20181003T232307_0179_012_329______LR1_R_NT_003.zip

I get this error:

Traceback (most recent call last):
  File "E:\JTeulade\repositories\stac\scripts\add_items.py", line 35, in <module>
    main()
  File "E:\JTeulade\repositories\stac\libs\sertit-utils\sertit\s3.py", line 99, in s3_env_wrapper
    return function(*_args, **_kwargs)
  File "E:\JTeulade\repositories\stac\scripts\add_items.py", line 22, in main
    add_items(valid_path_products, S3_TARGET_PATH, utils.get_ids())
  File "E:\JTeulade\repositories\stac\stac\stac.py", line 294, in add_items
    path_products = create_items(valid_path_products, catalog, s3_target_path)
  File "E:\JTeulade\repositories\stac\stac\stac.py", line 205, in create_items
    create_item(
  File "E:\JTeulade\repositories\stac\stac\stac.py", line 132, in create_item
    prod.stac.create_item()
  File "C:\Users\jteulade\AppData\Local\anaconda3\envs\arcgispro-eo\lib\site-packages\methodtools.py", line 72, in __call__
    return self.__call__(*args, **kwargs)
  File "e:\jteulade\repositories\eoreader\eoreader\__init__.py", line 34, in wrapper
    return func(*args, **kwargs)
  File "e:\jteulade\repositories\eoreader\eoreader\stac\stac_item.py", line 164, in create_item
    item.validate()
  File "C:\Users\jteulade\AppData\Local\anaconda3\envs\arcgispro-eo\lib\site-packages\pystac\stac_object.py", line 76, in validate
    return pystac.validation.validate(self)
  File "C:\Users\jteulade\AppData\Local\anaconda3\envs\arcgispro-eo\lib\site-packages\pystac\validation\__init__.py", line 36, in validate
    return validate_dict(
  File "C:\Users\jteulade\AppData\Local\anaconda3\envs\arcgispro-eo\lib\site-packages\pystac\validation\__init__.py", line 107, in validate_dict
    return RegisteredValidator.get_validator().validate(
  File "C:\Users\jteulade\AppData\Local\anaconda3\envs\arcgispro-eo\lib\site-packages\pystac\validation\stac_validator.py", line 123, in validate
    ext_result = self.validate_extension(
  File "C:\Users\jteulade\AppData\Local\anaconda3\envs\arcgispro-eo\lib\site-packages\pystac\validation\stac_validator.py", line 303, in validate_extension
    self._validate_from_uri(stac_dict, stac_object_type, schema_uri, href)
  File "C:\Users\jteulade\AppData\Local\anaconda3\envs\arcgispro-eo\lib\site-packages\pystac\validation\stac_validator.py", line 225, in _validate_from_uri
    raise STACValidationError(msg, source=errors) from best
pystac.errors.STACValidationError: Validation failed for Feature with ID 20161230T221009_S3_SLSTR_RBT against schema at https://stac-extensions.github.io/view/v1.0.0/schema.json
146.06927490234375 is greater than the maximum of 90

Failed validating 'maximum' in schema[0]['allOf'][0]['properties']['properties']['allOf'][1]['properties']['view:sun_elevation']:
    {'maximum': 90,
     'minimum': -90,
     'title': 'Sun Elevation',
     'type': 'number'}

On instance['properties']['view:sun_elevation']:
    146.06927490234375

I think there is a problem in the function to compute the sun elevation.

@jteulade jteulade added the bug Something isn't working label Jun 17, 2024
@remi-braun remi-braun added the 0.22.0 For version 0.22.0 label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.22.0 For version 0.22.0 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants