0

Sometimes, one wants to know how many (and which) satellite images (e.g. Sentinel-1, Sentinel-2, or Landsat-X) are available for a given ROI in a given time frame. In Google Earth Engine, this information can easily be derived:

// Load some geometry
var roi = ee.Geometry.Rectangle(96.01669, 18.52621, 96.04819, 18.49634);

// Define time frame
var start = ee.Date('2020-01-01');
var finish = ee.Date('2020-12-31');

// Load Sentinel-1 Imagery of standard acquisition mode (IW, VV/VH)
var s1_collection = ee.ImageCollection('COPERNICUS/S1_GRD')
    .filterDate(start, finish)
    .filterBounds(roi)
    .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
    .filter(ee.Filter.eq('instrumentMode', 'IW'));
    
var s2_collection = ee.ImageCollection('COPERNICUS/S2')
    .filterDate(start, finish)
    .filterBounds(roi);
    
print(s1_collection)
print(s2_collection)

In the Console, now, one can click both ImageCollections and see, how many images exist by looking at the number of elementsin the features list.

What I would like to do now, is to export some catalogue information to a CSV or spreadsheet-like output: One row per image with the columns containing

  • the unique image identifier
  • the acquisition time (date of day would suffice)
  • and maybe additional information on demand (e.g. orbit direction in the SAR case, mean incidence angle, footprint on ground etc.)

How can this information be extracted and formed into an exportable tabular format?

1 Answer 1

2

You can treat an imagecollection as a featurecollection for the purposes of exporting a table. Just specify the property names you want to extract in the 'selectors' parameter. Anything that doesn't already exist as a property, you can map over the collection and compute/set.

Export.table.toDrive({
    collection: images, 
    description: "ImageMetadata", 
    fileFormat: "csv", 
    selectors: ["system:index", "DATE_ACQUIRED", ...]
})
1
  • I was not aware of that, neither of selectors. Thank you for this fast and straight-forward solution!
    – Michael
    Oct 7, 2021 at 5:52

Your Answer

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

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