ee.FeatureCollection.getArray

從特徵擷取屬性。

用量傳回
FeatureCollection.getArray(property)陣列
引數類型詳細資料
這個:object元素要從中擷取屬性的特徵。
property字串要擷取的屬性。

範例

程式碼編輯器 (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'));

Python 設定

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

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