-
Notifications
You must be signed in to change notification settings - Fork 3
feat: standardise RGBN imagery TDE-693 #1460
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
base: master
Are you sure you want to change the base?
Conversation
scripts/gdal/gdal_bands.py
Outdated
|
|
||
|
|
||
| # pylint: disable-msg=too-many-return-statements | ||
| # pylint: disable-msg=too-many-return-statements, too-many-locals, too-many-branches |
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.
Have you considered extracting the logic of the different steps into individual helper functions?
As an example, you could look at having the following functions
get_alpha_and_nir_args()get_gray_band_args()get_palette_band_args()get_rgb_bands_args()
that would be called in that main function.
I think it would improve unit testing, maintainability and readability of this function.
Motivation
As a remote sensing scientist I want RGBNIR + Alpha TIFFs available in a public bucket so that I don’t need to request data from several different councils and/or LINZ.
This requires handling RGBN which can be in the following forms:
The desired output bands are:
R/G/B/NIR/A 5-band TIFFs
Modifications
Added a new preset
rgbnir_zstdUpdated bands checks to handle RGBNIR scenarios
Updated footprint creation to handle RGBNIR
Unit tests and doctests
End-to-end test for RGBNIR
Verification
PR container, unit tests, end-to-end tests.