ee.FeatureCollection.getArray

Trích xuất một thuộc tính từ một đối tượng.

Cách sử dụngGiá trị trả về
FeatureCollection.getArray(property)Mảng
Đối sốLoạiThông tin chi tiết
this: objectPhần tửTính năng để trích xuất thuộc tính.
propertyChuỗiThuộc tính cần trích xuất.

Ví dụ

Trình soạn thảo mã (JavaScript)

// A FeatureCollection with an array property value.
var fc = ee.FeatureCollection([]).set('array_property', ee.Array([1, 2, 3, 4]));

// Fetch the array property value as an ee.Array object.
print('Array property value as ee.Array', fc.getArray('array_property'));

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)

# A FeatureCollection with an array property value.
fc = ee.FeatureCollection([]).set('array_property', ee.Array([1, 2, 3, 4]))

# Fetch the array property value as an ee.Array object.
print('Array property value as ee.Array:',
      fc.getArray('array_property').getInfo())