I am interested in removing cloud in https://code.earthengine.google.com/d9aaa276f0fa1ab33e78230e8f348c6f.
I try to export specific multiband to GDrive in GEE. I try to write the sintax :
Export.image.toDrive({
image: s2_sr_median,
description: 'image_export',
folder: 'ee_demos',
region: region,
scale: 10,
crs: 'EPSG:4326'
});
But, the result all band will be exported. So, how to export specific multiband, for example band 2,3,4, and band 8. I have try this sintax, but not successfull. There is a message : Line 123: Unexpected arguments to function toDrive(): band.
Export.image.toDrive({
image: s2_sr_median,
description: 'image_export',
folder: 'ee_demos',
band: ['B2', 'B3', 'B4', 'B8'],
region: region,
scale: 10,
crs: 'EPSG:4326'
});
So, how is the solution ?
Best Answer
You can
select()
the bands after doing themedian()
. You can do it in two ways. Either you can use the index of the bands starting from 0.Or, if you do not want to go with the index, you can use the expression with band names. When the sequence breaks, put
|
between the band names.