0

I have a collection of all Landsat 4, 5, 7, and 8 imagery that has been modified for future processing.

  var mergedCollection = L457Renamed.merge(L8Renamed);

A property for each image is "CLOUD_COVER".

I would like to create a filter for this merged collection that will remove imagery above an adjustable cloud cover threshold.

something like: var collectionCloudiness = mergedCollection.select("CLOUD_Cover less than 10")

Additionally, how do I copy code from GEE so that it keeps its formatting and colors?

Thanks for your help!

1
  • These are the instructions to format your code in the questions or answers: Create code fences by placing your code between sets of 3 backticks ` or use CTRL + K ``` like so ``` Create inline code spans by placing text between single backticks like so Add a preformatted block within a list with eight spaces 1. This is normal text 2. This is a list item Skip a line and indent eight spaces. Eight spaces will trigger the code block.
    – OscarBau
    Jun 2, 2021 at 14:14

1 Answer 1

1

You apply a filter to your collection:

var collection = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
  .filterDate('2020-01-01', '2020-01-02')

print('unfiltered size', collection.size())  

var filtered = collection
  .filter(ee.Filter.lessThan('CLOUD_COVER', 20))

https://code.earthengine.google.com/0b89f2c48afb18ff53a221828ca23a03 print('filtered size', filtered.size())

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.