-
Notifications
You must be signed in to change notification settings - Fork 111
feature
Rodrigo E. Principe edited this page Oct 30, 2018
·
1 revision
Similar to ee.Feature.get
but can retrieve many properties at once and return them as a list
Reduce properties with a reducer. It returns a function to map over a FeatureCollection
Argument options
:
-
reducer
: defaults tomean
-
properties
: properties to aggregate withreducer
. Defaults to all properties -
name
: name for the resulting property. Defaults toreduction
var a = ee.Feature(null, {
"forest_area": 100,
"desert_area": 50,
"something_else": 1000
})
var options = {
reducer: 'sum',
properties: ['forest_area', 'desert_area'],
name: 'areas'
}
var areas = tools.feature.reduce(options)(a)
print(areas)
https://code.earthengine.google.com/5df3d3f037f8ea5a9a176f84a6f3121d
- @author: Rodrigo E. Principe
- email: fitoprincipe82 at gmail
- Licence: MIT