0

I am facing to a problem caused by the number of requests that can be done with the Google Earth Engine Python API is limited to 3000.

Since I have a lot of small disparate images with different regions to export I reach this limit every time. Then to reduce the number of requests done to the Python API I would like to clip these images in one task. The problem is each image corresponds to a different region and following the documentation it seems that it is not possible to get a list of region linked to images clipped.

A pseudo-code based on the existing code would be:

Export.image.toDrive({
  image: [img1, img2, ..., imgn],
  folder: "name",
  description: 'descr',
  scale: 30,
  region: [geometry1, geometry2, ..., geometryn]
});

Is it a way to achieve that?

1

You can create a "global" image with everything outside your ROIs masked and then skip the export of the empty tiles, effectively exporting all your regions in just a single export. Depending on the size of your ROIs you might want to adapt the size of each tile with the fileDimensions parameter.

Assuming you have all your ROIs in a single MultiPolygon feature called rois.

Export.image.toDrive({
  image: img.clip(rois),
  folder: "name",
  description: 'descr',
  scale: 30,
  region: rois,
  skipEmptyTiles: True
});
  • Ho ok and is it possible in that case to assign a specific description to each roi during the save to drive ? Then after the file saved to drive I need to parse it into single files isn't it? – Loic L. Nov 16 '18 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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