@turf/center
Advanced tools
Comparing version 6.0.0 to 6.0.1
{ | ||
"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 |
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
72
5533
10
4
36