line_segment library

Functions

lineSegment(GeoJSONObject geoJson, {bool combineGeometries = false}) FeatureCollection<LineString>
Creates a FeatureCollection of 2-vertex LineString segments from a LineString or MultiLineString or Polygon and MultiPolygon Returns FeatureCollection<LineString> 2-vertex line segments For example:
segmentEach(GeoJSONObject geojson, SegmentEachCallback callback, {bool combineNestedGeometries = true}) → void
Iterates over 2-vertex line segment in any GeoJSON object, similar to Iterable.forEach (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
segmentReduce<T>(GeoJSONObject geojson, SegmentReduceCallback<T> callback, T? initialValue, {bool combineNestedGeometries = true}) → T?
Reduces 2-vertex line segment in any GeoJSON object, similar to Iterable.reduce (Multi)Point geometries do not contain segments therefore they are ignored during this operation.

Typedefs

SegmentEachCallback = dynamic Function(Feature<LineString> currentSegment, int featureIndex, int? multiFeatureIndex, int? geometryIndex, int segmentIndex)
SegmentEachCallback
SegmentReduceCallback<T> = T? Function(T? previousValue, Feature<LineString> currentSegment, T? initialValue, int featureIndex, int? multiFeatureIndex, int? geometryIndex, int segmentIndex)
Callback for segmentReduce