0

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

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
  });
  • I did this and I have the clip area but with black background filling to make up a rectangle – Alvaro Morales Nov 5 '18 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 Nov 5 '18 at 15:44
  • But In Arcgis when I clip a raster I do get the actual clip area, with no black filling or something. – Alvaro Morales Nov 5 '18 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 Nov 5 '18 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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