ee.FeatureCollection.get

ดึงพร็อพเพอร์ตี้จากฟีเจอร์

การใช้งานการคืนสินค้า
FeatureCollection.get(property)
อาร์กิวเมนต์ประเภทรายละเอียด
ดังนี้ objectองค์ประกอบฟีเจอร์ที่จะดึงพร็อพเพอร์ตี้ออกมา
propertyสตริงพร็อพเพอร์ตี้ที่จะดึง

ตัวอย่าง

โปรแกรมแก้ไขโค้ด (JavaScript)

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

// View a list of FeatureCollection property names.
print(fc.propertyNames());

// Get the value of a listed property.
print('Global power plant data provider as ee.ComputedObject',
      fc.get('provider'));

// The returned value is an ee.ComputedObject which has no methods available for
// further processing; cast to the relevant Earth Engine object class for use.
print('Global power plant data provider as ee.String',
      ee.String(fc.get('provider')));

การตั้งค่า Python

ดูข้อมูลเกี่ยวกับ Python API และการใช้ geemap เพื่อการพัฒนาแบบอินเทอร์แอกทีฟได้ที่หน้า สภาพแวดล้อม Python

import ee
import geemap.core as geemap

Colab (Python)

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

# View a list of FeatureCollection property names.
print(fc.propertyNames().getInfo())

# Get the value of a listed property.
print('Global power plant data provider as ee.ComputedObject:',
      fc.get('provider').getInfo())

# The returned value is an ee.ComputedObject which has no methods available for
# further processing; cast to the relevant Earth Engine object class for use.
print('Global power plant data provider as ee.String:',
      ee.String(fc.get('provider')).getInfo())