Skip to content
Permalink
Browse files

run test

  • Loading branch information
zhuang-hao-ming committed Mar 23, 2018
1 parent 10586ee commit 8ce6acb9659037c227aff961de7263a02a0a792a
@@ -31,4 +31,4 @@ npm-debug.log*

node_modules

.vscode
.vscode
@@ -29,10 +29,10 @@ which is simply the area of the study area divided by the number of features.

**Parameters**

- `pointFeatureSet` **[FeatureCollection][1]<[Point][2]>** point set to study
- `options` **[Object][3]** optional parameters (optional, default `{}`)
- `pointFeatureSet` **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)>** point set to study
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** optional parameters (optional, default `{}`)
- `options.studyBbox` **bbox?** bbox representing the study area
- `options.confidenceLevel` **[number][4]** a confidence level .The unit is percentage . 5 means 95% ,value must be in [K_TABLE][5] (optional, default `20`)
- `options.confidenceLevel` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** a confidence level .The unit is percentage . 5 means 95% ,value must be in [K_TABLE](#k_table) (optional, default `20`)

**Examples**

@@ -42,51 +42,33 @@ var dataset = turf.randomPoint(100, { bbox: bbox });
var result = turf.quadratAnalysis(dataset);
```

Returns **[Object][3]** result [QuadratAnalysisResult][6]
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** result [QuadratAnalysisResult](#quadratanalysisresult)

## K_TABLE

the confidence level

Type: [Object][3]

**Properties**

- `20` **[number][4]**
- `15` **[number][4]**
- `10` **[number][4]**
- `5` **[number][4]**
- `2` **[number][4]**
- `1` **[number][4]**
- `20` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**
- `15` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**
- `10` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**
- `5` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**
- `2` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**
- `1` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**

## QuadratAnalysisResult

the return type of the quadratAnalysis

Type: [Object][3]
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `criticalValue` **[number][4]**
- `maxAbsoluteDifference` **[number][4]**
- `isRandom` **[boolean][7]**
- `observedDistribution` **[Array][8]<[number][4]>** the cumulative distribution of observed features, the index represents the number of features in the quadrat.

[1]: https://tools.ietf.org/html/rfc7946#section-3.3

[2]: https://tools.ietf.org/html/rfc7946#section-3.1.2

[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

[5]: #k_table

[6]: #quadratanalysisresult

[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
- `criticalValue` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**
- `maxAbsoluteDifference` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**
- `isRandom` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**
- `observedDistribution` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)>** the cumulative distribution of observed features, the index represents the number of features in the quadrat.

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
@@ -194,17 +194,14 @@ export default function quadratAnalysis(pointFeatureSet, options) {
* @property {number} 5
* @property {number} 2
* @property {number} 1
* @property {number} 0.1
*
*/
var K_TABLE = {
20: 1.07275,
15: 1.13795,
10: 1.22385,
5: 1.35810,
2: 1.51743,
1: 1.62762,
0.1: 1.94947
1: 1.62762
};

/**
@@ -214,4 +211,4 @@ var K_TABLE = {
* @property {number} maxAbsoluteDifference
* @property {boolean} isRandom
* @property {Array.<number>} observedDistribution the cumulative distribution of observed features, the index represents the number of features in the quadrat.
*/
*/
@@ -61,4 +61,4 @@ test('turf-quadrat-analysis 1', t=> {
t.ok(result2.maxAbsoluteDifference > result2.criticalValue)

t.end();
});
});

0 comments on commit 8ce6acb

Please sign in to comment.
You can’t perform that action at this time.