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

ninjogeotiff writer should write gradient for P mode images #2869

Closed
gerritholl opened this issue Aug 5, 2024 · 0 comments · Fixed by #2870
Closed

ninjogeotiff writer should write gradient for P mode images #2869

gerritholl opened this issue Aug 5, 2024 · 0 comments · Fixed by #2870
Assignees
Milestone

Comments

@gerritholl
Copy link
Collaborator

gerritholl commented Aug 5, 2024

Feature Request

Is your feature request related to a problem? Please describe.

The ninjogeotiff writer omits gradient and axis intercept for images of mode P, RGB, or RGBA, because those tags are not meaningful for categorical or RGB images. However, for mode P images, NinJo still expects a gradient set to 1. As it is now, mode P images produced by Satpy cannot be correctly displayed in NinJo, because the absence of a gradient is interpreted as a gradient of 0, leading to all-black images.

For mode P images, NinJo ignores the physical quantity/unit. Colormaps and legends are defined entirely in terms of pixel values. Therefore, regardless of the physical quantity/unit, it needs that gradient=1 and axisintercept=0.y**.

Describe the solution you'd like

The Satpy ninjogeotiff writer should (optionally) include a gradient and axis intercept for mode P images. The user should have a way to force those values to 1 and 0, overriding other methods that satpy and trollimage use for determining the correct gradient and axis intercept.

Describe any changes to existing user workflow

If we default to include gradient and axis intercept in the future, any users who rely on their absence will have to change their workflow. I expect no such users exist.

Overriding the automatically computed values should of course be optional, so this part will not affect any existing user workflow.

Additional context

The alternative would be to change NinJo, but changing Satpy is 2–3 orders of magnitude faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant