standardDeviationalEllipse
描述
🌐 Description
获取一个要素集合并返回一个标准偏差椭圆,也称为“方向分布”。标准偏差椭圆旨在通过绘制一个包含大约一个标准偏差(约 70%)数据的椭圆来显示数据集的方向和分布。
🌐 Takes a collection of features and returns a standard deviational ellipse, also known as a “directional distribution.” The standard deviational ellipse aims to show the direction and the distribution of a dataset by drawing an ellipse that contains about one standard deviation’s worth (~ 70%) of the data.
该模块反映了 ArcGIS 中 Directional Distribution 的功能,以及 QGIS 标准偏差椭圆插件 的功能
🌐 This module mirrors the functionality of Directional Distribution in ArcGIS and the QGIS Standard Deviational Ellipse Plugin
参考文献
• 罗伯特·S·尤伊尔,《标准偏差椭圆;一种用于空间描述的更新工具》,地理年鉴 53卷,第1期(1971):28–39,doi:{@link https://doi.org/10.2307/490885|10.2307/490885}。
• 保罗·汉利·弗尔菲, “关于莱费弗的‘标准偏差椭圆’的一则说明,” 美国社会学杂志 33, 第1期 (1927): 94—98, doi:{@link https://doi.org/10.1086/214336|10.1086/214336}.
参数
🌐 Parameters
| 名称 | 类型 | 描述 |
|---|---|---|
| points | FeatureCollection<Point> | GeoJSON 点 |
| options? | Object | 可选参数 (默认 {}) |
| options.weight? | string | 用于加权中心的属性名称 |
| options.steps? | number | 多边形的步数 _(默认 64) |
| options.properties? | Object | 要传递给生成椭圆的属性 (默认 {}) |
返回
🌐 Returns
Feature<Polygon> 一个椭圆形多边形,其中大约包含数据集的1个标准差。
示例
🌐 Examples
const bbox = [-74, 40.72, -73.98, 40.74];
const points = turf.randomPoint(400, { bbox: bbox });
const sdEllipse = turf.standardDeviationalEllipse(points);
安装
🌐 Installation
$ npm install @turf/standard-deviational-ellipse
import { standardDeviationalEllipse } from "@turf/standard-deviational-ellipse";
const result = standardDeviationalEllipse(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.standardDeviationalEllipse(...);