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

@turf/center

Package Overview
Dependencies
Maintainers
4
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/center - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

9

package.json
{
"name": "@turf/center",
"version": "6.0.0",
"version": "6.0.1",
"description": "turf center module",
"main": "index",
"types": "index.d.ts",
"files": [
"index.js",
"index.ts"
"index.d.ts"
],

@@ -43,3 +44,5 @@ "scripts": {

"tape": "*",
"write-json-file": "*"
"write-json-file": "*",
"tslint": "*",
"@types/tape": "*"
},

@@ -46,0 +49,0 @@ "dependencies": {

@@ -7,9 +7,11 @@ # @turf/center

Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns the absolute center point of all features.
Takes a [Feature][1] or [FeatureCollection][2] and returns the absolute center point of all features.
**Parameters**
- `geojson` **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** GeoJSON to be centered
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Optional parameters (optional, default `{}`)
- `options.properties` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** an Object that is used as the [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)'s properties (optional, default `{}`)
- `geojson` **[GeoJSON][3]** GeoJSON to be centered
- `options` **[Object][4]** Optional parameters (optional, default `{}`)
- `options.properties` **[Object][4]** Translate GeoJSON Properties to Point (optional, default `{}`)
- `options.bbox` **[Object][4]** Translate GeoJSON BBox to Point (optional, default `{}`)
- `options.id` **[Object][4]** Translate GeoJSON Id to Point (optional, default `{}`)

@@ -19,6 +21,6 @@ **Examples**

```javascript
var features = turf.featureCollection([
turf.point( [-97.522259, 35.4691]),
turf.point( [-97.502754, 35.463455]),
turf.point( [-97.508269, 35.463245])
var features = turf.points([
[-97.522259, 35.4691],
[-97.502754, 35.463455],
[-97.508269, 35.463245]
]);

@@ -34,4 +36,16 @@

Returns **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)>** a Point feature at the absolute center point of all input features
Returns **[Feature][5]<[Point][6]>** a Point feature at the absolute center point of all input features
[1]: https://tools.ietf.org/html/rfc7946#section-3.2
[2]: https://tools.ietf.org/html/rfc7946#section-3.3
[3]: https://tools.ietf.org/html/rfc7946#section-3
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[5]: https://tools.ietf.org/html/rfc7946#section-3.2
[6]: https://tools.ietf.org/html/rfc7946#section-3.1.2
<!-- This file is automatically generated. Please don't edit it directly:

@@ -38,0 +52,0 @@ if you find an error, edit the source file (likely index.js), and re-run

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