[GIS] Exporting a classified map from google earth engine

exportgoogle-earth-engine

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.

Best Answer

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.