turf-simplify
Advanced tools
Comparing version 3.0.10 to 3.0.12
{ | ||
"name": "turf-simplify", | ||
"version": "3.0.10", | ||
"version": "3.0.12", | ||
"description": "simplify geographic shapes", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# turf-simplify | ||
[![build status](https://secure.travis-ci.org/Turfjs/turf-simplify.png)](http://travis-ci.org/Turfjs/turf-simplify) | ||
# simplify | ||
simplify geographic shapes | ||
Takes a [LineString](LineString) or [Polygon](Polygon) and returns a simplified version. Internally uses [simplify-js](http://mourner.github.io/simplify-js/) to perform simplification. | ||
**Parameters** | ||
### `turf.simplify(feature, tolerance, highQuality)` | ||
- `feature` **(Feature<(LineString | Polygon | MultiLineString | MultiPolygon)> | FeatureCollection | GeometryCollection)** feature to be simplified | ||
- `tolerance` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** simplification tolerance | ||
- `highQuality` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** whether or not to spend more time to create | ||
a higher-quality simplification with a different algorithm | ||
Takes a LineString or Polygon and returns a simplified version. Internally uses [simplify-js](http://mourner.github.io/simplify-js/) to perform simplification. | ||
**Examples** | ||
### Parameters | ||
| parameter | type | description | | ||
| ------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------ | | ||
| `feature` | Feature\.\<LineString|Polygon\> | feature to be simplified | | ||
| `tolerance` | Number | simplification tolerance | | ||
| `highQuality` | Boolean | whether or not to spend more time to create a higher-quality simplification with a different algorithm | | ||
### Example | ||
```js | ||
```javascript | ||
var feature = { | ||
@@ -65,9 +57,15 @@ "type": "Feature", | ||
Returns **(Feature<(LineString | Polygon | MultiLineString | MultiPolygon)> | FeatureCollection | GeometryCollection)** a simplified feature | ||
**Returns** `Feature.<LineString|Polygon>`, a simplified feature | ||
--- | ||
## 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 | ||
@@ -77,8 +75,6 @@ $ npm install turf-simplify | ||
## 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
10958
79