@turf/line-slice-along 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 +9 -8
- package/dist/es/index.js +0 -0
- package/dist/js/index.js +0 -0
- package/index.d.ts +2 -1
- package/package.json +13 -11
package/README.md
CHANGED
|
@@ -10,15 +10,16 @@ and returns a subsection of the line in-between those points.
|
|
|
10
10
|
|
|
11
11
|
This can be useful for extracting only the part of a route between two distances.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
### Parameters
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- `options.units` **[string][7]** can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`)
|
|
15
|
+
* `line` **([Feature][3]<[LineString][4]> | [LineString][4])** input line
|
|
16
|
+
* `startDist` **[number][5]** distance along the line to starting point
|
|
17
|
+
* `stopDist` **[number][5]** distance along the line to ending point
|
|
18
|
+
* `options` **[Object][6]** Optional parameters (optional, default `{}`)
|
|
20
19
|
|
|
21
|
-
**
|
|
20
|
+
* `options.units` **[string][7]** can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`)
|
|
21
|
+
|
|
22
|
+
### Examples
|
|
22
23
|
|
|
23
24
|
```javascript
|
|
24
25
|
var line = turf.lineString([[7, 45], [9, 45], [14, 40], [14, 41]]);
|
|
@@ -30,7 +31,7 @@ var sliced = turf.lineSliceAlong(line, start, stop, {units: 'miles'});
|
|
|
30
31
|
var addToMap = [line, start, stop, sliced]
|
|
31
32
|
```
|
|
32
33
|
|
|
33
|
-
Returns **[Feature][3]
|
|
34
|
+
Returns **[Feature][3]<[LineString][4]>** sliced line
|
|
34
35
|
|
|
35
36
|
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.4
|
|
36
37
|
|
package/dist/es/index.js
CHANGED
|
File without changes
|
package/dist/js/index.js
CHANGED
|
File without changes
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/line-slice-along",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-alpha.1",
|
|
4
4
|
"description": "turf line-slice-along module",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"exports": {
|
|
27
27
|
"./package.json": "./package.json",
|
|
28
28
|
".": {
|
|
29
|
+
"types": "./index.d.ts",
|
|
29
30
|
"import": "./dist/es/index.js",
|
|
30
31
|
"require": "./dist/js/index.js"
|
|
31
32
|
}
|
|
@@ -37,25 +38,26 @@
|
|
|
37
38
|
"index.d.ts"
|
|
38
39
|
],
|
|
39
40
|
"scripts": {
|
|
40
|
-
"bench": "
|
|
41
|
+
"bench": "tsx bench.js",
|
|
41
42
|
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
|
|
42
|
-
"docs": "
|
|
43
|
+
"docs": "tsx ../../scripts/generate-readmes",
|
|
43
44
|
"test": "npm-run-all test:*",
|
|
44
|
-
"test:tape": "
|
|
45
|
+
"test:tape": "tsx test.js"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
|
-
"@turf/along": "^
|
|
48
|
+
"@turf/along": "^7.0.0-alpha.1",
|
|
48
49
|
"benchmark": "*",
|
|
49
50
|
"load-json-file": "*",
|
|
50
51
|
"npm-run-all": "*",
|
|
51
52
|
"rollup": "*",
|
|
52
|
-
"tape": "*"
|
|
53
|
+
"tape": "*",
|
|
54
|
+
"tsx": "*"
|
|
53
55
|
},
|
|
54
56
|
"dependencies": {
|
|
55
|
-
"@turf/bearing": "^
|
|
56
|
-
"@turf/destination": "^
|
|
57
|
-
"@turf/distance": "^
|
|
58
|
-
"@turf/helpers": "^
|
|
57
|
+
"@turf/bearing": "^7.0.0-alpha.1",
|
|
58
|
+
"@turf/destination": "^7.0.0-alpha.1",
|
|
59
|
+
"@turf/distance": "^7.0.0-alpha.1",
|
|
60
|
+
"@turf/helpers": "^7.0.0-alpha.1"
|
|
59
61
|
},
|
|
60
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "cf7a0c507b017ca066acffd0ce23bda5b393fb5a"
|
|
61
63
|
}
|