AI-generated Key Takeaways
-
FeatureCollection.get extracts a property from a feature.
-
The function takes the feature itself and the property name (as a string) as arguments.
-
The function returns the value of the specified property.
-
The returned value is an ee.ComputedObject, which can be cast to the relevant Earth Engine object class for further use.
| Usage | Returns |
|---|---|
FeatureCollection.
get
(property)
|
| Argument | Type | Details |
|---|---|---|
|
this:
object
|
Element | The feature to extract the property from. |
property
|
String | The property to extract. |
Examples
Code Editor (JavaScript)
// A global power plant FeatureCollection. var fc = ee . FeatureCollection ( 'WRI/GPPD/power_plants' ); // View a list of FeatureCollection property names. print ( fc . propertyNames ()); // Get the value of a listed property. print ( 'Global power plant data provider as ee.ComputedObject' , fc . get ( 'provider' )); // The returned value is an ee.ComputedObject which has no methods available for // further processing; cast to the relevant Earth Engine object class for use. print ( 'Global power plant data provider as ee.String' , ee . String ( fc . get ( 'provider' )));
import ee import geemap.core as geemap
Colab (Python)
# A global power plant FeatureCollection. fc = ee . FeatureCollection ( 'WRI/GPPD/power_plants' ) # View a list of FeatureCollection property names. display ( fc . propertyNames ()) # Get the value of a listed property. display ( 'Global power plant data provider as ee.ComputedObject:' , fc . get ( 'provider' )) # The returned value is an ee.ComputedObject which has no methods available for # further processing; cast to the relevant Earth Engine object class for use. display ( 'Global power plant data provider as ee.String:' , ee . String ( fc . get ( 'provider' )))

