@turf/transform-translate 6.5.0 → 7.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -9
- package/dist/es/index.js +0 -0
- package/dist/js/index.js +0 -0
- package/package.json +14 -12
package/README.md
CHANGED
|
@@ -7,17 +7,18 @@
|
|
|
7
7
|
Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line
|
|
8
8
|
on the provided direction angle.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
### Parameters
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- `options.units` **[string][4]** in which `distance` will be express; miles, kilometers, degrees, or radians (optional, default `'kilometers'`)
|
|
17
|
-
- `options.zTranslation` **[number][2]** length of the vertical motion, same unit of distance (optional, default `0`)
|
|
18
|
-
- `options.mutate` **[boolean][5]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
|
|
12
|
+
* `geojson` **[GeoJSON][1]** object to be translated
|
|
13
|
+
* `distance` **[number][2]** length of the motion; negative values determine motion in opposite direction
|
|
14
|
+
* `direction` **[number][2]** of the motion; angle from North in decimal degrees, positive clockwise
|
|
15
|
+
* `options` **[Object][3]** Optional parameters (optional, default `{}`)
|
|
19
16
|
|
|
20
|
-
**
|
|
17
|
+
* `options.units` **[string][4]** in which `distance` will be express; miles, kilometers, degrees, or radians (optional, default `'kilometers'`)
|
|
18
|
+
* `options.zTranslation` **[number][2]** length of the vertical motion, same unit of distance (optional, default `0`)
|
|
19
|
+
* `options.mutate` **[boolean][5]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
|
|
20
|
+
|
|
21
|
+
### Examples
|
|
21
22
|
|
|
22
23
|
```javascript
|
|
23
24
|
var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);
|
package/dist/es/index.js
CHANGED
|
File without changes
|
package/dist/js/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/transform-translate",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-alpha.1",
|
|
4
4
|
"description": "turf transform-translate module",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"exports": {
|
|
34
34
|
"./package.json": "./package.json",
|
|
35
35
|
".": {
|
|
36
|
+
"types": "./index.d.ts",
|
|
36
37
|
"import": "./dist/es/index.js",
|
|
37
38
|
"require": "./dist/js/index.js"
|
|
38
39
|
}
|
|
@@ -44,28 +45,29 @@
|
|
|
44
45
|
"index.d.ts"
|
|
45
46
|
],
|
|
46
47
|
"scripts": {
|
|
47
|
-
"bench": "
|
|
48
|
+
"bench": "tsx bench.js",
|
|
48
49
|
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
|
|
49
|
-
"docs": "
|
|
50
|
+
"docs": "tsx ../../scripts/generate-readmes",
|
|
50
51
|
"test": "npm-run-all test:*",
|
|
51
|
-
"test:tape": "
|
|
52
|
-
"test:types": "tsc --esModuleInterop --noEmit types.ts"
|
|
52
|
+
"test:tape": "tsx test.js",
|
|
53
|
+
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
|
-
"@turf/truncate": "^
|
|
56
|
+
"@turf/truncate": "^7.0.0-alpha.1",
|
|
56
57
|
"benchmark": "*",
|
|
57
58
|
"load-json-file": "*",
|
|
58
59
|
"npm-run-all": "*",
|
|
59
60
|
"rollup": "*",
|
|
60
61
|
"tape": "*",
|
|
62
|
+
"tsx": "*",
|
|
61
63
|
"write-json-file": "*"
|
|
62
64
|
},
|
|
63
65
|
"dependencies": {
|
|
64
|
-
"@turf/clone": "^
|
|
65
|
-
"@turf/helpers": "^
|
|
66
|
-
"@turf/invariant": "^
|
|
67
|
-
"@turf/meta": "^
|
|
68
|
-
"@turf/rhumb-destination": "^
|
|
66
|
+
"@turf/clone": "^7.0.0-alpha.1",
|
|
67
|
+
"@turf/helpers": "^7.0.0-alpha.1",
|
|
68
|
+
"@turf/invariant": "^7.0.0-alpha.1",
|
|
69
|
+
"@turf/meta": "^7.0.0-alpha.1",
|
|
70
|
+
"@turf/rhumb-destination": "^7.0.0-alpha.1"
|
|
69
71
|
},
|
|
70
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "cf7a0c507b017ca066acffd0ce23bda5b393fb5a"
|
|
71
73
|
}
|