node-red-contrib-tak-registration 0.13.1 → 0.14.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 (920) hide show
  1. package/node_modules/@turf/along/README.md +3 -5
  2. package/node_modules/@turf/along/dist/cjs/index.cjs.map +1 -1
  3. package/node_modules/@turf/along/dist/cjs/index.d.cts +3 -3
  4. package/node_modules/@turf/along/dist/esm/index.d.ts +3 -3
  5. package/node_modules/@turf/along/dist/esm/index.js.map +1 -1
  6. package/node_modules/@turf/along/package.json +13 -13
  7. package/node_modules/@turf/angle/dist/cjs/index.cjs +10 -7
  8. package/node_modules/@turf/angle/dist/cjs/index.cjs.map +1 -1
  9. package/node_modules/@turf/angle/dist/cjs/index.d.cts +1 -1
  10. package/node_modules/@turf/angle/dist/esm/index.d.ts +1 -1
  11. package/node_modules/@turf/angle/dist/esm/index.js +10 -7
  12. package/node_modules/@turf/angle/dist/esm/index.js.map +1 -1
  13. package/node_modules/@turf/angle/package.json +15 -15
  14. package/node_modules/@turf/area/dist/cjs/index.cjs +1 -2
  15. package/node_modules/@turf/area/dist/cjs/index.cjs.map +1 -1
  16. package/node_modules/@turf/area/dist/cjs/index.d.cts +1 -1
  17. package/node_modules/@turf/area/dist/esm/index.d.ts +1 -1
  18. package/node_modules/@turf/area/dist/esm/index.js +1 -2
  19. package/node_modules/@turf/area/dist/esm/index.js.map +1 -1
  20. package/node_modules/@turf/area/package.json +10 -10
  21. package/node_modules/@turf/bbox/dist/cjs/index.cjs.map +1 -1
  22. package/node_modules/@turf/bbox/dist/cjs/index.d.cts +1 -1
  23. package/node_modules/@turf/bbox/dist/esm/index.d.ts +1 -1
  24. package/node_modules/@turf/bbox/dist/esm/index.js.map +1 -1
  25. package/node_modules/@turf/bbox/package.json +10 -10
  26. package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs +9 -18
  27. package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs.map +1 -1
  28. package/node_modules/@turf/bbox-clip/dist/cjs/index.d.cts +1 -1
  29. package/node_modules/@turf/bbox-clip/dist/esm/index.d.ts +1 -1
  30. package/node_modules/@turf/bbox-clip/dist/esm/index.js +9 -18
  31. package/node_modules/@turf/bbox-clip/dist/esm/index.js.map +1 -1
  32. package/node_modules/@turf/bbox-clip/package.json +11 -11
  33. package/node_modules/@turf/bbox-polygon/README.md +6 -6
  34. package/node_modules/@turf/bbox-polygon/dist/cjs/index.cjs.map +1 -1
  35. package/node_modules/@turf/bbox-polygon/dist/cjs/index.d.cts +2 -2
  36. package/node_modules/@turf/bbox-polygon/dist/esm/index.d.ts +2 -2
  37. package/node_modules/@turf/bbox-polygon/dist/esm/index.js.map +1 -1
  38. package/node_modules/@turf/bbox-polygon/package.json +9 -9
  39. package/node_modules/@turf/bearing/dist/cjs/index.cjs.map +1 -1
  40. package/node_modules/@turf/bearing/dist/cjs/index.d.cts +1 -1
  41. package/node_modules/@turf/bearing/dist/esm/index.d.ts +1 -1
  42. package/node_modules/@turf/bearing/dist/esm/index.js.map +1 -1
  43. package/node_modules/@turf/bearing/package.json +11 -11
  44. package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs.map +1 -1
  45. package/node_modules/@turf/bezier-spline/dist/cjs/index.d.cts +1 -1
  46. package/node_modules/@turf/bezier-spline/dist/esm/index.d.ts +1 -1
  47. package/node_modules/@turf/bezier-spline/dist/esm/index.js.map +1 -1
  48. package/node_modules/@turf/bezier-spline/package.json +10 -10
  49. package/node_modules/@turf/boolean-clockwise/dist/cjs/index.cjs.map +1 -1
  50. package/node_modules/@turf/boolean-clockwise/dist/cjs/index.d.cts +1 -1
  51. package/node_modules/@turf/boolean-clockwise/dist/esm/index.d.ts +1 -1
  52. package/node_modules/@turf/boolean-clockwise/dist/esm/index.js.map +1 -1
  53. package/node_modules/@turf/boolean-clockwise/package.json +10 -10
  54. package/node_modules/@turf/boolean-concave/dist/cjs/index.cjs.map +1 -1
  55. package/node_modules/@turf/boolean-concave/dist/cjs/index.d.cts +1 -1
  56. package/node_modules/@turf/boolean-concave/dist/esm/index.d.ts +1 -1
  57. package/node_modules/@turf/boolean-concave/dist/esm/index.js.map +1 -1
  58. package/node_modules/@turf/boolean-concave/package.json +10 -10
  59. package/node_modules/@turf/boolean-contains/dist/cjs/index.cjs.map +1 -1
  60. package/node_modules/@turf/boolean-contains/dist/cjs/index.d.cts +1 -1
  61. package/node_modules/@turf/boolean-contains/dist/esm/index.d.ts +1 -1
  62. package/node_modules/@turf/boolean-contains/dist/esm/index.js.map +1 -1
  63. package/node_modules/@turf/boolean-contains/package.json +13 -13
  64. package/node_modules/@turf/boolean-crosses/dist/cjs/index.cjs.map +1 -1
  65. package/node_modules/@turf/boolean-crosses/dist/cjs/index.d.cts +1 -1
  66. package/node_modules/@turf/boolean-crosses/dist/esm/index.d.ts +1 -1
  67. package/node_modules/@turf/boolean-crosses/dist/esm/index.js.map +1 -1
  68. package/node_modules/@turf/boolean-crosses/package.json +13 -13
  69. package/node_modules/@turf/boolean-disjoint/README.md +1 -1
  70. package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs +3 -3
  71. package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs.map +1 -1
  72. package/node_modules/@turf/boolean-disjoint/dist/cjs/index.d.cts +3 -3
  73. package/node_modules/@turf/boolean-disjoint/dist/esm/index.d.ts +3 -3
  74. package/node_modules/@turf/boolean-disjoint/dist/esm/index.js +3 -3
  75. package/node_modules/@turf/boolean-disjoint/dist/esm/index.js.map +1 -1
  76. package/node_modules/@turf/boolean-disjoint/package.json +13 -13
  77. package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs +1 -2
  78. package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs.map +1 -1
  79. package/node_modules/@turf/boolean-equal/dist/cjs/index.d.cts +1 -1
  80. package/node_modules/@turf/boolean-equal/dist/esm/index.d.ts +1 -1
  81. package/node_modules/@turf/boolean-equal/dist/esm/index.js +1 -2
  82. package/node_modules/@turf/boolean-equal/dist/esm/index.js.map +1 -1
  83. package/node_modules/@turf/boolean-equal/package.json +11 -11
  84. package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs +3 -3
  85. package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs.map +1 -1
  86. package/node_modules/@turf/boolean-intersects/dist/cjs/index.d.cts +3 -3
  87. package/node_modules/@turf/boolean-intersects/dist/esm/index.d.ts +3 -3
  88. package/node_modules/@turf/boolean-intersects/dist/esm/index.js +3 -3
  89. package/node_modules/@turf/boolean-intersects/dist/esm/index.js.map +1 -1
  90. package/node_modules/@turf/boolean-intersects/package.json +11 -11
  91. package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs +3 -6
  92. package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs.map +1 -1
  93. package/node_modules/@turf/boolean-overlap/dist/cjs/index.d.cts +1 -1
  94. package/node_modules/@turf/boolean-overlap/dist/esm/index.d.ts +1 -1
  95. package/node_modules/@turf/boolean-overlap/dist/esm/index.js +3 -6
  96. package/node_modules/@turf/boolean-overlap/dist/esm/index.js.map +1 -1
  97. package/node_modules/@turf/boolean-overlap/package.json +13 -13
  98. package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs +7 -14
  99. package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs.map +1 -1
  100. package/node_modules/@turf/boolean-parallel/dist/cjs/index.d.cts +1 -1
  101. package/node_modules/@turf/boolean-parallel/dist/esm/index.d.ts +1 -1
  102. package/node_modules/@turf/boolean-parallel/dist/esm/index.js +7 -14
  103. package/node_modules/@turf/boolean-parallel/dist/esm/index.js.map +1 -1
  104. package/node_modules/@turf/boolean-parallel/package.json +12 -12
  105. package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs +2 -4
  106. package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs.map +1 -1
  107. package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.d.cts +1 -1
  108. package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.d.ts +1 -1
  109. package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +2 -4
  110. package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js.map +1 -1
  111. package/node_modules/@turf/boolean-point-in-polygon/package.json +10 -10
  112. package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs +10 -0
  113. package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs.map +1 -1
  114. package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.d.cts +1 -1
  115. package/node_modules/@turf/boolean-point-on-line/dist/esm/index.d.ts +1 -1
  116. package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js +10 -0
  117. package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js.map +1 -1
  118. package/node_modules/@turf/boolean-point-on-line/package.json +10 -10
  119. package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs +2 -4
  120. package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs.map +1 -1
  121. package/node_modules/@turf/boolean-touches/dist/cjs/index.d.cts +2 -1
  122. package/node_modules/@turf/boolean-touches/dist/esm/index.d.ts +2 -1
  123. package/node_modules/@turf/boolean-touches/dist/esm/index.js +2 -4
  124. package/node_modules/@turf/boolean-touches/dist/esm/index.js.map +1 -1
  125. package/node_modules/@turf/boolean-touches/package.json +12 -12
  126. package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs +14 -28
  127. package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs.map +1 -1
  128. package/node_modules/@turf/boolean-valid/dist/cjs/index.d.cts +1 -1
  129. package/node_modules/@turf/boolean-valid/dist/esm/index.d.ts +1 -1
  130. package/node_modules/@turf/boolean-valid/dist/esm/index.js +14 -28
  131. package/node_modules/@turf/boolean-valid/dist/esm/index.js.map +1 -1
  132. package/node_modules/@turf/boolean-valid/package.json +17 -17
  133. package/node_modules/@turf/boolean-within/dist/cjs/index.cjs +4 -8
  134. package/node_modules/@turf/boolean-within/dist/cjs/index.cjs.map +1 -1
  135. package/node_modules/@turf/boolean-within/dist/cjs/index.d.cts +1 -1
  136. package/node_modules/@turf/boolean-within/dist/esm/index.d.ts +1 -1
  137. package/node_modules/@turf/boolean-within/dist/esm/index.js +4 -8
  138. package/node_modules/@turf/boolean-within/dist/esm/index.js.map +1 -1
  139. package/node_modules/@turf/boolean-within/package.json +13 -13
  140. package/node_modules/@turf/buffer/dist/cjs/index.cjs +12 -24
  141. package/node_modules/@turf/buffer/dist/cjs/index.cjs.map +1 -1
  142. package/node_modules/@turf/buffer/dist/esm/index.js +12 -24
  143. package/node_modules/@turf/buffer/dist/esm/index.js.map +1 -1
  144. package/node_modules/@turf/buffer/package.json +12 -12
  145. package/node_modules/@turf/center/dist/cjs/index.cjs.map +1 -1
  146. package/node_modules/@turf/center/dist/cjs/index.d.cts +1 -1
  147. package/node_modules/@turf/center/dist/esm/index.d.ts +1 -1
  148. package/node_modules/@turf/center/dist/esm/index.js.map +1 -1
  149. package/node_modules/@turf/center/package.json +12 -12
  150. package/node_modules/@turf/center-mean/dist/cjs/index.cjs.map +1 -1
  151. package/node_modules/@turf/center-mean/dist/cjs/index.d.cts +1 -1
  152. package/node_modules/@turf/center-mean/dist/esm/index.d.ts +1 -1
  153. package/node_modules/@turf/center-mean/dist/esm/index.js.map +1 -1
  154. package/node_modules/@turf/center-mean/package.json +13 -13
  155. package/node_modules/@turf/center-median/dist/cjs/index.cjs +5 -10
  156. package/node_modules/@turf/center-median/dist/cjs/index.cjs.map +1 -1
  157. package/node_modules/@turf/center-median/dist/cjs/index.d.cts +1 -1
  158. package/node_modules/@turf/center-median/dist/esm/index.d.ts +1 -1
  159. package/node_modules/@turf/center-median/dist/esm/index.js +5 -10
  160. package/node_modules/@turf/center-median/dist/esm/index.js.map +1 -1
  161. package/node_modules/@turf/center-median/package.json +17 -17
  162. package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs +2 -4
  163. package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs.map +1 -1
  164. package/node_modules/@turf/center-of-mass/dist/cjs/index.d.cts +1 -1
  165. package/node_modules/@turf/center-of-mass/dist/esm/index.d.ts +1 -1
  166. package/node_modules/@turf/center-of-mass/dist/esm/index.js +2 -4
  167. package/node_modules/@turf/center-of-mass/dist/esm/index.js.map +1 -1
  168. package/node_modules/@turf/center-of-mass/package.json +13 -13
  169. package/node_modules/@turf/centroid/dist/cjs/index.cjs.map +1 -1
  170. package/node_modules/@turf/centroid/dist/cjs/index.d.cts +1 -1
  171. package/node_modules/@turf/centroid/dist/esm/index.d.ts +1 -1
  172. package/node_modules/@turf/centroid/dist/esm/index.js.map +1 -1
  173. package/node_modules/@turf/centroid/package.json +10 -10
  174. package/node_modules/@turf/circle/dist/cjs/index.cjs.map +1 -1
  175. package/node_modules/@turf/circle/dist/cjs/index.d.cts +1 -1
  176. package/node_modules/@turf/circle/dist/esm/index.d.ts +1 -1
  177. package/node_modules/@turf/circle/dist/esm/index.js.map +1 -1
  178. package/node_modules/@turf/circle/package.json +11 -11
  179. package/node_modules/@turf/clean-coords/dist/cjs/index.cjs +4 -8
  180. package/node_modules/@turf/clean-coords/dist/cjs/index.cjs.map +1 -1
  181. package/node_modules/@turf/clean-coords/dist/cjs/index.d.cts +1 -1
  182. package/node_modules/@turf/clean-coords/dist/esm/index.d.ts +1 -1
  183. package/node_modules/@turf/clean-coords/dist/esm/index.js +4 -8
  184. package/node_modules/@turf/clean-coords/dist/esm/index.js.map +1 -1
  185. package/node_modules/@turf/clean-coords/package.json +11 -11
  186. package/node_modules/@turf/clone/dist/cjs/index.cjs.map +1 -1
  187. package/node_modules/@turf/clone/dist/cjs/index.d.cts +1 -1
  188. package/node_modules/@turf/clone/dist/esm/index.d.ts +1 -1
  189. package/node_modules/@turf/clone/dist/esm/index.js.map +1 -1
  190. package/node_modules/@turf/clone/package.json +10 -10
  191. package/node_modules/@turf/clusters/README.md +8 -2
  192. package/node_modules/@turf/clusters/dist/cjs/index.cjs +9 -18
  193. package/node_modules/@turf/clusters/dist/cjs/index.cjs.map +1 -1
  194. package/node_modules/@turf/clusters/dist/cjs/index.d.cts +9 -8
  195. package/node_modules/@turf/clusters/dist/esm/index.d.ts +9 -8
  196. package/node_modules/@turf/clusters/dist/esm/index.js +9 -18
  197. package/node_modules/@turf/clusters/dist/esm/index.js.map +1 -1
  198. package/node_modules/@turf/clusters/package.json +10 -10
  199. package/node_modules/@turf/clusters-dbscan/README.md +38 -15
  200. package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs +2 -4
  201. package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs.map +1 -1
  202. package/node_modules/@turf/clusters-dbscan/dist/cjs/index.d.cts +16 -3
  203. package/node_modules/@turf/clusters-dbscan/dist/esm/index.d.ts +16 -3
  204. package/node_modules/@turf/clusters-dbscan/dist/esm/index.js +2 -4
  205. package/node_modules/@turf/clusters-dbscan/dist/esm/index.js.map +1 -1
  206. package/node_modules/@turf/clusters-dbscan/package.json +14 -14
  207. package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs +2 -4
  208. package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs.map +1 -1
  209. package/node_modules/@turf/clusters-kmeans/dist/cjs/index.d.cts +1 -1
  210. package/node_modules/@turf/clusters-kmeans/dist/esm/index.d.ts +1 -1
  211. package/node_modules/@turf/clusters-kmeans/dist/esm/index.js +2 -4
  212. package/node_modules/@turf/clusters-kmeans/dist/esm/index.js.map +1 -1
  213. package/node_modules/@turf/clusters-kmeans/package.json +15 -15
  214. package/node_modules/@turf/collect/dist/cjs/index.cjs.map +1 -1
  215. package/node_modules/@turf/collect/dist/cjs/index.d.cts +1 -1
  216. package/node_modules/@turf/collect/dist/esm/index.d.ts +1 -1
  217. package/node_modules/@turf/collect/dist/esm/index.js.map +1 -1
  218. package/node_modules/@turf/collect/package.json +11 -11
  219. package/node_modules/@turf/combine/dist/cjs/index.cjs.map +1 -1
  220. package/node_modules/@turf/combine/dist/cjs/index.d.cts +1 -1
  221. package/node_modules/@turf/combine/dist/esm/index.d.ts +1 -1
  222. package/node_modules/@turf/combine/dist/esm/index.js.map +1 -1
  223. package/node_modules/@turf/combine/package.json +10 -10
  224. package/node_modules/@turf/concave/dist/cjs/index.cjs.map +1 -1
  225. package/node_modules/@turf/concave/dist/cjs/index.d.cts +1 -1
  226. package/node_modules/@turf/concave/dist/esm/index.d.ts +1 -1
  227. package/node_modules/@turf/concave/dist/esm/index.js.map +1 -1
  228. package/node_modules/@turf/concave/package.json +14 -14
  229. package/node_modules/@turf/convex/dist/cjs/index.cjs.map +1 -1
  230. package/node_modules/@turf/convex/dist/cjs/index.d.cts +1 -1
  231. package/node_modules/@turf/convex/dist/esm/index.d.ts +1 -1
  232. package/node_modules/@turf/convex/dist/esm/index.js.map +1 -1
  233. package/node_modules/@turf/convex/package.json +10 -10
  234. package/node_modules/@turf/destination/dist/cjs/index.cjs.map +1 -1
  235. package/node_modules/@turf/destination/dist/cjs/index.d.cts +1 -1
  236. package/node_modules/@turf/destination/dist/esm/index.d.ts +1 -1
  237. package/node_modules/@turf/destination/dist/esm/index.js.map +1 -1
  238. package/node_modules/@turf/destination/package.json +11 -11
  239. package/node_modules/@turf/difference/dist/cjs/index.cjs +8 -10
  240. package/node_modules/@turf/difference/dist/cjs/index.cjs.map +1 -1
  241. package/node_modules/@turf/difference/dist/cjs/index.d.cts +1 -1
  242. package/node_modules/@turf/difference/dist/esm/index.d.ts +1 -1
  243. package/node_modules/@turf/difference/dist/esm/index.js +7 -9
  244. package/node_modules/@turf/difference/dist/esm/index.js.map +1 -1
  245. package/node_modules/@turf/difference/package.json +11 -11
  246. package/node_modules/@turf/dissolve/README.md +11 -12
  247. package/node_modules/@turf/dissolve/dist/cjs/index.cjs +5 -6
  248. package/node_modules/@turf/dissolve/dist/cjs/index.cjs.map +1 -1
  249. package/node_modules/@turf/dissolve/dist/cjs/index.d.cts +3 -3
  250. package/node_modules/@turf/dissolve/dist/esm/index.d.ts +3 -3
  251. package/node_modules/@turf/dissolve/dist/esm/index.js +4 -5
  252. package/node_modules/@turf/dissolve/dist/esm/index.js.map +1 -1
  253. package/node_modules/@turf/dissolve/package.json +13 -13
  254. package/node_modules/@turf/distance/dist/cjs/index.cjs.map +1 -1
  255. package/node_modules/@turf/distance/dist/cjs/index.d.cts +1 -1
  256. package/node_modules/@turf/distance/dist/esm/index.d.ts +1 -1
  257. package/node_modules/@turf/distance/dist/esm/index.js.map +1 -1
  258. package/node_modules/@turf/distance/package.json +10 -10
  259. package/node_modules/@turf/distance-weight/dist/cjs/index.cjs.map +1 -1
  260. package/node_modules/@turf/distance-weight/dist/cjs/index.d.cts +3 -1
  261. package/node_modules/@turf/distance-weight/dist/esm/index.d.ts +3 -1
  262. package/node_modules/@turf/distance-weight/dist/esm/index.js.map +1 -1
  263. package/node_modules/@turf/distance-weight/package.json +12 -12
  264. package/node_modules/@turf/ellipse/dist/cjs/index.cjs +8 -16
  265. package/node_modules/@turf/ellipse/dist/cjs/index.cjs.map +1 -1
  266. package/node_modules/@turf/ellipse/dist/esm/index.js +8 -16
  267. package/node_modules/@turf/ellipse/dist/esm/index.js.map +1 -1
  268. package/node_modules/@turf/ellipse/package.json +16 -16
  269. package/node_modules/@turf/envelope/dist/cjs/index.cjs.map +1 -1
  270. package/node_modules/@turf/envelope/dist/cjs/index.d.cts +1 -1
  271. package/node_modules/@turf/envelope/dist/esm/index.d.ts +1 -1
  272. package/node_modules/@turf/envelope/dist/esm/index.js.map +1 -1
  273. package/node_modules/@turf/envelope/package.json +11 -11
  274. package/node_modules/@turf/explode/dist/cjs/index.cjs.map +1 -1
  275. package/node_modules/@turf/explode/dist/cjs/index.d.cts +1 -1
  276. package/node_modules/@turf/explode/dist/esm/index.d.ts +1 -1
  277. package/node_modules/@turf/explode/dist/esm/index.js.map +1 -1
  278. package/node_modules/@turf/explode/package.json +10 -10
  279. package/node_modules/@turf/flatten/dist/cjs/index.cjs +1 -2
  280. package/node_modules/@turf/flatten/dist/cjs/index.cjs.map +1 -1
  281. package/node_modules/@turf/flatten/dist/cjs/index.d.cts +1 -1
  282. package/node_modules/@turf/flatten/dist/esm/index.d.ts +1 -1
  283. package/node_modules/@turf/flatten/dist/esm/index.js +1 -2
  284. package/node_modules/@turf/flatten/dist/esm/index.js.map +1 -1
  285. package/node_modules/@turf/flatten/package.json +10 -10
  286. package/node_modules/@turf/flip/dist/cjs/index.cjs +3 -6
  287. package/node_modules/@turf/flip/dist/cjs/index.cjs.map +1 -1
  288. package/node_modules/@turf/flip/dist/cjs/index.d.cts +1 -1
  289. package/node_modules/@turf/flip/dist/esm/index.d.ts +1 -1
  290. package/node_modules/@turf/flip/dist/esm/index.js +3 -6
  291. package/node_modules/@turf/flip/dist/esm/index.js.map +1 -1
  292. package/node_modules/@turf/flip/package.json +11 -11
  293. package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs +9 -18
  294. package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs.map +1 -1
  295. package/node_modules/@turf/geojson-rbush/dist/esm/index.js +9 -18
  296. package/node_modules/@turf/geojson-rbush/dist/esm/index.js.map +1 -1
  297. package/node_modules/@turf/geojson-rbush/package.json +11 -11
  298. package/node_modules/@turf/great-circle/README.md +2 -1
  299. package/node_modules/@turf/great-circle/dist/cjs/index.cjs +7 -2
  300. package/node_modules/@turf/great-circle/dist/cjs/index.cjs.map +1 -1
  301. package/node_modules/@turf/great-circle/dist/esm/index.js +7 -2
  302. package/node_modules/@turf/great-circle/dist/esm/index.js.map +1 -1
  303. package/node_modules/@turf/great-circle/package.json +9 -9
  304. package/node_modules/@turf/helpers/README.md +199 -154
  305. package/node_modules/@turf/helpers/dist/cjs/index.cjs +10 -7
  306. package/node_modules/@turf/helpers/dist/cjs/index.cjs.map +1 -1
  307. package/node_modules/@turf/helpers/dist/cjs/index.d.cts +149 -110
  308. package/node_modules/@turf/helpers/dist/esm/index.d.ts +149 -110
  309. package/node_modules/@turf/helpers/dist/esm/index.js +10 -7
  310. package/node_modules/@turf/helpers/dist/esm/index.js.map +1 -1
  311. package/node_modules/@turf/helpers/package.json +8 -8
  312. package/node_modules/@turf/hex-grid/dist/cjs/index.cjs +2 -4
  313. package/node_modules/@turf/hex-grid/dist/cjs/index.cjs.map +1 -1
  314. package/node_modules/@turf/hex-grid/dist/cjs/index.d.cts +1 -1
  315. package/node_modules/@turf/hex-grid/dist/esm/index.d.ts +1 -1
  316. package/node_modules/@turf/hex-grid/dist/esm/index.js +2 -4
  317. package/node_modules/@turf/hex-grid/dist/esm/index.js.map +1 -1
  318. package/node_modules/@turf/hex-grid/package.json +14 -14
  319. package/node_modules/@turf/interpolate/README.md +5 -2
  320. package/node_modules/@turf/interpolate/dist/cjs/index.cjs +10 -15
  321. package/node_modules/@turf/interpolate/dist/cjs/index.cjs.map +1 -1
  322. package/node_modules/@turf/interpolate/dist/cjs/index.d.cts +3 -1
  323. package/node_modules/@turf/interpolate/dist/esm/index.d.ts +3 -1
  324. package/node_modules/@turf/interpolate/dist/esm/index.js +11 -16
  325. package/node_modules/@turf/interpolate/dist/esm/index.js.map +1 -1
  326. package/node_modules/@turf/interpolate/package.json +18 -18
  327. package/node_modules/@turf/intersect/dist/cjs/index.cjs +7 -11
  328. package/node_modules/@turf/intersect/dist/cjs/index.cjs.map +1 -1
  329. package/node_modules/@turf/intersect/dist/cjs/index.d.cts +1 -1
  330. package/node_modules/@turf/intersect/dist/esm/index.d.ts +1 -1
  331. package/node_modules/@turf/intersect/dist/esm/index.js +6 -10
  332. package/node_modules/@turf/intersect/dist/esm/index.js.map +1 -1
  333. package/node_modules/@turf/intersect/package.json +11 -11
  334. package/node_modules/@turf/invariant/README.md +4 -0
  335. package/node_modules/@turf/invariant/dist/cjs/index.cjs.map +1 -1
  336. package/node_modules/@turf/invariant/dist/cjs/index.d.cts +6 -6
  337. package/node_modules/@turf/invariant/dist/esm/index.d.ts +6 -6
  338. package/node_modules/@turf/invariant/dist/esm/index.js.map +1 -1
  339. package/node_modules/@turf/invariant/package.json +9 -9
  340. package/node_modules/@turf/isobands/dist/cjs/index.cjs +10 -20
  341. package/node_modules/@turf/isobands/dist/cjs/index.cjs.map +1 -1
  342. package/node_modules/@turf/isobands/dist/cjs/index.d.cts +1 -1
  343. package/node_modules/@turf/isobands/dist/esm/index.d.ts +1 -1
  344. package/node_modules/@turf/isobands/dist/esm/index.js +10 -20
  345. package/node_modules/@turf/isobands/dist/esm/index.js.map +1 -1
  346. package/node_modules/@turf/isobands/package.json +20 -20
  347. package/node_modules/@turf/isolines/dist/cjs/index.cjs +10 -20
  348. package/node_modules/@turf/isolines/dist/cjs/index.cjs.map +1 -1
  349. package/node_modules/@turf/isolines/dist/cjs/index.d.cts +1 -1
  350. package/node_modules/@turf/isolines/dist/esm/index.d.ts +1 -1
  351. package/node_modules/@turf/isolines/dist/esm/index.js +10 -20
  352. package/node_modules/@turf/isolines/dist/esm/index.js.map +1 -1
  353. package/node_modules/@turf/isolines/package.json +17 -17
  354. package/node_modules/@turf/kinks/dist/cjs/index.cjs.map +1 -1
  355. package/node_modules/@turf/kinks/dist/cjs/index.d.cts +1 -1
  356. package/node_modules/@turf/kinks/dist/esm/index.d.ts +1 -1
  357. package/node_modules/@turf/kinks/dist/esm/index.js.map +1 -1
  358. package/node_modules/@turf/kinks/package.json +10 -10
  359. package/node_modules/@turf/length/dist/cjs/index.cjs.map +1 -1
  360. package/node_modules/@turf/length/dist/cjs/index.d.cts +1 -1
  361. package/node_modules/@turf/length/dist/esm/index.d.ts +1 -1
  362. package/node_modules/@turf/length/dist/esm/index.js.map +1 -1
  363. package/node_modules/@turf/length/package.json +11 -11
  364. package/node_modules/@turf/line-arc/dist/cjs/index.cjs.map +1 -1
  365. package/node_modules/@turf/line-arc/dist/cjs/index.d.cts +1 -1
  366. package/node_modules/@turf/line-arc/dist/esm/index.d.ts +1 -1
  367. package/node_modules/@turf/line-arc/dist/esm/index.js.map +1 -1
  368. package/node_modules/@turf/line-arc/package.json +12 -12
  369. package/node_modules/@turf/line-chunk/dist/cjs/index.cjs +3 -6
  370. package/node_modules/@turf/line-chunk/dist/cjs/index.cjs.map +1 -1
  371. package/node_modules/@turf/line-chunk/dist/esm/index.js +3 -6
  372. package/node_modules/@turf/line-chunk/dist/esm/index.js.map +1 -1
  373. package/node_modules/@turf/line-chunk/package.json +11 -11
  374. package/node_modules/@turf/line-intersect/README.md +1 -1
  375. package/node_modules/@turf/line-intersect/dist/cjs/index.cjs +3 -5
  376. package/node_modules/@turf/line-intersect/dist/cjs/index.cjs.map +1 -1
  377. package/node_modules/@turf/line-intersect/dist/cjs/index.d.cts +2 -2
  378. package/node_modules/@turf/line-intersect/dist/esm/index.d.ts +2 -2
  379. package/node_modules/@turf/line-intersect/dist/esm/index.js +3 -5
  380. package/node_modules/@turf/line-intersect/dist/esm/index.js.map +1 -1
  381. package/node_modules/@turf/line-intersect/package.json +10 -10
  382. package/node_modules/@turf/line-offset/dist/cjs/index.cjs +3 -6
  383. package/node_modules/@turf/line-offset/dist/cjs/index.cjs.map +1 -1
  384. package/node_modules/@turf/line-offset/dist/esm/index.js +3 -6
  385. package/node_modules/@turf/line-offset/dist/esm/index.js.map +1 -1
  386. package/node_modules/@turf/line-offset/package.json +10 -10
  387. package/node_modules/@turf/line-overlap/dist/cjs/index.cjs +10 -20
  388. package/node_modules/@turf/line-overlap/dist/cjs/index.cjs.map +1 -1
  389. package/node_modules/@turf/line-overlap/dist/cjs/index.d.cts +1 -1
  390. package/node_modules/@turf/line-overlap/dist/esm/index.d.ts +1 -1
  391. package/node_modules/@turf/line-overlap/dist/esm/index.js +10 -20
  392. package/node_modules/@turf/line-overlap/dist/esm/index.js.map +1 -1
  393. package/node_modules/@turf/line-overlap/package.json +15 -15
  394. package/node_modules/@turf/line-segment/dist/cjs/index.cjs.map +1 -1
  395. package/node_modules/@turf/line-segment/dist/cjs/index.d.cts +1 -1
  396. package/node_modules/@turf/line-segment/dist/esm/index.d.ts +1 -1
  397. package/node_modules/@turf/line-segment/dist/esm/index.js.map +1 -1
  398. package/node_modules/@turf/line-segment/package.json +11 -11
  399. package/node_modules/@turf/line-slice/dist/cjs/index.cjs.map +1 -1
  400. package/node_modules/@turf/line-slice/dist/esm/index.js.map +1 -1
  401. package/node_modules/@turf/line-slice/package.json +10 -10
  402. package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs +5 -10
  403. package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs.map +1 -1
  404. package/node_modules/@turf/line-slice-along/dist/esm/index.js +5 -10
  405. package/node_modules/@turf/line-slice-along/dist/esm/index.js.map +1 -1
  406. package/node_modules/@turf/line-slice-along/package.json +12 -12
  407. package/node_modules/@turf/line-split/dist/cjs/index.cjs +7 -14
  408. package/node_modules/@turf/line-split/dist/cjs/index.cjs.map +1 -1
  409. package/node_modules/@turf/line-split/dist/esm/index.js +7 -14
  410. package/node_modules/@turf/line-split/dist/esm/index.js.map +1 -1
  411. package/node_modules/@turf/line-split/package.json +16 -16
  412. package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs +4 -8
  413. package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs.map +1 -1
  414. package/node_modules/@turf/line-to-polygon/dist/cjs/index.d.cts +1 -1
  415. package/node_modules/@turf/line-to-polygon/dist/esm/index.d.ts +1 -1
  416. package/node_modules/@turf/line-to-polygon/dist/esm/index.js +4 -8
  417. package/node_modules/@turf/line-to-polygon/dist/esm/index.js.map +1 -1
  418. package/node_modules/@turf/line-to-polygon/package.json +12 -12
  419. package/node_modules/@turf/mask/dist/cjs/index.cjs +7 -7
  420. package/node_modules/@turf/mask/dist/cjs/index.cjs.map +1 -1
  421. package/node_modules/@turf/mask/dist/cjs/index.d.cts +1 -1
  422. package/node_modules/@turf/mask/dist/esm/index.d.ts +1 -1
  423. package/node_modules/@turf/mask/dist/esm/index.js +6 -6
  424. package/node_modules/@turf/mask/dist/esm/index.js.map +1 -1
  425. package/node_modules/@turf/mask/package.json +11 -11
  426. package/node_modules/@turf/meta/README.md +145 -93
  427. package/node_modules/@turf/meta/dist/cjs/index.cjs +22 -44
  428. package/node_modules/@turf/meta/dist/cjs/index.cjs.map +1 -1
  429. package/node_modules/@turf/meta/dist/esm/index.js +22 -44
  430. package/node_modules/@turf/meta/dist/esm/index.js.map +1 -1
  431. package/node_modules/@turf/meta/package.json +7 -7
  432. package/node_modules/@turf/midpoint/dist/cjs/index.cjs.map +1 -1
  433. package/node_modules/@turf/midpoint/dist/cjs/index.d.cts +1 -1
  434. package/node_modules/@turf/midpoint/dist/esm/index.d.ts +1 -1
  435. package/node_modules/@turf/midpoint/dist/esm/index.js.map +1 -1
  436. package/node_modules/@turf/midpoint/package.json +12 -12
  437. package/node_modules/@turf/moran-index/README.md +25 -47
  438. package/node_modules/@turf/moran-index/dist/cjs/index.cjs.map +1 -1
  439. package/node_modules/@turf/moran-index/dist/cjs/index.d.cts +16 -8
  440. package/node_modules/@turf/moran-index/dist/esm/index.d.ts +16 -8
  441. package/node_modules/@turf/moran-index/dist/esm/index.js.map +1 -1
  442. package/node_modules/@turf/moran-index/package.json +11 -11
  443. package/node_modules/@turf/nearest-neighbor-analysis/README.md +50 -21
  444. package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.cjs.map +1 -1
  445. package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.d.cts +25 -6
  446. package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.d.ts +25 -6
  447. package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js.map +1 -1
  448. package/node_modules/@turf/nearest-neighbor-analysis/package.json +17 -17
  449. package/node_modules/@turf/nearest-point/dist/cjs/index.cjs +2 -4
  450. package/node_modules/@turf/nearest-point/dist/cjs/index.cjs.map +1 -1
  451. package/node_modules/@turf/nearest-point/dist/cjs/index.d.cts +1 -1
  452. package/node_modules/@turf/nearest-point/dist/esm/index.d.ts +1 -1
  453. package/node_modules/@turf/nearest-point/dist/esm/index.js +2 -4
  454. package/node_modules/@turf/nearest-point/dist/esm/index.js.map +1 -1
  455. package/node_modules/@turf/nearest-point/package.json +12 -12
  456. package/node_modules/@turf/nearest-point-on-line/README.md +9 -9
  457. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs +97 -53
  458. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs.map +1 -1
  459. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.d.cts +2 -2
  460. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.d.ts +2 -2
  461. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js +99 -55
  462. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js.map +1 -1
  463. package/node_modules/@turf/nearest-point-on-line/package.json +15 -18
  464. package/node_modules/@turf/nearest-point-to-line/README.md +1 -9
  465. package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.cjs.map +1 -1
  466. package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.d.cts +1 -1
  467. package/node_modules/@turf/nearest-point-to-line/dist/esm/index.d.ts +1 -1
  468. package/node_modules/@turf/nearest-point-to-line/dist/esm/index.js.map +1 -1
  469. package/node_modules/@turf/nearest-point-to-line/package.json +14 -14
  470. package/node_modules/@turf/planepoint/dist/cjs/index.cjs.map +1 -1
  471. package/node_modules/@turf/planepoint/dist/cjs/index.d.cts +1 -1
  472. package/node_modules/@turf/planepoint/dist/esm/index.d.ts +1 -1
  473. package/node_modules/@turf/planepoint/dist/esm/index.js.map +1 -1
  474. package/node_modules/@turf/planepoint/package.json +10 -10
  475. package/node_modules/@turf/point-grid/dist/cjs/index.cjs +2 -4
  476. package/node_modules/@turf/point-grid/dist/cjs/index.cjs.map +1 -1
  477. package/node_modules/@turf/point-grid/dist/cjs/index.d.cts +1 -1
  478. package/node_modules/@turf/point-grid/dist/esm/index.d.ts +1 -1
  479. package/node_modules/@turf/point-grid/dist/esm/index.js +2 -4
  480. package/node_modules/@turf/point-grid/dist/esm/index.js.map +1 -1
  481. package/node_modules/@turf/point-grid/package.json +14 -14
  482. package/node_modules/@turf/point-on-feature/dist/cjs/index.cjs.map +1 -1
  483. package/node_modules/@turf/point-on-feature/dist/cjs/index.d.cts +1 -1
  484. package/node_modules/@turf/point-on-feature/dist/esm/index.d.ts +1 -1
  485. package/node_modules/@turf/point-on-feature/dist/esm/index.js.map +1 -1
  486. package/node_modules/@turf/point-on-feature/package.json +15 -15
  487. package/node_modules/@turf/point-to-line-distance/README.md +10 -10
  488. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs +21 -19
  489. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs.map +1 -1
  490. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.d.cts +3 -3
  491. package/node_modules/@turf/point-to-line-distance/dist/esm/index.d.ts +3 -3
  492. package/node_modules/@turf/point-to-line-distance/dist/esm/index.js +22 -20
  493. package/node_modules/@turf/point-to-line-distance/dist/esm/index.js.map +1 -1
  494. package/node_modules/@turf/point-to-line-distance/package.json +18 -17
  495. package/node_modules/@turf/point-to-polygon-distance/LICENSE +20 -0
  496. package/node_modules/@turf/point-to-polygon-distance/README.md +61 -0
  497. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs +49 -0
  498. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs.map +1 -0
  499. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.d.cts +23 -0
  500. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.d.ts +23 -0
  501. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js +49 -0
  502. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js.map +1 -0
  503. package/node_modules/@turf/point-to-polygon-distance/package.json +80 -0
  504. package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs.map +1 -1
  505. package/node_modules/@turf/points-within-polygon/dist/cjs/index.d.cts +1 -1
  506. package/node_modules/@turf/points-within-polygon/dist/esm/index.d.ts +1 -1
  507. package/node_modules/@turf/points-within-polygon/dist/esm/index.js.map +1 -1
  508. package/node_modules/@turf/points-within-polygon/package.json +11 -11
  509. package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs +1 -2
  510. package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs.map +1 -1
  511. package/node_modules/@turf/polygon-smooth/dist/cjs/index.d.cts +1 -1
  512. package/node_modules/@turf/polygon-smooth/dist/esm/index.d.ts +1 -1
  513. package/node_modules/@turf/polygon-smooth/dist/esm/index.js +1 -2
  514. package/node_modules/@turf/polygon-smooth/dist/esm/index.js.map +1 -1
  515. package/node_modules/@turf/polygon-smooth/package.json +10 -10
  516. package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs +1 -2
  517. package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs.map +1 -1
  518. package/node_modules/@turf/polygon-tangents/dist/cjs/index.d.cts +1 -1
  519. package/node_modules/@turf/polygon-tangents/dist/esm/index.d.ts +1 -1
  520. package/node_modules/@turf/polygon-tangents/dist/esm/index.js +1 -2
  521. package/node_modules/@turf/polygon-tangents/dist/esm/index.js.map +1 -1
  522. package/node_modules/@turf/polygon-tangents/package.json +14 -14
  523. package/node_modules/@turf/polygon-to-line/dist/cjs/index.cjs.map +1 -1
  524. package/node_modules/@turf/polygon-to-line/dist/cjs/index.d.cts +1 -1
  525. package/node_modules/@turf/polygon-to-line/dist/esm/index.d.ts +1 -1
  526. package/node_modules/@turf/polygon-to-line/dist/esm/index.js.map +1 -1
  527. package/node_modules/@turf/polygon-to-line/package.json +10 -10
  528. package/node_modules/@turf/polygonize/dist/cjs/index.cjs +20 -40
  529. package/node_modules/@turf/polygonize/dist/cjs/index.cjs.map +1 -1
  530. package/node_modules/@turf/polygonize/dist/cjs/index.d.cts +1 -1
  531. package/node_modules/@turf/polygonize/dist/esm/index.d.ts +1 -1
  532. package/node_modules/@turf/polygonize/dist/esm/index.js +20 -40
  533. package/node_modules/@turf/polygonize/dist/esm/index.js.map +1 -1
  534. package/node_modules/@turf/polygonize/package.json +13 -13
  535. package/node_modules/@turf/projection/README.md +2 -2
  536. package/node_modules/@turf/projection/dist/cjs/index.cjs +6 -12
  537. package/node_modules/@turf/projection/dist/cjs/index.cjs.map +1 -1
  538. package/node_modules/@turf/projection/dist/cjs/index.d.cts +2 -2
  539. package/node_modules/@turf/projection/dist/esm/index.d.ts +2 -2
  540. package/node_modules/@turf/projection/dist/esm/index.js +6 -12
  541. package/node_modules/@turf/projection/dist/esm/index.js.map +1 -1
  542. package/node_modules/@turf/projection/package.json +12 -12
  543. package/node_modules/@turf/quadrat-analysis/README.md +10 -10
  544. package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs.map +1 -1
  545. package/node_modules/@turf/quadrat-analysis/dist/cjs/index.d.cts +4 -4
  546. package/node_modules/@turf/quadrat-analysis/dist/esm/index.d.ts +4 -4
  547. package/node_modules/@turf/quadrat-analysis/dist/esm/index.js.map +1 -1
  548. package/node_modules/@turf/quadrat-analysis/package.json +18 -18
  549. package/node_modules/@turf/random/README.md +27 -29
  550. package/node_modules/@turf/random/dist/cjs/index.cjs +1 -3
  551. package/node_modules/@turf/random/dist/cjs/index.cjs.map +1 -1
  552. package/node_modules/@turf/random/dist/cjs/index.d.cts +11 -11
  553. package/node_modules/@turf/random/dist/esm/index.d.ts +11 -11
  554. package/node_modules/@turf/random/dist/esm/index.js +1 -3
  555. package/node_modules/@turf/random/dist/esm/index.js.map +1 -1
  556. package/node_modules/@turf/random/package.json +9 -9
  557. package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs.map +1 -1
  558. package/node_modules/@turf/rectangle-grid/dist/cjs/index.d.cts +1 -1
  559. package/node_modules/@turf/rectangle-grid/dist/esm/index.d.ts +1 -1
  560. package/node_modules/@turf/rectangle-grid/dist/esm/index.js.map +1 -1
  561. package/node_modules/@turf/rectangle-grid/package.json +13 -13
  562. package/node_modules/@turf/rewind/dist/cjs/index.cjs +3 -6
  563. package/node_modules/@turf/rewind/dist/cjs/index.cjs.map +1 -1
  564. package/node_modules/@turf/rewind/dist/cjs/index.d.cts +1 -1
  565. package/node_modules/@turf/rewind/dist/esm/index.d.ts +1 -1
  566. package/node_modules/@turf/rewind/dist/esm/index.js +3 -6
  567. package/node_modules/@turf/rewind/dist/esm/index.js.map +1 -1
  568. package/node_modules/@turf/rewind/package.json +13 -13
  569. package/node_modules/@turf/rhumb-bearing/README.md +1 -1
  570. package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs.map +1 -1
  571. package/node_modules/@turf/rhumb-bearing/dist/cjs/index.d.cts +1 -1
  572. package/node_modules/@turf/rhumb-bearing/dist/esm/index.d.ts +1 -1
  573. package/node_modules/@turf/rhumb-bearing/dist/esm/index.js.map +1 -1
  574. package/node_modules/@turf/rhumb-bearing/package.json +11 -11
  575. package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs +1 -2
  576. package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs.map +1 -1
  577. package/node_modules/@turf/rhumb-destination/dist/cjs/index.d.cts +1 -1
  578. package/node_modules/@turf/rhumb-destination/dist/esm/index.d.ts +1 -1
  579. package/node_modules/@turf/rhumb-destination/dist/esm/index.js +1 -2
  580. package/node_modules/@turf/rhumb-destination/dist/esm/index.js.map +1 -1
  581. package/node_modules/@turf/rhumb-destination/package.json +11 -11
  582. package/node_modules/@turf/rhumb-distance/README.md +1 -1
  583. package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs.map +1 -1
  584. package/node_modules/@turf/rhumb-distance/dist/cjs/index.d.cts +1 -1
  585. package/node_modules/@turf/rhumb-distance/dist/esm/index.d.ts +1 -1
  586. package/node_modules/@turf/rhumb-distance/dist/esm/index.js.map +1 -1
  587. package/node_modules/@turf/rhumb-distance/package.json +11 -11
  588. package/node_modules/@turf/sample/README.md +2 -1
  589. package/node_modules/@turf/sample/dist/cjs/index.cjs +3 -6
  590. package/node_modules/@turf/sample/dist/cjs/index.cjs.map +1 -1
  591. package/node_modules/@turf/sample/dist/cjs/index.d.cts +1 -1
  592. package/node_modules/@turf/sample/dist/esm/index.d.ts +1 -1
  593. package/node_modules/@turf/sample/dist/esm/index.js +3 -6
  594. package/node_modules/@turf/sample/dist/esm/index.js.map +1 -1
  595. package/node_modules/@turf/sample/package.json +9 -9
  596. package/node_modules/@turf/sector/dist/cjs/index.cjs +4 -8
  597. package/node_modules/@turf/sector/dist/cjs/index.cjs.map +1 -1
  598. package/node_modules/@turf/sector/dist/cjs/index.d.cts +1 -1
  599. package/node_modules/@turf/sector/dist/esm/index.d.ts +1 -1
  600. package/node_modules/@turf/sector/dist/esm/index.js +4 -8
  601. package/node_modules/@turf/sector/dist/esm/index.js.map +1 -1
  602. package/node_modules/@turf/sector/package.json +14 -14
  603. package/node_modules/@turf/shortest-path/README.md +13 -19
  604. package/node_modules/@turf/shortest-path/dist/cjs/index.cjs +3 -6
  605. package/node_modules/@turf/shortest-path/dist/cjs/index.cjs.map +1 -1
  606. package/node_modules/@turf/shortest-path/dist/cjs/index.d.cts +5 -5
  607. package/node_modules/@turf/shortest-path/dist/esm/index.d.ts +5 -5
  608. package/node_modules/@turf/shortest-path/dist/esm/index.js +3 -6
  609. package/node_modules/@turf/shortest-path/dist/esm/index.js.map +1 -1
  610. package/node_modules/@turf/shortest-path/package.json +18 -18
  611. package/node_modules/@turf/simplify/dist/cjs/index.cjs +8 -16
  612. package/node_modules/@turf/simplify/dist/cjs/index.cjs.map +1 -1
  613. package/node_modules/@turf/simplify/dist/cjs/index.d.cts +1 -1
  614. package/node_modules/@turf/simplify/dist/esm/index.d.ts +1 -1
  615. package/node_modules/@turf/simplify/dist/esm/index.js +8 -16
  616. package/node_modules/@turf/simplify/dist/esm/index.js.map +1 -1
  617. package/node_modules/@turf/simplify/package.json +13 -13
  618. package/node_modules/@turf/square/dist/cjs/index.cjs.map +1 -1
  619. package/node_modules/@turf/square/dist/cjs/index.d.cts +1 -1
  620. package/node_modules/@turf/square/dist/esm/index.d.ts +1 -1
  621. package/node_modules/@turf/square/dist/esm/index.js.map +1 -1
  622. package/node_modules/@turf/square/package.json +10 -10
  623. package/node_modules/@turf/square-grid/dist/cjs/index.cjs.map +1 -1
  624. package/node_modules/@turf/square-grid/dist/cjs/index.d.cts +1 -1
  625. package/node_modules/@turf/square-grid/dist/esm/index.d.ts +1 -1
  626. package/node_modules/@turf/square-grid/dist/esm/index.js.map +1 -1
  627. package/node_modules/@turf/square-grid/package.json +12 -12
  628. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs +3 -6
  629. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs.map +1 -1
  630. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.d.cts +1 -1
  631. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.d.ts +1 -1
  632. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js +3 -6
  633. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js.map +1 -1
  634. package/node_modules/@turf/standard-deviational-ellipse/package.json +16 -16
  635. package/node_modules/@turf/tag/dist/cjs/index.cjs +1 -2
  636. package/node_modules/@turf/tag/dist/cjs/index.cjs.map +1 -1
  637. package/node_modules/@turf/tag/dist/cjs/index.d.cts +1 -1
  638. package/node_modules/@turf/tag/dist/esm/index.d.ts +1 -1
  639. package/node_modules/@turf/tag/dist/esm/index.js +1 -2
  640. package/node_modules/@turf/tag/dist/esm/index.js.map +1 -1
  641. package/node_modules/@turf/tag/package.json +12 -12
  642. package/node_modules/@turf/tesselate/dist/cjs/index.cjs +1 -2
  643. package/node_modules/@turf/tesselate/dist/cjs/index.cjs.map +1 -1
  644. package/node_modules/@turf/tesselate/dist/cjs/index.d.cts +1 -1
  645. package/node_modules/@turf/tesselate/dist/esm/index.d.ts +1 -1
  646. package/node_modules/@turf/tesselate/dist/esm/index.js +1 -2
  647. package/node_modules/@turf/tesselate/dist/esm/index.js.map +1 -1
  648. package/node_modules/@turf/tesselate/package.json +9 -9
  649. package/node_modules/@turf/tin/dist/cjs/index.cjs +13 -14
  650. package/node_modules/@turf/tin/dist/cjs/index.cjs.map +1 -1
  651. package/node_modules/@turf/tin/dist/cjs/index.d.cts +1 -1
  652. package/node_modules/@turf/tin/dist/esm/index.d.ts +1 -1
  653. package/node_modules/@turf/tin/dist/esm/index.js +13 -14
  654. package/node_modules/@turf/tin/dist/esm/index.js.map +1 -1
  655. package/node_modules/@turf/tin/package.json +9 -9
  656. package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs +4 -8
  657. package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs.map +1 -1
  658. package/node_modules/@turf/transform-rotate/dist/cjs/index.d.cts +1 -1
  659. package/node_modules/@turf/transform-rotate/dist/esm/index.d.ts +1 -1
  660. package/node_modules/@turf/transform-rotate/dist/esm/index.js +4 -8
  661. package/node_modules/@turf/transform-rotate/dist/esm/index.js.map +1 -1
  662. package/node_modules/@turf/transform-rotate/package.json +17 -17
  663. package/node_modules/@turf/transform-scale/dist/cjs/index.cjs +18 -12
  664. package/node_modules/@turf/transform-scale/dist/cjs/index.cjs.map +1 -1
  665. package/node_modules/@turf/transform-scale/dist/cjs/index.d.cts +1 -1
  666. package/node_modules/@turf/transform-scale/dist/esm/index.d.ts +1 -1
  667. package/node_modules/@turf/transform-scale/dist/esm/index.js +18 -12
  668. package/node_modules/@turf/transform-scale/dist/esm/index.js.map +1 -1
  669. package/node_modules/@turf/transform-scale/package.json +21 -21
  670. package/node_modules/@turf/transform-translate/dist/cjs/index.cjs +4 -8
  671. package/node_modules/@turf/transform-translate/dist/cjs/index.cjs.map +1 -1
  672. package/node_modules/@turf/transform-translate/dist/cjs/index.d.cts +1 -1
  673. package/node_modules/@turf/transform-translate/dist/esm/index.d.ts +1 -1
  674. package/node_modules/@turf/transform-translate/dist/esm/index.js +4 -8
  675. package/node_modules/@turf/transform-translate/dist/esm/index.js.map +1 -1
  676. package/node_modules/@turf/transform-translate/package.json +14 -14
  677. package/node_modules/@turf/triangle-grid/dist/cjs/index.cjs.map +1 -1
  678. package/node_modules/@turf/triangle-grid/dist/cjs/index.d.cts +1 -1
  679. package/node_modules/@turf/triangle-grid/dist/esm/index.d.ts +1 -1
  680. package/node_modules/@turf/triangle-grid/dist/esm/index.js.map +1 -1
  681. package/node_modules/@turf/triangle-grid/package.json +13 -13
  682. package/node_modules/@turf/truncate/dist/cjs/index.cjs +3 -6
  683. package/node_modules/@turf/truncate/dist/cjs/index.cjs.map +1 -1
  684. package/node_modules/@turf/truncate/dist/cjs/index.d.cts +1 -1
  685. package/node_modules/@turf/truncate/dist/esm/index.d.ts +1 -1
  686. package/node_modules/@turf/truncate/dist/esm/index.js +3 -6
  687. package/node_modules/@turf/truncate/dist/esm/index.js.map +1 -1
  688. package/node_modules/@turf/truncate/package.json +10 -10
  689. package/node_modules/@turf/turf/dist/cjs/index.cjs +3 -1
  690. package/node_modules/@turf/turf/dist/cjs/index.cjs.map +1 -1
  691. package/node_modules/@turf/turf/dist/cjs/index.d.cts +1 -0
  692. package/node_modules/@turf/turf/dist/esm/index.d.ts +1 -0
  693. package/node_modules/@turf/turf/dist/esm/index.js +2 -0
  694. package/node_modules/@turf/turf/dist/esm/index.js.map +1 -1
  695. package/node_modules/@turf/turf/package.json +126 -125
  696. package/node_modules/@turf/turf/turf.min.js +3 -26
  697. package/node_modules/@turf/union/README.md +44 -24
  698. package/node_modules/@turf/union/dist/cjs/index.cjs +9 -12
  699. package/node_modules/@turf/union/dist/cjs/index.cjs.map +1 -1
  700. package/node_modules/@turf/union/dist/cjs/index.d.cts +40 -21
  701. package/node_modules/@turf/union/dist/esm/index.d.ts +40 -21
  702. package/node_modules/@turf/union/dist/esm/index.js +8 -11
  703. package/node_modules/@turf/union/dist/esm/index.js.map +1 -1
  704. package/node_modules/@turf/union/package.json +11 -11
  705. package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs +14 -28
  706. package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs.map +1 -1
  707. package/node_modules/@turf/unkink-polygon/dist/cjs/index.d.cts +1 -1
  708. package/node_modules/@turf/unkink-polygon/dist/esm/index.d.ts +1 -1
  709. package/node_modules/@turf/unkink-polygon/dist/esm/index.js +14 -28
  710. package/node_modules/@turf/unkink-polygon/dist/esm/index.js.map +1 -1
  711. package/node_modules/@turf/unkink-polygon/package.json +13 -13
  712. package/node_modules/@turf/voronoi/dist/cjs/index.cjs +3 -6
  713. package/node_modules/@turf/voronoi/dist/cjs/index.cjs.map +1 -1
  714. package/node_modules/@turf/voronoi/dist/cjs/index.d.cts +1 -1
  715. package/node_modules/@turf/voronoi/dist/esm/index.d.ts +1 -1
  716. package/node_modules/@turf/voronoi/dist/esm/index.js +3 -6
  717. package/node_modules/@turf/voronoi/dist/esm/index.js.map +1 -1
  718. package/node_modules/@turf/voronoi/package.json +11 -11
  719. package/node_modules/@types/node/README.md +1 -1
  720. package/node_modules/@types/node/events.d.ts +1 -1
  721. package/node_modules/@types/node/globals.d.ts +8 -6
  722. package/node_modules/@types/node/module.d.ts +10 -3
  723. package/node_modules/@types/node/net.d.ts +3 -0
  724. package/node_modules/@types/node/package.json +2 -2
  725. package/node_modules/@types/node/process.d.ts +35 -2
  726. package/node_modules/@types/node/sqlite.d.ts +30 -9
  727. package/node_modules/bignumber.js/CHANGELOG.md +295 -0
  728. package/node_modules/bignumber.js/LICENCE.md +26 -0
  729. package/node_modules/bignumber.js/README.md +286 -0
  730. package/node_modules/bignumber.js/bignumber.d.ts +1831 -0
  731. package/node_modules/bignumber.js/bignumber.js +2922 -0
  732. package/node_modules/bignumber.js/bignumber.mjs +2907 -0
  733. package/node_modules/bignumber.js/doc/API.html +2249 -0
  734. package/node_modules/bignumber.js/package.json +50 -0
  735. package/node_modules/long/index.d.ts +1 -456
  736. package/node_modules/long/package.json +1 -1
  737. package/node_modules/long/umd/index.d.ts +456 -1
  738. package/node_modules/polyclip-ts/LICENSE +21 -0
  739. package/node_modules/{polygon-clipping → polyclip-ts}/README.md +35 -36
  740. package/node_modules/polyclip-ts/dist/cjs/index.cjs +1179 -0
  741. package/node_modules/polyclip-ts/dist/cjs/index.cjs.map +1 -0
  742. package/node_modules/polyclip-ts/dist/cjs/index.d.cts +12 -0
  743. package/node_modules/polyclip-ts/dist/esm/index.d.ts +12 -0
  744. package/node_modules/polyclip-ts/dist/esm/index.js +1138 -0
  745. package/node_modules/polyclip-ts/dist/esm/index.js.map +1 -0
  746. package/node_modules/polyclip-ts/dist/polyclip-ts.umd.js +4811 -0
  747. package/node_modules/polyclip-ts/dist/polyclip-ts.umd.min.js +2 -0
  748. package/node_modules/polyclip-ts/package.json +72 -0
  749. package/node_modules/splaytree-ts/LICENSE +29 -0
  750. package/node_modules/splaytree-ts/README.md +296 -0
  751. package/node_modules/splaytree-ts/dist/cjs/index.cjs +714 -0
  752. package/node_modules/splaytree-ts/dist/cjs/index.cjs.map +1 -0
  753. package/node_modules/splaytree-ts/dist/cjs/index.d.cts +105 -0
  754. package/node_modules/splaytree-ts/dist/esm/index.d.ts +105 -0
  755. package/node_modules/splaytree-ts/dist/esm/index.js +688 -0
  756. package/node_modules/splaytree-ts/dist/esm/index.js.map +1 -0
  757. package/node_modules/splaytree-ts/dist/splaytree-ts.umd.js +736 -0
  758. package/node_modules/splaytree-ts/dist/splaytree-ts.umd.min.js +2 -0
  759. package/node_modules/splaytree-ts/package.json +59 -0
  760. package/node_modules/uuid/README.md +29 -16
  761. package/node_modules/uuid/dist/cjs/md5.d.ts +2 -0
  762. package/node_modules/uuid/dist/cjs/native.d.ts +1 -0
  763. package/node_modules/uuid/dist/cjs/rng.js +1 -1
  764. package/node_modules/uuid/dist/cjs/sha1.d.ts +2 -0
  765. package/node_modules/uuid/dist/cjs/stringify.js +2 -1
  766. package/node_modules/uuid/dist/cjs/v1.js +10 -1
  767. package/node_modules/uuid/dist/cjs/v1ToV6.js +1 -1
  768. package/node_modules/uuid/dist/cjs/v35.js +3 -3
  769. package/node_modules/uuid/dist/cjs/v4.js +7 -1
  770. package/node_modules/uuid/dist/cjs/v6ToV1.js +1 -1
  771. package/node_modules/uuid/dist/cjs/v7.js +10 -1
  772. package/node_modules/uuid/dist/cjs-browser/rng.js +1 -1
  773. package/node_modules/uuid/dist/cjs-browser/stringify.js +2 -1
  774. package/node_modules/uuid/dist/cjs-browser/v1.js +10 -1
  775. package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +1 -1
  776. package/node_modules/uuid/dist/cjs-browser/v35.js +3 -3
  777. package/node_modules/uuid/dist/cjs-browser/v4.js +7 -1
  778. package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +1 -1
  779. package/node_modules/uuid/dist/cjs-browser/v7.js +10 -1
  780. package/node_modules/uuid/dist/esm/md5.d.ts +2 -0
  781. package/node_modules/uuid/dist/esm/native.d.ts +1 -0
  782. package/node_modules/uuid/dist/esm/sha1.d.ts +2 -0
  783. package/node_modules/uuid/dist/esm/v1.js +8 -0
  784. package/node_modules/uuid/dist/esm/v4.js +7 -1
  785. package/node_modules/uuid/dist/esm/v7.js +8 -0
  786. package/node_modules/uuid/dist/esm-browser/v1.js +8 -0
  787. package/node_modules/uuid/dist/esm-browser/v4.js +7 -1
  788. package/node_modules/uuid/dist/esm-browser/v7.js +8 -0
  789. package/node_modules/uuid/package.json +26 -28
  790. package/package.json +4 -4
  791. package/node_modules/polygon-clipping/LICENSE.md +0 -11
  792. package/node_modules/polygon-clipping/dist/polygon-clipping.cjs.js +0 -1803
  793. package/node_modules/polygon-clipping/dist/polygon-clipping.d.ts +0 -14
  794. package/node_modules/polygon-clipping/dist/polygon-clipping.esm.js +0 -1532
  795. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.js +0 -2496
  796. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js +0 -24
  797. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js.map +0 -1
  798. package/node_modules/polygon-clipping/node_modules/robust-predicates/LICENSE +0 -24
  799. package/node_modules/polygon-clipping/node_modules/robust-predicates/README.md +0 -82
  800. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/incircle.js +0 -765
  801. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/insphere.js +0 -766
  802. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/orient2d.js +0 -184
  803. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/orient3d.js +0 -462
  804. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/util.js +0 -138
  805. package/node_modules/polygon-clipping/node_modules/robust-predicates/index.d.ts +0 -49
  806. package/node_modules/polygon-clipping/node_modules/robust-predicates/index.js +0 -5
  807. package/node_modules/polygon-clipping/node_modules/robust-predicates/package.json +0 -75
  808. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/incircle.js +0 -908
  809. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/incircle.min.js +0 -1
  810. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/insphere.js +0 -914
  811. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/insphere.min.js +0 -1
  812. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient2d.js +0 -280
  813. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient2d.min.js +0 -1
  814. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient3d.js +0 -601
  815. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient3d.min.js +0 -1
  816. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/predicates.js +0 -2328
  817. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/predicates.min.js +0 -1
  818. package/node_modules/polygon-clipping/package.json +0 -79
  819. package/node_modules/splaytree/Readme.md +0 -222
  820. package/node_modules/splaytree/dist/splay.esm.js +0 -686
  821. package/node_modules/splaytree/dist/splay.esm.js.map +0 -1
  822. package/node_modules/splaytree/dist/splay.js +0 -694
  823. package/node_modules/splaytree/dist/splay.js.map +0 -1
  824. package/node_modules/splaytree/package.json +0 -91
  825. package/node_modules/splaytree/src/index.ts +0 -679
  826. package/node_modules/splaytree/src/node.ts +0 -15
  827. package/node_modules/splaytree/src/types.ts +0 -2
  828. package/node_modules/splaytree/typings/index.d.ts +0 -82
  829. package/node_modules/splaytree/typings/node.d.ts +0 -8
  830. package/node_modules/splaytree/typings/types.d.ts +0 -2
  831. package/node_modules/uuid/CHANGELOG.md +0 -335
  832. package/node_modules/uuid/CONTRIBUTING.md +0 -18
  833. package/node_modules/uuid/dist/cjs/test/parse.test.d.ts +0 -1
  834. package/node_modules/uuid/dist/cjs/test/parse.test.js +0 -50
  835. package/node_modules/uuid/dist/cjs/test/rng.test.d.ts +0 -1
  836. package/node_modules/uuid/dist/cjs/test/rng.test.js +0 -14
  837. package/node_modules/uuid/dist/cjs/test/stringify.test.d.ts +0 -1
  838. package/node_modules/uuid/dist/cjs/test/stringify.test.js +0 -23
  839. package/node_modules/uuid/dist/cjs/test/test_constants.d.ts +0 -33
  840. package/node_modules/uuid/dist/cjs/test/test_constants.js +0 -91
  841. package/node_modules/uuid/dist/cjs/test/v1.test.d.ts +0 -1
  842. package/node_modules/uuid/dist/cjs/test/v1.test.js +0 -127
  843. package/node_modules/uuid/dist/cjs/test/v35.test.d.ts +0 -1
  844. package/node_modules/uuid/dist/cjs/test/v35.test.js +0 -143
  845. package/node_modules/uuid/dist/cjs/test/v4.test.d.ts +0 -1
  846. package/node_modules/uuid/dist/cjs/test/v4.test.js +0 -60
  847. package/node_modules/uuid/dist/cjs/test/v6.test.d.ts +0 -1
  848. package/node_modules/uuid/dist/cjs/test/v6.test.js +0 -56
  849. package/node_modules/uuid/dist/cjs/test/v7.test.d.ts +0 -1
  850. package/node_modules/uuid/dist/cjs/test/v7.test.js +0 -194
  851. package/node_modules/uuid/dist/cjs/test/validate.test.d.ts +0 -1
  852. package/node_modules/uuid/dist/cjs/test/validate.test.js +0 -13
  853. package/node_modules/uuid/dist/cjs/test/version.test.d.ts +0 -1
  854. package/node_modules/uuid/dist/cjs/test/version.test.js +0 -20
  855. package/node_modules/uuid/dist/cjs-browser/test/parse.test.d.ts +0 -1
  856. package/node_modules/uuid/dist/cjs-browser/test/parse.test.js +0 -50
  857. package/node_modules/uuid/dist/cjs-browser/test/rng.test.d.ts +0 -1
  858. package/node_modules/uuid/dist/cjs-browser/test/rng.test.js +0 -14
  859. package/node_modules/uuid/dist/cjs-browser/test/stringify.test.d.ts +0 -1
  860. package/node_modules/uuid/dist/cjs-browser/test/stringify.test.js +0 -23
  861. package/node_modules/uuid/dist/cjs-browser/test/test_constants.d.ts +0 -33
  862. package/node_modules/uuid/dist/cjs-browser/test/test_constants.js +0 -91
  863. package/node_modules/uuid/dist/cjs-browser/test/v1.test.d.ts +0 -1
  864. package/node_modules/uuid/dist/cjs-browser/test/v1.test.js +0 -127
  865. package/node_modules/uuid/dist/cjs-browser/test/v35.test.d.ts +0 -1
  866. package/node_modules/uuid/dist/cjs-browser/test/v35.test.js +0 -143
  867. package/node_modules/uuid/dist/cjs-browser/test/v4.test.d.ts +0 -1
  868. package/node_modules/uuid/dist/cjs-browser/test/v4.test.js +0 -60
  869. package/node_modules/uuid/dist/cjs-browser/test/v6.test.d.ts +0 -1
  870. package/node_modules/uuid/dist/cjs-browser/test/v6.test.js +0 -56
  871. package/node_modules/uuid/dist/cjs-browser/test/v7.test.d.ts +0 -1
  872. package/node_modules/uuid/dist/cjs-browser/test/v7.test.js +0 -194
  873. package/node_modules/uuid/dist/cjs-browser/test/validate.test.d.ts +0 -1
  874. package/node_modules/uuid/dist/cjs-browser/test/validate.test.js +0 -13
  875. package/node_modules/uuid/dist/cjs-browser/test/version.test.d.ts +0 -1
  876. package/node_modules/uuid/dist/cjs-browser/test/version.test.js +0 -20
  877. package/node_modules/uuid/dist/esm/test/parse.test.d.ts +0 -1
  878. package/node_modules/uuid/dist/esm/test/parse.test.js +0 -48
  879. package/node_modules/uuid/dist/esm/test/rng.test.d.ts +0 -1
  880. package/node_modules/uuid/dist/esm/test/rng.test.js +0 -12
  881. package/node_modules/uuid/dist/esm/test/stringify.test.d.ts +0 -1
  882. package/node_modules/uuid/dist/esm/test/stringify.test.js +0 -21
  883. package/node_modules/uuid/dist/esm/test/test_constants.d.ts +0 -33
  884. package/node_modules/uuid/dist/esm/test/test_constants.js +0 -88
  885. package/node_modules/uuid/dist/esm/test/v1.test.d.ts +0 -1
  886. package/node_modules/uuid/dist/esm/test/v1.test.js +0 -125
  887. package/node_modules/uuid/dist/esm/test/v35.test.d.ts +0 -1
  888. package/node_modules/uuid/dist/esm/test/v35.test.js +0 -141
  889. package/node_modules/uuid/dist/esm/test/v4.test.d.ts +0 -1
  890. package/node_modules/uuid/dist/esm/test/v4.test.js +0 -58
  891. package/node_modules/uuid/dist/esm/test/v6.test.d.ts +0 -1
  892. package/node_modules/uuid/dist/esm/test/v6.test.js +0 -54
  893. package/node_modules/uuid/dist/esm/test/v7.test.d.ts +0 -1
  894. package/node_modules/uuid/dist/esm/test/v7.test.js +0 -192
  895. package/node_modules/uuid/dist/esm/test/validate.test.d.ts +0 -1
  896. package/node_modules/uuid/dist/esm/test/validate.test.js +0 -11
  897. package/node_modules/uuid/dist/esm/test/version.test.d.ts +0 -1
  898. package/node_modules/uuid/dist/esm/test/version.test.js +0 -18
  899. package/node_modules/uuid/dist/esm-browser/test/parse.test.d.ts +0 -1
  900. package/node_modules/uuid/dist/esm-browser/test/parse.test.js +0 -48
  901. package/node_modules/uuid/dist/esm-browser/test/rng.test.d.ts +0 -1
  902. package/node_modules/uuid/dist/esm-browser/test/rng.test.js +0 -12
  903. package/node_modules/uuid/dist/esm-browser/test/stringify.test.d.ts +0 -1
  904. package/node_modules/uuid/dist/esm-browser/test/stringify.test.js +0 -21
  905. package/node_modules/uuid/dist/esm-browser/test/test_constants.d.ts +0 -33
  906. package/node_modules/uuid/dist/esm-browser/test/test_constants.js +0 -88
  907. package/node_modules/uuid/dist/esm-browser/test/v1.test.d.ts +0 -1
  908. package/node_modules/uuid/dist/esm-browser/test/v1.test.js +0 -125
  909. package/node_modules/uuid/dist/esm-browser/test/v35.test.d.ts +0 -1
  910. package/node_modules/uuid/dist/esm-browser/test/v35.test.js +0 -141
  911. package/node_modules/uuid/dist/esm-browser/test/v4.test.d.ts +0 -1
  912. package/node_modules/uuid/dist/esm-browser/test/v4.test.js +0 -58
  913. package/node_modules/uuid/dist/esm-browser/test/v6.test.d.ts +0 -1
  914. package/node_modules/uuid/dist/esm-browser/test/v6.test.js +0 -54
  915. package/node_modules/uuid/dist/esm-browser/test/v7.test.d.ts +0 -1
  916. package/node_modules/uuid/dist/esm-browser/test/v7.test.js +0 -192
  917. package/node_modules/uuid/dist/esm-browser/test/validate.test.d.ts +0 -1
  918. package/node_modules/uuid/dist/esm-browser/test/validate.test.js +0 -11
  919. package/node_modules/uuid/dist/esm-browser/test/version.test.d.ts +0 -1
  920. package/node_modules/uuid/dist/esm-browser/test/version.test.js +0 -18
@@ -2,6 +2,17 @@
2
2
 
3
3
  <!-- Generated by documentation.js. Update this documentation by updating the source code. -->
4
4
 
5
+ ## MoranIndex
6
+
7
+ Type: [object][1]
8
+
9
+ ### Properties
10
+
11
+ * `moranIndex` **[number][2]** the moran's Index of the observed feature set
12
+ * `expectedMoranIndex` **[number][2]** the moran's Index of the random distribution
13
+ * `stdNorm` **[number][2]** the standard devitaion of the random distribution
14
+ * `zNorm` **[number][2]** the z-score of the observe samples with regard to the random distribution
15
+
5
16
  ## moranIndex
6
17
 
7
18
  Moran's I measures patterns of attribute values associated with features.
@@ -20,22 +31,22 @@ the z-score can be calculated based on a normal or random assumption.
20
31
 
21
32
  **Bibliography**\*
22
33
 
23
- 1. [Moran's I][1]
34
+ 1. [Moran's I][3]
24
35
 
25
- 2. [pysal][2]
36
+ 2. [pysal][4]
26
37
 
27
38
  3. Andy Mitchell, The ESRI Guide to GIS Analysis Volume 2: Spatial Measurements & Statistics.
28
39
 
29
40
  ### Parameters
30
41
 
31
- * `fc` **[FeatureCollection][3]\<any>**&#x20;
32
- * `options` **[Object][4]**&#x20;
42
+ * `fc` **[FeatureCollection][5]\<any>**&#x20;
43
+ * `options` **[Object][1]**&#x20;
33
44
 
34
- * `options.inputField` **[string][5]** the property name, must contain numeric values
35
- * `options.threshold` **[number][6]** the distance threshold (optional, default `100000`)
36
- * `options.p` **[number][6]** the Minkowski p-norm distance parameter (optional, default `2`)
45
+ * `options.inputField` **[string][6]** the property name, must contain numeric values
46
+ * `options.threshold` **[number][2]** the distance threshold (optional, default `100000`)
47
+ * `options.p` **[number][2]** the Minkowski p-norm distance parameter (optional, default `2`)
37
48
  * `options.binary` **[boolean][7]** whether transfrom the distance to binary (optional, default `false`)
38
- * `options.alpha` **[number][6]** the distance decay parameter (optional, default `-1`)
49
+ * `options.alpha` **[number][2]** the distance decay parameter (optional, default `-1`)
39
50
  * `options.standardization` **[boolean][7]** wheter row standardization the distance (optional, default `true`)
40
51
 
41
52
  ### Examples
@@ -51,55 +62,22 @@ const result = turf.moranIndex(dataset, {
51
62
 
52
63
  Returns **[MoranIndex][8]**&#x20;
53
64
 
54
- ## mean
65
+ [1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
55
66
 
56
- get mean of a list
67
+ [2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
57
68
 
58
- ### Parameters
69
+ [3]: https://en.wikipedia.org/wiki/Moran%27s_I
59
70
 
60
- * `y` **[Array][9]<[number][6]>**&#x20;
71
+ [4]: http://pysal.readthedocs.io/en/latest/index.html
61
72
 
62
- Returns **[number][6]**&#x20;
73
+ [5]: https://tools.ietf.org/html/rfc7946#section-3.3
63
74
 
64
- ## variance
65
-
66
- get variance of a list
67
-
68
- ### Parameters
69
-
70
- * `y` **[Array][9]<[number][6]>**&#x20;
71
-
72
- Returns **[number][6]**&#x20;
73
-
74
- ## MoranIndex
75
-
76
- Type: [Object][4]
77
-
78
- ### Properties
79
-
80
- * `moranIndex` **[number][6]** the moran's Index of the observed feature set
81
- * `expectedMoranIndex` **[number][6]** the moran's Index of the random distribution
82
- * `stdNorm` **[number][6]** the standard devitaion of the random distribution
83
- * `zNorm` **[number][6]** the z-score of the observe samples with regard to the random distribution
84
-
85
- [1]: https://en.wikipedia.org/wiki/Moran%27s_I
86
-
87
- [2]: http://pysal.readthedocs.io/en/latest/index.html
88
-
89
- [3]: https://tools.ietf.org/html/rfc7946#section-3.3
90
-
91
- [4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
92
-
93
- [5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
94
-
95
- [6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
75
+ [6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
96
76
 
97
77
  [7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
98
78
 
99
79
  [8]: #moranindex
100
80
 
101
- [9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
102
-
103
81
  <!-- 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. -->
104
82
 
105
83
  ---
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"names":["moranIndex"],"mappings":";AACA,SAAS,kBAAkB,qBAAqB;AAChD,SAAS,mBAAmB;AA6C5B,SAAS,WACP,IACA,SAaA;AA9DF;AA+DE,QAAM,aAAa,QAAQ;AAC3B,QAAM,YAAY,QAAQ,aAAa;AACvC,QAAM,IAAI,QAAQ,KAAK;AACvB,QAAM,UAAS,aAAQ,WAAR,YAAkB;AACjC,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,mBAAkB,aAAQ,oBAAR,YAA2B;AAEnD,QAAM,SAAS,cAAc,IAAI;AAAA,IAC/B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,IAAc,CAAC;AACrB,cAAY,IAAI,CAAC,YAAY;AAC3B,UAAM,gBAAgB,QAAQ,cAAc,CAAC;AAE7C,MAAE,KAAK,cAAc,UAAU,CAAC;AAAA,EAClC,CAAC;AAED,QAAM,QAAQ,KAAK,CAAC;AACpB,QAAM,OAAO,SAAS,CAAC;AACvB,MAAI,YAAY;AAChB,MAAI,KAAK;A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\nimport { distanceWeight as spatialWeight } from \"@turf/distance-weight\";\nimport { featureEach } from \"@turf/meta\";\n\n/**\n * Moran's I measures patterns of attribute values associated with features.\n * The method reveal whether similar values tend to occur near each other,\n * or whether high or low values are interspersed.\n *\n * Moran's I > 0 means a clusterd pattern.\n * Moran's I < 0 means a dispersed pattern.\n * Moran's I = 0 means a random pattern.\n *\n * In order to test the significance of the result. The z score is calculated.\n * A positive enough z-score (ex. >1.96) indicates clustering,\n * while a negative enough z-score (ex. <-1.96) indicates a dispersed pattern.\n *\n * the z-score can be calculated based on a normal or random assumption.\n *\n * **Bibliography***\n *\n * 1. [Moran's I](https://en.wikipedia.org/wiki/Moran%27s_I)\n *\n * 2. [pysal](http://pysal.readthedocs.io/en/latest/index.html)\n *\n * 3. Andy Mitchell, The ESRI Guide to GIS Analysis Volume 2: Spatial Measurements & Statistics.\n *\n * @name moranIndex\n * @param {FeatureCollection<any>} fc\n * @param {Object} options\n * @param {string} options.inputField the property name, must contain numeric values\n * @param {number} [options.threshold=100000] the distance threshold\n * @param {number} [options.p=2] the Minkowski p-norm distance parameter\n * @param {boolean} [options.binary=false] whether transfrom the distance to binary\n * @param {number} [options.alpha=-1] the distance decay parameter\n * @param {boolean} [options.standardization=true] wheter row standardization the distance\n * @returns {MoranIndex}\n * @example\n *\n * const bbox = [-65, 40, -63, 42];\n * const dataset = turf.randomPoint(100, { bbox: bbox });\n *\n * const result = turf.moranIndex(dataset, {\n * inputField: 'CRIME',\n * });\n */\n\nfunction moranIndex(\n fc: FeatureCollection<any>,\n options: {\n inputField: string;\n threshold?: number;\n p?: number;\n binary?: boolean;\n alpha?: number;\n standardization?: boolean;\n }\n): {\n moranIndex: number;\n expectedMoranIndex: number;\n stdNorm: number;\n zNorm: number;\n} {\n const inputField = options.inputField;\n const threshold = options.threshold || 100000;\n const p = options.p || 2;\n const binary = options.binary ?? false;\n const alpha = options.alpha || -1;\n const standardization = options.standardization ?? true;\n\n const weight = spatialWeight(fc, {\n alpha,\n binary,\n p,\n standardization,\n threshold,\n });\n\n const y: number[] = [];\n featureEach(fc, (feature) => {\n const feaProperties = feature.properties || {};\n // validate inputField exists\n y.push(feaProperties[inputField]);\n });\n\n const yMean = mean(y);\n const yVar = variance(y);\n let weightSum = 0;\n let s0 = 0;\n let s1 = 0;\n let s2 = 0;\n const n = weight.length;\n // validate y.length is the same as weight.length\n for (let i = 0; i < n; i++) {\n let subS2 = 0;\n for (let j = 0; j < n; j++) {\n weightSum += weight[i][j] * (y[i] - yMean) * (y[j] - yMean);\n s0 += weight[i][j];\n s1 += Math.pow(weight[i][j] + weight[j][i], 2);\n subS2 += weight[i][j] + weight[j][i];\n }\n s2 += Math.pow(subS2, 2);\n }\n s1 = 0.5 * s1;\n\n const moranIndex = weightSum / s0 / yVar;\n const expectedMoranIndex = -1 / (n - 1);\n const vNum = n * n * s1 - n * s2 + 3 * (s0 * s0);\n const vDen = (n - 1) * (n + 1) * (s0 * s0);\n const vNorm = vNum / vDen - expectedMoranIndex * expectedMoranIndex;\n const stdNorm = Math.sqrt(vNorm);\n const zNorm = (moranIndex - expectedMoranIndex) / stdNorm;\n\n return {\n expectedMoranIndex,\n moranIndex,\n stdNorm,\n zNorm,\n };\n}\n\n/**\n * get mean of a list\n * @param {number[]} y\n * @returns {number}\n *\n */\nfunction mean(y: number[]): number {\n let sum = 0;\n for (const item of y) {\n sum += item;\n }\n return sum / y.length;\n}\n/**\n * get variance of a list\n * @param {number[]} y\n * @returns {number}\n *\n */\nfunction variance(y: number[]): number {\n const yMean = mean(y);\n let sum = 0;\n for (const item of y) {\n sum += Math.pow(item - yMean, 2);\n }\n return sum / y.length;\n}\n\n/**\n * @typedef {Object} MoranIndex\n * @property {number} moranIndex the moran's Index of the observed feature set\n * @property {number} expectedMoranIndex the moran's Index of the random distribution\n * @property {number} stdNorm the standard devitaion of the random distribution\n * @property {number} zNorm the z-score of the observe samples with regard to the random distribution\n */\n\nexport { moranIndex };\nexport default moranIndex;\n"]}
1
+ {"version":3,"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from \"geojson\";\nimport { distanceWeight as spatialWeight } from \"@turf/distance-weight\";\nimport { featureEach } from \"@turf/meta\";\n\n/**\n * @typedef {object} MoranIndex\n * @property {number} moranIndex the moran's Index of the observed feature set\n * @property {number} expectedMoranIndex the moran's Index of the random distribution\n * @property {number} stdNorm the standard devitaion of the random distribution\n * @property {number} zNorm the z-score of the observe samples with regard to the random distribution\n */\ntype MoranIndex = {\n moranIndex: number;\n expectedMoranIndex: number;\n stdNorm: number;\n zNorm: number;\n};\n\n/**\n * Moran's I measures patterns of attribute values associated with features.\n * The method reveal whether similar values tend to occur near each other,\n * or whether high or low values are interspersed.\n *\n * Moran's I > 0 means a clusterd pattern.\n * Moran's I < 0 means a dispersed pattern.\n * Moran's I = 0 means a random pattern.\n *\n * In order to test the significance of the result. The z score is calculated.\n * A positive enough z-score (ex. >1.96) indicates clustering,\n * while a negative enough z-score (ex. <-1.96) indicates a dispersed pattern.\n *\n * the z-score can be calculated based on a normal or random assumption.\n *\n * **Bibliography***\n *\n * 1. [Moran's I](https://en.wikipedia.org/wiki/Moran%27s_I)\n *\n * 2. [pysal](http://pysal.readthedocs.io/en/latest/index.html)\n *\n * 3. Andy Mitchell, The ESRI Guide to GIS Analysis Volume 2: Spatial Measurements & Statistics.\n *\n * @function\n * @param {FeatureCollection<any>} fc\n * @param {Object} options\n * @param {string} options.inputField the property name, must contain numeric values\n * @param {number} [options.threshold=100000] the distance threshold\n * @param {number} [options.p=2] the Minkowski p-norm distance parameter\n * @param {boolean} [options.binary=false] whether transfrom the distance to binary\n * @param {number} [options.alpha=-1] the distance decay parameter\n * @param {boolean} [options.standardization=true] wheter row standardization the distance\n * @returns {MoranIndex}\n * @example\n *\n * const bbox = [-65, 40, -63, 42];\n * const dataset = turf.randomPoint(100, { bbox: bbox });\n *\n * const result = turf.moranIndex(dataset, {\n * inputField: 'CRIME',\n * });\n */\n\nfunction moranIndex(\n fc: FeatureCollection<any>,\n options: {\n inputField: string;\n threshold?: number;\n p?: number;\n binary?: boolean;\n alpha?: number;\n standardization?: boolean;\n }\n): MoranIndex {\n const inputField = options.inputField;\n const threshold = options.threshold || 100000;\n const p = options.p || 2;\n const binary = options.binary ?? false;\n const alpha = options.alpha || -1;\n const standardization = options.standardization ?? true;\n\n const weight = spatialWeight(fc, {\n alpha,\n binary,\n p,\n standardization,\n threshold,\n });\n\n const y: number[] = [];\n featureEach(fc, (feature) => {\n const feaProperties = feature.properties || {};\n // validate inputField exists\n y.push(feaProperties[inputField]);\n });\n\n const yMean = mean(y);\n const yVar = variance(y);\n let weightSum = 0;\n let s0 = 0;\n let s1 = 0;\n let s2 = 0;\n const n = weight.length;\n // validate y.length is the same as weight.length\n for (let i = 0; i < n; i++) {\n let subS2 = 0;\n for (let j = 0; j < n; j++) {\n weightSum += weight[i][j] * (y[i] - yMean) * (y[j] - yMean);\n s0 += weight[i][j];\n s1 += Math.pow(weight[i][j] + weight[j][i], 2);\n subS2 += weight[i][j] + weight[j][i];\n }\n s2 += Math.pow(subS2, 2);\n }\n s1 = 0.5 * s1;\n\n const moranIndex = weightSum / s0 / yVar;\n const expectedMoranIndex = -1 / (n - 1);\n const vNum = n * n * s1 - n * s2 + 3 * (s0 * s0);\n const vDen = (n - 1) * (n + 1) * (s0 * s0);\n const vNorm = vNum / vDen - expectedMoranIndex * expectedMoranIndex;\n const stdNorm = Math.sqrt(vNorm);\n const zNorm = (moranIndex - expectedMoranIndex) / stdNorm;\n\n return {\n expectedMoranIndex,\n moranIndex,\n stdNorm,\n zNorm,\n };\n}\n\n/**\n * get mean of a list\n *\n * @private\n * @param {number[]} y\n * @returns {number}\n *\n */\nfunction mean(y: number[]): number {\n let sum = 0;\n for (const item of y) {\n sum += item;\n }\n return sum / y.length;\n}\n/**\n * get variance of a list\n *\n * @private\n * @param {number[]} y\n * @returns {number}\n *\n */\nfunction variance(y: number[]): number {\n const yMean = mean(y);\n let sum = 0;\n for (const item of y) {\n sum += Math.pow(item - yMean, 2);\n }\n return sum / y.length;\n}\n\nexport { moranIndex, MoranIndex };\nexport default moranIndex;\n"]}
@@ -1,5 +1,18 @@
1
1
  import { FeatureCollection } from 'geojson';
2
2
 
3
+ /**
4
+ * @typedef {object} MoranIndex
5
+ * @property {number} moranIndex the moran's Index of the observed feature set
6
+ * @property {number} expectedMoranIndex the moran's Index of the random distribution
7
+ * @property {number} stdNorm the standard devitaion of the random distribution
8
+ * @property {number} zNorm the z-score of the observe samples with regard to the random distribution
9
+ */
10
+ type MoranIndex = {
11
+ moranIndex: number;
12
+ expectedMoranIndex: number;
13
+ stdNorm: number;
14
+ zNorm: number;
15
+ };
3
16
  /**
4
17
  * Moran's I measures patterns of attribute values associated with features.
5
18
  * The method reveal whether similar values tend to occur near each other,
@@ -23,7 +36,7 @@ import { FeatureCollection } from 'geojson';
23
36
  *
24
37
  * 3. Andy Mitchell, The ESRI Guide to GIS Analysis Volume 2: Spatial Measurements & Statistics.
25
38
  *
26
- * @name moranIndex
39
+ * @function
27
40
  * @param {FeatureCollection<any>} fc
28
41
  * @param {Object} options
29
42
  * @param {string} options.inputField the property name, must contain numeric values
@@ -49,11 +62,6 @@ declare function moranIndex(fc: FeatureCollection<any>, options: {
49
62
  binary?: boolean;
50
63
  alpha?: number;
51
64
  standardization?: boolean;
52
- }): {
53
- moranIndex: number;
54
- expectedMoranIndex: number;
55
- stdNorm: number;
56
- zNorm: number;
57
- };
65
+ }): MoranIndex;
58
66
 
59
- export { moranIndex as default, moranIndex };
67
+ export { type MoranIndex, moranIndex as default, moranIndex };
@@ -1,5 +1,18 @@
1
1
  import { FeatureCollection } from 'geojson';
2
2
 
3
+ /**
4
+ * @typedef {object} MoranIndex
5
+ * @property {number} moranIndex the moran's Index of the observed feature set
6
+ * @property {number} expectedMoranIndex the moran's Index of the random distribution
7
+ * @property {number} stdNorm the standard devitaion of the random distribution
8
+ * @property {number} zNorm the z-score of the observe samples with regard to the random distribution
9
+ */
10
+ type MoranIndex = {
11
+ moranIndex: number;
12
+ expectedMoranIndex: number;
13
+ stdNorm: number;
14
+ zNorm: number;
15
+ };
3
16
  /**
4
17
  * Moran's I measures patterns of attribute values associated with features.
5
18
  * The method reveal whether similar values tend to occur near each other,
@@ -23,7 +36,7 @@ import { FeatureCollection } from 'geojson';
23
36
  *
24
37
  * 3. Andy Mitchell, The ESRI Guide to GIS Analysis Volume 2: Spatial Measurements & Statistics.
25
38
  *
26
- * @name moranIndex
39
+ * @function
27
40
  * @param {FeatureCollection<any>} fc
28
41
  * @param {Object} options
29
42
  * @param {string} options.inputField the property name, must contain numeric values
@@ -49,11 +62,6 @@ declare function moranIndex(fc: FeatureCollection<any>, options: {
49
62
  binary?: boolean;
50
63
  alpha?: number;
51
64
  standardization?: boolean;
52
- }): {
53
- moranIndex: number;
54
- expectedMoranIndex: number;
55
- stdNorm: number;
56
- zNorm: number;
57
- };
65
+ }): MoranIndex;
58
66
 
59
- export { moranIndex as default, moranIndex };
67
+ export { type MoranIndex, moranIndex as default, moranIndex };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { FeatureCollection } from \"geojson\";\nimport { distanceWeight as spatialWeight } from \"@turf/distance-weight\";\nimport { featureEach } from \"@turf/meta\";\n\n/**\n * Moran's I measures patterns of attribute values associated with features.\n * The method reveal whether similar values tend to occur near each other,\n * or whether high or low values are interspersed.\n *\n * Moran's I > 0 means a clusterd pattern.\n * Moran's I < 0 means a dispersed pattern.\n * Moran's I = 0 means a random pattern.\n *\n * In order to test the significance of the result. The z score is calculated.\n * A positive enough z-score (ex. >1.96) indicates clustering,\n * while a negative enough z-score (ex. <-1.96) indicates a dispersed pattern.\n *\n * the z-score can be calculated based on a normal or random assumption.\n *\n * **Bibliography***\n *\n * 1. [Moran's I](https://en.wikipedia.org/wiki/Moran%27s_I)\n *\n * 2. [pysal](http://pysal.readthedocs.io/en/latest/index.html)\n *\n * 3. Andy Mitchell, The ESRI Guide to GIS Analysis Volume 2: Spatial Measurements & Statistics.\n *\n * @name moranIndex\n * @param {FeatureCollection<any>} fc\n * @param {Object} options\n * @param {string} options.inputField the property name, must contain numeric values\n * @param {number} [options.threshold=100000] the distance threshold\n * @param {number} [options.p=2] the Minkowski p-norm distance parameter\n * @param {boolean} [options.binary=false] whether transfrom the distance to binary\n * @param {number} [options.alpha=-1] the distance decay parameter\n * @param {boolean} [options.standardization=true] wheter row standardization the distance\n * @returns {MoranIndex}\n * @example\n *\n * const bbox = [-65, 40, -63, 42];\n * const dataset = turf.randomPoint(100, { bbox: bbox });\n *\n * const result = turf.moranIndex(dataset, {\n * inputField: 'CRIME',\n * });\n */\n\nfunction moranIndex(\n fc: FeatureCollection<any>,\n options: {\n inputField: string;\n threshold?: number;\n p?: number;\n binary?: boolean;\n alpha?: number;\n standardization?: boolean;\n }\n): {\n moranIndex: number;\n expectedMoranIndex: number;\n stdNorm: number;\n zNorm: number;\n} {\n const inputField = options.inputField;\n const threshold = options.threshold || 100000;\n const p = options.p || 2;\n const binary = options.binary ?? false;\n const alpha = options.alpha || -1;\n const standardization = options.standardization ?? true;\n\n const weight = spatialWeight(fc, {\n alpha,\n binary,\n p,\n standardization,\n threshold,\n });\n\n const y: number[] = [];\n featureEach(fc, (feature) => {\n const feaProperties = feature.properties || {};\n // validate inputField exists\n y.push(feaProperties[inputField]);\n });\n\n const yMean = mean(y);\n const yVar = variance(y);\n let weightSum = 0;\n let s0 = 0;\n let s1 = 0;\n let s2 = 0;\n const n = weight.length;\n // validate y.length is the same as weight.length\n for (let i = 0; i < n; i++) {\n let subS2 = 0;\n for (let j = 0; j < n; j++) {\n weightSum += weight[i][j] * (y[i] - yMean) * (y[j] - yMean);\n s0 += weight[i][j];\n s1 += Math.pow(weight[i][j] + weight[j][i], 2);\n subS2 += weight[i][j] + weight[j][i];\n }\n s2 += Math.pow(subS2, 2);\n }\n s1 = 0.5 * s1;\n\n const moranIndex = weightSum / s0 / yVar;\n const expectedMoranIndex = -1 / (n - 1);\n const vNum = n * n * s1 - n * s2 + 3 * (s0 * s0);\n const vDen = (n - 1) * (n + 1) * (s0 * s0);\n const vNorm = vNum / vDen - expectedMoranIndex * expectedMoranIndex;\n const stdNorm = Math.sqrt(vNorm);\n const zNorm = (moranIndex - expectedMoranIndex) / stdNorm;\n\n return {\n expectedMoranIndex,\n moranIndex,\n stdNorm,\n zNorm,\n };\n}\n\n/**\n * get mean of a list\n * @param {number[]} y\n * @returns {number}\n *\n */\nfunction mean(y: number[]): number {\n let sum = 0;\n for (const item of y) {\n sum += item;\n }\n return sum / y.length;\n}\n/**\n * get variance of a list\n * @param {number[]} y\n * @returns {number}\n *\n */\nfunction variance(y: number[]): number {\n const yMean = mean(y);\n let sum = 0;\n for (const item of y) {\n sum += Math.pow(item - yMean, 2);\n }\n return sum / y.length;\n}\n\n/**\n * @typedef {Object} MoranIndex\n * @property {number} moranIndex the moran's Index of the observed feature set\n * @property {number} expectedMoranIndex the moran's Index of the random distribution\n * @property {number} stdNorm the standard devitaion of the random distribution\n * @property {number} zNorm the z-score of the observe samples with regard to the random distribution\n */\n\nexport { moranIndex };\nexport default moranIndex;\n"],"mappings":";AACA,SAAS,kBAAkB,qBAAqB;AAChD,SAAS,mBAAmB;AA6C5B,SAAS,WACP,IACA,SAaA;AA9DF;AA+DE,QAAM,aAAa,QAAQ;AAC3B,QAAM,YAAY,QAAQ,aAAa;AACvC,QAAM,IAAI,QAAQ,KAAK;AACvB,QAAM,UAAS,aAAQ,WAAR,YAAkB;AACjC,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,mBAAkB,aAAQ,oBAAR,YAA2B;AAEnD,QAAM,SAAS,cAAc,IAAI;AAAA,IAC/B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,IAAc,CAAC;AACrB,cAAY,IAAI,CAAC,YAAY;AAC3B,UAAM,gBAAgB,QAAQ,cAAc,CAAC;AAE7C,MAAE,KAAK,cAAc,UAAU,CAAC;AAAA,EAClC,CAAC;AAED,QAAM,QAAQ,KAAK,CAAC;AAC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,EAAE;AACjB;AAWA,IAAO,2BAAQ;","names":["moranIndex"]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { FeatureCollection } from \"geojson\";\nimport { distanceWeight as spatialWeight } from \"@turf/distance-weight\";\nimport { featureEach } from \"@turf/meta\";\n\n/**\n * @typedef {object} MoranIndex\n * @property {number} moranIndex the moran's Index of the observed feature set\n * @property {number} expectedMoranIndex the moran's Index of the random distribution\n * @property {number} stdNorm the standard devitaion of the random distribution\n * @property {number} zNorm the z-score of the observe samples with regard to the random distribution\n */\ntype MoranIndex = {\n moranIndex: number;\n expectedMoranIndex: number;\n stdNorm: number;\n zNorm: number;\n};\n\n/**\n * Moran's I measures patterns of attribute values associated with features.\n * The method reveal whether similar values tend to occur near each other,\n * or whether high or low values are interspersed.\n *\n * Moran's I > 0 means a clusterd pattern.\n * Moran's I < 0 means a dispersed pattern.\n * Moran's I = 0 means a random pattern.\n *\n * In order to test the significance of the result. The z score is calculated.\n * A positive enough z-score (ex. >1.96) indicates clustering,\n * while a negative enough z-score (ex. <-1.96) indicates a dispersed pattern.\n *\n * the z-score can be calculated based on a normal or random assumption.\n *\n * **Bibliography***\n *\n * 1. [Moran's I](https://en.wikipedia.org/wiki/Moran%27s_I)\n *\n * 2. [pysal](http://pysal.readthedocs.io/en/latest/index.html)\n *\n * 3. Andy Mitchell, The ESRI Guide to GIS Analysis Volume 2: Spatial Measurements & Statistics.\n *\n * @function\n * @param {FeatureCollection<any>} fc\n * @param {Object} options\n * @param {string} options.inputField the property name, must contain numeric values\n * @param {number} [options.threshold=100000] the distance threshold\n * @param {number} [options.p=2] the Minkowski p-norm distance parameter\n * @param {boolean} [options.binary=false] whether transfrom the distance to binary\n * @param {number} [options.alpha=-1] the distance decay parameter\n * @param {boolean} [options.standardization=true] wheter row standardization the distance\n * @returns {MoranIndex}\n * @example\n *\n * const bbox = [-65, 40, -63, 42];\n * const dataset = turf.randomPoint(100, { bbox: bbox });\n *\n * const result = turf.moranIndex(dataset, {\n * inputField: 'CRIME',\n * });\n */\n\nfunction moranIndex(\n fc: FeatureCollection<any>,\n options: {\n inputField: string;\n threshold?: number;\n p?: number;\n binary?: boolean;\n alpha?: number;\n standardization?: boolean;\n }\n): MoranIndex {\n const inputField = options.inputField;\n const threshold = options.threshold || 100000;\n const p = options.p || 2;\n const binary = options.binary ?? false;\n const alpha = options.alpha || -1;\n const standardization = options.standardization ?? true;\n\n const weight = spatialWeight(fc, {\n alpha,\n binary,\n p,\n standardization,\n threshold,\n });\n\n const y: number[] = [];\n featureEach(fc, (feature) => {\n const feaProperties = feature.properties || {};\n // validate inputField exists\n y.push(feaProperties[inputField]);\n });\n\n const yMean = mean(y);\n const yVar = variance(y);\n let weightSum = 0;\n let s0 = 0;\n let s1 = 0;\n let s2 = 0;\n const n = weight.length;\n // validate y.length is the same as weight.length\n for (let i = 0; i < n; i++) {\n let subS2 = 0;\n for (let j = 0; j < n; j++) {\n weightSum += weight[i][j] * (y[i] - yMean) * (y[j] - yMean);\n s0 += weight[i][j];\n s1 += Math.pow(weight[i][j] + weight[j][i], 2);\n subS2 += weight[i][j] + weight[j][i];\n }\n s2 += Math.pow(subS2, 2);\n }\n s1 = 0.5 * s1;\n\n const moranIndex = weightSum / s0 / yVar;\n const expectedMoranIndex = -1 / (n - 1);\n const vNum = n * n * s1 - n * s2 + 3 * (s0 * s0);\n const vDen = (n - 1) * (n + 1) * (s0 * s0);\n const vNorm = vNum / vDen - expectedMoranIndex * expectedMoranIndex;\n const stdNorm = Math.sqrt(vNorm);\n const zNorm = (moranIndex - expectedMoranIndex) / stdNorm;\n\n return {\n expectedMoranIndex,\n moranIndex,\n stdNorm,\n zNorm,\n };\n}\n\n/**\n * get mean of a list\n *\n * @private\n * @param {number[]} y\n * @returns {number}\n *\n */\nfunction mean(y: number[]): number {\n let sum = 0;\n for (const item of y) {\n sum += item;\n }\n return sum / y.length;\n}\n/**\n * get variance of a list\n *\n * @private\n * @param {number[]} y\n * @returns {number}\n *\n */\nfunction variance(y: number[]): number {\n const yMean = mean(y);\n let sum = 0;\n for (const item of y) {\n sum += Math.pow(item - yMean, 2);\n }\n return sum / y.length;\n}\n\nexport { moranIndex, MoranIndex };\nexport default moranIndex;\n"],"mappings":";AACA,SAAS,kBAAkB,qBAAqB;AAChD,SAAS,mBAAmB;AA2D5B,SAAS,WACP,IACA,SAQY;AAvEd;AAwEE,QAAM,aAAa,QAAQ;AAC3B,QAAM,YAAY,QAAQ,aAAa;AACvC,QAAM,IAAI,QAAQ,KAAK;AACvB,QAAM,UAAS,aAAQ,WAAR,YAAkB;AACjC,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,mBAAkB,aAAQ,oBAAR,YAA2B;AAEnD,QAAM,SAAS,cAAc,IAAI;AAAA,IAC/B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,IAAc,CAAC;AACrB,cAAY,IAAI,CAAC,YAAY;AAC3B,UAAM,gBAAgB,QAAQ,cAAc,CAAC;AAE7C,MAAE,KAAK,cAAc,UAAU,CAAC;AAAA,EAClC,CAAC;AAED,QAAM,QAAQ,KAAK,CAAC;AACpB,QAAM,OAAO,SAAS,CAAC;AACvB,MAAI,YAAY;AAChB,MAAI,KAAK;AACT,MAAI,KAAK;AACT,MAAI,KAAK;AACT,QAAM,IAAI,OAAO;AAEjB,WAAS,IAAI,GAAG,IAAI,GAAG,KAAK;AAC1B,QAAI,QAAQ;AACZ,aAAS,IAAI,GAAG,IAAI,GAAG,KAAK;AAC1B,mBAAa,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,IAAI,UAAU,EAAE,CAAC,IAAI;AACrD,YAAM,OAAO,CAAC,EAAE,CAAC;AACjB,YAAM,KAAK,IAAI,OAAO,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC;AAC7C,eAAS,OAAO,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,EAAE,CAAC;AAAA,IACrC;AACA,UAAM,KAAK,IAAI,OAAO,CAAC;AAAA,EACzB;AACA,OAAK,MAAM;AAEX,QAAMA,cAAa,YAAY,KAAK;AACpC,QAAM,qBAAqB,MAAM,IAAI;AACrC,QAAM,OAAO,IAAI,IAAI,KAAK,IAAI,KAAK,KAAK,KAAK;AAC7C,QAAM,QAAQ,IAAI,MAAM,IAAI,MAAM,KAAK;AACvC,QAAM,QAAQ,OAAO,OAAO,qBAAqB;AACjD,QAAM,UAAU,KAAK,KAAK,KAAK;AAC/B,QAAM,SAASA,cAAa,sBAAsB;AAElD,SAAO;AAAA,IACL;AAAA,IACA,YAAAA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAUA,SAAS,KAAK,GAAqB;AACjC,MAAI,MAAM;AACV,aAAW,QAAQ,GAAG;AACpB,WAAO;AAAA,EACT;AACA,SAAO,MAAM,EAAE;AACjB;AASA,SAAS,SAAS,GAAqB;AACrC,QAAM,QAAQ,KAAK,CAAC;AACpB,MAAI,MAAM;AACV,aAAW,QAAQ,GAAG;AACpB,WAAO,KAAK,IAAI,OAAO,OAAO,CAAC;AAAA,EACjC;AACA,SAAO,MAAM,EAAE;AACjB;AAGA,IAAO,2BAAQ;","names":["moranIndex"]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/moran-index",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "turf moran-index module",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
@@ -53,22 +53,22 @@
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/benchmark": "^2.1.5",
56
- "@types/tape": "^4.2.32",
56
+ "@types/tape": "^4.13.4",
57
57
  "benchmark": "^2.1.4",
58
58
  "load-json-file": "^7.0.1",
59
59
  "npm-run-all": "^4.1.5",
60
- "tape": "^5.7.2",
61
- "tsup": "^8.0.1",
62
- "tsx": "^4.6.2",
63
- "typescript": "^5.2.2",
60
+ "tape": "^5.9.0",
61
+ "tsup": "^8.3.5",
62
+ "tsx": "^4.19.2",
63
+ "typescript": "^5.5.4",
64
64
  "write-json-file": "^5.0.0"
65
65
  },
66
66
  "dependencies": {
67
- "@turf/distance-weight": "^7.1.0",
68
- "@turf/helpers": "^7.1.0",
69
- "@turf/meta": "^7.1.0",
67
+ "@turf/distance-weight": "^7.2.0",
68
+ "@turf/helpers": "^7.2.0",
69
+ "@turf/meta": "^7.2.0",
70
70
  "@types/geojson": "^7946.0.10",
71
- "tslib": "^2.6.2"
71
+ "tslib": "^2.8.1"
72
72
  },
73
- "gitHead": "68915eeebc9278bb40dec3f1034499698a0561ef"
73
+ "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
74
74
  }
@@ -2,16 +2,42 @@
2
2
 
3
3
  <!-- Generated by documentation.js. Update this documentation by updating the source code. -->
4
4
 
5
+ ## NearestNeighborStatistics
6
+
7
+ Nearest neighbour statistics.
8
+
9
+ Type: [object][1]
10
+
11
+ ### Properties
12
+
13
+ * `arealUnits` **[string][2]**&#x20;
14
+ * `observedMeanDistance` **[number][3]**&#x20;
15
+ * `expectedMeanDistance` **[number][3]**&#x20;
16
+ * `numberOfPoints` **[number][3]**&#x20;
17
+ * `zScore` **[number][3]**&#x20;
18
+
19
+ ## NearestNeighborStudyArea
20
+
21
+ Nearest neighbour study area polygon feature.
22
+
23
+ Type: [object][1]
24
+
25
+ ### Properties
26
+
27
+ * `properties` **[GeoJsonProperties][4]**&#x20;
28
+
29
+ * `properties.nearestNeighborAnalysis` **[NearestNeighborStatistics][5]**&#x20;
30
+
5
31
  ## nearestNeighborAnalysis
6
32
 
7
33
  Nearest Neighbor Analysis calculates an index based the average distances
8
34
  between points in the dataset, thereby providing inference as to whether the
9
35
  data is clustered, dispersed, or randomly distributed within the study area.
10
36
 
11
- It returns a [Feature\<Polygon>][1] of the study area, with the results of
37
+ It returns a [Feature][4]<[Polygon][6]> of the study area, with the results of
12
38
  the analysis attached as part of of the `nearestNeighborAnalysis` property
13
39
  of the study area's `properties`. The attached
14
- [*z*-score][2] indicates how many
40
+ [*z*-score][7] indicates how many
15
41
  standard deviations above or below the expected mean distance the data's
16
42
  observed mean distance is. The more negative, the more clustered. The more
17
43
  positive, the more evenly dispersed. A *z*-score between -2 and 2 indicates
@@ -21,11 +47,11 @@ dispersed.
21
47
 
22
48
  **Remarks**
23
49
 
24
- * Though the analysis will work on any [FeatureCollection][3] type, it
25
- works best with [Point][4] collections.
50
+ * Though the analysis will work on any [FeatureCollection][8] type, it
51
+ works best with [Point][9] collections.
26
52
 
27
53
  * This analysis is *very* sensitive to the study area provided.
28
- If no [Feature\<Polygon>][1] is passed as the study area, the function draws a box
54
+ If no [Feature][4]<[Polygon][6]> is passed as the study area, the function draws a box
29
55
  around the data, which may distort the findings. This analysis works best
30
56
  with a bounded area of interest within with the data is either clustered,
31
57
  dispersed, or randomly distributed. For example, a city's subway stops may
@@ -37,16 +63,15 @@ dispersed.
37
63
 
38
64
  Philip J. Clark and Francis C. Evans, “Distance to Nearest Neighbor as a
39
65
  Measure of Spatial Relationships in Populations,” *Ecology* 35, no. 4
40
- (1954): 445–453, doi:[10.2307/1931034][5].
66
+ (1954): 445–453, doi:[10.2307/1931034][10].
41
67
 
42
68
  ### Parameters
43
69
 
44
- * `dataset` **[FeatureCollection][3]\<any>** FeatureCollection (pref. of points) to study
45
- * `options` **[Object][6]** Optional parameters (optional, default `{}`)
70
+ * `dataset` **[FeatureCollection][8]\<any>** FeatureCollection (pref. of points) to study
71
+ * `options` **[Object][1]** Optional parameters (optional, default `{}`)
46
72
 
47
- * `options.studyArea` **[Feature][7]<[Polygon][8]>?** polygon representing the study area
48
- * `options.units` **[string][9]** unit of measurement for distances and, squared, area. (optional, default `'kilometers'`)
49
- * `options.properties` **[Object][6]** properties (optional, default `{}`)
73
+ * `options.studyArea` **[Feature][4]<[Polygon][6]>?** polygon representing the study area
74
+ * `options.properties` **[GeoJsonProperties][4]** properties (optional, default `{}`)
50
75
 
51
76
  ### Examples
52
77
 
@@ -59,25 +84,29 @@ var nearestNeighborStudyArea = turf.nearestNeighborAnalysis(dataset);
59
84
  var addToMap = [dataset, nearestNeighborStudyArea];
60
85
  ```
61
86
 
62
- Returns **[Feature][7]<[Polygon][8]>** A polygon of the study area or an approximation of one.
87
+ Returns **[NearestNeighborStudyArea][11]** A polygon of the study area or an approximation of one.
88
+
89
+ [1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
90
+
91
+ [2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
63
92
 
64
- [1]: Feature<Polygon>
93
+ [3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
65
94
 
66
- [2]: https://en.wikipedia.org/wiki/Standard_score
95
+ [4]: https://tools.ietf.org/html/rfc7946#section-3.2
67
96
 
68
- [3]: https://tools.ietf.org/html/rfc7946#section-3.3
97
+ [5]: #nearestneighborstatistics
69
98
 
70
- [4]: https://tools.ietf.org/html/rfc7946#section-3.1.2
99
+ [6]: https://tools.ietf.org/html/rfc7946#section-3.1.6
71
100
 
72
- [5]: http://doi.org/10.2307/1931034
101
+ [7]: https://en.wikipedia.org/wiki/Standard_score
73
102
 
74
- [6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
103
+ [8]: https://tools.ietf.org/html/rfc7946#section-3.3
75
104
 
76
- [7]: https://tools.ietf.org/html/rfc7946#section-3.2
105
+ [9]: https://tools.ietf.org/html/rfc7946#section-3.1.2
77
106
 
78
- [8]: https://tools.ietf.org/html/rfc7946#section-3.1.6
107
+ [10]: http://doi.org/10.2307/1931034
79
108
 
80
- [9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
109
+ [11]: #nearestneighborstudyarea
81
110
 
82
111
  <!-- 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. -->
83
112
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"names":[],"mappings":";AAOA,SA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yCAAQ","sourcesContent":["import {\n FeatureCollection,\n Feature,\n Point,\n Polygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { area } from \"@turf/area\";\nimport { bbox } from \"@turf/bbox\";\nimport { bboxPolygon } from \"@turf/bbox-polygon\";\nimport { centroid } from \"@turf/centroid\";\nimport { distance } from \"@turf/distance\";\nimport { nearestPoint } from \"@turf/nearest-point\";\nimport { featureEach } from \"@turf/meta\";\nimport {\n convertArea,\n featureCollection,\n Units,\n AreaUnits,\n} from \"@turf/helpers\";\n\ninterface NearestNeighborStatistics {\n units: Units & AreaUnits;\n arealUnits: string;\n observedMeanDistance: number;\n expectedMeanDistance: number;\n numberOfPoints: number;\n zScore: number;\n}\n\ninterface NearestNeighborStudyArea extends Feature<Polygon> {\n properties: {\n nearestNeighborAnalysis: NearestNeighborStatistics;\n [key: string]: any;\n };\n}\n\n/**\n * Nearest Neighbor Analysis calculates an index based the average distances\n * between points in the dataset, thereby providing inference as to whether the\n * data is clustered, dispersed, or randomly distributed within the study area.\n *\n * It returns a {@link Feature<Polygon>} of the study area, with the results of\n * the analysis attached as part of of the `nearestNeighborAnalysis` property\n * of the study area's `properties`. The attached\n * [_z_-score](https://en.wikipedia.org/wiki/Standard_score) indicates how many\n * standard deviations above or below the expected mean distance the data's\n * observed mean distance is. The more negative, the more clustered. The more\n * positive, the more evenly dispersed. A _z_-score between -2 and 2 indicates\n * a seemingly random distribution. That is, within _p_ of less than 0.05, the\n * distribution appears statistically significantly neither clustered nor\n * dispersed.\n *\n * **Remarks**\n *\n * - Though the analysis will work on any {@link FeatureCollection} type, it\n * works best with {@link Point} collections.\n *\n * - This analysis is _very_ sensitive to the study area provided.\n * If no {@link Feature<Polygon>} is passed as the study area, the function draws a box\n * around the data, which may distort the findings. This analysis works best\n * with a bounded area of interest within with the data is either clustered,\n * dispersed, or randomly distributed. For example, a city's subway stops may\n * look extremely clustered if the study area is an entire state. On the other\n * hand, they may look rather evenly dispersed if the study area is limited to\n * the city's downtown.\n *\n * **Bibliography**\n *\n * Philip J. Clark and Francis C. Evans, “Distance to Nearest Neighbor as a\n * Measure of Spatial Relationships in Populations,” _Ecology_ 35, no. 4\n * (1954): 445–453, doi:[10.2307/1931034](http://doi.org/10.2307/1931034).\n *\n * @name nearestNeighborAnalysis\n * @param {FeatureCollection<any>} dataset FeatureCollection (pref. of points) to study\n * @param {Object} [options={}] Optional parameters\n * @param {Feature<Polygon>} [options.studyArea] polygon representing the study area\n * @param {string} [options.units='kilometers'] unit of measurement for distances and, squared, area.\n * @param {Object} [options.properties={}] properties\n * @returns {Feature<Polygon>} A polygon of the study area or an approximation of one.\n * @example\n * var bbox = [-65, 40, -63, 42];\n * var dataset = turf.randomPoint(100, { bbox: bbox });\n * var nearestNeighborStudyArea = turf.nearestNeighborAnalysis(dataset);\n *\n * //addToMap\n * var addToMap = [dataset, nearestNeighborStudyArea];\n */\nfunction nearestNeighborAnalysis(\n dataset: FeatureCollection<any>,\n options?: {\n studyArea?: Feature<Polygon>;\n units?: Units & AreaUnits;\n properties?: GeoJsonProperties;\n }\n): NearestNeighborStudyArea {\n // Optional params\n options = options || {};\n const studyArea = options.studyArea || bboxPolygon(bbox(dataset));\n const properties = options.properties || {};\n const units = options.units || \"kilometers\";\n\n const features: Array<Feature<Point>> = [];\n featureEach(dataset, (feature) => {\n features.push(centroid(feature));\n });\n const n = features.length;\n const observedMeanDistance =\n features\n .map((feature, index) => {\n const otherFeatures = featureCollection<Point>(\n features.filter((f, i) => {\n return i !== index;\n })\n );\n // Have to add the ! to make typescript validation pass\n // see https://stackoverflow.com/a/40350534/1979085\n return distance(\n feature,\n nearestPoint(feature, otherFeatures).geometry!.coordinates,\n { units }\n );\n })\n .reduce((sum, value) => {\n return sum + value;\n }, 0) / n;\n\n const populationDensity = n / convertArea(area(studyArea), \"meters\", units);\n const expectedMeanDistance = 1 / (2 * Math.sqrt(populationDensity));\n const variance = 0.26136 / Math.sqrt(n * populationDensity);\n properties.nearestNeighborAnalysis = {\n units: units,\n arealUnits: units + \"²\",\n observedMeanDistance: observedMeanDistance,\n expectedMeanDistance: expectedMeanDistance,\n nearestNeighborIndex: observedMeanDistance / expectedMeanDistance,\n numberOfPoints: n,\n zScore: (observedMeanDistance - expectedMeanDistance) / variance,\n };\n studyArea.properties = properties;\n\n return studyArea as NearestNeighborStudyArea;\n}\n\nexport {\n nearestNeighborAnalysis,\n NearestNeighborStatistics,\n NearestNeighborStudyArea,\n};\nexport default nearestNeighborAnalysis;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-nearest-neighbor-analysis/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACOA,kCAAqB;AACrB,kCAAqB;AACrB,iDAA4B;AAC5B,0CAAyB;AACzB,0CAAyB;AACzB,mDAA6B;AAC7B,kCAA4B;AAC5B;AACE;AACA;AAAA,wCAGK;AAwFP,SAAS,uBAAA,CACP,OAAA,EACA,OAAA,EAK0B;AAE1B,EAAA,QAAA,EAAU,QAAA,GAAW,CAAC,CAAA;AACtB,EAAA,MAAM,UAAA,EAAY,OAAA,CAAQ,UAAA,GAAa,sCAAA,wBAAY,OAAY,CAAC,CAAA;AAChE,EAAA,MAAM,WAAA,EAAa,OAAA,CAAQ,WAAA,GAAc,CAAC,CAAA;AAC1C,EAAA,MAAM,MAAA,EAAQ,OAAA,CAAQ,MAAA,GAAS,YAAA;AAE/B,EAAA,MAAM,SAAA,EAAkC,CAAC,CAAA;AACzC,EAAA,+BAAA,OAAY,EAAS,CAAC,OAAA,EAAA,GAAY;AAChC,IAAA,QAAA,CAAS,IAAA,CAAK,gCAAA,OAAgB,CAAC,CAAA;AAAA,EACjC,CAAC,CAAA;AACD,EAAA,MAAM,EAAA,EAAI,QAAA,CAAS,MAAA;AACnB,EAAA,MAAM,qBAAA,EACJ,QAAA,CACG,GAAA,CAAI,CAAC,OAAA,EAAS,KAAA,EAAA,GAAU;AACvB,IAAA,MAAM,cAAA,EAAgB,wCAAA;AAAA,MACpB,QA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","sourcesContent":[null,"import {\n FeatureCollection,\n Feature,\n Point,\n Polygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { area } from \"@turf/area\";\nimport { bbox } from \"@turf/bbox\";\nimport { bboxPolygon } from \"@turf/bbox-polygon\";\nimport { centroid } from \"@turf/centroid\";\nimport { distance } from \"@turf/distance\";\nimport { nearestPoint } from \"@turf/nearest-point\";\nimport { featureEach } from \"@turf/meta\";\nimport {\n convertArea,\n featureCollection,\n Units,\n AreaUnits,\n} from \"@turf/helpers\";\n\n/**\n * Nearest neighbour statistics.\n *\n * @typedef {object} NearestNeighborStatistics\n * @property {(Units & AreaUnits)} units\n * @property {string} arealUnits\n * @property {number} observedMeanDistance\n * @property {number} expectedMeanDistance\n * @property {number} numberOfPoints\n * @property {number} zScore\n */\ninterface NearestNeighborStatistics {\n units: Units & AreaUnits;\n arealUnits: string;\n observedMeanDistance: number;\n expectedMeanDistance: number;\n numberOfPoints: number;\n zScore: number;\n}\n\n/**\n * Nearest neighbour study area polygon feature.\n *\n * @typedef {object} NearestNeighborStudyArea\n * @extends Feature<Polygon>\n * @property {GeoJsonProperties} properties\n * @property {NearestNeighborStatistics} properties.nearestNeighborAnalysis\n */\ninterface NearestNeighborStudyArea extends Feature<Polygon> {\n properties: {\n nearestNeighborAnalysis: NearestNeighborStatistics;\n [key: string]: any;\n };\n}\n\n/**\n * Nearest Neighbor Analysis calculates an index based the average distances\n * between points in the dataset, thereby providing inference as to whether the\n * data is clustered, dispersed, or randomly distributed within the study area.\n *\n * It returns a {@link Feature}<{@link Polygon}> of the study area, with the results of\n * the analysis attached as part of of the `nearestNeighborAnalysis` property\n * of the study area's `properties`. The attached\n * [_z_-score](https://en.wikipedia.org/wiki/Standard_score) indicates how many\n * standard deviations above or below the expected mean distance the data's\n * observed mean distance is. The more negative, the more clustered. The more\n * positive, the more evenly dispersed. A _z_-score between -2 and 2 indicates\n * a seemingly random distribution. That is, within _p_ of less than 0.05, the\n * distribution appears statistically significantly neither clustered nor\n * dispersed.\n *\n * **Remarks**\n *\n * - Though the analysis will work on any {@link FeatureCollection} type, it\n * works best with {@link Point} collections.\n *\n * - This analysis is _very_ sensitive to the study area provided.\n * If no {@link Feature}<{@link Polygon}> is passed as the study area, the function draws a box\n * around the data, which may distort the findings. This analysis works best\n * with a bounded area of interest within with the data is either clustered,\n * dispersed, or randomly distributed. For example, a city's subway stops may\n * look extremely clustered if the study area is an entire state. On the other\n * hand, they may look rather evenly dispersed if the study area is limited to\n * the city's downtown.\n *\n * **Bibliography**\n *\n * Philip J. Clark and Francis C. Evans, “Distance to Nearest Neighbor as a\n * Measure of Spatial Relationships in Populations,” _Ecology_ 35, no. 4\n * (1954): 445–453, doi:[10.2307/1931034](http://doi.org/10.2307/1931034).\n *\n * @function\n * @param {FeatureCollection<any>} dataset FeatureCollection (pref. of points) to study\n * @param {Object} [options={}] Optional parameters\n * @param {Feature<Polygon>} [options.studyArea] polygon representing the study area\n * @param {Units & AreaUnits} [options.units='kilometers'] unit of measurement for distances and, squared, area.\n * @param {GeoJsonProperties} [options.properties={}] properties\n * @returns {NearestNeighborStudyArea} A polygon of the study area or an approximation of one.\n * @example\n * var bbox = [-65, 40, -63, 42];\n * var dataset = turf.randomPoint(100, { bbox: bbox });\n * var nearestNeighborStudyArea = turf.nearestNeighborAnalysis(dataset);\n *\n * //addToMap\n * var addToMap = [dataset, nearestNeighborStudyArea];\n */\nfunction nearestNeighborAnalysis(\n dataset: FeatureCollection<any>,\n options?: {\n studyArea?: Feature<Polygon>;\n units?: Units & AreaUnits;\n properties?: GeoJsonProperties;\n }\n): NearestNeighborStudyArea {\n // Optional params\n options = options || {};\n const studyArea = options.studyArea || bboxPolygon(bbox(dataset));\n const properties = options.properties || {};\n const units = options.units || \"kilometers\";\n\n const features: Array<Feature<Point>> = [];\n featureEach(dataset, (feature) => {\n features.push(centroid(feature));\n });\n const n = features.length;\n const observedMeanDistance =\n features\n .map((feature, index) => {\n const otherFeatures = featureCollection<Point>(\n features.filter((f, i) => {\n return i !== index;\n })\n );\n // Have to add the ! to make typescript validation pass\n // see https://stackoverflow.com/a/40350534/1979085\n return distance(\n feature,\n nearestPoint(feature, otherFeatures).geometry!.coordinates,\n { units }\n );\n })\n .reduce((sum, value) => {\n return sum + value;\n }, 0) / n;\n\n const populationDensity = n / convertArea(area(studyArea), \"meters\", units);\n const expectedMeanDistance = 1 / (2 * Math.sqrt(populationDensity));\n const variance = 0.26136 / Math.sqrt(n * populationDensity);\n properties.nearestNeighborAnalysis = {\n units: units,\n arealUnits: units + \"²\",\n observedMeanDistance: observedMeanDistance,\n expectedMeanDistance: expectedMeanDistance,\n nearestNeighborIndex: observedMeanDistance / expectedMeanDistance,\n numberOfPoints: n,\n zScore: (observedMeanDistance - expectedMeanDistance) / variance,\n };\n studyArea.properties = properties;\n\n return studyArea as NearestNeighborStudyArea;\n}\n\nexport {\n nearestNeighborAnalysis,\n NearestNeighborStatistics,\n NearestNeighborStudyArea,\n};\nexport default nearestNeighborAnalysis;\n"]}
@@ -1,6 +1,17 @@
1
1
  import { Feature, Polygon, FeatureCollection, GeoJsonProperties } from 'geojson';
2
2
  import { Units, AreaUnits } from '@turf/helpers';
3
3
 
4
+ /**
5
+ * Nearest neighbour statistics.
6
+ *
7
+ * @typedef {object} NearestNeighborStatistics
8
+ * @property {(Units & AreaUnits)} units
9
+ * @property {string} arealUnits
10
+ * @property {number} observedMeanDistance
11
+ * @property {number} expectedMeanDistance
12
+ * @property {number} numberOfPoints
13
+ * @property {number} zScore
14
+ */
4
15
  interface NearestNeighborStatistics {
5
16
  units: Units & AreaUnits;
6
17
  arealUnits: string;
@@ -9,6 +20,14 @@ interface NearestNeighborStatistics {
9
20
  numberOfPoints: number;
10
21
  zScore: number;
11
22
  }
23
+ /**
24
+ * Nearest neighbour study area polygon feature.
25
+ *
26
+ * @typedef {object} NearestNeighborStudyArea
27
+ * @extends Feature<Polygon>
28
+ * @property {GeoJsonProperties} properties
29
+ * @property {NearestNeighborStatistics} properties.nearestNeighborAnalysis
30
+ */
12
31
  interface NearestNeighborStudyArea extends Feature<Polygon> {
13
32
  properties: {
14
33
  nearestNeighborAnalysis: NearestNeighborStatistics;
@@ -20,7 +39,7 @@ interface NearestNeighborStudyArea extends Feature<Polygon> {
20
39
  * between points in the dataset, thereby providing inference as to whether the
21
40
  * data is clustered, dispersed, or randomly distributed within the study area.
22
41
  *
23
- * It returns a {@link Feature<Polygon>} of the study area, with the results of
42
+ * It returns a {@link Feature}<{@link Polygon}> of the study area, with the results of
24
43
  * the analysis attached as part of of the `nearestNeighborAnalysis` property
25
44
  * of the study area's `properties`. The attached
26
45
  * [_z_-score](https://en.wikipedia.org/wiki/Standard_score) indicates how many
@@ -37,7 +56,7 @@ interface NearestNeighborStudyArea extends Feature<Polygon> {
37
56
  * works best with {@link Point} collections.
38
57
  *
39
58
  * - This analysis is _very_ sensitive to the study area provided.
40
- * If no {@link Feature<Polygon>} is passed as the study area, the function draws a box
59
+ * If no {@link Feature}<{@link Polygon}> is passed as the study area, the function draws a box
41
60
  * around the data, which may distort the findings. This analysis works best
42
61
  * with a bounded area of interest within with the data is either clustered,
43
62
  * dispersed, or randomly distributed. For example, a city's subway stops may
@@ -51,13 +70,13 @@ interface NearestNeighborStudyArea extends Feature<Polygon> {
51
70
  * Measure of Spatial Relationships in Populations,” _Ecology_ 35, no. 4
52
71
  * (1954): 445–453, doi:[10.2307/1931034](http://doi.org/10.2307/1931034).
53
72
  *
54
- * @name nearestNeighborAnalysis
73
+ * @function
55
74
  * @param {FeatureCollection<any>} dataset FeatureCollection (pref. of points) to study
56
75
  * @param {Object} [options={}] Optional parameters
57
76
  * @param {Feature<Polygon>} [options.studyArea] polygon representing the study area
58
- * @param {string} [options.units='kilometers'] unit of measurement for distances and, squared, area.
59
- * @param {Object} [options.properties={}] properties
60
- * @returns {Feature<Polygon>} A polygon of the study area or an approximation of one.
77
+ * @param {Units & AreaUnits} [options.units='kilometers'] unit of measurement for distances and, squared, area.
78
+ * @param {GeoJsonProperties} [options.properties={}] properties
79
+ * @returns {NearestNeighborStudyArea} A polygon of the study area or an approximation of one.
61
80
  * @example
62
81
  * var bbox = [-65, 40, -63, 42];
63
82
  * var dataset = turf.randomPoint(100, { bbox: bbox });
@@ -1,6 +1,17 @@
1
1
  import { Feature, Polygon, FeatureCollection, GeoJsonProperties } from 'geojson';
2
2
  import { Units, AreaUnits } from '@turf/helpers';
3
3
 
4
+ /**
5
+ * Nearest neighbour statistics.
6
+ *
7
+ * @typedef {object} NearestNeighborStatistics
8
+ * @property {(Units & AreaUnits)} units
9
+ * @property {string} arealUnits
10
+ * @property {number} observedMeanDistance
11
+ * @property {number} expectedMeanDistance
12
+ * @property {number} numberOfPoints
13
+ * @property {number} zScore
14
+ */
4
15
  interface NearestNeighborStatistics {
5
16
  units: Units & AreaUnits;
6
17
  arealUnits: string;
@@ -9,6 +20,14 @@ interface NearestNeighborStatistics {
9
20
  numberOfPoints: number;
10
21
  zScore: number;
11
22
  }
23
+ /**
24
+ * Nearest neighbour study area polygon feature.
25
+ *
26
+ * @typedef {object} NearestNeighborStudyArea
27
+ * @extends Feature<Polygon>
28
+ * @property {GeoJsonProperties} properties
29
+ * @property {NearestNeighborStatistics} properties.nearestNeighborAnalysis
30
+ */
12
31
  interface NearestNeighborStudyArea extends Feature<Polygon> {
13
32
  properties: {
14
33
  nearestNeighborAnalysis: NearestNeighborStatistics;
@@ -20,7 +39,7 @@ interface NearestNeighborStudyArea extends Feature<Polygon> {
20
39
  * between points in the dataset, thereby providing inference as to whether the
21
40
  * data is clustered, dispersed, or randomly distributed within the study area.
22
41
  *
23
- * It returns a {@link Feature<Polygon>} of the study area, with the results of
42
+ * It returns a {@link Feature}<{@link Polygon}> of the study area, with the results of
24
43
  * the analysis attached as part of of the `nearestNeighborAnalysis` property
25
44
  * of the study area's `properties`. The attached
26
45
  * [_z_-score](https://en.wikipedia.org/wiki/Standard_score) indicates how many
@@ -37,7 +56,7 @@ interface NearestNeighborStudyArea extends Feature<Polygon> {
37
56
  * works best with {@link Point} collections.
38
57
  *
39
58
  * - This analysis is _very_ sensitive to the study area provided.
40
- * If no {@link Feature<Polygon>} is passed as the study area, the function draws a box
59
+ * If no {@link Feature}<{@link Polygon}> is passed as the study area, the function draws a box
41
60
  * around the data, which may distort the findings. This analysis works best
42
61
  * with a bounded area of interest within with the data is either clustered,
43
62
  * dispersed, or randomly distributed. For example, a city's subway stops may
@@ -51,13 +70,13 @@ interface NearestNeighborStudyArea extends Feature<Polygon> {
51
70
  * Measure of Spatial Relationships in Populations,” _Ecology_ 35, no. 4
52
71
  * (1954): 445–453, doi:[10.2307/1931034](http://doi.org/10.2307/1931034).
53
72
  *
54
- * @name nearestNeighborAnalysis
73
+ * @function
55
74
  * @param {FeatureCollection<any>} dataset FeatureCollection (pref. of points) to study
56
75
  * @param {Object} [options={}] Optional parameters
57
76
  * @param {Feature<Polygon>} [options.studyArea] polygon representing the study area
58
- * @param {string} [options.units='kilometers'] unit of measurement for distances and, squared, area.
59
- * @param {Object} [options.properties={}] properties
60
- * @returns {Feature<Polygon>} A polygon of the study area or an approximation of one.
77
+ * @param {Units & AreaUnits} [options.units='kilometers'] unit of measurement for distances and, squared, area.
78
+ * @param {GeoJsonProperties} [options.properties={}] properties
79
+ * @returns {NearestNeighborStudyArea} A polygon of the study area or an approximation of one.
61
80
  * @example
62
81
  * var bbox = [-65, 40, -63, 42];
63
82
  * var dataset = turf.randomPoint(100, { bbox: bbox });