propReduce
Description
Reduce properties in any GeoJSON object into a single value, similar to how Array.reduce works. However, in this case we lazily run the reduction, so an array of all properties is unnecessary.
Parameters
| Name | Type | Description |
|---|---|---|
| geojson | FeatureCollection | Feature | any GeoJSON object |
| callback | Function | a method that takes (previousValue, currentProperties, featureIndex) |
| initialValue? | * | Value to use as the first argument to the first call of the callback. |
Returns
* The value that results from the reduction.