When visualizing a single Landsat image I get artefacts:


enter image description here

When creating a global product (e.g. binary mask of clear observations) those artefacts sum up to two stripes:

enter image description here


The source of these artifacts is that projection math is complex and should be applied with a bit more care than is actually happening.

In this particular case, your source image is in EPSG:32654, UTM zone 54N, which is intended for use in the longitude range 138°E to 144°E. Attempting to transform coordinates far outside this range of validity gives nonsensical results which produce the sort of artifacts you are seeing.

In typical cases, Earth Engine will use the geometry of the image to determine whether the image's pixels will be used, so that this never comes up (for example, .mosaic() of an image collection will first select the images that intersect the tile being calculated before retrieving any individual pixels), but you've found a case (accessing an individual image) where it does not. image.clip(image.geometry()) forces the geometry to be checked and so is a reasonable workaround for this issue.

That said, if these artifacts are showing up for you in your global product, even when you zoom in or export high resolution images (so the rendering tiles are small compared to the globe), it suggests that you're doing something in a more inefficient way than necessary (because reducing an image collection should filter images as I mentioned above) and it might be useful to have someone review your script to see if it can be made faster as well as avoiding these artifacts.


Interesting bug ! A temporary fix can be :

var im=ee.Image('LANDSAT/LE07/C01/T1_SR/LE07_112017_20000401') Map.addLayer(im.clip(im.geometry()))

and you can do it for an entire collection using map()


Thanks Kevin and Mathieu, clipping to the image geometry fixes the problem!

Regarding the global product: the origional implementation uses the following code to derive the clear observation mask for a Landsat image:

var isClear = function(image){
  var pixel_qa = image.select('pixel_qa')
  return ee.Image(0)
      .where(pixel_qa.bitwiseAnd(2).neq(0), 1) // clear
      .where(pixel_qa.bitwiseAnd(4).neq(0), 1) // water
      .where(pixel_qa.bitwiseAnd(16).neq(0), 1) // snow

After changing it to the following, it is much faster and also the artefacts are gone, without the need to clip to the image geometries:

var isClear = function(image){
  var pixel_qa = image.select('pixel_qa')
  return pixel_qa.bitwiseAnd(2).neq(0)

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.