ee.FeatureCollection.getString

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

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

ตัวอย่าง

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

// A FeatureCollection with a string property value.
var fc = ee.FeatureCollection([]).set('string_property', 'Abies magnifica');

// Fetch the string property value as an ee.String object.
print('String property value as ee.String', fc.getString('string_property'));

การตั้งค่า Python

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

import ee
import geemap.core as geemap

Colab (Python)

# A FeatureCollection with a string property value.
fc = ee.FeatureCollection([]).set('string_property', 'Abies magnifica')

# Fetch the string property value as an ee.String object.
print('String property value as ee.String:',
      fc.getString('string_property').getInfo())