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

stac threedep create-catalog trying to generate 1/3 second item metadata for items that only exist in 1 second collection #14

Closed
hrodmn opened this issue Jul 21, 2023 · 0 comments · Fixed by #15
Labels
bug Something isn't working

Comments

@hrodmn
Copy link
Contributor

hrodmn commented Jul 21, 2023

I recently tried generating the STAC metadata using stac threedep create-catalog /tmp/threedep_catalog but hit an error while generating the 1/3 arc-second items:

FileNotFoundError: https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/TIFF/current/n15w093/USGS_13_n15w093.xml

After digging around a bit I found the root cause in commands.py:
https://github.com/stactools-packages/threedep/blob/main/src/stactools/threedep/commands.py#L63-L69

If you don't provide any asset_ids to the cli script, asset_ids gets created by utils.fetch_ids(product) when running the 1 second collection (product = 1). Then when the loop cycles to product = 13, the asset_ids variable exists so we don't run utils.fetch_ids(product) again. Maybe this used to work but there are some IDs in the 1-second collection that are not present in the 1/3-second collection which causes the FileNotFoundERror.

@hrodmn hrodmn added the bug Something isn't working label Jul 21, 2023
hrodmn added a commit to ncx-co/threedep that referenced this issue Jul 21, 2023
hrodmn added a commit to ncx-co/threedep that referenced this issue Aug 8, 2023
gadomski pushed a commit that referenced this issue Aug 8, 2023
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

Successfully merging a pull request may close this issue.

1 participant