0

I am working with some data that somebody else prepared. The data consists of DEM .tif files that have been remapped to different values. When I attempt to upload these files to Google Earth Engine via the assets tab, I get the following error:

Error: No data value -128.0 cannot be applied to band #0 of type Short <0, 255>.

Is there any way i can alter the data in QGIS to fix this error?

1 Answer 1

0

If the Earth Engine error is correct, the nodata value is incompatible with the data type of your image because -128 cannot be represented in an unsigned integer. You can fix that in QGIS by re-exporting the image with a compatible data type using the Raster > Conversion > Translate (Convert Format) tool.

If the int8 data type isn't supported by your QGIS version (it was added recently), you could either:

  1. Continue using -128 as the nodata value but use an int16 data type. This will make a larger file, but allow you to keep using the same nodata value.
  2. Assign a new nodata value (like 0 or 255) and use a byte data type. Just make sure that the nodata value you choose isn't being used for valid data.

Both of those can be done using the Translate tool.

1
  • Thank you Aaron! That worked! Commented Feb 6 at 17:41

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.