turf-square
Advanced tools
Comparing version 3.0.10 to 3.0.12
{ | ||
"name": "turf-square", | ||
"version": "3.0.10", | ||
"version": "3.0.12", | ||
"description": "turf square module", | ||
@@ -30,5 +30,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"turf-distance": "^3.0.10", | ||
"turf-helpers": "^3.0.10" | ||
"turf-distance": "^3.0.12", | ||
"turf-helpers": "^3.0.12" | ||
} | ||
} |
# turf-square | ||
[![build status](https://secure.travis-ci.org/Turfjs/turf-square.png)](http://travis-ci.org/Turfjs/turf-square) | ||
# square | ||
turf square module | ||
Takes a bounding box and calculates the minimum square bounding box that | ||
would contain the input. | ||
**Parameters** | ||
### `turf.square(bbox)` | ||
- `bbox` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>** a bounding box | ||
Takes a bounding box and calculates the minimum square bounding box that would contain the input. | ||
**Examples** | ||
### Parameters | ||
| parameter | type | description | | ||
| --------- | ----------------- | -------------- | | ||
| `bbox` | Array\.\<number\> | a bounding box | | ||
### Example | ||
```js | ||
```javascript | ||
var bbox = [-20,-20,-15,0]; | ||
@@ -38,9 +30,15 @@ | ||
Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>** a square surrounding `bbox` | ||
**Returns** `Array.<number>`, a square surrounding `bbox` | ||
--- | ||
## 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 | ||
@@ -50,8 +48,6 @@ $ npm install turf-square | ||
## 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
4987
52
Updatedturf-distance@^3.0.12
Updatedturf-helpers@^3.0.12