-
Notifications
You must be signed in to change notification settings - Fork 8
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
Added landsat8 collection2 support #173
Added landsat8 collection2 support #173
Conversation
Fixed a bug in my previous commit, i.e. different group names between Landsat 8 vs 5-7 -> "TIRS_THERMAL_CONSTANTS" vs "THERMAL_CONSTANTS" were not considered for collection 1 data, hence causing a unit test error. This issue has been resolved in my latest commit. In additon, I included an iterative search for the collection number inside the MTL metadata file. This allows for an easy expansion towards additional collection numbers in the future. Group names are defined based on the found collection number and exceptions are treated as AttributeErrors. I missed to set the black formatting line length to 120 in my earlier commit. This has been fixed in my latest commit. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #173 +/- ##
==========================================
- Coverage 96.16% 95.41% -0.76%
==========================================
Files 6 6
Lines 548 567 +19
==========================================
+ Hits 527 541 +14
- Misses 21 26 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks good, I guess we can do it like that. Thank you very much!
… added argument to iteratre_mtl(), whis is missing in the comment (otherwise there would be nothing to call
Current version of raster.py uses metadata group names based on Landsat Collection 1 data (obsolete). This revised version checks the collection number from the MTL metadata file and uses proper group names depending on the collection number.
MTL changes are documented in "Landsat Collection 2 Level-1 Product Metadata Fields", which can be accessed at USGS: https://www.usgs.gov/media/files/landsat-collection-2-level-1-metadata-additions-and-changes