ee.ImageCollection.toList

यह फ़ंक्शन, किसी कलेक्शन के एलिमेंट को सूची के तौर पर दिखाता है.

इस्तेमालरिटर्न
ImageCollection.toList(count, offset)सूची
आर्ग्यूमेंटटाइपविवरण
यह: collectionFeatureCollectionवह इनपुट कलेक्शन जिसे फ़ेच करना है.
countपूर्णांकफ़ेच किए जाने वाले ज़्यादा से ज़्यादा एलिमेंट की संख्या.
offsetपूर्णांक, डिफ़ॉल्ट: 0शुरुआत से हटाए जाने वाले एलिमेंट की संख्या. अगर यह सेट है, तो (ऑफ़सेट + गिनती) एलिमेंट फ़ेच किए जाएंगे और पहले ऑफ़सेट एलिमेंट खारिज कर दिए जाएंगे.

उदाहरण

कोड एडिटर (JavaScript)

// Note: ee.ImageCollection.toList may take a lot of time and memory to run,
// since it must generate all of the results in order to gather them into a
// list. Large collections and/or complex computations can produce memory
// limitation errors.

// A Landsat 8 TOA image collection (1 year of images at a specific point).
var col = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA')
  .filterBounds(ee.Geometry.Point(-90.70, 34.71))
  .filterDate('2020-01-01', '2021-01-01');
print('Image collection', col);

// Get the first 3 images as a list of images.
var imgListFirst3 = col.toList(3);
print('First 3 images', imgListFirst3);

// Get the second 3 images as a list of images (use the offset parameter).
var imgListSecond3 = col.toList(3, 3);
print('Second 3 images', imgListSecond3);

Python सेटअप करना

Python API और इंटरैक्टिव डेवलपमेंट के लिए geemap का इस्तेमाल करने के बारे में जानकारी पाने के लिए, Python एनवायरमेंट पेज देखें.

import ee
import geemap.core as geemap

Colab (Python)

# Note: ee.ImageCollection.toList may take a lot of time and memory to run,
# since it must generate all of the results in order to gather them into a
# list. Large collections and/or complex computations can produce memory
# limitation errors.

# A Landsat 8 TOA image collection (1 year of images at a specific point).
col = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA').filterBounds(
    ee.Geometry.Point(-90.70, 34.71)).filterDate('2020-01-01', '2021-01-01')
print('Image collection:', col.getInfo())

# Get the first 3 images as a list of images.
img_list_first3 = col.toList(3)
print('First 3 images:', img_list_first3.getInfo())

# Get the second 3 images as a list of images (use the offset parameter).
img_list_second3 = col.toList(3, 3)
print('Second 3 images:', img_list_second3.getInfo())