ee.ImageCollection

ImageCollection 可通过以下实参构建:

  - 字符串:假定为集合的名称,

  - 图片列表,或可用于构建图片的任何内容。

  - 单张图片。

  - 计算对象 - 重新解释为集合。

用法返回
ee.ImageCollection(args)ImageCollection
参数类型详细信息
argsComputedObject|Image|List<Object>|String构造函数实参。

示例

代码编辑器 (JavaScript)

print('Image collection from a string',
      ee.ImageCollection('COPERNICUS/S2_SR').limit(3));

var img1 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNK');
var img2 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNL');
var img3 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNM');
print('Image collection from a list of images',
      ee.ImageCollection([img1, img2, img3]));

print('Image collection from a single image',
      ee.ImageCollection(img1));

Python 设置

如需了解 Python API 和如何使用 geemap 进行交互式开发,请参阅 Python 环境页面。

import ee
import geemap.core as geemap

Colab (Python)

print('Image collection from a string:',
      ee.ImageCollection('COPERNICUS/S2_SR').limit(3).getInfo())

img1 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNK')
img2 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNL')
img3 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNM')
print('Image collection from a list of images:',
      ee.ImageCollection([img1, img2, img3]).getInfo())

print('Image collection from a single image:',
      ee.ImageCollection(img1).getInfo())