-
Notifications
You must be signed in to change notification settings - Fork 283
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
How to create a multi-band geotiff? #2698
Comments
The geotiff writer writes one dataset per file. That could be a single band (mode L or LA) or a composite (mode RGB/RGBA) such as There is also the |
@swdmike how many bands would you like in your geotiff? Can geotiff hold an arbitrary number of bands? |
Geotiff can hold "many" bands. In a project I've created 7-band files using |
If this is a strongly requested feature (I know @simonrp84 has wanted to do this in the past and likely uses GDAL post-satpy to do it) then I think a separate writer based on the existing Geotiff writer could be created. It could/should enhance all the datasets provided to it, join them together along some dimension, then give it to trollimage
This is off the top of my head. |
You don't. Only mode L can be stored in such files (maybe mode P). |
Are you telling me it isn't possible or are you saying this is your suggestion for the solution? If this is your suggestion, then I'd argue shouldn't we let the users decide how to parse out the bands of the file in whatever application they have? We're already talking about non-standard geotiffs (non-standard in the sense that they aren't normal image modes). |
I thought it wasn't possible, but looking again, I'm not so sure any more. Note that we already support storing multiple RGBs in a single TIFF file, using the overviews option. But overviews is just a special case for storing multiple images in a file. Similarly, as I understand it, an image of mode RGB, RGBA, or LA is a special case for storing multiple bands in a single image, and that this interpretation is only given in this case. I think that soon as more than 4 bands are stored in an image, TIFF no longer has this way to tell how images should be interpreted, which arguably means that image modes are not supported at all. The user can interpret and process the data how they want. Someone storing multiple RGBs in a single file might be better off storing multiple images in a file rather than multiple bands in a single image, but in both cases, Satpy only supports the special case (overviews for multiple images, or LA/RGB/RGBA for multiple bands). |
Describe the bug
Sorry to ask, does scene.save_datasets support multi band geotiff? The result contains only one band. My data is Himawari HSD.
Well, true color tif is all right.
The text was updated successfully, but these errors were encountered: