0

This question already has an answer here:

I have some ImageCollection with around 120 images in the GEE Web IDE. I want to upload them to a Google Cloud storage bucket. But it raises the Error: I think because the export function is only for a image not for a imageCollection. How can I iterate through this Collection to create a assest for every image and maybe is there a way to do this automatically? Maybe with Python?

Error: Invalid argument: 'image' must be of type Image.


var exportRegion = ee.FeatureCollection('users/tillmueller1990/ried_roi')
var bands = ['Backscatter_Coefficient', 'Incidence_angle', 'Soil_moisture']
// Variables
var begin = ee.Date.fromYMD(2017,1,1,'Europe/Berlin');
var end = ee.Date.fromYMD(2019,2,1,'Europe/Berlin');
var orbnr = ee.Number(139);
var slinr = ee.Number(17);

//Products
var s1_data = ee.ImageCollection('COPERNICUS/S1_GRD')

var s1_grd_iw_vv_des = s1_data
  .filterDate(begin,end)
  .filter(ee.Filter.eq('relativeOrbitNumber_stop',orbnr))
  .filter(ee.Filter.eq('sliceNumber',slinr))
  .filter(ee.Filter.eq('instrumentMode','IW'))
  .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
  .filter(ee.Filter.eq("orbitProperties_pass", "DESCENDING"))
  .filter(ee.Filter.eq('resolution_meters',10))
  .sort('system:time_start');

var addSM_des = function(image) {
  var sm = image.expression('(omega - omegaD) / (omegaW - omegaD)', {'omega' : image.select('VV'), 'omegaD' : s1_f12_max_des.select('VV'), 'omegaW' : s1_f12_min_des.select('VV')})
  return image.addBands(sm).select(['VV', 'angle', 'VV_1'],['Backscatter_Coefficient','Incident_angle', 'Soil_moisture']);}


var s1_f12_min_des = s1_grd_iw_vv_des.min();
var s1_f12_max_des = s1_grd_iw_vv_des.max();

var s1_f12_des_sm = s1_grd_iw_vv_des.map(addSM_des)

Export.image.toCloudStorage({
   image: s1_f12_des_sm.select(bands),
   description: 'image_s1_tfr',
   scale: 10,
   fileFormat: 'TFRecord',
   bucket: 'tf12', 
   region: exportRegion,
   formatOptions: {
     maxFileSize: 1e9,
     compressed: true,
   },
 });

 Export.image.toCloudStorage({
   image: s1_f12_des_sm.select(bands),
   description: 'image_s1_gt',
   scale: 10,
   fileFormat: 'GeoTIFF',
   bucket: 'tf12', 
   region: exportRegion });

marked as duplicate by Erik, whyzar, csk, JGH, Hornbydd Feb 12 at 14:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.