Upon analyzing the code you provided, I noticed a potential issue in the export section. It seems that the NDBI image (ndbi2020) you are trying to export is of data type Float32, but you are attempting to convert it to Int16 using the .int16() method before exporting. This could result in the pixel values being rounded down to 0, as you mentioned. To resolve this issue, you can modify the export code to export the image as Float32 directly. Here's the updated code for the export section: javascript Copy code // 5. Export to Drive Export.image.toDrive({ image: ndbi2020, description: 'NDBI image 2020', scale: 30, region: point, maxPixels: 1e13 }); By removing the .int16() method, the image will be exported as Float32, which should preserve the decimal values of the NDBI index and avoid the issue of getting pixel values of 0 in the exported image.
Upon analyzing the code you provided, I noticed a potential issue in the export section. It seems that the NDBI image (ndbi2020) you are trying to export is of data type Float32, but you are attempting to convert it to Int16 using the .int16() method before exporting. This could result in the pixel values being rounded down to 0, as you mentioned.
To resolve this issue, you can modify the export code to export the image as Float32 directly. Here's the updated code for the export section:
javascript
Copy code
// 5. Export to Drive
Export.image.toDrive({
image: ndbi2020,
description: 'NDBI image 2020',
scale: 30,
region: point,
maxPixels: 1e13
});
By removing the .int16() method, the image will be exported as Float32, which should preserve the decimal values of the NDBI index and avoid the issue of getting pixel values of 0 in the exported image.
Great job. Thanks!
Hi Joao Antonio, Thanks for your valuable comments and wonderful feedback.
Good one
Thanks Mr. Chan
while i have exported the image in q gis I got complete dark image with no pixel values
BRO IN EXPORT I AM GETTING 0 VALUES COMPLETE DARK TIFF IN EXPORT WHAT IS THE ISSUE ?
i have done this to resolve the issue
but then got only one very small area just over a house