I have a classified image that is roughly 400 KB and every time export the image to Google Drive it's roughly 300 KB as a cropped image. Strangely, the first time I exported to drive the image was full size. Thereafter it was cropped. Code below. Any ideas how to export the full size image consistently?

  image: classified2011,
  description: 'LandUse2011',
  scale: 30.0
  • 1
    You're going to need to add more code than this. There's a "Get Link" button at the top of the code editor, and you can cut and paste that to let people run your code directly. (Only, probably you want to remove the piece of code that downloads.)
    – Mike N
    Apr 10, 2019 at 17:27
  • I cant view this images...they appeared to be empty. may you please help me. what am i doing wrong? heres my code // Load a landsat image and select three bands. var landsat = ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_123032_20140515') .select(['B4', 'B3', 'B2']); Export.image.toDrive({ image: landsat, description: 'maxPixelsExample', scale: 30, region: myRectangle, //the rectangle is focused in gauteng fileFormat: 'GeoTIFF', maxPixels: 1e9 }); May 22, 2019 at 14:49
  • Welcome to GIS SE. If you have not yet done so, please take a moment to read the short tour to learn about this site's focused Q&A format. If you have a question, please use the Ask Question button and create a new question.
    – Andy
    May 22, 2019 at 15:22

1 Answer 1


You will have to set the argument 'region' and define the region you want to export (probably you can just draw a polygon/rectangle). If you don't do that, the image will export as big as the size it is on your screen, see the explanation below:

region (Geometry.LinearRing|Geometry.Polygon|String, optional): A LinearRing, Polygon, or coordinates representing region to export. These may be specified as the Geometry objects or coordinates serialized as a string. If not specified, the region defaults to the viewport at the time of invocation.

  • Thank you! This worked perfectly.
    – Tony
    Apr 11, 2019 at 18:00

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.