3

When I export an image in Google Earth Engine the resulting raster does not match the original. When I import the export back into Google Earth Engine the is an spatial misalignment between the original (orange in picture below) and the exported version (green in the picture below). The direction as size of the misalignment varies across the image. A solution appears to be to set the scale of the image below its native resolution, in this instance 1m as opposed to 30m; however this will hugely increase the size of the image. Am I missing something in the export call

enter image description here

Export.image.toDrive({
  image: landsat,
  description: 'imageExport',
  scale: 30,
  crs: 'EPSG:3857',
  maxPixels: 800000000000
});
1

If you export by specifying a scale for Landsat images, you are explicitly overriding the non-integer affine transform with an integer one, and introducing a 1/2 pixel shift.

You may want to try Exporting with the original image.projection() instead of creating a new one from scratch.

  • 1
    I'm still not clear what to set the scale to? Even if I don't specify the scale in the code, it is a parameter "Scale (m/px)" in the "Task: Initiate image export" popup under resolution, other options are "maximum dimension (px)" or "dimension (px)". – Thomas Worthington Oct 10 '17 at 13:46
  • I'm still unable to get this to work. I have set the scale using var scale = mangrove.projection().nominalScale().getInfo() and the projection using var projection = mangrove.projection().getInfo() which equates to crs: EPSG:4326. I can't believe this is impossible – Thomas Worthington Oct 31 '17 at 16:45
  • You shouldn't need to fiddle with the scale at all if you use crs: image.select(0).first().projection(). Be sure that image is straight out of the collection, not some computed thing (e.g. composite of images). I'm led to believe it's computed because EPSG:4326 is not the native projection of any landsat scene that I'm aware of. – Nicholas Clinton Oct 31 '17 at 23:39

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.