1

I need a S5P image from a spesific date. Is there any way to filter image collection based on the metadata on GEE so the result is only from an image. I've tried something like:

var collection = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_SO2')
.select('SO2_column_number_density')
.filter(ee.Filter.eq('time_reference_julian_day', 2459022.5 ))

but it doesn't seem to work.

Which part do I need to fix?

2

Your code would work, a functional equivalent alternative would be to use .filterMetadata().

var collection = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_SO2')
.select('SO2_column_number_density')
.filterMetadata('time_reference_julian_day', 'equals', 2459022.5)

However there doesn't exist an Image at the time you selected, that's why 0 Images get returned

Instead you can use .filterDate() to display all images on the date you have chosen. Also please see the get started part of the Developers Guide. It will help you immensly when you are starting out.

var collection = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_SO2') 
                    .select('SO2_column_number_density') 
                    .filterDate("2020-01-01", "2020-01-02")
 
print(collection)

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.