i'm trying to export image from GEE to my drive and I have gotten this error messege: Error: Exported bands must have compatible data types; found inconsistent types: Byte and Float64.
I have read here that it may have to do with the bands, but the thing is that I don't really need all the bands, I want to download it in RGB .
this is the code I have :
// Load a Landsat 8 -atmospheric corrected
var collection = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
//surface reflectance
.filterBounds(table)
.filterDate('2015-03-01', '2018-03-31');
// Get the number of images.
var count = collection.size();
print('Count: ', count);
// make a composite (mean image) of the images
var meanImage = collection.mean().clip(table);
print(meanImage,'mean image');
//make image for mesopotamia only
//var mesopotamia=meanImage.clip(table);
//visualization
var visParams = {
bands: ['B4', 'B3', 'B2'],
min: 0,
max: 3000,
gamma: 1.4,
};
Map.addLayer(meanImage,visParams,'Landset8');
//Map.addLayer(mesopotamia,visParams,'Mesopotamia');
var toexport = meanImage.visualize(visParams).addBands(meanImage)
// Export the image, specifying scale and region.
Export.image.toDrive({
image: toexport,
description: 'MesopotamiaLandset8',
scale:30,
maxPixels:201406799,
region: table
});