0

When exporting large raster data in Google Earth Engine to your Google Drive, is there a function that prevents the export from automatically tiling into smaller files, or even decreases the number of tiles that are exported? My maxPixels is set to 1e13.

I've also used GDAL in QGIS to merge my raster tiles but it takes ~12 hours to complete the task (I had 20 rasters of ~12 GB total, and the merged raster was 75 GB). Any suggestions for faster processing?

2 Answers 2

2

You can control the number of tiles you get with the fileDimensions argument in Export.image.toDrive():

FileDimensions (List|Number, optional):

The dimensions in pixels of each image file, if the image is too large to fit in a single file. May specify a single number to indicate a square shape, or an array of two dimensions to indicate (width,height). Note that the image will still be clipped to the overall image dimensions. Must be a multiple of shardSize.

I normally create a VRT instead of merging my tiles together to a single file.

The speed of your export mostly depends on what you're trying to export - how much processing is required.

2
  • Thanks! Do you know what is meant by shardSize?
    – rachell
    Apr 16, 2020 at 21:50
  • According to the docs: "Size in pixels of the shards in which this image will be computed." My understanding is that it's the tile size Google breaks your image into, for running processing across their cluster of machines. Apr 17, 2020 at 12:44
0

Following to the Daniel respond, I can tell that you could use two parameters in Export.image.toDrive function that control the size and numbers of the exported files from your main image. These are shardSize and fileDimensions.

fileDimensions controls pixel size of each exported files. The default pixel size is 256 (which can be changed with shardSize) which means that your exported images will be spilt into 256 pixels tile, and saved into your drive.

In case you want to increase or decrease pixels of your exported images, you need to specify the value of shardSize argument. Once you define it, your fileDimensions can take value equal or in multiple size of your shardSize (below image)

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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