0

When trying export my file (Sentinel-2 image) from GEE, I got error:

Error: Exported bands must have compatible data types; found inconsistent types: Float32 and Float64.

This is the code to export:

Export.image.toDrive({
  image: compositeS2_15,
  description: 'compositeSS_2015',
  scale: 10,
  region: GTG.geometry().bounds(), 
  maxPixels: 3784216672400,
  crs : 'EPSG:32630',
  fileFormat: 'GEOTIFF'
});

I don't know why it doesn't work.

0

1 Answer 1

1

When exporting to a GeoTIFF, all bands must have the same data type. In your case, you have a mix of float and double. All you have to do to sort this out is to cast the the data type you want to have.

Export.image.toDrive({
  image: compositeS2_15.double(),
  // image: compositeS2_15.float(), // If you want a smaller image at the expense of precision
  description: 'compositeSS_2015',
  scale: 10,
  region: GTG.geometry().bounds(), 
  maxPixels: 3784216672400,
  crs : 'EPSG:32630',
  fileFormat: 'GEOTIFF'
});

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