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

run tests on all state/year combinations #30

Merged
merged 3 commits into from
Jan 27, 2023

Conversation

geomatician
Copy link
Contributor

I generated STAC items for every unique state/year combination available in the NAIP bucket. This was a total of 228 runs.

Issues I found during testing:

  1. If it can't find the resource description and date in the metadata files, the code attempts to extract it from the COG href. In order to get the date from the COG href, it uses a regex. Most of the COG's have a name with the format m_3510264_ne_13_060_20200905.tif , but some of them have it as m_4209601_ne_14_060_20180912_20181211.tif with an extra 8-number sequence at the end of the name. In these cases, the actual date for the scene is always the first set of 8 characters (in this case, 20180912) and not the second. The regex was modified to take this into account with an optional clause at the end.

  2. Some of the XML metadata files from the year 2020 do not contain the xpath gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString but instead contain the xpath idinfo/citation/citeinfo/title for the resource description field. This was added as a fallback if the longer xpath was not found. Most of the metadata files contain the longer xpath and only a handful contain the shorter one.

  3. The logic for extracting the resource description and date for scenes prior to 2020, if no resource description and date are found by looking through the associated metadata file, was made to use the same common method (maybe_extract_id_and_date) that the other cases use.

Copy link

@philvarner philvarner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regex changes requested

Copy link

@philvarner philvarner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unusued groups

Copy link

@philvarner philvarner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to go ahead and approve, pending the unused group removal

@gadomski gadomski enabled auto-merge (squash) January 27, 2023 21:59
@gadomski gadomski merged commit fdb5aff into stactools-packages:main Jan 27, 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

Successfully merging this pull request may close these issues.

3 participants