GEE: How to export Landsat image in specific coordinates?

Viewed 43

I am using the code from the Google Earth Engine guide "Exporting data" but using different coordinates to define the region.

// Load a landsat image and select three bands.
var landsat = ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_123032_20140515')
  .select(['B4', 'B3', 'B2']);

// Create a geometry representing an export region.
var geometry = ee.Geometry.Rectangle([116.2621, 38.8412, 116.4849, 39.01236]);

var projection = landsat.select('B2').projection().getInfo();

Export.image.toDrive({
  image: landsat,
  description: 'imageToDriveExample_transform',
  crs: projection.crs,
  crsTransform: projection.transform,
  region: geometry
});

// Apply the coordinates method to the Point object.
var pointCoordinates = geometry.coordinates();

// Print the result to the console.
print('point.coordinates(...) =', pointCoordinates); 

Running this code results in the following error:

Error: Unable to export unbounded image. (Error code: 3)

But changing to var geometry = ee.Geometry.Rectangle([116.2621, 38.8412, 116.4849, 40.01236]) does work. I have been trying with a bunch of different coordinates and I do not understand why some work and others don't.

0 Answers
Related