Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

turf-simplify

Package Overview
Dependencies
Maintainers
9
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-simplify - npm Package Compare versions

Comparing version 3.0.10 to 3.0.12

2

package.json
{
"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&lt;(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
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc