0

I've got a dataset of ~60 points that we've taken during a series of oceanographic cruises where we were sampling, among other things, sea surface temperature. I'm interested in comparing these point samples to MODIS SST but I'm not sure exactly how to efficiently go about filtering MODIS by each point in my series in GEE. Is there a good way to find the closest MODIS image to my point sample date but not include it if it is outside of some date range?

I've got the basics but I'm not sure where to go from here:

var modis = ee.ImageCollection('NASA/OCEANDATA/MODIS-Aqua/L3SMI')
var point_samples = ee.FeatureCollection('my collection of points')

var modis_filtered = modis
                  .filterDate('2018-08-01', '2018-8-15') // I want to filter by each point
                  .median();

var modisSST = modis_filtered.select(['sst']);
1

If you are interested in the MODIS sst of a composite image between the dates you have set at every of your sample points, you can simply use reduce regions:

var addTempMODIS = modisSST.reduceRegions({collection: point_samples, 
                                            reducer: ee.Reducer.mean(),
                                            scale: 500
});

If all the sample points have property with a date the sample is taken, you should not make a median composite. Make a function to map over a list of the dates you are interested in, filter for every day the point_samples feature collection and the MODIS image, and then use reduceRegions similarly on that image and filtered feature collection. If the latter is your goal, you should give access to your feature collection to properly help you.

  • Thanks @Kuik!! I've just got it as a list being cast into a feature collection but it is a little long ~100 entries (okay not that long in the scheme of GEE). What is the best way to share it? As a fusion table? – clifgray Jan 15 at 21:21
  • I've basically created a solution but it feels very sloppy. I've included the Feature Collection in there. I'd love any tips on improving this! code.earthengine.google.com/731f25549dae8654e4b7718ecd69a846 – clifgray Jan 16 at 0:04
  • I think it does the job perfectly – Kuik Jan 16 at 10:33

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.