ee.FeatureCollection.getString

Eigenschaft aus einem Feature extrahieren

NutzungAusgabe
FeatureCollection.getString(property)String
ArgumentTypDetails
So gehts: objectElementDas Feature, aus dem das Attribut extrahiert werden soll.
propertyStringDas Attribut, das extrahiert werden soll.

Beispiele

Code-Editor (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 einrichten

Informationen zur Python API und zur Verwendung von geemap für die interaktive Entwicklung finden Sie auf der Seite Python-Umgebung.

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