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

Trying to index sentinel data into open data cude using this command stac-to-dc --catalog-href='https://earth-search.aws.element84.com/v0/' --bbox='25,20,35,30' --collections='sentinel-s2-l2a-cogs' --datetime='2020-01-01/2020-03-31' .But it shows exception #586

Open
chiranjivSharma opened this issue Nov 2, 2023 · 12 comments

Comments

@chiranjivSharma
Copy link

/home/bel/miniconda3/envs/cubeenv1/lib/python3.11/site-packages/pystac_client/client.py:186: NoConformsTo: Server does not advertise any conformance classes.
warnings.warn(NoConformsTo())
Traceback (most recent call last):
File "/home/bel/miniconda3/envs/cubeenv1/bin/stac-to-dc", line 8, in
sys.exit(cli())
^^^^^
File "/home/bel/miniconda3/envs/cubeenv1/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bel/miniconda3/envs/cubeenv1/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/bel/miniconda3/envs/cubeenv1/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bel/miniconda3/envs/cubeenv1/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bel/miniconda3/envs/cubeenv1/lib/python3.11/site-packages/odc/apps/dc_tools/stac_api_to_dc.py", line 302, in cli
added, failed, skipped = stac_api_to_odc(
^^^^^^^^^^^^^^^^
File "/home/bel/miniconda3/envs/cubeenv1/lib/python3.11/site-packages/odc/apps/dc_tools/stac_api_to_dc.py", line 159, in stac_api_to_odc
search = client.search(**config)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bel/miniconda3/envs/cubeenv1/lib/python3.11/site-packages/pystac_client/client.py", line 591, in search
raise DoesNotConformTo(
pystac_client.warnings.DoesNotConformTo: Server does not conform to ITEM_SEARCH, There is not fallback option available for search.

@SpacemanPaul SpacemanPaul transferred this issue from opendatacube/datacube-core Nov 3, 2023
@alexgleith
Copy link
Contributor

Can you please share what parameters you've used for the tool?

I think you may be using a STAC API endpoint/catalog URL that isn't appropriate.

@alexgleith
Copy link
Contributor

Oh, I see it's in your title https://earth-search.aws.element84.com/v0/

Please use their V1 API: earth-search.aws.element84.com/v1/

@chiranjivSharma
Copy link
Author

stac-to-dc --catalog-href='https://earth-search.aws.element84.com/v1/' --bbox='25,20,35,30' --collections='sentinel-s2-l2a-cogs' --datetime='2023-01-01/2023-03-31' .....used this v1 api ,getting below mentioned message

11/03/2023 03:58:53: WARNING: Didn't find any items, finishing.
Added 0 Datasets, failed 0 Datasets, skipped 0 Datasets

could you help on this.

@alexgleith
Copy link
Contributor

Oh, you need to change the name of the collection to the new one.

@chiranjivSharma
Copy link
Author

could you help on identifying the new collection name

@alexgleith
Copy link
Contributor

Sorry, yeah. It's this one: https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a

The name is sentinel-2-l2a.

I'll update the documentation.

@chiranjivSharma
Copy link
Author

stac-to-dc --catalog-href='https://earth-search.aws.element84.com/v1/' --bbox='25,20,35,30' --collections='sentinel-2-l2a' --datetime='2023-01-01/2023-01-02'....used this command now. But now I am getting below mentioned error message....

Indexing from STAC API...
/home/bel/miniconda3/envs/cubeenv1/lib/python3.11/site-packages/pystac_client/item_search.py:850: FutureWarning: get_all_items() is deprecated, use item_collection() instead.
warnings.warn(
11/03/2023 04:22:06: ERROR: Failed to handle item S2B_35QNE_20230101_0_L2A
Traceback (most recent call last):
File "/home/bel/miniconda3/envs/cubeenv1/lib/python3.11/site-packages/odc/apps/dc_tools/stac_api_to_dc.py", line 194, in stac_api_to_odc
_ = future.result()
^^^^^^^^^^^^^^^
File "/home/bel/miniconda3/envs/cubeenv1/lib/python3.11/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/bel/miniconda3/envs/cubeenv1/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/bel/miniconda3/envs/cubeenv1/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bel/miniconda3/envs/cubeenv1/lib/python3.11/site-packages/odc/apps/dc_tools/stac_api_to_dc.py", line 132, in process_item
index_update_dataset(
File "/home/bel/miniconda3/envs/cubeenv1/lib/python3.11/site-packages/odc/apps/dc_tools/utils.py", line 218, in index_update_dataset
raise IndexingException(
odc.apps.dc_tools.utils.IndexingException: Failed to create dataset with error The dataset is not specifying all of the measurements in this product.
Missing fields are;
{'B04', 'B8A', 'B01', 'B11', 'B09', 'B07', 'SCL', 'B03', 'B05', 'B06', 'WVP', 'B02', 'AOT', 'B08', 'B12'}
The URI was s3://sentinel-cogs/sentinel-s2-l2a-cogs/35/Q/NE/2023/1/S2B_35QNE_20230101_0_L2A/S2B_35QNE_20230101_0_L2A.json

Like this for many other similar messages. Any idea on this, as in what could go wrong.
Earlier to this I added a product with datacube product add s2_l2a.odc-product.yaml this command.

@chiranjivSharma
Copy link
Author

chiranjivSharma commented Nov 3, 2023

Finally it shows- Added 0 Datasets, failed 87 Datasets, skipped 0 Datasets message

@alexgleith
Copy link
Contributor

Ooh, the product definition needs to change too...

@chiranjivSharma
Copy link
Author

you got any link to that other product definition yaml file and do I need to remove the earlier product definition file before adding the new one?

@alexgleith
Copy link
Contributor

Can you please check this, maybe test the new product definition: https://github.com/opendatacube/datacube-dataset-config/compare/main...alexgleith-patch-1?quick_pull=1

You can update the product with datacube product update --allow-unsafe <path-to-file>.yaml

@chiranjivSharma
Copy link
Author

Thanks it helped

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