Announcement: All noncommercial projects registered to use Earth Engine beforeApril 15, 2025 mustverify noncommercial eligibility to maintain access. If you have not verified by September 26, 2025, your access may be on hold.
ee.FeatureCollection.getString Stay organized with collections Save and categorize content based on your preferences.
Page Summary
You can extract a property from a feature using
FeatureCollection.getString(property).This method takes the feature object and the property name as arguments.
It returns the value of the specified property as a String.
Examples are provided in both JavaScript and Python to demonstrate usage.
| Usage | Returns |
|---|---|
FeatureCollection.getString(property) | String |
| Argument | Type | Details |
|---|---|---|
this:object | Element | The feature to extract the property from. |
property | String | The property to extract. |
Examples
Code Editor (JavaScript)
// A FeatureCollection with a string property value.varfc=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 setup
See the Python Environment page for information on the Python API and usinggeemap for interactive development.
importeeimportgeemap.coreasgeemap
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.display('String property value as ee.String:',fc.getString('string_property'))
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.