Mosaic: adds band and datatype checks#313
Mosaic: adds band and datatype checks#313jfbourdon wants to merge 2 commits intojblindsay:masterfrom
Conversation
|
This is a great addition! Is there a place that multi-band input can be checked more generally in the GeoTIFF reader rather than in the tool itself? I think most tools encounter problems when fed a multiband TIFF file |
|
Do you suggest to consider any multiband GeoTIFF as invalid when loaded? If so, it would be an issue with some tools that either support or require multiband like |
Yeah, I was suggesting that. The manual does state multi-band GeoTIFF are not supported. https://www.whiteboxgeo.com/manual/wbt_book/supported_formats.html
I must admit I didn't realize these tools worked with multi-band GeoTIFF input. I just tested RgbToIhs with an RGB GeoTIFF and can confirm it does run via
I think my suggestion is mainly for cases where reading of GeoTIFF input would cause a confusing error in a tool. Perhaps tool parameters need a new flag in the metadata to reflect when they support multiband input |
I missed that part in the manual... but it seems that the manual is wrong as you found out yourself, at least for multiband RGB/RGBA Uint8 GeoTIFF. I really think that there should be an explicit check for multiband in all raster tool. We'll see what Lindsay has to say on this. |
Partially fix #309
Explicitly tell the user that the tool can only work with single band and single data type rasters. I had to modify the GeoTiff reader in order to expose the number of bands inside a GeoTiff as before is was always set to one.
A better solution would be to edit the tool in order for it to accept multiband raster but that is more work.