ee.FeatureCollection.first

從指定集合傳回第一個項目。

用量傳回
FeatureCollection.first()元素
引數類型詳細資料
這個:collectionFeatureCollection要從中選取第一個項目的集合。

範例

程式碼編輯器 (JavaScript)

// A global power plant FeatureCollection.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants');

print('The first feature (power plant) in the collection', fc.first());

Python 設定

請參閱 Python 環境頁面,瞭解 Python API 和如何使用 geemap 進行互動式開發。

import ee
import geemap.core as geemap

Colab (Python)

from pprint import pprint

# A global power plant FeatureCollection.
fc = ee.FeatureCollection('WRI/GPPD/power_plants')

print('The first feature (power plant) in the collection:')
pprint(fc.first().getInfo())