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.
Files changed (124) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +6 -2
  3. package/examples/{feedback.json → Feedback.json} +1 -9
  4. package/examples/MouseCoordinates.json +159 -0
  5. package/examples/sidcEdgeIcon.json +158 -0
  6. package/node_modules/@turf/bezier-spline/README.md +15 -21
  7. package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs +165 -0
  8. package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs.map +1 -0
  9. package/node_modules/@turf/bezier-spline/dist/{es/index.js → cjs/index.d.cts} +9 -30
  10. package/node_modules/@turf/bezier-spline/dist/{js → esm}/index.d.ts +5 -3
  11. package/node_modules/@turf/bezier-spline/dist/esm/index.js +165 -0
  12. package/node_modules/@turf/bezier-spline/dist/esm/index.js.map +1 -0
  13. package/node_modules/@turf/bezier-spline/package.json +33 -25
  14. package/node_modules/@turf/helpers/README.md +231 -219
  15. package/node_modules/@turf/helpers/dist/cjs/index.cjs +308 -0
  16. package/node_modules/@turf/helpers/dist/cjs/index.cjs.map +1 -0
  17. package/node_modules/@turf/helpers/dist/{es/index.js → cjs/index.d.cts} +103 -303
  18. package/node_modules/@turf/helpers/dist/{js → esm}/index.d.ts +67 -53
  19. package/node_modules/@turf/helpers/dist/esm/index.js +308 -0
  20. package/node_modules/@turf/helpers/dist/esm/index.js.map +1 -0
  21. package/node_modules/@turf/helpers/package.json +32 -22
  22. package/node_modules/@turf/invariant/README.md +47 -58
  23. package/node_modules/@turf/invariant/dist/cjs/index.cjs +127 -0
  24. package/node_modules/@turf/invariant/dist/cjs/index.cjs.map +1 -0
  25. package/node_modules/@turf/invariant/dist/cjs/index.d.cts +108 -0
  26. package/node_modules/@turf/invariant/dist/{js → esm}/index.d.ts +12 -9
  27. package/node_modules/@turf/invariant/dist/esm/index.js +127 -0
  28. package/node_modules/@turf/invariant/dist/esm/index.js.map +1 -0
  29. package/node_modules/@turf/invariant/package.json +31 -22
  30. package/node_modules/@types/geojson/LICENSE +21 -0
  31. package/node_modules/@types/geojson/README.md +15 -0
  32. package/node_modules/@types/geojson/index.d.ts +165 -0
  33. package/node_modules/@types/geojson/package.json +45 -0
  34. package/node_modules/body-parser/HISTORY.md +7 -0
  35. package/node_modules/body-parser/README.md +11 -0
  36. package/node_modules/body-parser/lib/types/urlencoded.js +30 -7
  37. package/node_modules/body-parser/package.json +2 -2
  38. package/node_modules/encodeurl/README.md +19 -38
  39. package/node_modules/encodeurl/index.js +1 -1
  40. package/node_modules/encodeurl/package.json +7 -7
  41. package/node_modules/express/History.md +27 -0
  42. package/node_modules/express/Readme.md +100 -6
  43. package/node_modules/express/lib/response.js +11 -10
  44. package/node_modules/express/package.json +11 -11
  45. package/node_modules/finalhandler/HISTORY.md +15 -0
  46. package/node_modules/finalhandler/README.md +2 -2
  47. package/node_modules/finalhandler/index.js +7 -2
  48. package/node_modules/finalhandler/package.json +8 -7
  49. package/node_modules/merge-descriptors/README.md +4 -3
  50. package/node_modules/merge-descriptors/index.js +3 -3
  51. package/node_modules/merge-descriptors/package.json +14 -7
  52. package/node_modules/mime-db/HISTORY.md +14 -0
  53. package/node_modules/mime-db/README.md +27 -24
  54. package/node_modules/mime-db/db.json +646 -62
  55. package/node_modules/mime-db/package.json +9 -13
  56. package/node_modules/mime-types/node_modules/mime-db/HISTORY.md +507 -0
  57. package/node_modules/mime-types/node_modules/mime-db/LICENSE +23 -0
  58. package/node_modules/mime-types/node_modules/mime-db/README.md +100 -0
  59. package/node_modules/mime-types/node_modules/mime-db/db.json +8519 -0
  60. package/node_modules/mime-types/node_modules/mime-db/index.js +12 -0
  61. package/node_modules/mime-types/node_modules/mime-db/package.json +60 -0
  62. package/node_modules/object-inspect/CHANGELOG.md +15 -0
  63. package/node_modules/object-inspect/index.js +4 -1
  64. package/node_modules/object-inspect/package.json +14 -9
  65. package/node_modules/object-inspect/readme.markdown +9 -11
  66. package/node_modules/path-to-regexp/index.js +57 -40
  67. package/node_modules/path-to-regexp/package.json +2 -2
  68. package/node_modules/qs/.editorconfig +3 -0
  69. package/node_modules/qs/.eslintrc +2 -2
  70. package/node_modules/qs/CHANGELOG.md +59 -5
  71. package/node_modules/qs/README.md +133 -49
  72. package/node_modules/qs/dist/qs.js +56 -2020
  73. package/node_modules/qs/lib/parse.js +46 -13
  74. package/node_modules/qs/lib/stringify.js +53 -28
  75. package/node_modules/qs/lib/utils.js +47 -34
  76. package/node_modules/qs/package.json +26 -12
  77. package/node_modules/qs/test/empty-keys-cases.js +267 -0
  78. package/node_modules/qs/test/parse.js +347 -32
  79. package/node_modules/qs/test/stringify.js +436 -47
  80. package/node_modules/send/HISTORY.md +5 -0
  81. package/node_modules/send/index.js +1 -2
  82. package/node_modules/send/node_modules/encodeurl/LICENSE +22 -0
  83. package/node_modules/send/node_modules/encodeurl/README.md +128 -0
  84. package/node_modules/send/node_modules/encodeurl/index.js +60 -0
  85. package/node_modules/send/node_modules/encodeurl/package.json +40 -0
  86. package/node_modules/send/package.json +1 -1
  87. package/node_modules/serve-static/HISTORY.md +16 -0
  88. package/node_modules/serve-static/index.js +1 -2
  89. package/node_modules/serve-static/package.json +3 -3
  90. package/node_modules/tslib/CopyrightNotice.txt +15 -0
  91. package/node_modules/tslib/LICENSE.txt +12 -0
  92. package/node_modules/tslib/README.md +164 -0
  93. package/node_modules/tslib/SECURITY.md +41 -0
  94. package/node_modules/tslib/modules/index.d.ts +37 -0
  95. package/node_modules/tslib/modules/index.js +68 -0
  96. package/node_modules/tslib/modules/package.json +3 -0
  97. package/node_modules/tslib/package.json +47 -0
  98. package/node_modules/tslib/tslib.d.ts +453 -0
  99. package/node_modules/tslib/tslib.es6.html +1 -0
  100. package/node_modules/tslib/tslib.es6.js +379 -0
  101. package/node_modules/tslib/tslib.es6.mjs +378 -0
  102. package/node_modules/tslib/tslib.html +1 -0
  103. package/node_modules/tslib/tslib.js +429 -0
  104. package/package.json +5 -5
  105. package/worldmap/index.html +1 -1
  106. package/worldmap/leaflet/leaflet.mousecoordinate.js +3 -3
  107. package/worldmap/worldmap.js +148 -44
  108. package/worldmap.html +1 -1
  109. package/worldmap.js +23 -4
  110. package/node_modules/@turf/bezier-spline/dist/es/lib/spline.js +0 -158
  111. package/node_modules/@turf/bezier-spline/dist/es/package.json +0 -1
  112. package/node_modules/@turf/bezier-spline/dist/js/index.js +0 -65
  113. package/node_modules/@turf/bezier-spline/dist/js/lib/spline.d.ts +0 -62
  114. package/node_modules/@turf/bezier-spline/dist/js/lib/spline.js +0 -160
  115. package/node_modules/@turf/helpers/dist/es/lib/geojson.js +0 -7
  116. package/node_modules/@turf/helpers/dist/es/package.json +0 -1
  117. package/node_modules/@turf/helpers/dist/js/index.js +0 -724
  118. package/node_modules/@turf/helpers/dist/js/lib/geojson.d.ts +0 -193
  119. package/node_modules/@turf/helpers/dist/js/lib/geojson.js +0 -9
  120. package/node_modules/@turf/invariant/dist/es/index.js +0 -223
  121. package/node_modules/@turf/invariant/dist/es/package.json +0 -1
  122. package/node_modules/@turf/invariant/dist/js/index.js +0 -233
  123. package/node_modules/path-to-regexp/History.md +0 -36
  124. /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
- ## earthRadius
5
+ ## helpers
6
6
 
7
- Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
7
+ ### earthRadius
8
8
 
9
- ## factors
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
- Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
11
+ Type: [number][3]
12
12
 
13
- ## unitsFactors
13
+ ### factors
14
14
 
15
- Units of measurement factors based on 1 meter.
15
+ Unit of measurement factors based on earthRadius.
16
16
 
17
- ## areaFactors
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][1] in a GeoJSON [Feature][2].
29
+ Wraps a GeoJSON [Geometry][5] in a GeoJSON [Feature][6].
30
+
31
+ ### Parameters
24
32
 
25
- **Parameters**
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
- - `geometry` **[Geometry][3]** input geometry
28
- - `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
29
- - `options` **[Object][4]** Optional Parameters (optional, default `{}`)
30
- - `options.bbox` **[Array][5]&lt;[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
- **Examples**
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][8]** a GeoJSON Feature
53
+ Returns **[Feature][6]** a GeoJSON Feature
47
54
 
48
55
  ## geometry
49
56
 
50
- Creates a GeoJSON [Geometry][1] from a Geometry string type & coordinates.
57
+ Creates a GeoJSON [Geometry][5] from a Geometry string type & coordinates.
51
58
  For GeometryCollection type use `helpers.geometryCollection`
52
59
 
53
- **Parameters**
60
+ ### Parameters
54
61
 
55
- - `type` **[string][7]** Geometry Type
56
- - `coordinates` **[Array][5]&lt;[number][6]>** Coordinates
57
- - `options` **[Object][4]** Optional Parameters (optional, default `{}`)
58
- - `options.bbox` **[Array][5]&lt;[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
- **Examples**
66
+ ### Examples
61
67
 
62
68
  ```javascript
63
- var type = 'Point';
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][3]** a GeoJSON Geometry
75
+ Returns **[Geometry][5]** a GeoJSON Geometry
72
76
 
73
77
  ## point
74
78
 
75
- Creates a [Point][9] [Feature][2] from a Position.
79
+ Creates a [Point][9] [Feature][6] from a Position.
80
+
81
+ ### Parameters
76
82
 
77
- **Parameters**
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
- - `coordinates` **[Array][5]&lt;[number][6]>** longitude, latitude position (each in decimal degrees)
80
- - `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
81
- - `options` **[Object][4]** Optional Parameters (optional, default `{}`)
82
- - `options.bbox` **[Array][5]&lt;[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
- **Examples**
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][8]&lt;[Point][10]>** a Point feature
98
+ Returns **[Feature][6]<[Point][9]>** a Point feature
94
99
 
95
100
  ## points
96
101
 
97
- Creates a [Point][9] [FeatureCollection][11] from an Array of Point coordinates.
102
+ Creates a [Point][9] [FeatureCollection][10] from an Array of Point coordinates.
98
103
 
99
- **Parameters**
104
+ ### Parameters
100
105
 
101
- - `coordinates` **[Array][5]&lt;[Array][5]&lt;[number][6]>>** an array of Points
102
- - `properties` **[Object][4]** Translate these properties to each Feature (optional, default `{}`)
103
- - `options` **[Object][4]** Optional Parameters (optional, default `{}`)
104
- - `options.bbox` **[Array][5]&lt;[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
- **Examples**
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][12]&lt;[Point][10]>** Point Feature
126
+ Returns **[FeatureCollection][10]<[Point][9]>** Point Feature
120
127
 
121
128
  ## polygon
122
129
 
123
- Creates a [Polygon][13] [Feature][2] from an Array of LinearRings.
130
+ Creates a [Polygon][11] [Feature][6] from an Array of LinearRings.
131
+
132
+ ### Parameters
124
133
 
125
- **Parameters**
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
- - `coordinates` **[Array][5]&lt;[Array][5]&lt;[Array][5]&lt;[number][6]>>>** an array of LinearRings
128
- - `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
129
- - `options` **[Object][4]** Optional Parameters (optional, default `{}`)
130
- - `options.bbox` **[Array][5]&lt;[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
- **Examples**
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][8]&lt;[Polygon][14]>** Polygon Feature
149
+ Returns **[Feature][6]<[Polygon][11]>** Polygon Feature
142
150
 
143
151
  ## polygons
144
152
 
145
- Creates a [Polygon][13] [FeatureCollection][11] from an Array of Polygon coordinates.
153
+ Creates a [Polygon][11] [FeatureCollection][10] from an Array of Polygon coordinates.
146
154
 
147
- **Parameters**
155
+ ### Parameters
148
156
 
149
- - `coordinates` **[Array][5]&lt;[Array][5]&lt;[Array][5]&lt;[Array][5]&lt;[number][6]>>>>** an array of Polygon coordinates
150
- - `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
151
- - `options` **[Object][4]** Optional Parameters (optional, default `{}`)
152
- - `options.bbox` **[Array][5]&lt;[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
- **Examples**
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][12]&lt;[Polygon][14]>** Polygon FeatureCollection
175
+ Returns **[FeatureCollection][10]<[Polygon][11]>** Polygon FeatureCollection
167
176
 
168
177
  ## lineString
169
178
 
170
- Creates a [LineString][15] [Feature][2] from an Array of Positions.
179
+ Creates a [LineString][12] [Feature][6] from an Array of Positions.
180
+
181
+ ### Parameters
171
182
 
172
- **Parameters**
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
- - `coordinates` **[Array][5]&lt;[Array][5]&lt;[number][6]>>** an array of Positions
175
- - `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
176
- - `options` **[Object][4]** Optional Parameters (optional, default `{}`)
177
- - `options.bbox` **[Array][5]&lt;[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
- **Examples**
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][8]&lt;[LineString][16]>** LineString Feature
200
+ Returns **[Feature][6]<[LineString][12]>** LineString Feature
191
201
 
192
202
  ## lineStrings
193
203
 
194
- Creates a [LineString][15] [FeatureCollection][11] from an Array of LineString coordinates.
204
+ Creates a [LineString][12] [FeatureCollection][10] from an Array of LineString coordinates.
195
205
 
196
- **Parameters**
206
+ ### Parameters
197
207
 
198
- - `coordinates` **[Array][5]&lt;[Array][5]&lt;[number][6]>>** an array of LinearRings
199
- - `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
200
- - `options` **[Object][4]** Optional Parameters (optional, default `{}`)
201
- - `options.bbox` **[Array][5]&lt;[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
- **Examples**
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][12]&lt;[LineString][16]>** LineString FeatureCollection
227
+ Returns **[FeatureCollection][10]<[LineString][12]>** LineString FeatureCollection
216
228
 
217
229
  ## featureCollection
218
230
 
219
- Takes one or more [Features][2] and creates a [FeatureCollection][11].
231
+ Takes one or more [Features][6] and creates a [FeatureCollection][10].
232
+
233
+ ### Parameters
220
234
 
221
- **Parameters**
235
+ * `features` **[Array][7]<[Feature][6]>** input features
236
+ * `options` **[Object][4]** Optional Parameters (optional, default `{}`)
222
237
 
223
- - `features` **[Array][5]&lt;[Feature][8]>** input features
224
- - `options` **[Object][4]** Optional Parameters (optional, default `{}`)
225
- - `options.bbox` **[Array][5]&lt;[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
- **Examples**
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][12]** FeatureCollection of Features
257
+ Returns **[FeatureCollection][10]** FeatureCollection of Features
245
258
 
246
259
  ## multiLineString
247
260
 
248
- Creates a [Feature&lt;MultiLineString>][17] based on a
261
+ Creates a [Feature\<MultiLineString>][13] based on a
249
262
  coordinate array. Properties can be added optionally.
250
263
 
251
- **Parameters**
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
- - `coordinates` **[Array][5]&lt;[Array][5]&lt;[Array][5]&lt;[number][6]>>>** an array of LineStrings
254
- - `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
255
- - `options` **[Object][4]** Optional Parameters (optional, default `{}`)
256
- - `options.bbox` **[Array][5]&lt;[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
- **Examples**
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
- - Throws **[Error][18]** if no coordinates are passed
281
+ * Throws **[Error][14]** if no coordinates are passed
268
282
 
269
- Returns **[Feature][8]&lt;[MultiLineString][19]>** a MultiLineString feature
283
+ Returns **[Feature][6]<[MultiLineString][15]>** a MultiLineString feature
270
284
 
271
285
  ## multiPoint
272
286
 
273
- Creates a [Feature&lt;MultiPoint>][20] based on a
287
+ Creates a [Feature\<MultiPoint>][16] based on a
274
288
  coordinate array. Properties can be added optionally.
275
289
 
276
- **Parameters**
290
+ ### Parameters
277
291
 
278
- - `coordinates` **[Array][5]&lt;[Array][5]&lt;[number][6]>>** an array of Positions
279
- - `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
280
- - `options` **[Object][4]** Optional Parameters (optional, default `{}`)
281
- - `options.bbox` **[Array][5]&lt;[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
- **Examples**
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
- - Throws **[Error][18]** if no coordinates are passed
307
+ * Throws **[Error][14]** if no coordinates are passed
293
308
 
294
- Returns **[Feature][8]&lt;[MultiPoint][21]>** a MultiPoint feature
309
+ Returns **[Feature][6]<[MultiPoint][17]>** a MultiPoint feature
295
310
 
296
311
  ## multiPolygon
297
312
 
298
- Creates a [Feature&lt;MultiPolygon>][22] based on a
313
+ Creates a [Feature\<MultiPolygon>][18] based on a
299
314
  coordinate array. Properties can be added optionally.
300
315
 
301
- **Parameters**
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
- - `coordinates` **[Array][5]&lt;[Array][5]&lt;[Array][5]&lt;[Array][5]&lt;[number][6]>>>>** an array of Polygons
304
- - `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
305
- - `options` **[Object][4]** Optional Parameters (optional, default `{}`)
306
- - `options.bbox` **[Array][5]&lt;[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
- **Examples**
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
- - Throws **[Error][18]** if no coordinates are passed
333
+ * Throws **[Error][14]** if no coordinates are passed
318
334
 
319
- Returns **[Feature][8]&lt;[MultiPolygon][23]>** a multipolygon feature
335
+ Returns **[Feature][6]<[MultiPolygon][19]>** a multipolygon feature
320
336
 
321
337
  ## geometryCollection
322
338
 
323
- Creates a [Feature&lt;GeometryCollection>][24] based on a
339
+ Creates a [Feature\<GeometryCollection>][20] based on a
324
340
  coordinate array. Properties can be added optionally.
325
341
 
326
- **Parameters**
342
+ ### Parameters
327
343
 
328
- - `geometries` **[Array][5]&lt;[Geometry][3]>** an array of GeoJSON Geometries
329
- - `properties` **[Object][4]** an Object of key-value pairs to add as properties (optional, default `{}`)
330
- - `options` **[Object][4]** Optional Parameters (optional, default `{}`)
331
- - `options.bbox` **[Array][5]&lt;[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
- **Examples**
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
- "type": "Point",
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
- //=collection
358
+ // => collection
348
359
  ```
349
360
 
350
- Returns **[Feature][8]&lt;[GeometryCollection][25]>** a GeoJSON GeometryCollection 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
- **Parameters**
367
+ ### Parameters
357
368
 
358
- - `num` **[number][6]** Number
359
- - `precision` **[number][6]** Precision (optional, default `0`)
369
+ * `num` **[number][3]** Number
370
+ * `precision` **[number][3]** Precision (optional, default `0`)
360
371
 
361
- **Examples**
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][6]** rounded 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
- **Parameters**
389
+ ### Parameters
379
390
 
380
- - `radians` **[number][6]** in radians across the sphere
381
- - `units` **[string][7]** can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers. (optional, default `'kilometers'`)
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][6]** distance
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
- **Parameters**
402
+ ### Parameters
391
403
 
392
- - `distance` **[number][6]** in real units
393
- - `units` **[string][7]** can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers. (optional, default `'kilometers'`)
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][6]** radians
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
- **Parameters**
415
+ ### Parameters
403
416
 
404
- - `distance` **[number][6]** in real units
405
- - `units` **[string][7]** can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers. (optional, default `'kilometers'`)
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][6]** degrees
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
- **Parameters**
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
- - `bearing` **[number][6]** angle, between -180 and +180 degrees
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
- Returns **[number][6]** angle between 0 and 360 degrees
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
- **Parameters**
449
+ ### Parameters
425
450
 
426
- - `radians` **[number][6]** angle in radians
451
+ * `radians` **[number][3]** angle in radians
427
452
 
428
- Returns **[number][6]** degrees between 0 and 360 degrees
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
- **Parameters**
459
+ ### Parameters
435
460
 
436
- - `degrees` **[number][6]** angle between 0 and 360 degrees
461
+ * `degrees` **[number][3]** angle between 0 and 360 degrees
437
462
 
438
- Returns **[number][6]** angle in radians
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
- **Parameters**
470
+ ### Parameters
446
471
 
447
- - `length` **[number][6]** to be converted
448
- - `originalUnit` **[string][7]** of the length
449
- - `finalUnit` **[string][7]** returned unit (optional, default `'kilometers'`)
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][6]** the converted length
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
- **Parameters**
483
+ ### Parameters
459
484
 
460
- - `area` **[number][6]** to be converted
461
- - `originalUnit` **[string][7]** of the distance (optional, default `'meters'`)
462
- - `finalUnit` **[string][7]** returned unit (optional, default `'kilometers'`)
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][6]** the converted distance
489
+ Returns **[number][3]** the converted area
465
490
 
466
491
  ## isNumber
467
492
 
468
493
  isNumber
469
494
 
470
- **Parameters**
495
+ ### Parameters
471
496
 
472
- - `num` **any** Number to validate
497
+ * `num` **any** Number to validate
473
498
 
474
- **Examples**
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][26]** true/false
508
+ Returns **[boolean][22]** true/false
484
509
 
485
510
  ## isObject
486
511
 
487
512
  isObject
488
513
 
489
- **Parameters**
514
+ ### Parameters
490
515
 
491
- - `input` **any** variable to validate
516
+ * `input` **any** variable to validate
492
517
 
493
- **Examples**
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][26]** true/false
527
+ Returns **[boolean][22]** true/false, including false for Arrays and Functions
503
528
 
504
- [1]: https://tools.ietf.org/html/rfc7946#section-3.1
529
+ [1]: https://en.wikipedia.org/wiki/Earth_radius#Arithmetic_mean_radius
505
530
 
506
- [2]: https://tools.ietf.org/html/rfc7946#section-3.2
531
+ [2]: https://rosettacode.org/wiki/Haversine_formula#:~:text=This%20value%20is%20recommended
507
532
 
508
- [3]: https://tools.ietf.org/html/rfc7946#section-3.1
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://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
537
+ [5]: https://tools.ietf.org/html/rfc7946#section-3.1
513
538
 
514
- [6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
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/String
541
+ [7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
517
542
 
518
- [8]: https://tools.ietf.org/html/rfc7946#section-3.2
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.1.2
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
- [15]: https://tools.ietf.org/html/rfc7946#section-3.1.4
549
+ [11]: https://tools.ietf.org/html/rfc7946#section-3.1.6
533
550
 
534
- [16]: https://tools.ietf.org/html/rfc7946#section-3.1.4
551
+ [12]: https://tools.ietf.org/html/rfc7946#section-3.1.4
535
552
 
536
- [17]: Feature<MultiLineString>
553
+ [13]: Feature<MultiLineString>
537
554
 
538
- [18]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error
555
+ [14]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error
539
556
 
540
- [19]: https://tools.ietf.org/html/rfc7946#section-3.1.5
557
+ [15]: https://tools.ietf.org/html/rfc7946#section-3.1.5
541
558
 
542
- [20]: Feature<MultiPoint>
559
+ [16]: Feature<MultiPoint>
543
560
 
544
- [21]: https://tools.ietf.org/html/rfc7946#section-3.1.3
561
+ [17]: https://tools.ietf.org/html/rfc7946#section-3.1.3
545
562
 
546
- [22]: Feature<MultiPolygon>
563
+ [18]: Feature<MultiPolygon>
547
564
 
548
- [23]: https://tools.ietf.org/html/rfc7946#section-3.1.7
565
+ [19]: https://tools.ietf.org/html/rfc7946#section-3.1.7
549
566
 
550
- [24]: Feature<GeometryCollection>
567
+ [20]: Feature<GeometryCollection>
551
568
 
552
- [25]: https://tools.ietf.org/html/rfc7946#section-3.1.8
569
+ [21]: https://tools.ietf.org/html/rfc7946#section-3.1.8
553
570
 
554
- [26]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
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](http://turfjs.org/), an open source
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 Turf module that includes it as a function:
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