Kamal Hosen
Kamal Hosen
Geospatial Developer | Data Science | Python

Aug 23, 2022

Exploring Image Collection and Image Metadata in Google Earth Engine


Image metadata is important information to know more about the image like band names, projection information, properties, etc.

In this tutorial, I will show you how to get image metadata.

First, load an image that you want to get metadata. In the earlier tutorial, I showed how to filter image collection. I will use this function to filter image collection.

var myCollection = ee.ImageCollection("LANDSAT/LC08/C02/T1_TOA");

var startDate = '2020-01-01'; // Year-Month-Day (YYYY-MM-DD)
var endDate = '2020-12-31';

var geometry = ee.Geometry.Point([89.50, 22.86]);

var filterImageCollection = myCollection.filterDate(startDate, endDate).filterBounds(geometry);

We now have an image collection. Now, use the print function to print image collection information.

// Print Image Collections

You will see the details of your image collection printed in the console. It will show you the metadata for this collection's images. Let’s select a specific image and print its metadata.

To select an individual image from the image collection, we will use the first command that will get only the first image from the collection, and its index number is 0.

// Get only first image from an image collection
var getFirstImage = myCollection.filterDate(startDate, endDate).filterBounds(geometry).first();

Now, you will the property details of that selected image.

Share To

About Author
  • Kamal Hosen
  • Kamal Hosen
    Geospatial Developer | Data Science | Python

    A passionate geospatial developer and analyst whose core interest is developing geospatial products/services to support the decision-making process in climate change and disaster risk reduction, spatial planning process, natural resources management, and land management sectors. I love learning and working with open source technologies like Python, Django, LeafletJS, PostGIS, GeoServer, and Google Earth Engine.