I am beginner in GEE and trying to apply cloud mask in my study area. I found one code and trying to apply in my area: link: https://code.earthengine.google.com/31b5b21913eefdc05563dfec72c4ee08 I am trying export image to gdrive. However, I faced following error:" Exported bands must have compatible data types; found inconsistent types: Int16 and Byte" while trying to export image. Kindly check code and fix this error
[![var point = /* color: #98ff00 */ee.Geometry.Point(\[74.146537,36.255872\]);
//load images for composite
var sr14= ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
.filterBounds(point)
.filterDate('2014-01-01','2014-03-01')
//.select(\['B4','B3','B2'\]); // if you select those bands you loose BQA band
// Temporally composite the images with a maximum value function.
var composite = sr14.max();
Map.setCenter( 74.146537,36.255872);
var vis = {bands:\['B3','B6'\],min:0, max:5000}
Map.addLayer(composite, vis, 'max value composite');
var mask = require('users/fitoprincipe/geetools:cloud_masks')
print(mask.help\['landsatSR'\])
var mask_function = mask.landsatSR() // mask function
var col_free = sr14.map(mask_function) // apply function to collection
var composite_free = col_free.max() // create composite using max
Map.addLayer(composite_free, vis, 'composite collection without clouds');
// Export a cloud-optimized GeoTIFF.
Export.image.toDrive({
image: composite_free,
description: 'imageToCOGeoTiffExample',
scale: 30,
region: point,
fileFormat: 'GeoTIFF',
folder : 'My Drive/Landsat',
maxPixels: 1e13
});][1]][1]