1

Normally, I do export images which are rectangles whatever the shape of the region is, then I clip them on a GIS software.

Is there a way to do it directly in GEE?

This is the code I use for exporting

Export.image.toDrive({
  image: mejorImagen,
  description: 'Landsat8_Ab_2013',
  scale: 30,
  region: Abast
  });

1 Answer 1

3

You can clip them in GEE the same way as you would with a GIS, i.e. masking everything outside your clip geometry.

Export.image.toDrive({
  image: mejorImagen.clip(your_clip_geometry),
  description: 'Landsat8_Ab_2013',
  scale: 30,
  region: Abast
  });
4
  • I did this and I have the clip area but with black background filling to make up a rectangle Commented Nov 5, 2018 at 14:35
  • That is to be expected. The display of "No Data" areas as black or transparent is a convention by the software you use to display it. There are no empty pixels in the file itself.
    – Kersten
    Commented Nov 5, 2018 at 15:44
  • But In Arcgis when I clip a raster I do get the actual clip area, with no black filling or something. Commented Nov 5, 2018 at 15:54
  • It will still be a rectangle full of pixel values, only that ArcGIS does not display the pixels with the value that is marked in the metadata as "No Data".
    – Kersten
    Commented Nov 5, 2018 at 18:32

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.