turf-explode
Advanced tools
Comparing version 3.0.10 to 3.0.12
@@ -10,3 +10,3 @@ var featureCollection = require('turf-helpers').featureCollection; | ||
* @name explode | ||
* @param {(Feature|FeatureCollection)} input input features | ||
* @param {(Feature|FeatureCollection)} geojson input features | ||
* @return {FeatureCollection<point>} points representing the exploded input features | ||
@@ -38,5 +38,5 @@ * @throws {Error} if it encounters an unknown geometry type | ||
*/ | ||
module.exports = function (layer) { | ||
module.exports = function (geojson) { | ||
var points = []; | ||
each(layer, function (coord) { | ||
each(geojson, function (coord) { | ||
points.push(point(coord)); | ||
@@ -43,0 +43,0 @@ }); |
{ | ||
"name": "turf-explode", | ||
"version": "3.0.10", | ||
"version": "3.0.12", | ||
"description": "turf explode module", | ||
@@ -29,8 +29,8 @@ "main": "index.js", | ||
"geojson-fixtures": "^0.6.1", | ||
"turf-helpers": "^3.0.10" | ||
"turf-helpers": "^3.0.12" | ||
}, | ||
"dependencies": { | ||
"turf-meta": "^3.0.10", | ||
"turf-helpers": "^3.0.10" | ||
"turf-meta": "^3.0.12", | ||
"turf-helpers": "^3.0.12" | ||
} | ||
} |
# turf-explode | ||
[![build status](https://secure.travis-ci.org/Turfjs/turf-explode.png)](http://travis-ci.org/Turfjs/turf-explode) | ||
# explode | ||
turf explode module | ||
### `turf.explode(input)` | ||
Takes a feature or set of features and returns all positions as | ||
Point|points. | ||
[points](Point). | ||
**Parameters** | ||
### Parameters | ||
- `geojson` **(Feature | FeatureCollection)** input features | ||
| parameter | type | description | | ||
| --------- | -------------------------- | -------------- | | ||
| `input` | Feature\,FeatureCollection | input features | | ||
**Examples** | ||
### Example | ||
```js | ||
```javascript | ||
var poly = { | ||
@@ -48,9 +39,17 @@ "type": "Feature", | ||
- Throws **[Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)** if it encounters an unknown geometry type | ||
**Returns** `FeatureCollection.<point>`, points representing the exploded input features | ||
Returns **FeatureCollection<point>** points representing the exploded input features | ||
## Installation | ||
--- | ||
Requires [nodejs](http://nodejs.org/). | ||
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. | ||
### Installation | ||
Install this module individually: | ||
```sh | ||
@@ -60,8 +59,6 @@ $ npm install turf-explode | ||
## 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
5125
63
Updatedturf-helpers@^3.0.12
Updatedturf-meta@^3.0.12