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 API และการใช้ geemap เพื่อการพัฒนาแบบอินเทอร์แอกทีฟได้ที่หน้า สภาพแวดล้อม Python

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