1

I am trying to download images from google earth engine for the Netherlands from 2013 through 2021. For the years 2013, 2017, and 2019, the images I'm getting have a weird white artifact on them, as shown below:weird landsat artifact

This is not happening for other years. 2014, 2015, 2016, 2018, 2020, and 2021 are all completely fine.

The code I am using is given below:

// Landsat8 has 11 bands, defined here
var landsat_8_bands = ['B1','B2','B3','B4','B5','B6','B7','B8','B9','B10','B11'];

// This is the string we need to pass to fetch Tier 1 images from Landsat8 Collection 1
// All images after december 31 2021 are in collection 2
// Collection 1 data will be maintained in the Earth Engine Data Catalog at least through 2022
var landsat8 = 'LANDSAT/LC08/C02/T1_TOA';

// Max. acceptable cloud cover is 10%
var allowed_cloud_cover = 10;

// Country we want data for
var region = Netherlands;

// Define the name of the region as a string; this can be passed to functions later
var region_string = 'Netherlands';

// Year we are downloading images for
var year = 2019; 

Map.addLayer(Netherlands, {color: 'blue'}, 'NL shapefile')

// Crop function for cropping our region of interest (Netherlands)
function crop_aoi(image){
  return image.clip(region);
}

// Map the function to one year of Landsat8 ShapefileTOA data and take the median value of each pixel in that image
var collection = ee.ImageCollection(landsat8)
                  .map(crop_aoi)
                  .select(landsat_8_bands) // this is to ensure that only the 11 landsat8 bands are fetched
                  .filterDate(year + '-03-01', year + '-09-30') // take images between march and september
                  .filter(ee.Filter.lt('CLOUD_COVER', allowed_cloud_cover));
  //                .median();
var composite = collection.median();
composite = composite.float();

print('All band names', composite.bandNames());
// print(composite);

Export.image.toDrive({image: composite,
                      description: 'landsat8_' + year + '_' + region_string,
                      folder: 'Masters_thesis',
                      fileNamePrefix: 'landsat8_28992_' + year + '_' + region_string,
                      region: region,
                      maxPixels: 10e11,
                      scale: 30
                      });

1 Answer 1

3

When you see slightly diagonal stripes or boundaries in your composite image, they're likely to be borders between different source images — the angle of the stripe is the satellite's orbital path. In this case, there is simply no image for that location and date range with low enough cloud cover. Thus, there is no data — it is not white but rather masked.

If I run your code with the allowed_cloud_cover set to 15 instead of 10, I can see the stripe filled in with a noticeably cloudy image — there are only 3 images in that area, with CLOUD_COVER values of 12 to 14.6, so there isn't enough non-cloudy data for it to consistently dominate the median.

Image

You should consider setting allowed_cloud_cover even higher — from experimentation, it seems that the additional non-cloudy data that is thus included is more helpful than the additional clouds are harmful.

2
  • Thank you so much! This was very helpful!
    – Srinath
    Commented Sep 30, 2022 at 14:52
  • I downloaded with a higher allowed_cloud_cover setting, and it did clear things up. But for some reason, there is a portion of the downloaded image that has no data at all. Here is what it looks like when I open it in QGIS
    – Srinath
    Commented Sep 30, 2022 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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