I made a copy of an Image that was shared with me as an asset in Google Earth Engine.
I expect the new copy to be identical to the image that was shared. To check that nothing was changed during export, I made a new image that is the difference between my two images, and I expect the result to be an image with uniform zero value.
var original = ee.Image("..."); //shared layer
var copy = ee.Image("...");
var difference = original.subtract(copy)
However, if I add difference
to the map, it shows a pattern if I take a look from far away:
Inspecting the value of pixels shows values other than zero.
However, the pattern fades away if I zoom in, and I only find zeros if I inspect pixel values. I've added some transparency to the layer in the capture, but you can see that it's a plain grey.
Still, if I print the properties of my difference
layer, it shows -255 and 255 as min and max values.
I think this is something about how GEE works with pyramids or pixel representation at different zoom scales. Indeed, the original and copy layers also look a bit different from the distance, but they look the same from close distance:
original
copy
I'll zoom in to the island where the arrow points
original
copy
Can I trust that the two layers are identical in their values and their difference is zero for every pixel?
var proj = original.projection()
and thenMap.addLayer(difference.reproject(proj)....)
. If that works I post it as an answer