2

I have classified an Landsat image in Google Earth Engine and I need to export it so that I can use it in a GIS software. Export to cloud storage is a fee-based service and I cannot afford to pay for that. Therefore I have tried the following code for image exporting according to the reference materials:

// Export the image, specifying scale and region.
  Export.image.toDrive({
  image: classified,
  description: 'imageToDriveExample',
  scale: 30,
  region: geometry
  });

I don't get any results though.

  • What results do you expect? This should create a task you can see in the right hand side of the code editor. Once you started the task it will run on the server and notify you when your result is ready. The result will be located in your associated Google Drive account. – Kersten Feb 7 '17 at 16:30
  • Yes, I expected to see the map in my Google Drive account but I saw nothing. The console also does not report any error. – Pamela Ochungo Feb 8 '17 at 12:50
  • Under the "Tasks" tab - does the task appear as finished (blue) or with an error (red)? Sometimes tasks fail and then they report the associated error. – Kersten Feb 8 '17 at 13:21
  • There is no error in red. – Pamela Ochungo Feb 9 '17 at 9:23
  • i am sharing my code generated in the GEE. With this code i managed to export an image I rated. code.earthengine.google.com/7918f2949bdedf2037cccfc3aff71af6 Good Luck! – Christhian Cunha Oct 13 '17 at 3:32
4

How to export an image to Google Drive using the Earth Engine Code Editor:

  1. Add some javascript code that exports an image to the Code Editor window. (I have added a few variable assignment statements to make it a working example.)
    var classified = ee.Image('USGS/NLCD/NLCD2011').select('landcover');
    var geometry = ee.Geometry.Polygon(
        [[[-122.58, 38.23],
          [-122.58, 37.79],
          [-121.85, 37.79],
          [-121.85, 38.23]]]);
    Export.image.toDrive({
      image: classified,
      description: 'imageToDriveExample',
      scale: 30,
      region: geometry
    });
  1. Click the Run button to execute the code.

  2. Select the Tasks tab, if it is not already selected. You should see a task named "imageToDriveExample" with a grey background indicating that the task has not been run.

  3. Click the Run button to the right of the task. A dialog box will appear with the parameters that will be used for the export. If needed, update the export parameters. (I like to specify a Drive Folder that I previously created for exports, for keeping things organized.)

  4. Click dialog box's Run button to start the task. Note that the Run button is replaced with a spinning gear icon, which indicates the task is running.

  5. Wait for the task to complete. Once it completes, the task becomes blue and the spinning gear icon will be replaced with a checkmark.

  6. To show information on a completed task, place your cursor over the task name and click on the question mark. This will bring up a dialog box with information about the task, including a link named "Output link".

  7. Click on the "Output link" which opens up the Google Drive folder that you specified earlier.

For additional details on export options, see the Earth Engine documentation page Exporting Data.

protected by Community Apr 24 '18 at 15:04

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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