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