Socket
Socket
Sign inDemoInstall

@turf/transform-rotate

Package Overview
Dependencies
Maintainers
7
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/transform-rotate - npm Package Compare versions

Comparing version 6.5.0 to 7.0.0-alpha.0

24

package.json
{
"name": "@turf/transform-rotate",
"version": "6.5.0",
"version": "7.0.0-alpha.0",
"description": "turf transform-rotate module",

@@ -50,6 +50,6 @@ "author": "Turf Authors",

"test:tape": "node -r esm test.js",
"test:types": "tsc --esModuleInterop --noEmit types.ts"
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
},
"devDependencies": {
"@turf/truncate": "^6.5.0",
"@turf/truncate": "^7.0.0-alpha.0",
"benchmark": "*",

@@ -63,12 +63,12 @@ "load-json-file": "*",

"dependencies": {
"@turf/centroid": "^6.5.0",
"@turf/clone": "^6.5.0",
"@turf/helpers": "^6.5.0",
"@turf/invariant": "^6.5.0",
"@turf/meta": "^6.5.0",
"@turf/rhumb-bearing": "^6.5.0",
"@turf/rhumb-destination": "^6.5.0",
"@turf/rhumb-distance": "^6.5.0"
"@turf/centroid": "^7.0.0-alpha.0",
"@turf/clone": "^7.0.0-alpha.0",
"@turf/helpers": "^7.0.0-alpha.0",
"@turf/invariant": "^7.0.0-alpha.0",
"@turf/meta": "^7.0.0-alpha.0",
"@turf/rhumb-bearing": "^7.0.0-alpha.0",
"@turf/rhumb-destination": "^7.0.0-alpha.0",
"@turf/rhumb-distance": "^7.0.0-alpha.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
"gitHead": "0edc4c491b999e5ace770a61e1cf549f7c004189"
}

@@ -7,15 +7,15 @@ # @turf/transform-rotate

Rotates any geojson Feature or Geometry of a specified angle, around its `centroid` or a given `pivot` point;
all rotations follow the right-hand rule: [https://en.wikipedia.org/wiki/Right-hand_rule][1]
Rotates any geojson Feature or Geometry of a specified angle, around its `centroid` or a given `pivot` point.
**Parameters**
### Parameters
- `geojson` **[GeoJSON][2]** object to be rotated
- `angle` **[number][3]** of rotation (along the vertical axis), from North in decimal degrees, negative clockwise
- `options` **[Object][4]** Optional parameters (optional, default `{}`)
- `options.pivot` **[Coord][5]** point around which the rotation will be performed (optional, default `'centroid'`)
- `options.mutate` **[boolean][6]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
* `geojson` **[GeoJSON][1]** object to be rotated
* `angle` **[number][2]** of rotation in decimal degrees, positive clockwise
* `options` **[Object][3]** Optional parameters (optional, default `{}`)
**Examples**
* `options.pivot` **[Coord][4]** point around which the rotation will be performed (optional, default `'centroid'`)
* `options.mutate` **[boolean][5]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
### Examples
```javascript

@@ -31,16 +31,14 @@ var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);

Returns **[GeoJSON][2]** the rotated GeoJSON feature
Returns **[GeoJSON][1]** the rotated GeoJSON feature
[1]: https://en.wikipedia.org/wiki/Right-hand_rule
[1]: https://tools.ietf.org/html/rfc7946#section-3
[2]: https://tools.ietf.org/html/rfc7946#section-3
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[4]: https://tools.ietf.org/html/rfc7946#section-3.1.1
[5]: https://tools.ietf.org/html/rfc7946#section-3.1.1
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
<!-- This file is automatically generated. Please don't edit it directly:

@@ -47,0 +45,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