I've been working on a task for a few days that involved iterating geometries and exporting time series data within these geometries. I want to be able to create a 1000 km^2 tile and then produce 100 tiles that are 100km^2 within this larger tile. Within the smaller tiles I want to export NDVI time series data to my Google Drive.

The desired output is 100 .tif file exports for a large area that can then be further analyzed in a different data processor.

This is the code that I am working with ("point" can be defined arbitrarily):

var targetArea = ee.Number(1e12)

function toSquare(buffer) {
  return point.buffer(buffer, 1).bounds()

function getBuffer(area) {
  return ee.Number(area).sqrt().divide(2)

var buffer = getBuffer(targetArea)
var minBuffer = buffer.multiply(0.99)
var maxBuffer = buffer.multiply(1.01)
var square, area
for (var i = 0; i < 100; i++) {
  var buffer = minBuffer.add(maxBuffer).divide(2)
  square = toSquare(buffer)
  area = square.area(1)
  minBuffer = ee.Number(ee.Algorithms.If(area.lt(targetArea), buffer, minBuffer))
  maxBuffer = ee.Number(ee.Algorithms.If(area.gt(targetArea), buffer, maxBuffer))

print(area, 'area')
var perimeter = square.perimeter(.001);
print(perimeter, 'perimeter');

This is the link to the script pasted above and it creates a roughly 1km^2 tile with the data that I want to be exported: https://code.earthengine.google.com/c48fb6bf2bbc8bc0511d95ab9c360fdb

The obvious problem is that the export would be too large for Earth Engine to handle at higher quality. Is there a way to break this down into smaller tiles through some sort of loop? I want the tiles to touch, so that no data is left out within the large square.

1 Answer 1


Earth Engine will automatically create tiles of your export if it is large. Make sure you include the maxPixels: yourMaxPixelsHere so that it doesn't fail on you. When you export, you are allowed a much larger amount of data, but you will have to be prepared to wait.

From the Google Earth Engine Developers Guide.

If the output image is large, it will be exported as multiple files. If you are exporting to GeoTIFF(s), the image is split into tiles. The filename of each tile will be in the form baseFilename-yMin-xMin where xMin and yMin are the coordinates of each tile within the overall bounding box of the exported image.

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.