1

I am using GDAL translate to convert tif in float 32 to Byte format. When I run the conversion using GDAL translate, the output is useless (see pictures). GDAL does not seem to have this problem with other formats, Int 16 worked fine, but I need these images in Byte.output input

Command: gdal_translate -ot Byte -of GTiff "D:/QGIS ASTER TEST/Singleband/StAustell/RT_StAustell_14.tif" "D:/QGIS ASTER TEST/test4.tif"

Log: Processing algorithm… AlgorithmDialog Input parameters: { 'COPY_SUBDATASETS' : False, 'DATA_TYPE' : 0, 'INPUT' : 'D:/QGIS ASTER TEST/Singleband/StAustell/RT_StAustell_14.tif', 'NODATA' : 0, 'OPTIONS' : '', 'OUTPUT' : 'D:/QGIS ASTER TEST/test4.tif', 'TARGET_CRS' : '' }

GDAL command: gdal_translate -ot Byte -of GTiff "D:/QGIS ASTER TEST/Singleband/StAustell/RT_StAustell_14.tif" "D:/QGIS ASTER TEST/test4.tif" GDAL command output: Input file size is 969, 872

0...10...20...30...40...50...60...70...80...90...100 - done.

Execution completed in 0.12 seconds Results: {'OUTPUT': }

Loading resulting layers Algorithm 'Translate (convert format)' finished

  • 2
    Post the command you have been using so we can further help you. – RomaH May 17 '18 at 14:04
  • I am using the GDAL extension in QGIS – P Griffin May 17 '18 at 14:20
  • 1
    At the bottom of the translate window there should be a text box that has a string of text starts 'gdal_translate', with name of files and options, that is the command that was ran. Post that text here so we can review your command, and see if there is a bug/error/etc. – RomaH May 17 '18 at 14:38
  • 1
    You probably haven't scaled your data, please edit your question and post the orig. raster statistics (min, max) and no data values. Byte can only store values 0-255. – user2856 May 17 '18 at 23:18
  • 1
    I hade the exact same problem and as Luke writes missing scaling was the issue – lijat Nov 2 '18 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.