Skip to content

Conversation

@rebclarke
Copy link

@rebclarke rebclarke commented Dec 18, 2025

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:

  • R,G,B,Undefined - where the band labelled Undefined is NIR.
  • R,G,B,Alpha - where the band labelled Alpha is NIR.
  • R,G,B,Undefined,Alpha - where the band labelled Undefined is NIR and Alpha is Alpha.

The desired output bands are:
R/G/B/NIR/A 5-band TIFFs

Modifications

Added a new preset rgbnir_zstd
Updated 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.

@rebclarke rebclarke added the container Publish a container label Dec 18, 2025
@rebclarke rebclarke added container Publish a container and removed container Publish a container labels Dec 18, 2025
@rebclarke rebclarke added container Publish a container and removed container Publish a container labels Jan 13, 2026
@rebclarke rebclarke changed the title feat: rgbnir gdal preset tde-1740 feat: rgbnir gdal preset tde-693 Jan 13, 2026
@amfage amfage added container Publish a container and removed container Publish a container labels Jan 14, 2026
@amfage amfage changed the title feat: rgbnir gdal preset tde-693 feat: standardise RGBN imagery TDE-693 Jan 14, 2026
@amfage amfage removed the container Publish a container label Jan 14, 2026
@amfage amfage added the container Publish a container label Jan 14, 2026


# pylint: disable-msg=too-many-return-statements
# pylint: disable-msg=too-many-return-statements, too-many-locals, too-many-branches
Copy link
Collaborator

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

  1. get_alpha_and_nir_args()
  2. get_gray_band_args()
  3. get_palette_band_args()
  4. 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.

@amfage amfage marked this pull request as ready for review January 16, 2026 03:21
@amfage amfage requested a review from a team as a code owner January 16, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

container Publish a container

Development

Successfully merging this pull request may close these issues.

4 participants