Skip to content

Handle CMETAA autofocus type field rename - #628

Open
arpitjain099 wants to merge 1 commit into
ngageoint:masterfrom
arpitjain099:chore/cmetaa-af-type1-fallback
Open

Handle CMETAA autofocus type field rename#628
arpitjain099 wants to merge 1 commit into
ngageoint:masterfrom
arpitjain099:chore/cmetaa-af-type1-fallback

Conversation

@arpitjain099

Copy link
Copy Markdown

Fixes #487

CMETAA now stores autofocus type values as AF_TYPE1, AF_TYPE2, and AF_TYPE3, but other_nitf was still reading AF_TYPE[0]. That can fail on newer CMETAA structures and prevents AzAutofocus from being set correctly.

This adds a small helper that reads AF_TYPE1 first, falls back to AF_TYPE for compatibility, and defaults safely when neither is present.

I also added focused tests for:

  • AF_TYPE1 taking precedence
  • fallback to AF_TYPE
  • default behavior when both are missing

Verified with:

  • ./.venv/bin/python -m pytest tests/io/complex/test_other_nitf.py

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
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.

CMETAA AF_TYPE

1 participant