node-red-contrib-web-worldmap 4.8.1 → 5.0.0
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/CHANGELOG.md +2 -0
- package/README.md +6 -2
- package/examples/{feedback.json → Feedback.json} +1 -9
- package/examples/MouseCoordinates.json +159 -0
- package/examples/sidcEdgeIcon.json +158 -0
- package/node_modules/@turf/bezier-spline/README.md +15 -21
- package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs +165 -0
- package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs.map +1 -0
- package/node_modules/@turf/bezier-spline/dist/{es/index.js → cjs/index.d.cts} +9 -30
- package/node_modules/@turf/bezier-spline/dist/{js → esm}/index.d.ts +5 -3
- package/node_modules/@turf/bezier-spline/dist/esm/index.js +165 -0
- package/node_modules/@turf/bezier-spline/dist/esm/index.js.map +1 -0
- package/node_modules/@turf/bezier-spline/package.json +33 -25
- package/node_modules/@turf/helpers/README.md +231 -219
- package/node_modules/@turf/helpers/dist/cjs/index.cjs +308 -0
- package/node_modules/@turf/helpers/dist/cjs/index.cjs.map +1 -0
- package/node_modules/@turf/helpers/dist/{es/index.js → cjs/index.d.cts} +103 -303
- package/node_modules/@turf/helpers/dist/{js → esm}/index.d.ts +67 -53
- package/node_modules/@turf/helpers/dist/esm/index.js +308 -0
- package/node_modules/@turf/helpers/dist/esm/index.js.map +1 -0
- package/node_modules/@turf/helpers/package.json +32 -22
- package/node_modules/@turf/invariant/README.md +47 -58
- package/node_modules/@turf/invariant/dist/cjs/index.cjs +127 -0
- package/node_modules/@turf/invariant/dist/cjs/index.cjs.map +1 -0
- package/node_modules/@turf/invariant/dist/cjs/index.d.cts +108 -0
- package/node_modules/@turf/invariant/dist/{js → esm}/index.d.ts +12 -9
- package/node_modules/@turf/invariant/dist/esm/index.js +127 -0
- package/node_modules/@turf/invariant/dist/esm/index.js.map +1 -0
- package/node_modules/@turf/invariant/package.json +31 -22
- package/node_modules/@types/geojson/LICENSE +21 -0
- package/node_modules/@types/geojson/README.md +15 -0
- package/node_modules/@types/geojson/index.d.ts +165 -0
- package/node_modules/@types/geojson/package.json +45 -0
- package/node_modules/body-parser/HISTORY.md +7 -0
- package/node_modules/body-parser/README.md +11 -0
- package/node_modules/body-parser/lib/types/urlencoded.js +30 -7
- package/node_modules/body-parser/package.json +2 -2
- package/node_modules/encodeurl/README.md +19 -38
- package/node_modules/encodeurl/index.js +1 -1
- package/node_modules/encodeurl/package.json +7 -7
- package/node_modules/express/History.md +27 -0
- package/node_modules/express/Readme.md +100 -6
- package/node_modules/express/lib/response.js +11 -10
- package/node_modules/express/package.json +11 -11
- package/node_modules/finalhandler/HISTORY.md +15 -0
- package/node_modules/finalhandler/README.md +2 -2
- package/node_modules/finalhandler/index.js +7 -2
- package/node_modules/finalhandler/package.json +8 -7
- package/node_modules/merge-descriptors/README.md +4 -3
- package/node_modules/merge-descriptors/index.js +3 -3
- package/node_modules/merge-descriptors/package.json +14 -7
- package/node_modules/mime-db/HISTORY.md +14 -0
- package/node_modules/mime-db/README.md +27 -24
- package/node_modules/mime-db/db.json +646 -62
- package/node_modules/mime-db/package.json +9 -13
- package/node_modules/mime-types/node_modules/mime-db/HISTORY.md +507 -0
- package/node_modules/mime-types/node_modules/mime-db/LICENSE +23 -0
- package/node_modules/mime-types/node_modules/mime-db/README.md +100 -0
- package/node_modules/mime-types/node_modules/mime-db/db.json +8519 -0
- package/node_modules/mime-types/node_modules/mime-db/index.js +12 -0
- package/node_modules/mime-types/node_modules/mime-db/package.json +60 -0
- package/node_modules/object-inspect/CHANGELOG.md +15 -0
- package/node_modules/object-inspect/index.js +4 -1
- package/node_modules/object-inspect/package.json +14 -9
- package/node_modules/object-inspect/readme.markdown +9 -11
- package/node_modules/path-to-regexp/index.js +57 -40
- package/node_modules/path-to-regexp/package.json +2 -2
- package/node_modules/qs/.editorconfig +3 -0
- package/node_modules/qs/.eslintrc +2 -2
- package/node_modules/qs/CHANGELOG.md +59 -5
- package/node_modules/qs/README.md +133 -49
- package/node_modules/qs/dist/qs.js +56 -2020
- package/node_modules/qs/lib/parse.js +46 -13
- package/node_modules/qs/lib/stringify.js +53 -28
- package/node_modules/qs/lib/utils.js +47 -34
- package/node_modules/qs/package.json +26 -12
- package/node_modules/qs/test/empty-keys-cases.js +267 -0
- package/node_modules/qs/test/parse.js +347 -32
- package/node_modules/qs/test/stringify.js +436 -47
- package/node_modules/send/HISTORY.md +5 -0
- package/node_modules/send/index.js +1 -2
- package/node_modules/send/node_modules/encodeurl/LICENSE +22 -0
- package/node_modules/send/node_modules/encodeurl/README.md +128 -0
- package/node_modules/send/node_modules/encodeurl/index.js +60 -0
- package/node_modules/send/node_modules/encodeurl/package.json +40 -0
- package/node_modules/send/package.json +1 -1
- package/node_modules/serve-static/HISTORY.md +16 -0
- package/node_modules/serve-static/index.js +1 -2
- package/node_modules/serve-static/package.json +3 -3
- package/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/node_modules/tslib/LICENSE.txt +12 -0
- package/node_modules/tslib/README.md +164 -0
- package/node_modules/tslib/SECURITY.md +41 -0
- package/node_modules/tslib/modules/index.d.ts +37 -0
- package/node_modules/tslib/modules/index.js +68 -0
- package/node_modules/tslib/modules/package.json +3 -0
- package/node_modules/tslib/package.json +47 -0
- package/node_modules/tslib/tslib.d.ts +453 -0
- package/node_modules/tslib/tslib.es6.html +1 -0
- package/node_modules/tslib/tslib.es6.js +379 -0
- package/node_modules/tslib/tslib.es6.mjs +378 -0
- package/node_modules/tslib/tslib.html +1 -0
- package/node_modules/tslib/tslib.js +429 -0
- package/package.json +5 -5
- package/worldmap/index.html +1 -1
- package/worldmap/leaflet/leaflet.mousecoordinate.js +3 -3
- package/worldmap/worldmap.js +148 -44
- package/worldmap.html +1 -1
- package/worldmap.js +23 -4
- package/node_modules/@turf/bezier-spline/dist/es/lib/spline.js +0 -158
- package/node_modules/@turf/bezier-spline/dist/es/package.json +0 -1
- package/node_modules/@turf/bezier-spline/dist/js/index.js +0 -65
- package/node_modules/@turf/bezier-spline/dist/js/lib/spline.d.ts +0 -62
- package/node_modules/@turf/bezier-spline/dist/js/lib/spline.js +0 -160
- package/node_modules/@turf/helpers/dist/es/lib/geojson.js +0 -7
- package/node_modules/@turf/helpers/dist/es/package.json +0 -1
- package/node_modules/@turf/helpers/dist/js/index.js +0 -724
- package/node_modules/@turf/helpers/dist/js/lib/geojson.d.ts +0 -193
- package/node_modules/@turf/helpers/dist/js/lib/geojson.js +0 -9
- package/node_modules/@turf/invariant/dist/es/index.js +0 -223
- package/node_modules/@turf/invariant/dist/es/package.json +0 -1
- package/node_modules/@turf/invariant/dist/js/index.js +0 -233
- package/node_modules/path-to-regexp/History.md +0 -36
- /package/node_modules/{encodeurl → send/node_modules/encodeurl}/HISTORY.md +0 -0
|
@@ -2,35 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## helpers
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### earthRadius
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The Earth radius in kilometers. Used by Turf modules that model the Earth as a sphere. The [mean radius][1] was selected because it is [recommended ][2] by the Haversine formula (used by turf/distance) to reduce error.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Type: [number][3]
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
### factors
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Unit of measurement factors based on earthRadius.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Keys are the name of the unit, values are the number of that unit in a single radian
|
|
18
|
+
|
|
19
|
+
Type: [Object][4]
|
|
20
|
+
|
|
21
|
+
### areaFactors
|
|
18
22
|
|
|
19
23
|
Area of measurement factors based on 1 square meter.
|
|
20
24
|
|
|
25
|
+
Type: [Object][4]
|
|
26
|
+
|
|
21
27
|
## feature
|
|
22
28
|
|
|
23
|
-
Wraps a GeoJSON [Geometry][
|
|
29
|
+
Wraps a GeoJSON [Geometry][5] in a GeoJSON [Feature][6].
|
|
30
|
+
|
|
31
|
+
### Parameters
|
|
24
32
|
|
|
25
|
-
**
|
|
33
|
+
* `geometry` **[Geometry][5]** input geometry
|
|
34
|
+
* `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
|
|
35
|
+
* `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
26
36
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
30
|
-
- `options.bbox` **[Array][5]<[number][6]>?** Bounding Box Array [west, south, east, north] associated with the Feature
|
|
31
|
-
- `options.id` **([string][7] \| [number][6])?** Identifier associated with the Feature
|
|
37
|
+
* `options.bbox` **[Array][7]<[number][3]>?** Bounding Box Array \[west, south, east, north] associated with the Feature
|
|
38
|
+
* `options.id` **([string][8] | [number][3])?** Identifier associated with the Feature
|
|
32
39
|
|
|
33
|
-
|
|
40
|
+
### Examples
|
|
34
41
|
|
|
35
42
|
```javascript
|
|
36
43
|
var geometry = {
|
|
@@ -43,46 +50,44 @@ var feature = turf.feature(geometry);
|
|
|
43
50
|
//=feature
|
|
44
51
|
```
|
|
45
52
|
|
|
46
|
-
Returns **[Feature][
|
|
53
|
+
Returns **[Feature][6]** a GeoJSON Feature
|
|
47
54
|
|
|
48
55
|
## geometry
|
|
49
56
|
|
|
50
|
-
Creates a GeoJSON [Geometry][
|
|
57
|
+
Creates a GeoJSON [Geometry][5] from a Geometry string type & coordinates.
|
|
51
58
|
For GeometryCollection type use `helpers.geometryCollection`
|
|
52
59
|
|
|
53
|
-
|
|
60
|
+
### Parameters
|
|
54
61
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
- `options.bbox` **[Array][5]<[number][6]>?** Bounding Box Array [west, south, east, north] associated with the Geometry
|
|
62
|
+
* `type` **[string][8]** Geometry Type
|
|
63
|
+
* `coordinates` **[Array][7]\<any>** Coordinates
|
|
64
|
+
* `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
59
65
|
|
|
60
|
-
|
|
66
|
+
### Examples
|
|
61
67
|
|
|
62
68
|
```javascript
|
|
63
|
-
var type =
|
|
69
|
+
var type = "Point";
|
|
64
70
|
var coordinates = [110, 50];
|
|
65
|
-
|
|
66
71
|
var geometry = turf.geometry(type, coordinates);
|
|
67
|
-
|
|
68
|
-
//=geometry
|
|
72
|
+
// => geometry
|
|
69
73
|
```
|
|
70
74
|
|
|
71
|
-
Returns **[Geometry][
|
|
75
|
+
Returns **[Geometry][5]** a GeoJSON Geometry
|
|
72
76
|
|
|
73
77
|
## point
|
|
74
78
|
|
|
75
|
-
Creates a [Point][9] [Feature][
|
|
79
|
+
Creates a [Point][9] [Feature][6] from a Position.
|
|
80
|
+
|
|
81
|
+
### Parameters
|
|
76
82
|
|
|
77
|
-
**
|
|
83
|
+
* `coordinates` **[Array][7]<[number][3]>** longitude, latitude position (each in decimal degrees)
|
|
84
|
+
* `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
|
|
85
|
+
* `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
78
86
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
- `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
82
|
-
- `options.bbox` **[Array][5]<[number][6]>?** Bounding Box Array [west, south, east, north] associated with the Feature
|
|
83
|
-
- `options.id` **([string][7] \| [number][6])?** Identifier associated with the Feature
|
|
87
|
+
* `options.bbox` **[Array][7]<[number][3]>?** Bounding Box Array \[west, south, east, north] associated with the Feature
|
|
88
|
+
* `options.id` **([string][8] | [number][3])?** Identifier associated with the Feature
|
|
84
89
|
|
|
85
|
-
|
|
90
|
+
### Examples
|
|
86
91
|
|
|
87
92
|
```javascript
|
|
88
93
|
var point = turf.point([-75.343, 39.984]);
|
|
@@ -90,21 +95,23 @@ var point = turf.point([-75.343, 39.984]);
|
|
|
90
95
|
//=point
|
|
91
96
|
```
|
|
92
97
|
|
|
93
|
-
Returns **[Feature][
|
|
98
|
+
Returns **[Feature][6]<[Point][9]>** a Point feature
|
|
94
99
|
|
|
95
100
|
## points
|
|
96
101
|
|
|
97
|
-
Creates a [Point][9] [FeatureCollection][
|
|
102
|
+
Creates a [Point][9] [FeatureCollection][10] from an Array of Point coordinates.
|
|
98
103
|
|
|
99
|
-
|
|
104
|
+
### Parameters
|
|
100
105
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
- `options.bbox` **[Array][5]<[number][6]>?** Bounding Box Array [west, south, east, north] associated with the FeatureCollection
|
|
105
|
-
- `options.id` **([string][7] \| [number][6])?** Identifier associated with the FeatureCollection
|
|
106
|
+
* `coordinates` **[Array][7]<[Array][7]<[number][3]>>** an array of Points
|
|
107
|
+
* `properties` **[Object][4]** Translate these properties to each Feature (optional, default `{}`)
|
|
108
|
+
* `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
106
109
|
|
|
107
|
-
**
|
|
110
|
+
* `options.bbox` **[Array][7]<[number][3]>?** Bounding Box Array \[west, south, east, north]
|
|
111
|
+
associated with the FeatureCollection
|
|
112
|
+
* `options.id` **([string][8] | [number][3])?** Identifier associated with the FeatureCollection
|
|
113
|
+
|
|
114
|
+
### Examples
|
|
108
115
|
|
|
109
116
|
```javascript
|
|
110
117
|
var points = turf.points([
|
|
@@ -116,21 +123,22 @@ var points = turf.points([
|
|
|
116
123
|
//=points
|
|
117
124
|
```
|
|
118
125
|
|
|
119
|
-
Returns **[FeatureCollection][
|
|
126
|
+
Returns **[FeatureCollection][10]<[Point][9]>** Point Feature
|
|
120
127
|
|
|
121
128
|
## polygon
|
|
122
129
|
|
|
123
|
-
Creates a [Polygon][
|
|
130
|
+
Creates a [Polygon][11] [Feature][6] from an Array of LinearRings.
|
|
131
|
+
|
|
132
|
+
### Parameters
|
|
124
133
|
|
|
125
|
-
**
|
|
134
|
+
* `coordinates` **[Array][7]<[Array][7]<[Array][7]<[number][3]>>>** an array of LinearRings
|
|
135
|
+
* `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
|
|
136
|
+
* `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
126
137
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
- `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
130
|
-
- `options.bbox` **[Array][5]<[number][6]>?** Bounding Box Array [west, south, east, north] associated with the Feature
|
|
131
|
-
- `options.id` **([string][7] \| [number][6])?** Identifier associated with the Feature
|
|
138
|
+
* `options.bbox` **[Array][7]<[number][3]>?** Bounding Box Array \[west, south, east, north] associated with the Feature
|
|
139
|
+
* `options.id` **([string][8] | [number][3])?** Identifier associated with the Feature
|
|
132
140
|
|
|
133
|
-
|
|
141
|
+
### Examples
|
|
134
142
|
|
|
135
143
|
```javascript
|
|
136
144
|
var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
|
|
@@ -138,21 +146,22 @@ var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
|
|
|
138
146
|
//=polygon
|
|
139
147
|
```
|
|
140
148
|
|
|
141
|
-
Returns **[Feature][
|
|
149
|
+
Returns **[Feature][6]<[Polygon][11]>** Polygon Feature
|
|
142
150
|
|
|
143
151
|
## polygons
|
|
144
152
|
|
|
145
|
-
Creates a [Polygon][
|
|
153
|
+
Creates a [Polygon][11] [FeatureCollection][10] from an Array of Polygon coordinates.
|
|
146
154
|
|
|
147
|
-
|
|
155
|
+
### Parameters
|
|
148
156
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
- `options.bbox` **[Array][5]<[number][6]>?** Bounding Box Array [west, south, east, north] associated with the Feature
|
|
153
|
-
- `options.id` **([string][7] \| [number][6])?** Identifier associated with the FeatureCollection
|
|
157
|
+
* `coordinates` **[Array][7]<[Array][7]<[Array][7]<[Array][7]<[number][3]>>>>** an array of Polygon coordinates
|
|
158
|
+
* `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
|
|
159
|
+
* `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
154
160
|
|
|
155
|
-
**
|
|
161
|
+
* `options.bbox` **[Array][7]<[number][3]>?** Bounding Box Array \[west, south, east, north] associated with the Feature
|
|
162
|
+
* `options.id` **([string][8] | [number][3])?** Identifier associated with the FeatureCollection
|
|
163
|
+
|
|
164
|
+
### Examples
|
|
156
165
|
|
|
157
166
|
```javascript
|
|
158
167
|
var polygons = turf.polygons([
|
|
@@ -163,21 +172,22 @@ var polygons = turf.polygons([
|
|
|
163
172
|
//=polygons
|
|
164
173
|
```
|
|
165
174
|
|
|
166
|
-
Returns **[FeatureCollection][
|
|
175
|
+
Returns **[FeatureCollection][10]<[Polygon][11]>** Polygon FeatureCollection
|
|
167
176
|
|
|
168
177
|
## lineString
|
|
169
178
|
|
|
170
|
-
Creates a [LineString][
|
|
179
|
+
Creates a [LineString][12] [Feature][6] from an Array of Positions.
|
|
180
|
+
|
|
181
|
+
### Parameters
|
|
171
182
|
|
|
172
|
-
**
|
|
183
|
+
* `coordinates` **[Array][7]<[Array][7]<[number][3]>>** an array of Positions
|
|
184
|
+
* `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
|
|
185
|
+
* `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
173
186
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
- `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
177
|
-
- `options.bbox` **[Array][5]<[number][6]>?** Bounding Box Array [west, south, east, north] associated with the Feature
|
|
178
|
-
- `options.id` **([string][7] \| [number][6])?** Identifier associated with the Feature
|
|
187
|
+
* `options.bbox` **[Array][7]<[number][3]>?** Bounding Box Array \[west, south, east, north] associated with the Feature
|
|
188
|
+
* `options.id` **([string][8] | [number][3])?** Identifier associated with the Feature
|
|
179
189
|
|
|
180
|
-
|
|
190
|
+
### Examples
|
|
181
191
|
|
|
182
192
|
```javascript
|
|
183
193
|
var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
|
|
@@ -187,21 +197,23 @@ var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]],
|
|
|
187
197
|
//=linestring2
|
|
188
198
|
```
|
|
189
199
|
|
|
190
|
-
Returns **[Feature][
|
|
200
|
+
Returns **[Feature][6]<[LineString][12]>** LineString Feature
|
|
191
201
|
|
|
192
202
|
## lineStrings
|
|
193
203
|
|
|
194
|
-
Creates a [LineString][
|
|
204
|
+
Creates a [LineString][12] [FeatureCollection][10] from an Array of LineString coordinates.
|
|
195
205
|
|
|
196
|
-
|
|
206
|
+
### Parameters
|
|
197
207
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
- `options.bbox` **[Array][5]<[number][6]>?** Bounding Box Array [west, south, east, north] associated with the FeatureCollection
|
|
202
|
-
- `options.id` **([string][7] \| [number][6])?** Identifier associated with the FeatureCollection
|
|
208
|
+
* `coordinates` **[Array][7]<[Array][7]<[Array][7]<[number][3]>>>** an array of LinearRings
|
|
209
|
+
* `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
|
|
210
|
+
* `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
203
211
|
|
|
204
|
-
**
|
|
212
|
+
* `options.bbox` **[Array][7]<[number][3]>?** Bounding Box Array \[west, south, east, north]
|
|
213
|
+
associated with the FeatureCollection
|
|
214
|
+
* `options.id` **([string][8] | [number][3])?** Identifier associated with the FeatureCollection
|
|
215
|
+
|
|
216
|
+
### Examples
|
|
205
217
|
|
|
206
218
|
```javascript
|
|
207
219
|
var linestrings = turf.lineStrings([
|
|
@@ -212,20 +224,21 @@ var linestrings = turf.lineStrings([
|
|
|
212
224
|
//=linestrings
|
|
213
225
|
```
|
|
214
226
|
|
|
215
|
-
Returns **[FeatureCollection][
|
|
227
|
+
Returns **[FeatureCollection][10]<[LineString][12]>** LineString FeatureCollection
|
|
216
228
|
|
|
217
229
|
## featureCollection
|
|
218
230
|
|
|
219
|
-
Takes one or more [Features][
|
|
231
|
+
Takes one or more [Features][6] and creates a [FeatureCollection][10].
|
|
232
|
+
|
|
233
|
+
### Parameters
|
|
220
234
|
|
|
221
|
-
**
|
|
235
|
+
* `features` **[Array][7]<[Feature][6]>** input features
|
|
236
|
+
* `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
222
237
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
- `options.bbox` **[Array][5]<[number][6]>?** Bounding Box Array [west, south, east, north] associated with the Feature
|
|
226
|
-
- `options.id` **([string][7] \| [number][6])?** Identifier associated with the Feature
|
|
238
|
+
* `options.bbox` **[Array][7]<[number][3]>?** Bounding Box Array \[west, south, east, north] associated with the Feature
|
|
239
|
+
* `options.id` **([string][8] | [number][3])?** Identifier associated with the Feature
|
|
227
240
|
|
|
228
|
-
|
|
241
|
+
### Examples
|
|
229
242
|
|
|
230
243
|
```javascript
|
|
231
244
|
var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
|
|
@@ -241,22 +254,23 @@ var collection = turf.featureCollection([
|
|
|
241
254
|
//=collection
|
|
242
255
|
```
|
|
243
256
|
|
|
244
|
-
Returns **[FeatureCollection][
|
|
257
|
+
Returns **[FeatureCollection][10]** FeatureCollection of Features
|
|
245
258
|
|
|
246
259
|
## multiLineString
|
|
247
260
|
|
|
248
|
-
Creates a [Feature
|
|
261
|
+
Creates a [Feature\<MultiLineString>][13] based on a
|
|
249
262
|
coordinate array. Properties can be added optionally.
|
|
250
263
|
|
|
251
|
-
|
|
264
|
+
### Parameters
|
|
265
|
+
|
|
266
|
+
* `coordinates` **[Array][7]<[Array][7]<[Array][7]<[number][3]>>>** an array of LineStrings
|
|
267
|
+
* `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
|
|
268
|
+
* `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
252
269
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
- `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
256
|
-
- `options.bbox` **[Array][5]<[number][6]>?** Bounding Box Array [west, south, east, north] associated with the Feature
|
|
257
|
-
- `options.id` **([string][7] \| [number][6])?** Identifier associated with the Feature
|
|
270
|
+
* `options.bbox` **[Array][7]<[number][3]>?** Bounding Box Array \[west, south, east, north] associated with the Feature
|
|
271
|
+
* `options.id` **([string][8] | [number][3])?** Identifier associated with the Feature
|
|
258
272
|
|
|
259
|
-
|
|
273
|
+
### Examples
|
|
260
274
|
|
|
261
275
|
```javascript
|
|
262
276
|
var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
|
|
@@ -264,24 +278,25 @@ var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
|
|
|
264
278
|
//=multiLine
|
|
265
279
|
```
|
|
266
280
|
|
|
267
|
-
|
|
281
|
+
* Throws **[Error][14]** if no coordinates are passed
|
|
268
282
|
|
|
269
|
-
Returns **[Feature][
|
|
283
|
+
Returns **[Feature][6]<[MultiLineString][15]>** a MultiLineString feature
|
|
270
284
|
|
|
271
285
|
## multiPoint
|
|
272
286
|
|
|
273
|
-
Creates a [Feature
|
|
287
|
+
Creates a [Feature\<MultiPoint>][16] based on a
|
|
274
288
|
coordinate array. Properties can be added optionally.
|
|
275
289
|
|
|
276
|
-
|
|
290
|
+
### Parameters
|
|
277
291
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
- `options.bbox` **[Array][5]<[number][6]>?** Bounding Box Array [west, south, east, north] associated with the Feature
|
|
282
|
-
- `options.id` **([string][7] \| [number][6])?** Identifier associated with the Feature
|
|
292
|
+
* `coordinates` **[Array][7]<[Array][7]<[number][3]>>** an array of Positions
|
|
293
|
+
* `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
|
|
294
|
+
* `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
283
295
|
|
|
284
|
-
**
|
|
296
|
+
* `options.bbox` **[Array][7]<[number][3]>?** Bounding Box Array \[west, south, east, north] associated with the Feature
|
|
297
|
+
* `options.id` **([string][8] | [number][3])?** Identifier associated with the Feature
|
|
298
|
+
|
|
299
|
+
### Examples
|
|
285
300
|
|
|
286
301
|
```javascript
|
|
287
302
|
var multiPt = turf.multiPoint([[0,0],[10,10]]);
|
|
@@ -289,24 +304,25 @@ var multiPt = turf.multiPoint([[0,0],[10,10]]);
|
|
|
289
304
|
//=multiPt
|
|
290
305
|
```
|
|
291
306
|
|
|
292
|
-
|
|
307
|
+
* Throws **[Error][14]** if no coordinates are passed
|
|
293
308
|
|
|
294
|
-
Returns **[Feature][
|
|
309
|
+
Returns **[Feature][6]<[MultiPoint][17]>** a MultiPoint feature
|
|
295
310
|
|
|
296
311
|
## multiPolygon
|
|
297
312
|
|
|
298
|
-
Creates a [Feature
|
|
313
|
+
Creates a [Feature\<MultiPolygon>][18] based on a
|
|
299
314
|
coordinate array. Properties can be added optionally.
|
|
300
315
|
|
|
301
|
-
|
|
316
|
+
### Parameters
|
|
317
|
+
|
|
318
|
+
* `coordinates` **[Array][7]<[Array][7]<[Array][7]<[Array][7]<[number][3]>>>>** an array of Polygons
|
|
319
|
+
* `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
|
|
320
|
+
* `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
302
321
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
- `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
306
|
-
- `options.bbox` **[Array][5]<[number][6]>?** Bounding Box Array [west, south, east, north] associated with the Feature
|
|
307
|
-
- `options.id` **([string][7] \| [number][6])?** Identifier associated with the Feature
|
|
322
|
+
* `options.bbox` **[Array][7]<[number][3]>?** Bounding Box Array \[west, south, east, north] associated with the Feature
|
|
323
|
+
* `options.id` **([string][8] | [number][3])?** Identifier associated with the Feature
|
|
308
324
|
|
|
309
|
-
|
|
325
|
+
### Examples
|
|
310
326
|
|
|
311
327
|
```javascript
|
|
312
328
|
var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
|
|
@@ -314,51 +330,46 @@ var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
|
|
|
314
330
|
//=multiPoly
|
|
315
331
|
```
|
|
316
332
|
|
|
317
|
-
|
|
333
|
+
* Throws **[Error][14]** if no coordinates are passed
|
|
318
334
|
|
|
319
|
-
Returns **[Feature][
|
|
335
|
+
Returns **[Feature][6]<[MultiPolygon][19]>** a multipolygon feature
|
|
320
336
|
|
|
321
337
|
## geometryCollection
|
|
322
338
|
|
|
323
|
-
Creates a [Feature
|
|
339
|
+
Creates a [Feature\<GeometryCollection>][20] based on a
|
|
324
340
|
coordinate array. Properties can be added optionally.
|
|
325
341
|
|
|
326
|
-
|
|
342
|
+
### Parameters
|
|
327
343
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
- `options.bbox` **[Array][5]<[number][6]>?** Bounding Box Array [west, south, east, north] associated with the Feature
|
|
332
|
-
- `options.id` **([string][7] \| [number][6])?** Identifier associated with the Feature
|
|
344
|
+
* `geometries` **[Array][7]<[Geometry][5]>** an array of GeoJSON Geometries
|
|
345
|
+
* `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
|
|
346
|
+
* `options` **[Object][4]** Optional Parameters (optional, default `{}`)
|
|
333
347
|
|
|
334
|
-
**
|
|
348
|
+
* `options.bbox` **[Array][7]<[number][3]>?** Bounding Box Array \[west, south, east, north] associated with the Feature
|
|
349
|
+
* `options.id` **([string][8] | [number][3])?** Identifier associated with the Feature
|
|
350
|
+
|
|
351
|
+
### Examples
|
|
335
352
|
|
|
336
353
|
```javascript
|
|
337
|
-
var pt =
|
|
338
|
-
|
|
339
|
-
"coordinates": [100, 0]
|
|
340
|
-
};
|
|
341
|
-
var line = {
|
|
342
|
-
"type": "LineString",
|
|
343
|
-
"coordinates": [ [101, 0], [102, 1] ]
|
|
344
|
-
};
|
|
354
|
+
var pt = turf.geometry("Point", [100, 0]);
|
|
355
|
+
var line = turf.geometry("LineString", [[101, 0], [102, 1]]);
|
|
345
356
|
var collection = turf.geometryCollection([pt, line]);
|
|
346
357
|
|
|
347
|
-
|
|
358
|
+
// => collection
|
|
348
359
|
```
|
|
349
360
|
|
|
350
|
-
Returns **[Feature][
|
|
361
|
+
Returns **[Feature][6]<[GeometryCollection][21]>** a GeoJSON GeometryCollection Feature
|
|
351
362
|
|
|
352
363
|
## round
|
|
353
364
|
|
|
354
365
|
Round number to precision
|
|
355
366
|
|
|
356
|
-
|
|
367
|
+
### Parameters
|
|
357
368
|
|
|
358
|
-
|
|
359
|
-
|
|
369
|
+
* `num` **[number][3]** Number
|
|
370
|
+
* `precision` **[number][3]** Precision (optional, default `0`)
|
|
360
371
|
|
|
361
|
-
|
|
372
|
+
### Examples
|
|
362
373
|
|
|
363
374
|
```javascript
|
|
364
375
|
turf.round(120.4321)
|
|
@@ -368,110 +379,124 @@ turf.round(120.4321, 2)
|
|
|
368
379
|
//=120.43
|
|
369
380
|
```
|
|
370
381
|
|
|
371
|
-
Returns **[number][
|
|
382
|
+
Returns **[number][3]** rounded number
|
|
372
383
|
|
|
373
384
|
## radiansToLength
|
|
374
385
|
|
|
375
386
|
Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
|
|
376
387
|
Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
|
|
377
388
|
|
|
378
|
-
|
|
389
|
+
### Parameters
|
|
379
390
|
|
|
380
|
-
|
|
381
|
-
|
|
391
|
+
* `radians` **[number][3]** in radians across the sphere
|
|
392
|
+
* `units` **[string][8]** can be degrees, radians, miles, inches, yards, metres,
|
|
393
|
+
meters, kilometres, kilometers. (optional, default `"kilometers"`)
|
|
382
394
|
|
|
383
|
-
Returns **[number][
|
|
395
|
+
Returns **[number][3]** distance
|
|
384
396
|
|
|
385
397
|
## lengthToRadians
|
|
386
398
|
|
|
387
399
|
Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
|
|
388
400
|
Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
|
|
389
401
|
|
|
390
|
-
|
|
402
|
+
### Parameters
|
|
391
403
|
|
|
392
|
-
|
|
393
|
-
|
|
404
|
+
* `distance` **[number][3]** in real units
|
|
405
|
+
* `units` **[string][8]** can be degrees, radians, miles, inches, yards, metres,
|
|
406
|
+
meters, kilometres, kilometers. (optional, default `"kilometers"`)
|
|
394
407
|
|
|
395
|
-
Returns **[number][
|
|
408
|
+
Returns **[number][3]** radians
|
|
396
409
|
|
|
397
410
|
## lengthToDegrees
|
|
398
411
|
|
|
399
412
|
Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
|
|
400
413
|
Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
|
|
401
414
|
|
|
402
|
-
|
|
415
|
+
### Parameters
|
|
403
416
|
|
|
404
|
-
|
|
405
|
-
|
|
417
|
+
* `distance` **[number][3]** in real units
|
|
418
|
+
* `units` **[string][8]** can be degrees, radians, miles, inches, yards, metres,
|
|
419
|
+
meters, kilometres, kilometers. (optional, default `"kilometers"`)
|
|
406
420
|
|
|
407
|
-
Returns **[number][
|
|
421
|
+
Returns **[number][3]** degrees
|
|
408
422
|
|
|
409
423
|
## bearingToAzimuth
|
|
410
424
|
|
|
411
425
|
Converts any bearing angle from the north line direction (positive clockwise)
|
|
412
426
|
and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
|
|
413
427
|
|
|
414
|
-
|
|
428
|
+
### Parameters
|
|
429
|
+
|
|
430
|
+
* `bearing` **[number][3]** angle, between -180 and +180 degrees
|
|
431
|
+
|
|
432
|
+
Returns **[number][3]** angle between 0 and 360 degrees
|
|
433
|
+
|
|
434
|
+
## azimuthToBearing
|
|
415
435
|
|
|
416
|
-
|
|
436
|
+
Converts any azimuth angle from the north line direction (positive clockwise)
|
|
437
|
+
and returns an angle between -180 and +180 degrees (positive clockwise), 0 being the north line
|
|
417
438
|
|
|
418
|
-
|
|
439
|
+
### Parameters
|
|
440
|
+
|
|
441
|
+
* `angle` **[number][3]** between 0 and 360 degrees
|
|
442
|
+
|
|
443
|
+
Returns **[number][3]** bearing between -180 and +180 degrees
|
|
419
444
|
|
|
420
445
|
## radiansToDegrees
|
|
421
446
|
|
|
422
447
|
Converts an angle in radians to degrees
|
|
423
448
|
|
|
424
|
-
|
|
449
|
+
### Parameters
|
|
425
450
|
|
|
426
|
-
|
|
451
|
+
* `radians` **[number][3]** angle in radians
|
|
427
452
|
|
|
428
|
-
Returns **[number][
|
|
453
|
+
Returns **[number][3]** degrees between 0 and 360 degrees
|
|
429
454
|
|
|
430
455
|
## degreesToRadians
|
|
431
456
|
|
|
432
457
|
Converts an angle in degrees to radians
|
|
433
458
|
|
|
434
|
-
|
|
459
|
+
### Parameters
|
|
435
460
|
|
|
436
|
-
|
|
461
|
+
* `degrees` **[number][3]** angle between 0 and 360 degrees
|
|
437
462
|
|
|
438
|
-
Returns **[number][
|
|
463
|
+
Returns **[number][3]** angle in radians
|
|
439
464
|
|
|
440
465
|
## convertLength
|
|
441
466
|
|
|
442
467
|
Converts a length to the requested unit.
|
|
443
468
|
Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
|
|
444
469
|
|
|
445
|
-
|
|
470
|
+
### Parameters
|
|
446
471
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
472
|
+
* `length` **[number][3]** to be converted
|
|
473
|
+
* `originalUnit` **Units** of the length (optional, default `"kilometers"`)
|
|
474
|
+
* `finalUnit` **Units** returned unit (optional, default `"kilometers"`)
|
|
450
475
|
|
|
451
|
-
Returns **[number][
|
|
476
|
+
Returns **[number][3]** the converted length
|
|
452
477
|
|
|
453
478
|
## convertArea
|
|
454
479
|
|
|
455
480
|
Converts a area to the requested unit.
|
|
456
481
|
Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares
|
|
457
482
|
|
|
458
|
-
|
|
483
|
+
### Parameters
|
|
459
484
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
485
|
+
* `area` **[number][3]** to be converted
|
|
486
|
+
* `originalUnit` **Units** of the distance (optional, default `"meters"`)
|
|
487
|
+
* `finalUnit` **Units** returned unit (optional, default `"kilometers"`)
|
|
463
488
|
|
|
464
|
-
Returns **[number][
|
|
489
|
+
Returns **[number][3]** the converted area
|
|
465
490
|
|
|
466
491
|
## isNumber
|
|
467
492
|
|
|
468
493
|
isNumber
|
|
469
494
|
|
|
470
|
-
|
|
495
|
+
### Parameters
|
|
471
496
|
|
|
472
|
-
|
|
497
|
+
* `num` **any** Number to validate
|
|
473
498
|
|
|
474
|
-
|
|
499
|
+
### Examples
|
|
475
500
|
|
|
476
501
|
```javascript
|
|
477
502
|
turf.isNumber(123)
|
|
@@ -480,17 +505,17 @@ turf.isNumber('foo')
|
|
|
480
505
|
//=false
|
|
481
506
|
```
|
|
482
507
|
|
|
483
|
-
Returns **[boolean][
|
|
508
|
+
Returns **[boolean][22]** true/false
|
|
484
509
|
|
|
485
510
|
## isObject
|
|
486
511
|
|
|
487
512
|
isObject
|
|
488
513
|
|
|
489
|
-
|
|
514
|
+
### Parameters
|
|
490
515
|
|
|
491
|
-
|
|
516
|
+
* `input` **any** variable to validate
|
|
492
517
|
|
|
493
|
-
|
|
518
|
+
### Examples
|
|
494
519
|
|
|
495
520
|
```javascript
|
|
496
521
|
turf.isObject({elevation: 10})
|
|
@@ -499,80 +524,67 @@ turf.isObject('foo')
|
|
|
499
524
|
//=false
|
|
500
525
|
```
|
|
501
526
|
|
|
502
|
-
Returns **[boolean][
|
|
527
|
+
Returns **[boolean][22]** true/false, including false for Arrays and Functions
|
|
503
528
|
|
|
504
|
-
[1]: https://
|
|
529
|
+
[1]: https://en.wikipedia.org/wiki/Earth_radius#Arithmetic_mean_radius
|
|
505
530
|
|
|
506
|
-
[2]: https://
|
|
531
|
+
[2]: https://rosettacode.org/wiki/Haversine_formula#:~:text=This%20value%20is%20recommended
|
|
507
532
|
|
|
508
|
-
[3]: https://
|
|
533
|
+
[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
509
534
|
|
|
510
535
|
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
511
536
|
|
|
512
|
-
[5]: https://
|
|
537
|
+
[5]: https://tools.ietf.org/html/rfc7946#section-3.1
|
|
513
538
|
|
|
514
|
-
[6]: https://
|
|
539
|
+
[6]: https://tools.ietf.org/html/rfc7946#section-3.2
|
|
515
540
|
|
|
516
|
-
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/
|
|
541
|
+
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
|
|
517
542
|
|
|
518
|
-
[8]: https://
|
|
543
|
+
[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
|
|
519
544
|
|
|
520
545
|
[9]: https://tools.ietf.org/html/rfc7946#section-3.1.2
|
|
521
546
|
|
|
522
|
-
[10]: https://tools.ietf.org/html/rfc7946#section-3.
|
|
523
|
-
|
|
524
|
-
[11]: https://tools.ietf.org/html/rfc7946#section-3.3
|
|
525
|
-
|
|
526
|
-
[12]: https://tools.ietf.org/html/rfc7946#section-3.3
|
|
527
|
-
|
|
528
|
-
[13]: https://tools.ietf.org/html/rfc7946#section-3.1.6
|
|
529
|
-
|
|
530
|
-
[14]: https://tools.ietf.org/html/rfc7946#section-3.1.6
|
|
547
|
+
[10]: https://tools.ietf.org/html/rfc7946#section-3.3
|
|
531
548
|
|
|
532
|
-
[
|
|
549
|
+
[11]: https://tools.ietf.org/html/rfc7946#section-3.1.6
|
|
533
550
|
|
|
534
|
-
[
|
|
551
|
+
[12]: https://tools.ietf.org/html/rfc7946#section-3.1.4
|
|
535
552
|
|
|
536
|
-
[
|
|
553
|
+
[13]: Feature<MultiLineString>
|
|
537
554
|
|
|
538
|
-
[
|
|
555
|
+
[14]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error
|
|
539
556
|
|
|
540
|
-
[
|
|
557
|
+
[15]: https://tools.ietf.org/html/rfc7946#section-3.1.5
|
|
541
558
|
|
|
542
|
-
[
|
|
559
|
+
[16]: Feature<MultiPoint>
|
|
543
560
|
|
|
544
|
-
[
|
|
561
|
+
[17]: https://tools.ietf.org/html/rfc7946#section-3.1.3
|
|
545
562
|
|
|
546
|
-
[
|
|
563
|
+
[18]: Feature<MultiPolygon>
|
|
547
564
|
|
|
548
|
-
[
|
|
565
|
+
[19]: https://tools.ietf.org/html/rfc7946#section-3.1.7
|
|
549
566
|
|
|
550
|
-
[
|
|
567
|
+
[20]: Feature<GeometryCollection>
|
|
551
568
|
|
|
552
|
-
[
|
|
569
|
+
[21]: https://tools.ietf.org/html/rfc7946#section-3.1.8
|
|
553
570
|
|
|
554
|
-
[
|
|
571
|
+
[22]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
555
572
|
|
|
556
|
-
<!-- This file is automatically generated. Please don't edit it directly
|
|
557
|
-
if you find an error, edit the source file (likely index.js), and re-run
|
|
558
|
-
./scripts/generate-readmes in the turf project. -->
|
|
573
|
+
<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->
|
|
559
574
|
|
|
560
575
|
---
|
|
561
576
|
|
|
562
|
-
This module is part of the [Turfjs project](
|
|
563
|
-
module collection dedicated to geographic algorithms. It is maintained in the
|
|
564
|
-
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
|
|
565
|
-
PRs and issues.
|
|
577
|
+
This module is part of the [Turfjs project](https://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.
|
|
566
578
|
|
|
567
579
|
### Installation
|
|
568
580
|
|
|
569
|
-
Install this module individually:
|
|
581
|
+
Install this single module individually:
|
|
570
582
|
|
|
571
583
|
```sh
|
|
572
584
|
$ npm install @turf/helpers
|
|
573
585
|
```
|
|
574
586
|
|
|
575
|
-
Or install the
|
|
587
|
+
Or install the all-encompassing @turf/turf module that includes all modules as functions:
|
|
576
588
|
|
|
577
589
|
```sh
|
|
578
590
|
$ npm install @turf/turf
|