[GIS] Exporting an image in Google Earth Engine image alignment

exportgoogle-earth-engine

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
});

Best Answer

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.