2

Is it possible to change the data type from "Float32 - Thirty two bit floating point" to "Byte - Eight bit unsigned integer"? I've tried few options, but failed.

Data type save raster options

1
  • Eight bits has a tiny fraction of the range of values in a 4-byte float. "Save As" seems like the wrong interface -- Some sort of calculation would be a better way to map the results.
    – Vince
    Commented Aug 7, 2023 at 13:11

1 Answer 1

2

Use the other tool "Raster conversion - Translate". There you can add additional command line parameters which are documented in https://gdal.org/programs/gdal_translate.html.

In your case you probably want to use -ot Byte. You need a rather new GDAL for signed byte, see https://gdal.org/development/rfc/rfc87_signed_int8.html

The Save as tool does not work because it has an UI only for the creation options, but selecting pixel type does not belong to the creation options of the GeoTIFF driver https://gdal.org/drivers/raster/gtiff.html.

2
  • Thanks for the explanation! Just a little correction: it is -ot Byte for getting the OP result. QGIS 3.28.9 has the GDAL v. 3.7.1, which is fine! Commented Aug 7, 2023 at 13:31
  • 1
    Right, I did not read the question well enough but just looked the screen capture where OP had experimented with PIXELTYPE=SIGNEDBYTE.
    – user30184
    Commented Aug 7, 2023 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.