print
Stay organized with collections
Save and categorize content based on your preferences.
Prints the arguments to the console.
Usage | Returns | print(var_args) | |
Argument | Type | Details | var_args | VarArgs | The objects to print. |
Examples
Code Editor (JavaScript)
print(1); // 1
print(ee.Number(1)); // 1
print(ee.Array([1])); // [1]
print(ee.ImageCollection('AAFC/ACI').size()); // 10
print(ee.Image('AAFC/ACI/2009')); // Image AAFC/ACI/2009 (1 band)
print(ee.FeatureCollection("NOAA/NHC/HURDAT2/pacific").size()); // 28547
Python setup
See the
Python Environment page for information on the Python API and using
geemap
for interactive development.
import ee
import geemap.core as geemap
Colab (Python)
"""There is no dedicated print function for the Earth Engine Python API.
To print Earth Engine objects, use Python's built-in `print` function.
Printing an Earth Engine object in Python prints the serialized request for the
object, not the object itself, so you must call `getInfo()` on Earth Engine
objects to get the desired object from the server to the client. For example,
`print(ee.Number(1).getInfo())`. Note that `getInfo()` is a synchronous
operation. Alternatively, the eerepr library provides rich Earth Engine object
representation; it is included in the geemap library.
"""
print(1) # 1
print(ee.Number(1).getInfo()) # 1
print(ee.Array([1]).getInfo()) # [1]
print(ee.ImageCollection('AAFC/ACI').size().getInfo()) # 10
print(ee.Image('AAFC/ACI/2009').getInfo()) # Image AAFC/ACI/2009 (1 band)
print(
ee.FeatureCollection("NOAA/NHC/HURDAT2/pacific").size().getInfo()
) # 28547
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]