@turf/directional-mean v6.5.0
@turf/directional-mean
DirectionalMeanLine
Type: Object
Properties
cartesianAngle
number the mean angle of all lines. (measure from due earth counterclockwise).bearingAngle
number the mean angle of all lines. (bearing).circularVariance
number the extent to which features all point in the same direction. the value ranges 0-1, the bigger the value, the more variation in directions between lines.averageX
number the centroid of all lines.averageY
number the centroid of all line.averageLength
number the average length of line.countOfLines
number the count of features.
directionalMean
This module calculate the average angle of a set of lines, measuring the trend of it. It can be used in both project coordinate system and geography coordinate system. It can handle segments of line or the whole line.
Parameters
lines
FeatureCollection<LineString>options
object (optional, default{}
)
Examples
var lines = turf.lineStrings([
[[110, 45], [120, 50]],
[[100, 50], [115, 55]],
])
var directionalMeanLine = turf.directionalMean(lines);
// => directionalMeanLine
Returns DirectionalMeanLine Directional Mean Line
This module is part of the Turfjs project, an open source module collection dedicated to geographic algorithms. It is maintained in the Turfjs/turf repository, where you can create PRs and issues.
Installation
Install this module individually:
$ npm install @turf/directional-mean
Or install the Turf module that includes it as a function:
$ npm install @turf/turf
9 days ago
2 months ago
3 months ago
4 months ago
4 months ago
8 months ago
7 months ago
1 year ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
6 years ago
6 years ago
6 years ago