ee-runner icon indicating copy to clipboard operation
ee-runner copied to clipboard

Export to GCS for multiband images

Open tillmann123456 opened this issue 3 years ago • 1 comments

Hi, I'd like to automate uploading of multiband image assets from GEE into GCS. The band name contains important information on the date of capture, so I need to keep it. Is this possible?

For now, my efforts have only led to that for every image I upload into GCS, there get generated dozens of separate .tif files, possibly one for each band, but the naming is not clear. Great if you could give me any advice on this! My code is below, where "t" and "loc" are assigned during a loop.

Thanks a lot, Tillmann

var params = {
  element:load,
  type:'EXPORT_IMAGE',
  description: loc+"_demeaned_Y"+t+"of7",
  region: load.geometry(),
  outputPrefix: loc+"_demeaned_Y"+t+"of7",
  outputBucket: "XXX",
  scale: 3.1,
  fileFormat: "GEO_TIFF", 
  formatOptions: {
    cloudOptimized: true

}

}
var taskId = ee.data.newTaskId(1)

ee.data.startProcessing(taskId, params);

tillmann123456 avatar Feb 28 '21 18:02 tillmann123456

I'd probably post this question on https://groups.google.com/forum/#!forum/google-earth-engine-developers since it addresses EE functionality (https://developers.google.com/earth-engine/guides/exporting#to-cloud-storage).

Does renaming bands in a multi-band image work? I thought it should turn band names into file names for a multi-band image.

An alternative is maybe to generate a set of bounding box features with all required properties (time, etc.) in addition to images, with unique image ids.

gena avatar Mar 01 '21 22:03 gena