<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi list,<div><br></div><div>I just tried to convert a Cloudsat (2B-GEOPROF to be exact) to a TIFF. I try to do this using the Python bindings and creating a VRT [3] referencing the Subdatasets of the HDF 4 file. </div><div><br></div><div>When I try to do this, I get the following error: </div><div><br></div><div>"Unable to export GeoTIFF file with different datatypes per different bands. All bands should have the same types in TIFF."</div><div><br></div><div>The TIFF spec allows to define the dataset for each sample ([1] and [2]), but it seems that GDAL does not support it. </div><div><br></div><div>I'd like to know if there is a way around this error or otherwise if it would be possible/feasible to implement this in the driver?</div><div><br></div><div>I understand, that the TIFF driver is one of the oldest but still most used ones around, so breaking compatibility would potentially be devastating. Maybe putting this functionality behind a flag might be preferable.</div><div><br></div><div>Regards,</div><div>Fabian</div><div><br></div><div>[1] <a href="https://www.awaresystems.be/imaging/tiff/tifftags/bitspersample.html">https://www.awaresystems.be/imaging/tiff/tifftags/bitspersample.html</a></div><div>[2] <a href="https://www.awaresystems.be/imaging/tiff/tifftags/sampleformat.html">https://www.awaresystems.be/imaging/tiff/tifftags/sampleformat.html</a></div><div>[3] This is the generated temporary VRT I try to generate a TIFF copy from:</div><div><br></div><div><VRTDataset rasterXSize="125" rasterYSize="20753"><br></div><div><div>  <VRTRasterBand dataType="Int16" band="1"></div><div>    <NoDataValue>15360</NoDataValue></div><div>    <ComplexSource></div><div>      <SourceFilename relativeToVRT="0">HDF4_EOS:EOS_SWATH:"autotest/data/2017339123204_61738_CS_2B-GEOPROF_GRANULE_P_R04_E06.hdf":2B-GEOPROF:Radar_Reflectivity</SourceFilename></div><div>      <SourceBand>1</SourceBand></div><div>      <SourceProperties RasterXSize="125" RasterYSize="20753" DataType="Int16" BlockXSize="125" BlockYSize="8000" /></div><div>      <SrcRect xOff="0" yOff="0" xSize="125" ySize="20753" /></div><div>      <DstRect xOff="0" yOff="0" xSize="125" ySize="20753" /></div><div>      <NODATA>15360</NODATA></div><div>    </ComplexSource></div><div>  </VRTRasterBand></div><div>  <VRTRasterBand dataType="Int16" band="2"></div><div>    <NoDataValue>15360</NoDataValue></div><div>    <ComplexSource></div><div>      <SourceFilename relativeToVRT="0">HDF4_EOS:EOS_SWATH:"autotest/data/2017339123204_61738_CS_2B-GEOPROF_GRANULE_P_R04_E06.hdf":2B-GEOPROF:Gaseous_Attenuation</SourceFilename></div><div>      <SourceBand>1</SourceBand></div><div>      <SourceProperties RasterXSize="125" RasterYSize="20753" DataType="Int16" BlockXSize="125" BlockYSize="8000" /></div><div>      <SrcRect xOff="0" yOff="0" xSize="125" ySize="20753" /></div><div>      <DstRect xOff="0" yOff="0" xSize="125" ySize="20753" /></div><div>      <NODATA>15360</NODATA></div><div>    </ComplexSource></div><div>  </VRTRasterBand></div><div>  <VRTRasterBand dataType="Byte" band="3"></div><div>    <NoDataValue>-99</NoDataValue></div><div>    <ComplexSource></div><div>      <SourceFilename relativeToVRT="0">HDF4_EOS:EOS_SWATH:"autotest/data/2017339123204_61738_CS_2B-GEOPROF_GRANULE_P_R04_E06.hdf":2B-GEOPROF:CPR_Cloud_mask</SourceFilename></div><div>      <SourceBand>1</SourceBand></div><div>      <SourceProperties RasterXSize="125" RasterYSize="20753" DataType="Byte" BlockXSize="125" BlockYSize="8000" /></div><div>      <SrcRect xOff="0" yOff="0" xSize="125" ySize="20753" /></div><div>      <DstRect xOff="0" yOff="0" xSize="125" ySize="20753" /></div><div>      <NODATA>-99</NODATA></div><div>    </ComplexSource></div><div>  </VRTRasterBand></div><div></VRTDataset></div></div></div></div></div></div></div></div></div>