Skip to content

Image information and metadata

To explore image bands and properties in the Code Editor, print() the image and inspect the output in the console. This information can also be accessed programmatically. For example, the following demonstrates how to access information about bands, projections and other metadata:

import ee
ee.Initialize()

#Load an image.
image = ee.Image('LANDSAT/LC08/C01/T1/LC08_044034_20140318');

#Get information about the bands as a list.
bandNames = image.bandNames()
print('Band names: '+str(bandNames.getInfo())) # ee.List of band names

#Get projection information from band 1.
b1proj = image.select('B1').projection()
print('Band 1 projection: '+str(b1proj.getInfo())) # ee.Projection object

#Get scale (in meters) information from band 1.
b1scale = image.select('B1').projection().nominalScale()
print('Band 1 scale: '+str(b1scale.getInfo())) # ee.Number

#Note that different bands can have different projections and scale.
b8scale = image.select('B8').projection().nominalScale()
print('Band 8 scale: '+str(b8scale.getInfo())) # ee.Number

#Get a list of all metadata properties.
properties = image.propertyNames()
print('Metadata properties: '+str(properties.getInfo())) # ee.List of metadata properties

#Get a specific metadata property.
cloudiness = image.get('CLOUD_COVER')
print('CLOUD_COVER: '+str(cloudiness.getInfo())) # ee.Number

#Get the timestamp and convert it to a date.
date = ee.Date(image.get('system:time_start'))
print('Timestamp: '+str(date.getInfo())) # ee.Date

Note that the results of these queries are server-side objects. When you print() them, you request that information describing the object be sent from the server to your client. (Learn more about client vs. server in Earth Engine on this page). The Code Editor then attempts to display the object information in a human-readable way in the console.


  1. Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 4.0 Attribution License. Code samples are licensed under the Apache 2.0 License 

  2. Last updated July 10, 2019.