ee.FeatureCollection.first

Trả về mục đầu tiên trong một bộ sưu tập nhất định.

Cách sử dụngGiá trị trả về
FeatureCollection.first()Phần tử
Đối sốLoạiThông tin chi tiết
this: collectionFeatureCollectionTập hợp mà bạn sẽ chọn mục đầu tiên.

Ví dụ

Trình soạn thảo mã (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());

Thiết lập Python

Hãy xem trang Môi trường Python để biết thông tin về API Python và cách sử dụng geemap cho quá trình phát triển tương tác.

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())