turf-convex
Advanced tools
Comparing version 3.0.10 to 3.0.12
@@ -14,3 +14,3 @@ var each = require('turf-meta').coordEach, | ||
* @name convex | ||
* @param {FeatureCollection<Point>} input input points | ||
* @param {FeatureCollection<Point>} featurecollection input points | ||
* @returns {Feature<Polygon>} a convex hull | ||
@@ -77,5 +77,5 @@ * @example | ||
*/ | ||
module.exports = function (fc) { | ||
module.exports = function (featurecollection) { | ||
var points = []; | ||
each(fc, function (coord) { points.push(coord); }); | ||
each(featurecollection, function (coord) { points.push(coord); }); | ||
var hull = convexHull(points); | ||
@@ -82,0 +82,0 @@ if (hull.length > 0) { |
{ | ||
"name": "turf-convex", | ||
"version": "3.0.10", | ||
"version": "3.0.12", | ||
"description": "", | ||
@@ -33,5 +33,5 @@ "main": "index.js", | ||
"convex-hull": "^1.0.3", | ||
"turf-meta": "^3.0.10", | ||
"turf-helpers": "^3.0.10" | ||
"turf-meta": "^3.0.12", | ||
"turf-helpers": "^3.0.12" | ||
} | ||
} |
# turf-convex | ||
[![build status](https://secure.travis-ci.org/Turfjs/turf-convex.png)](http://travis-ci.org/Turfjs/turf-convex) | ||
# convex | ||
### `turf.convex(input)` | ||
Takes a set of Point|points and returns a | ||
Takes a set of [points](Point) and returns a | ||
[convex hull](http://en.wikipedia.org/wiki/Convex_hull) polygon. | ||
@@ -17,13 +12,9 @@ | ||
**Parameters** | ||
### Parameters | ||
- `featurecollection` **FeatureCollection<Point>** input points | ||
| parameter | type | description | | ||
| --------- | ---------------------------- | ------------ | | ||
| `input` | FeatureCollection\.\<Point\> | input points | | ||
**Examples** | ||
### Example | ||
```js | ||
```javascript | ||
var points = { | ||
@@ -89,9 +80,15 @@ "type": "FeatureCollection", | ||
Returns **Feature<Polygon>** a convex hull | ||
**Returns** `Feature.<Polygon>`, a convex hull | ||
--- | ||
## Installation | ||
This module is part of the [Turfjs project](http://turfjs.org/), an open source | ||
module collection dedicated to geographic algorithms. It is maintained in the | ||
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create | ||
PRs and issues. | ||
Requires [nodejs](http://nodejs.org/). | ||
### Installation | ||
Install this module individually: | ||
```sh | ||
@@ -101,8 +98,6 @@ $ npm install turf-convex | ||
## Tests | ||
Or install the Turf module that includes it as a function: | ||
```sh | ||
$ npm test | ||
$ npm install turf | ||
``` | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13357
101
Updatedturf-helpers@^3.0.12
Updatedturf-meta@^3.0.12