segmentReduce
描述
¥Description
Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce() (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
参数
¥Parameters
名称 | 类型 | 描述 |
---|---|---|
geojson | FeatureCollection | 特性 | 几何图形 | 任意 GeoJSON |
callback | segmentReduceCallback | a method that takes (previousValue, currentSegment, currentIndex) |
initialValue? | Reducer | Value to use as the first argument to the first call of the callback. |
返回
¥Returns
Reducer