0

I wanted to know the difference between FeatureCollection and ImageCollection in Google Earth Engine. The documentation does not mention the difference, it just says that many methods such as maps, reduce can be applied to both and that both return a list

3

An ee.ImageCollection is a specialized kind of ee.FeatureCollection that:

  • is guaranteed to contain only ee.Images (whereas a ee.FeatureCollection can contain images and also other sorts of things), and
  • can have image-specific operations used on it, such as ee.ImageCollection.max and the general form ee.ImageCollection.reduce which performs a reduction across all the images of a collection, for each pixel, producing a single image.

Anything you can do with a ee.FeatureCollection, you can do with an ee.ImageCollection, but not vice versa. This can produce more or less surprising results, though. For example, if I apply draw to an image collection:

var imageCollection = ee.ImageCollection("LANDSAT/LC08/C01/T1")
  .filterDate('2015-01-01', '2015-01-02');
Map.addLayer(imageCollection.draw("FF0000"));

then since what draw does is draw geometries so you can look at them, it asks "what are the geometries of these features?" and gets back the bounding rectangle of each image — not the pixels. Which might be what you want, or not — but it's useful to keep in mind that some of the things listed under ee.ImageCollection are written from the perspective of features.


A side note: The general kind of thing that can be stored in a feature collection is colloquially called a feature but is called in the API documentation an Element (usually seen specified as a return type). What all Elements have in common is that they can be in collections, and they can have properties. The commonly seen types of Elements are:

  • ee.Feature (just has geometry and properties, nothing extra)
  • ee.Image (has bands, in addition to geometry and properties)
  • ee.FeatureCollection (has properties and also contains features/elements)
  • ee.ImageCollection (like FeatureCollection but contains only images)
1

Features are points, polygons. They have property associated with it. While image collection is what it says. Featurecollection stores points polygons, properties.

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.