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 للحصول على معلومات حول واجهة برمجة التطبيقات Python واستخدام geemap للتطوير التفاعلي.

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