node-red-contrib-tak-registration 0.13.1 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (921) 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/tak-registration.js +3 -1
  792. package/node_modules/polygon-clipping/LICENSE.md +0 -11
  793. package/node_modules/polygon-clipping/dist/polygon-clipping.cjs.js +0 -1803
  794. package/node_modules/polygon-clipping/dist/polygon-clipping.d.ts +0 -14
  795. package/node_modules/polygon-clipping/dist/polygon-clipping.esm.js +0 -1532
  796. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.js +0 -2496
  797. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js +0 -24
  798. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js.map +0 -1
  799. package/node_modules/polygon-clipping/node_modules/robust-predicates/LICENSE +0 -24
  800. package/node_modules/polygon-clipping/node_modules/robust-predicates/README.md +0 -82
  801. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/incircle.js +0 -765
  802. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/insphere.js +0 -766
  803. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/orient2d.js +0 -184
  804. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/orient3d.js +0 -462
  805. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/util.js +0 -138
  806. package/node_modules/polygon-clipping/node_modules/robust-predicates/index.d.ts +0 -49
  807. package/node_modules/polygon-clipping/node_modules/robust-predicates/index.js +0 -5
  808. package/node_modules/polygon-clipping/node_modules/robust-predicates/package.json +0 -75
  809. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/incircle.js +0 -908
  810. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/incircle.min.js +0 -1
  811. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/insphere.js +0 -914
  812. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/insphere.min.js +0 -1
  813. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient2d.js +0 -280
  814. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient2d.min.js +0 -1
  815. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient3d.js +0 -601
  816. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient3d.min.js +0 -1
  817. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/predicates.js +0 -2328
  818. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/predicates.min.js +0 -1
  819. package/node_modules/polygon-clipping/package.json +0 -79
  820. package/node_modules/splaytree/Readme.md +0 -222
  821. package/node_modules/splaytree/dist/splay.esm.js +0 -686
  822. package/node_modules/splaytree/dist/splay.esm.js.map +0 -1
  823. package/node_modules/splaytree/dist/splay.js +0 -694
  824. package/node_modules/splaytree/dist/splay.js.map +0 -1
  825. package/node_modules/splaytree/package.json +0 -91
  826. package/node_modules/splaytree/src/index.ts +0 -679
  827. package/node_modules/splaytree/src/node.ts +0 -15
  828. package/node_modules/splaytree/src/types.ts +0 -2
  829. package/node_modules/splaytree/typings/index.d.ts +0 -82
  830. package/node_modules/splaytree/typings/node.d.ts +0 -8
  831. package/node_modules/splaytree/typings/types.d.ts +0 -2
  832. package/node_modules/uuid/CHANGELOG.md +0 -335
  833. package/node_modules/uuid/CONTRIBUTING.md +0 -18
  834. package/node_modules/uuid/dist/cjs/test/parse.test.d.ts +0 -1
  835. package/node_modules/uuid/dist/cjs/test/parse.test.js +0 -50
  836. package/node_modules/uuid/dist/cjs/test/rng.test.d.ts +0 -1
  837. package/node_modules/uuid/dist/cjs/test/rng.test.js +0 -14
  838. package/node_modules/uuid/dist/cjs/test/stringify.test.d.ts +0 -1
  839. package/node_modules/uuid/dist/cjs/test/stringify.test.js +0 -23
  840. package/node_modules/uuid/dist/cjs/test/test_constants.d.ts +0 -33
  841. package/node_modules/uuid/dist/cjs/test/test_constants.js +0 -91
  842. package/node_modules/uuid/dist/cjs/test/v1.test.d.ts +0 -1
  843. package/node_modules/uuid/dist/cjs/test/v1.test.js +0 -127
  844. package/node_modules/uuid/dist/cjs/test/v35.test.d.ts +0 -1
  845. package/node_modules/uuid/dist/cjs/test/v35.test.js +0 -143
  846. package/node_modules/uuid/dist/cjs/test/v4.test.d.ts +0 -1
  847. package/node_modules/uuid/dist/cjs/test/v4.test.js +0 -60
  848. package/node_modules/uuid/dist/cjs/test/v6.test.d.ts +0 -1
  849. package/node_modules/uuid/dist/cjs/test/v6.test.js +0 -56
  850. package/node_modules/uuid/dist/cjs/test/v7.test.d.ts +0 -1
  851. package/node_modules/uuid/dist/cjs/test/v7.test.js +0 -194
  852. package/node_modules/uuid/dist/cjs/test/validate.test.d.ts +0 -1
  853. package/node_modules/uuid/dist/cjs/test/validate.test.js +0 -13
  854. package/node_modules/uuid/dist/cjs/test/version.test.d.ts +0 -1
  855. package/node_modules/uuid/dist/cjs/test/version.test.js +0 -20
  856. package/node_modules/uuid/dist/cjs-browser/test/parse.test.d.ts +0 -1
  857. package/node_modules/uuid/dist/cjs-browser/test/parse.test.js +0 -50
  858. package/node_modules/uuid/dist/cjs-browser/test/rng.test.d.ts +0 -1
  859. package/node_modules/uuid/dist/cjs-browser/test/rng.test.js +0 -14
  860. package/node_modules/uuid/dist/cjs-browser/test/stringify.test.d.ts +0 -1
  861. package/node_modules/uuid/dist/cjs-browser/test/stringify.test.js +0 -23
  862. package/node_modules/uuid/dist/cjs-browser/test/test_constants.d.ts +0 -33
  863. package/node_modules/uuid/dist/cjs-browser/test/test_constants.js +0 -91
  864. package/node_modules/uuid/dist/cjs-browser/test/v1.test.d.ts +0 -1
  865. package/node_modules/uuid/dist/cjs-browser/test/v1.test.js +0 -127
  866. package/node_modules/uuid/dist/cjs-browser/test/v35.test.d.ts +0 -1
  867. package/node_modules/uuid/dist/cjs-browser/test/v35.test.js +0 -143
  868. package/node_modules/uuid/dist/cjs-browser/test/v4.test.d.ts +0 -1
  869. package/node_modules/uuid/dist/cjs-browser/test/v4.test.js +0 -60
  870. package/node_modules/uuid/dist/cjs-browser/test/v6.test.d.ts +0 -1
  871. package/node_modules/uuid/dist/cjs-browser/test/v6.test.js +0 -56
  872. package/node_modules/uuid/dist/cjs-browser/test/v7.test.d.ts +0 -1
  873. package/node_modules/uuid/dist/cjs-browser/test/v7.test.js +0 -194
  874. package/node_modules/uuid/dist/cjs-browser/test/validate.test.d.ts +0 -1
  875. package/node_modules/uuid/dist/cjs-browser/test/validate.test.js +0 -13
  876. package/node_modules/uuid/dist/cjs-browser/test/version.test.d.ts +0 -1
  877. package/node_modules/uuid/dist/cjs-browser/test/version.test.js +0 -20
  878. package/node_modules/uuid/dist/esm/test/parse.test.d.ts +0 -1
  879. package/node_modules/uuid/dist/esm/test/parse.test.js +0 -48
  880. package/node_modules/uuid/dist/esm/test/rng.test.d.ts +0 -1
  881. package/node_modules/uuid/dist/esm/test/rng.test.js +0 -12
  882. package/node_modules/uuid/dist/esm/test/stringify.test.d.ts +0 -1
  883. package/node_modules/uuid/dist/esm/test/stringify.test.js +0 -21
  884. package/node_modules/uuid/dist/esm/test/test_constants.d.ts +0 -33
  885. package/node_modules/uuid/dist/esm/test/test_constants.js +0 -88
  886. package/node_modules/uuid/dist/esm/test/v1.test.d.ts +0 -1
  887. package/node_modules/uuid/dist/esm/test/v1.test.js +0 -125
  888. package/node_modules/uuid/dist/esm/test/v35.test.d.ts +0 -1
  889. package/node_modules/uuid/dist/esm/test/v35.test.js +0 -141
  890. package/node_modules/uuid/dist/esm/test/v4.test.d.ts +0 -1
  891. package/node_modules/uuid/dist/esm/test/v4.test.js +0 -58
  892. package/node_modules/uuid/dist/esm/test/v6.test.d.ts +0 -1
  893. package/node_modules/uuid/dist/esm/test/v6.test.js +0 -54
  894. package/node_modules/uuid/dist/esm/test/v7.test.d.ts +0 -1
  895. package/node_modules/uuid/dist/esm/test/v7.test.js +0 -192
  896. package/node_modules/uuid/dist/esm/test/validate.test.d.ts +0 -1
  897. package/node_modules/uuid/dist/esm/test/validate.test.js +0 -11
  898. package/node_modules/uuid/dist/esm/test/version.test.d.ts +0 -1
  899. package/node_modules/uuid/dist/esm/test/version.test.js +0 -18
  900. package/node_modules/uuid/dist/esm-browser/test/parse.test.d.ts +0 -1
  901. package/node_modules/uuid/dist/esm-browser/test/parse.test.js +0 -48
  902. package/node_modules/uuid/dist/esm-browser/test/rng.test.d.ts +0 -1
  903. package/node_modules/uuid/dist/esm-browser/test/rng.test.js +0 -12
  904. package/node_modules/uuid/dist/esm-browser/test/stringify.test.d.ts +0 -1
  905. package/node_modules/uuid/dist/esm-browser/test/stringify.test.js +0 -21
  906. package/node_modules/uuid/dist/esm-browser/test/test_constants.d.ts +0 -33
  907. package/node_modules/uuid/dist/esm-browser/test/test_constants.js +0 -88
  908. package/node_modules/uuid/dist/esm-browser/test/v1.test.d.ts +0 -1
  909. package/node_modules/uuid/dist/esm-browser/test/v1.test.js +0 -125
  910. package/node_modules/uuid/dist/esm-browser/test/v35.test.d.ts +0 -1
  911. package/node_modules/uuid/dist/esm-browser/test/v35.test.js +0 -141
  912. package/node_modules/uuid/dist/esm-browser/test/v4.test.d.ts +0 -1
  913. package/node_modules/uuid/dist/esm-browser/test/v4.test.js +0 -58
  914. package/node_modules/uuid/dist/esm-browser/test/v6.test.d.ts +0 -1
  915. package/node_modules/uuid/dist/esm-browser/test/v6.test.js +0 -54
  916. package/node_modules/uuid/dist/esm-browser/test/v7.test.d.ts +0 -1
  917. package/node_modules/uuid/dist/esm-browser/test/v7.test.js +0 -192
  918. package/node_modules/uuid/dist/esm-browser/test/validate.test.d.ts +0 -1
  919. package/node_modules/uuid/dist/esm-browser/test/validate.test.js +0 -11
  920. package/node_modules/uuid/dist/esm-browser/test/version.test.d.ts +0 -1
  921. package/node_modules/uuid/dist/esm-browser/test/version.test.js +0 -18
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/square",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "turf square module",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
@@ -52,19 +52,19 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/benchmark": "^2.1.5",
55
- "@types/tape": "^4.2.32",
55
+ "@types/tape": "^4.13.4",
56
56
  "benchmark": "^2.1.4",
57
57
  "npm-run-all": "^4.1.5",
58
- "tape": "^5.7.2",
59
- "tsup": "^8.0.1",
60
- "tsx": "^4.6.2",
61
- "typescript": "^5.2.2"
58
+ "tape": "^5.9.0",
59
+ "tsup": "^8.3.5",
60
+ "tsx": "^4.19.2",
61
+ "typescript": "^5.5.4"
62
62
  },
63
63
  "dependencies": {
64
- "@turf/distance": "^7.1.0",
65
- "@turf/helpers": "^7.1.0",
64
+ "@turf/distance": "^7.2.0",
65
+ "@turf/helpers": "^7.2.0",
66
66
  "@types/geojson": "^7946.0.10",
67
- "tslib": "^2.6.2"
67
+ "tslib": "^2.8.1"
68
68
  },
69
- "gitHead": "68915eeebc9278bb40dec3f1034499698a0561ef"
69
+ "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
70
70
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"names":[],"mappings":";AASA,SAAS,qBAAqB;AA4B9B,SAAS,WACP,MACA,UACA,UAII,CAAC,GAC0B;AAC/B,SAAO,cAAc,MAAM,UAAU,UAAU,OAAO;AACxD;AAGA,IAAO,2BAAQ","sourcesContent":["import {\n FeatureCollection,\n Polygon,\n BBox,\n Feature,\n MultiPolygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { Units } from \"@turf/helpers\";\nimport { rectangleGrid } from \"@turf/rectangle-grid\";\n\n/**\n * Creates a grid of square polygons with cell length consistent in degrees\n *\n * @name squareGrid\n * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order. If the grid does not fill the bbox perfectly, it is centered.\n * @param {number} cellSide length of each cell side.\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] the units of the cellSide value.\n * Supports all valid Turf {@link https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md Units}.\n * If you are looking for squares with sides of equal lengths in linear units (e.g. kilometers) this is not the module for you.\n * The cellSide is converted from units provided to degrees internally, so the width and height of resulting polygons will be consistent only in degrees.\n * @param {Feature<Polygon|MultiPolygon>} [options.mask] if passed a Polygon or MultiPolygon,\n * the grid Points will be created only inside it\n * @param {Object} [options.properties={}] passed to each point of the grid\n * @returns {FeatureCollection<Polygon>} a grid of polygons with equal width and height in degrees.\n * @example\n * var bbox = [-95, 30 ,-85, 40];\n * var cellSide = 50;\n * var options = {units: 'miles'};\n *\n * var squareGrid = turf.squareGrid(bbox, cellSide, options);\n *\n * //addToMap\n * var addToMap = [squareGrid]\n */\n\nfunction squareGrid<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon;\n } = {}\n): FeatureCollection<Polygon, P> {\n return rectangleGrid(bbox, cellSide, cellSide, options);\n}\n\nexport { squareGrid };\nexport default squareGrid;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-square-grid/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACSA,qDAA8B;AA4B9B,SAAS,UAAA,CACP,IAAA,EACA,QAAA,EACA,QAAA,EAII,CAAC,CAAA,EAC0B;AAC/B,EAAA,OAAO,0CAAA,IAAc,EAAM,QAAA,EAAU,QAAA,EAAU,OAAO,CAAA;AACxD;AAGA,IAAO,yBAAA,EAAQ,UAAA;AD5Cf;AACE;AACA;AACF,4EAAC","file":"/home/runner/work/turf/turf/packages/turf-square-grid/dist/cjs/index.cjs","sourcesContent":[null,"import {\n FeatureCollection,\n Polygon,\n BBox,\n Feature,\n MultiPolygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { Units } from \"@turf/helpers\";\nimport { rectangleGrid } from \"@turf/rectangle-grid\";\n\n/**\n * Creates a grid of square polygons with cell length consistent in degrees\n *\n * @function\n * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order. If the grid does not fill the bbox perfectly, it is centered.\n * @param {number} cellSide length of each cell side.\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] the units of the cellSide value.\n * Supports all valid Turf {@link https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md Units}.\n * If you are looking for squares with sides of equal lengths in linear units (e.g. kilometers) this is not the module for you.\n * The cellSide is converted from units provided to degrees internally, so the width and height of resulting polygons will be consistent only in degrees.\n * @param {Feature<Polygon|MultiPolygon>} [options.mask] if passed a Polygon or MultiPolygon,\n * the grid Points will be created only inside it\n * @param {Object} [options.properties={}] passed to each point of the grid\n * @returns {FeatureCollection<Polygon>} a grid of polygons with equal width and height in degrees.\n * @example\n * var bbox = [-95, 30 ,-85, 40];\n * var cellSide = 50;\n * var options = {units: 'miles'};\n *\n * var squareGrid = turf.squareGrid(bbox, cellSide, options);\n *\n * //addToMap\n * var addToMap = [squareGrid]\n */\n\nfunction squareGrid<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon;\n } = {}\n): FeatureCollection<Polygon, P> {\n return rectangleGrid(bbox, cellSide, cellSide, options);\n}\n\nexport { squareGrid };\nexport default squareGrid;\n"]}
@@ -4,7 +4,7 @@ import { Units } from '@turf/helpers';
4
4
  /**
5
5
  * Creates a grid of square polygons with cell length consistent in degrees
6
6
  *
7
- * @name squareGrid
7
+ * @function
8
8
  * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order. If the grid does not fill the bbox perfectly, it is centered.
9
9
  * @param {number} cellSide length of each cell side.
10
10
  * @param {Object} [options={}] Optional parameters
@@ -4,7 +4,7 @@ import { Units } from '@turf/helpers';
4
4
  /**
5
5
  * Creates a grid of square polygons with cell length consistent in degrees
6
6
  *
7
- * @name squareGrid
7
+ * @function
8
8
  * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order. If the grid does not fill the bbox perfectly, it is centered.
9
9
  * @param {number} cellSide length of each cell side.
10
10
  * @param {Object} [options={}] Optional parameters
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n FeatureCollection,\n Polygon,\n BBox,\n Feature,\n MultiPolygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { Units } from \"@turf/helpers\";\nimport { rectangleGrid } from \"@turf/rectangle-grid\";\n\n/**\n * Creates a grid of square polygons with cell length consistent in degrees\n *\n * @name squareGrid\n * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order. If the grid does not fill the bbox perfectly, it is centered.\n * @param {number} cellSide length of each cell side.\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] the units of the cellSide value.\n * Supports all valid Turf {@link https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md Units}.\n * If you are looking for squares with sides of equal lengths in linear units (e.g. kilometers) this is not the module for you.\n * The cellSide is converted from units provided to degrees internally, so the width and height of resulting polygons will be consistent only in degrees.\n * @param {Feature<Polygon|MultiPolygon>} [options.mask] if passed a Polygon or MultiPolygon,\n * the grid Points will be created only inside it\n * @param {Object} [options.properties={}] passed to each point of the grid\n * @returns {FeatureCollection<Polygon>} a grid of polygons with equal width and height in degrees.\n * @example\n * var bbox = [-95, 30 ,-85, 40];\n * var cellSide = 50;\n * var options = {units: 'miles'};\n *\n * var squareGrid = turf.squareGrid(bbox, cellSide, options);\n *\n * //addToMap\n * var addToMap = [squareGrid]\n */\n\nfunction squareGrid<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon;\n } = {}\n): FeatureCollection<Polygon, P> {\n return rectangleGrid(bbox, cellSide, cellSide, options);\n}\n\nexport { squareGrid };\nexport default squareGrid;\n"],"mappings":";AASA,SAAS,qBAAqB;AA4B9B,SAAS,WACP,MACA,UACA,UAII,CAAC,GAC0B;AAC/B,SAAO,cAAc,MAAM,UAAU,UAAU,OAAO;AACxD;AAGA,IAAO,2BAAQ;","names":[]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n FeatureCollection,\n Polygon,\n BBox,\n Feature,\n MultiPolygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { Units } from \"@turf/helpers\";\nimport { rectangleGrid } from \"@turf/rectangle-grid\";\n\n/**\n * Creates a grid of square polygons with cell length consistent in degrees\n *\n * @function\n * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order. If the grid does not fill the bbox perfectly, it is centered.\n * @param {number} cellSide length of each cell side.\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] the units of the cellSide value.\n * Supports all valid Turf {@link https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md Units}.\n * If you are looking for squares with sides of equal lengths in linear units (e.g. kilometers) this is not the module for you.\n * The cellSide is converted from units provided to degrees internally, so the width and height of resulting polygons will be consistent only in degrees.\n * @param {Feature<Polygon|MultiPolygon>} [options.mask] if passed a Polygon or MultiPolygon,\n * the grid Points will be created only inside it\n * @param {Object} [options.properties={}] passed to each point of the grid\n * @returns {FeatureCollection<Polygon>} a grid of polygons with equal width and height in degrees.\n * @example\n * var bbox = [-95, 30 ,-85, 40];\n * var cellSide = 50;\n * var options = {units: 'miles'};\n *\n * var squareGrid = turf.squareGrid(bbox, cellSide, options);\n *\n * //addToMap\n * var addToMap = [squareGrid]\n */\n\nfunction squareGrid<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon;\n } = {}\n): FeatureCollection<Polygon, P> {\n return rectangleGrid(bbox, cellSide, cellSide, options);\n}\n\nexport { squareGrid };\nexport default squareGrid;\n"],"mappings":";AASA,SAAS,qBAAqB;AA4B9B,SAAS,WACP,MACA,UACA,UAII,CAAC,GAC0B;AAC/B,SAAO,cAAc,MAAM,UAAU,UAAU,OAAO;AACxD;AAGA,IAAO,2BAAQ;","names":[]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/square-grid",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "turf square-grid module",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
@@ -52,23 +52,23 @@
52
52
  "test:tape": "tsx test.ts"
53
53
  },
54
54
  "devDependencies": {
55
- "@turf/bbox-polygon": "^7.1.0",
56
- "@turf/truncate": "^7.1.0",
55
+ "@turf/bbox-polygon": "^7.2.0",
56
+ "@turf/truncate": "^7.2.0",
57
57
  "@types/benchmark": "^2.1.5",
58
- "@types/tape": "^4.2.32",
58
+ "@types/tape": "^4.13.4",
59
59
  "benchmark": "^2.1.4",
60
60
  "npm-run-all": "^4.1.5",
61
- "tape": "^5.7.2",
62
- "tsup": "^8.0.1",
63
- "tsx": "^4.6.2",
64
- "typescript": "^5.2.2",
61
+ "tape": "^5.9.0",
62
+ "tsup": "^8.3.5",
63
+ "tsx": "^4.19.2",
64
+ "typescript": "^5.5.4",
65
65
  "write-json-file": "^5.0.0"
66
66
  },
67
67
  "dependencies": {
68
- "@turf/helpers": "^7.1.0",
69
- "@turf/rectangle-grid": "^7.1.0",
68
+ "@turf/helpers": "^7.2.0",
69
+ "@turf/rectangle-grid": "^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
  }
@@ -8,15 +8,12 @@ var _ellipse = require('@turf/ellipse');
8
8
  function standardDeviationalEllipse(points, options) {
9
9
  var _a;
10
10
  options = options || {};
11
- if (!_helpers.isObject.call(void 0, options))
12
- throw new Error("options is invalid");
11
+ if (!_helpers.isObject.call(void 0, options)) throw new Error("options is invalid");
13
12
  const steps = options.steps || 64;
14
13
  const weightTerm = options.weight;
15
14
  const properties = options.properties || {};
16
- if (!_helpers.isNumber.call(void 0, steps))
17
- throw new Error("steps must be a number");
18
- if (!_helpers.isObject.call(void 0, properties))
19
- throw new Error("properties must be a number");
15
+ if (!_helpers.isNumber.call(void 0, steps)) throw new Error("steps must be a number");
16
+ if (!_helpers.isObject.call(void 0, properties)) throw new Error("properties must be a number");
20
17
  const numberOfFeatures = _meta.coordAll.call(void 0, points).length;
21
18
  const meanCenter = _centermean.centerMean.call(void 0, points, { weight: weightTerm });
22
19
  let xDeviationSquaredSum = 0;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"names":["_a"],"mappings":";AAQA,SAAS,UAAU,mBAAmB;AACtC,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB,UAAU,gBAAgB;AACtD,SAAS,kBAAkB;AAC3B,SAAS,2BAA2B;AACpC,SAAS,eAAe;AAwDxB,SAAS,2BACP,QACA,SAK4B;AA5E9B;AA8EE,YAAU,WAAW,CAAC;AACtB,M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GAAG,UAAU,UAAU,CAAC;AACvE,iBACE,KAAK;AAAA,MACH,UAAU,IAAI,KAAK,IAAI,KAAK,IAAI,UAAU,IAAI,KAAK,IAAI,KAAK;AAAA,MAC5D;AAAA,IACF,IAAI;AACN,iBACE,KAAK;AAAA,MACH,UAAU,IAAI,KAAK,IAAI,KAAK,IAAI,UAAU,IAAI,KAAK,IAAI,KAAK;AAAA,MAC5D;AAAA,IACF,IAAI;AACN,iBAAa;AAAA,EACf,CAAC;AAED,QAAM,SAAS,KAAK,KAAM,IAAI,YAAa,SAAS;AACpD,QAAM,SAAS,KAAK,KAAM,IAAI,YAAa,SAAS;AAEpD,QAAM,aAA+B,QAAQ,YAAY,QAAQ,QAAQ;AAAA,IACvE,OAAO;AAAA,IACP,OAAO;AAAA,IACP;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,sBAAsB;AAAA,IAC1B;AAAA,IACA,kBAAkB,CAAC,UAAU,CAAC;AAAA,EAChC;AACA,QAAM,uCAAuC;AAAA,IAC3C,uBAAuB,UAAU,UAAU;AAAA,IAC3C,eAAe;AAAA,IACf,eAAe;AAAA,IACf;AAAA,IACA,OAAO;AAAA,IACP,yBACG,MAAM,SAAS,mBAAmB,EAAE,SAAU;AAAA,EACnD;AAEA,aAAW,cAAa,gBAAW,eAAX,YAAyB,CAAC;AAClD,aAAW,WAAW,6BACpB;AAIF,SAAO;AACT;AAUA,SAAS,cAAc,aAAuB,QAAkB;AAC9D,SAAO;AAAA,IACL,GAAG,YAAY,CAAC,IAAI,OAAO,CAAC;AAAA,IAC5B,GAAG,YAAY,CAAC,IAAI,OAAO,CAAC;AAAA,EAC9B;AACF;AAGA,IAAO,4CAAQ","sourcesContent":["import {\n FeatureCollection,\n Feature,\n Position,\n Polygon,\n GeoJsonProperties,\n Point,\n} from \"geojson\";\nimport { coordAll, featureEach } from \"@turf/meta\";\nimport { getCoords } from \"@turf/invariant\";\nimport { featureCollection, isObject, isNumber } from \"@turf/helpers\";\nimport { centerMean } from \"@turf/center-mean\";\nimport { pointsWithinPolygon } from \"@turf/points-within-polygon\";\nimport { ellipse } from \"@turf/ellipse\";\n\ndeclare interface SDEProps {\n meanCenterCoordinates: Position;\n semiMajorAxis: number;\n semiMinorAxis: number;\n numberOfFeatures: number;\n angle: number;\n percentageWithinEllipse: number;\n}\n\ndeclare interface StandardDeviationalEllipse extends Feature<Polygon> {\n properties: {\n standardDeviationalEllipse: SDEProps;\n [key: string]: any;\n } | null;\n}\n\n/**\n * Takes a collection of features and returns a standard deviational ellipse,\n * also known as a “directional distribution.” The standard deviational ellipse\n * aims to show the direction and the distribution of a dataset by drawing\n * an ellipse that contains about one standard deviation’s worth (~ 70%) of the\n * data.\n *\n * This module mirrors the functionality of {@link http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-statistics-toolbox/directional-distribution.htm|Directional Distribution}\n * in ArcGIS and the {@link http://arken.nmbu.no/~havatv/gis/qgisplugins/SDEllipse/|QGIS Standard Deviational Ellipse Plugin}\n *\n * **Bibliography**\n *\n * • Robert S. Yuill, “The Standard Deviational Ellipse; An Updated Tool for\n * Spatial Description,” _Geografiska Annaler_ 53, no. 1 (1971): 28–39,\n * doi:{@link https://doi.org/10.2307/490885|10.2307/490885}.\n *\n * • Paul Hanly Furfey, “A Note on Lefever’s “Standard Deviational Ellipse,”\n * _American Journal of Sociology_ 33, no. 1 (1927): 94—98,\n * doi:{@link https://doi.org/10.1086/214336|10.1086/214336}.\n *\n *\n * @name standardDeviationalEllipse\n * @param {FeatureCollection<Point>} points GeoJSON points\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.weight] the property name used to weight the center\n * @param {number} [options.steps=64] number of steps for the polygon\n * @param {Object} [options.properties={}] properties to pass to the resulting ellipse\n * @returns {Feature<Polygon>} an elliptical Polygon that includes approximately 1 SD of the dataset within it.\n * @example\n *\n * const bbox = [-74, 40.72, -73.98, 40.74];\n * const points = turf.randomPoint(400, {bbox: bbox});\n * const sdEllipse = turf.standardDeviationalEllipse(points);\n *\n * //addToMap\n * const addToMap = [points, sdEllipse];\n *\n */\nfunction standardDeviationalEllipse(\n points: FeatureCollection<Point>,\n options?: {\n properties?: GeoJsonProperties;\n weight?: string;\n steps?: number;\n }\n): StandardDeviationalEllipse {\n // Optional params\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const steps = options.steps || 64;\n const weightTerm = options.weight;\n const properties = options.properties || {};\n\n // Validation:\n if (!isNumber(steps)) throw new Error(\"steps must be a number\");\n if (!isObject(properties)) throw new Error(\"properties must be a number\");\n\n // Calculate mean center & number of features:\n const numberOfFeatures = coordAll(points).length;\n const meanCenter = centerMean(points, { weight: weightTerm });\n\n // Calculate angle of rotation:\n // [X, Y] = mean center of all [x, y].\n // theta = arctan( (A + B) / C )\n // A = sum((x - X)^2) - sum((y - Y)^2)\n // B = sqrt(A^2 + 4(sum((x - X)(y - Y))^2))\n // C = 2(sum((x - X)(y - Y)))\n\n let xDeviationSquaredSum = 0;\n let yDeviationSquaredSum = 0;\n let xyDeviationSum = 0;\n\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n xDeviationSquaredSum += Math.pow(deviation.x, 2) * weight;\n yDeviationSquaredSum += Math.pow(deviation.y, 2) * weight;\n xyDeviationSum += deviation.x * deviation.y * weight;\n });\n\n const bigA = xDeviationSquaredSum - yDeviationSquaredSum;\n const bigB = Math.sqrt(Math.pow(bigA, 2) + 4 * Math.pow(xyDeviationSum, 2));\n const bigC = 2 * xyDeviationSum;\n const theta = Math.atan((bigA + bigB) / bigC);\n const thetaDeg = (theta * 180) / Math.PI;\n\n // Calculate axes:\n // sigmaX = sqrt((1 / n - 2) * sum((((x - X) * cos(theta)) - ((y - Y) * sin(theta)))^2))\n // sigmaY = sqrt((1 / n - 2) * sum((((x - X) * sin(theta)) - ((y - Y) * cos(theta)))^2))\n let sigmaXsum = 0;\n let sigmaYsum = 0;\n let weightsum = 0;\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n sigmaXsum +=\n Math.pow(\n deviation.x * Math.cos(theta) - deviation.y * Math.sin(theta),\n 2\n ) * weight;\n sigmaYsum +=\n Math.pow(\n deviation.x * Math.sin(theta) + deviation.y * Math.cos(theta),\n 2\n ) * weight;\n weightsum += weight;\n });\n\n const sigmaX = Math.sqrt((2 * sigmaXsum) / weightsum);\n const sigmaY = Math.sqrt((2 * sigmaYsum) / weightsum);\n\n const theEllipse: Feature<Polygon> = ellipse(meanCenter, sigmaX, sigmaY, {\n units: \"degrees\",\n angle: thetaDeg,\n steps: steps,\n properties: properties,\n });\n const pointsWithinEllipse = pointsWithinPolygon(\n points,\n featureCollection([theEllipse])\n );\n const standardDeviationalEllipseProperties = {\n meanCenterCoordinates: getCoords(meanCenter),\n semiMajorAxis: sigmaX,\n semiMinorAxis: sigmaY,\n numberOfFeatures: numberOfFeatures,\n angle: thetaDeg,\n percentageWithinEllipse:\n (100 * coordAll(pointsWithinEllipse).length) / numberOfFeatures,\n };\n // Make sure properties object exists.\n theEllipse.properties = theEllipse.properties ?? {};\n theEllipse.properties.standardDeviationalEllipse =\n standardDeviationalEllipseProperties;\n\n // We have added the StandardDeviationalEllipse specific properties, so\n // confirm this to Typescript with a cast.\n return theEllipse as StandardDeviationalEllipse;\n}\n\n/**\n * Get x_i - X and y_i - Y\n *\n * @private\n * @param {Position} coordinates Array of [x_i, y_i]\n * @param {Position} center Array of [X, Y]\n * @returns {Object} { x: n, y: m }\n */\nfunction getDeviations(coordinates: Position, center: Position) {\n return {\n x: coordinates[0] - center[0],\n y: coordinates[1] - center[1],\n };\n}\n\nexport { standardDeviationalEllipse, SDEProps, StandardDeviationalEllipse };\nexport default standardDeviationalEllipse;\n"]}
1
+ {"version":3,"sources":["/home/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IAC3C,aAAA,EAAe,MAAA;AAAA,IACf,aAAA,EAAe,MAAA;AAAA,IACf,gBAAA;AAAA,IACA,KAAA,EAAO,QAAA;AAAA,IACP,uBAAA,EACG,IAAA,EAAM,4BAAA,mBAA4B,CAAA,CAAE,OAAA,EAAU;AAAA,EACnD,CAAA;AAEA,EAAA,UAAA,CAAW,WAAA,EAAA,CAAa,GAAA,EAAA,UAAA,CAAW,UAAA,EAAA,GAAX,KAAA,EAAA,GAAA,EAAyB,CAAC,CAAA;AAClD,EAAA,UAAA,CAAW,UAAA,CAAW,2BAAA,EACpB,oCAAA;AAIF,EAAA,OAAO,UAAA;AACT;AAUA,SAAS,aAAA,CAAc,WAAA,EAAuB,MAAA,EAAkB;AAC9D,EAAA,OAAO;AAAA,IACL,CAAA,EAAG,WAAA,CAAY,CAAC,EAAA,EAAI,MAAA,CAAO,CAAC,CAAA;AAAA,IAC5B,CAAA,EAAG,WAAA,CAAY,CAAC,EAAA,EAAI,MAAA,CAAO,CAAC;AAAA,EAC9B,CAAA;AACF;AAGA,IAAO,0CAAA,EAAQ,0BAAA;AD3Gf;AACE;AACA;AACF,6HAAC","file":"/home/runner/work/turf/turf/packages/turf-standard-deviational-ellipse/dist/cjs/index.cjs","sourcesContent":[null,"import {\n FeatureCollection,\n Feature,\n Position,\n Polygon,\n GeoJsonProperties,\n Point,\n} from \"geojson\";\nimport { coordAll, featureEach } from \"@turf/meta\";\nimport { getCoords } from \"@turf/invariant\";\nimport { featureCollection, isObject, isNumber } from \"@turf/helpers\";\nimport { centerMean } from \"@turf/center-mean\";\nimport { pointsWithinPolygon } from \"@turf/points-within-polygon\";\nimport { ellipse } from \"@turf/ellipse\";\n\ndeclare interface SDEProps {\n meanCenterCoordinates: Position;\n semiMajorAxis: number;\n semiMinorAxis: number;\n numberOfFeatures: number;\n angle: number;\n percentageWithinEllipse: number;\n}\n\ndeclare interface StandardDeviationalEllipse extends Feature<Polygon> {\n properties: {\n standardDeviationalEllipse: SDEProps;\n [key: string]: any;\n } | null;\n}\n\n/**\n * Takes a collection of features and returns a standard deviational ellipse,\n * also known as a “directional distribution.” The standard deviational ellipse\n * aims to show the direction and the distribution of a dataset by drawing\n * an ellipse that contains about one standard deviation’s worth (~ 70%) of the\n * data.\n *\n * This module mirrors the functionality of {@link http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-statistics-toolbox/directional-distribution.htm|Directional Distribution}\n * in ArcGIS and the {@link http://arken.nmbu.no/~havatv/gis/qgisplugins/SDEllipse/|QGIS Standard Deviational Ellipse Plugin}\n *\n * **Bibliography**\n *\n * • Robert S. Yuill, “The Standard Deviational Ellipse; An Updated Tool for\n * Spatial Description,” _Geografiska Annaler_ 53, no. 1 (1971): 28–39,\n * doi:{@link https://doi.org/10.2307/490885|10.2307/490885}.\n *\n * • Paul Hanly Furfey, “A Note on Lefever’s “Standard Deviational Ellipse,”\n * _American Journal of Sociology_ 33, no. 1 (1927): 94—98,\n * doi:{@link https://doi.org/10.1086/214336|10.1086/214336}.\n *\n *\n * @function\n * @param {FeatureCollection<Point>} points GeoJSON points\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.weight] the property name used to weight the center\n * @param {number} [options.steps=64] number of steps for the polygon\n * @param {Object} [options.properties={}] properties to pass to the resulting ellipse\n * @returns {Feature<Polygon>} an elliptical Polygon that includes approximately 1 SD of the dataset within it.\n * @example\n *\n * const bbox = [-74, 40.72, -73.98, 40.74];\n * const points = turf.randomPoint(400, {bbox: bbox});\n * const sdEllipse = turf.standardDeviationalEllipse(points);\n *\n * //addToMap\n * const addToMap = [points, sdEllipse];\n *\n */\nfunction standardDeviationalEllipse(\n points: FeatureCollection<Point>,\n options?: {\n properties?: GeoJsonProperties;\n weight?: string;\n steps?: number;\n }\n): StandardDeviationalEllipse {\n // Optional params\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const steps = options.steps || 64;\n const weightTerm = options.weight;\n const properties = options.properties || {};\n\n // Validation:\n if (!isNumber(steps)) throw new Error(\"steps must be a number\");\n if (!isObject(properties)) throw new Error(\"properties must be a number\");\n\n // Calculate mean center & number of features:\n const numberOfFeatures = coordAll(points).length;\n const meanCenter = centerMean(points, { weight: weightTerm });\n\n // Calculate angle of rotation:\n // [X, Y] = mean center of all [x, y].\n // theta = arctan( (A + B) / C )\n // A = sum((x - X)^2) - sum((y - Y)^2)\n // B = sqrt(A^2 + 4(sum((x - X)(y - Y))^2))\n // C = 2(sum((x - X)(y - Y)))\n\n let xDeviationSquaredSum = 0;\n let yDeviationSquaredSum = 0;\n let xyDeviationSum = 0;\n\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n xDeviationSquaredSum += Math.pow(deviation.x, 2) * weight;\n yDeviationSquaredSum += Math.pow(deviation.y, 2) * weight;\n xyDeviationSum += deviation.x * deviation.y * weight;\n });\n\n const bigA = xDeviationSquaredSum - yDeviationSquaredSum;\n const bigB = Math.sqrt(Math.pow(bigA, 2) + 4 * Math.pow(xyDeviationSum, 2));\n const bigC = 2 * xyDeviationSum;\n const theta = Math.atan((bigA + bigB) / bigC);\n const thetaDeg = (theta * 180) / Math.PI;\n\n // Calculate axes:\n // sigmaX = sqrt((1 / n - 2) * sum((((x - X) * cos(theta)) - ((y - Y) * sin(theta)))^2))\n // sigmaY = sqrt((1 / n - 2) * sum((((x - X) * sin(theta)) - ((y - Y) * cos(theta)))^2))\n let sigmaXsum = 0;\n let sigmaYsum = 0;\n let weightsum = 0;\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n sigmaXsum +=\n Math.pow(\n deviation.x * Math.cos(theta) - deviation.y * Math.sin(theta),\n 2\n ) * weight;\n sigmaYsum +=\n Math.pow(\n deviation.x * Math.sin(theta) + deviation.y * Math.cos(theta),\n 2\n ) * weight;\n weightsum += weight;\n });\n\n const sigmaX = Math.sqrt((2 * sigmaXsum) / weightsum);\n const sigmaY = Math.sqrt((2 * sigmaYsum) / weightsum);\n\n const theEllipse: Feature<Polygon> = ellipse(meanCenter, sigmaX, sigmaY, {\n units: \"degrees\",\n angle: thetaDeg,\n steps: steps,\n properties: properties,\n });\n const pointsWithinEllipse = pointsWithinPolygon(\n points,\n featureCollection([theEllipse])\n );\n const standardDeviationalEllipseProperties = {\n meanCenterCoordinates: getCoords(meanCenter),\n semiMajorAxis: sigmaX,\n semiMinorAxis: sigmaY,\n numberOfFeatures: numberOfFeatures,\n angle: thetaDeg,\n percentageWithinEllipse:\n (100 * coordAll(pointsWithinEllipse).length) / numberOfFeatures,\n };\n // Make sure properties object exists.\n theEllipse.properties = theEllipse.properties ?? {};\n theEllipse.properties.standardDeviationalEllipse =\n standardDeviationalEllipseProperties;\n\n // We have added the StandardDeviationalEllipse specific properties, so\n // confirm this to Typescript with a cast.\n return theEllipse as StandardDeviationalEllipse;\n}\n\n/**\n * Get x_i - X and y_i - Y\n *\n * @private\n * @param {Position} coordinates Array of [x_i, y_i]\n * @param {Position} center Array of [X, Y]\n * @returns {Object} { x: n, y: m }\n */\nfunction getDeviations(coordinates: Position, center: Position) {\n return {\n x: coordinates[0] - center[0],\n y: coordinates[1] - center[1],\n };\n}\n\nexport { standardDeviationalEllipse, SDEProps, StandardDeviationalEllipse };\nexport default standardDeviationalEllipse;\n"]}
@@ -35,7 +35,7 @@ declare interface StandardDeviationalEllipse extends Feature<Polygon> {
35
35
  * doi:{@link https://doi.org/10.1086/214336|10.1086/214336}.
36
36
  *
37
37
  *
38
- * @name standardDeviationalEllipse
38
+ * @function
39
39
  * @param {FeatureCollection<Point>} points GeoJSON points
40
40
  * @param {Object} [options={}] Optional parameters
41
41
  * @param {string} [options.weight] the property name used to weight the center
@@ -35,7 +35,7 @@ declare interface StandardDeviationalEllipse extends Feature<Polygon> {
35
35
  * doi:{@link https://doi.org/10.1086/214336|10.1086/214336}.
36
36
  *
37
37
  *
38
- * @name standardDeviationalEllipse
38
+ * @function
39
39
  * @param {FeatureCollection<Point>} points GeoJSON points
40
40
  * @param {Object} [options={}] Optional parameters
41
41
  * @param {string} [options.weight] the property name used to weight the center
@@ -8,15 +8,12 @@ import { ellipse } from "@turf/ellipse";
8
8
  function standardDeviationalEllipse(points, options) {
9
9
  var _a;
10
10
  options = options || {};
11
- if (!isObject(options))
12
- throw new Error("options is invalid");
11
+ if (!isObject(options)) throw new Error("options is invalid");
13
12
  const steps = options.steps || 64;
14
13
  const weightTerm = options.weight;
15
14
  const properties = options.properties || {};
16
- if (!isNumber(steps))
17
- throw new Error("steps must be a number");
18
- if (!isObject(properties))
19
- throw new Error("properties must be a number");
15
+ if (!isNumber(steps)) throw new Error("steps must be a number");
16
+ if (!isObject(properties)) throw new Error("properties must be a number");
20
17
  const numberOfFeatures = coordAll(points).length;
21
18
  const meanCenter = centerMean(points, { weight: weightTerm });
22
19
  let xDeviationSquaredSum = 0;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n FeatureCollection,\n Feature,\n Position,\n Polygon,\n GeoJsonProperties,\n Point,\n} from \"geojson\";\nimport { coordAll, featureEach } from \"@turf/meta\";\nimport { getCoords } from \"@turf/invariant\";\nimport { featureCollection, isObject, isNumber } from \"@turf/helpers\";\nimport { centerMean } from \"@turf/center-mean\";\nimport { pointsWithinPolygon } from \"@turf/points-within-polygon\";\nimport { ellipse } from \"@turf/ellipse\";\n\ndeclare interface SDEProps {\n meanCenterCoordinates: Position;\n semiMajorAxis: number;\n semiMinorAxis: number;\n numberOfFeatures: number;\n angle: number;\n percentageWithinEllipse: number;\n}\n\ndeclare interface StandardDeviationalEllipse extends Feature<Polygon> {\n properties: {\n standardDeviationalEllipse: SDEProps;\n [key: string]: any;\n } | null;\n}\n\n/**\n * Takes a collection of features and returns a standard deviational ellipse,\n * also known as a “directional distribution.” The standard deviational ellipse\n * aims to show the direction and the distribution of a dataset by drawing\n * an ellipse that contains about one standard deviation’s worth (~ 70%) of the\n * data.\n *\n * This module mirrors the functionality of {@link http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-statistics-toolbox/directional-distribution.htm|Directional Distribution}\n * in ArcGIS and the {@link http://arken.nmbu.no/~havatv/gis/qgisplugins/SDEllipse/|QGIS Standard Deviational Ellipse Plugin}\n *\n * **Bibliography**\n *\n * • Robert S. Yuill, “The Standard Deviational Ellipse; An Updated Tool for\n * Spatial Description,” _Geografiska Annaler_ 53, no. 1 (1971): 28–39,\n * doi:{@link https://doi.org/10.2307/490885|10.2307/490885}.\n *\n * • Paul Hanly Furfey, “A Note on Lefever’s “Standard Deviational Ellipse,”\n * _American Journal of Sociology_ 33, no. 1 (1927): 94—98,\n * doi:{@link https://doi.org/10.1086/214336|10.1086/214336}.\n *\n *\n * @name standardDeviationalEllipse\n * @param {FeatureCollection<Point>} points GeoJSON points\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.weight] the property name used to weight the center\n * @param {number} [options.steps=64] number of steps for the polygon\n * @param {Object} [options.properties={}] properties to pass to the resulting ellipse\n * @returns {Feature<Polygon>} an elliptical Polygon that includes approximately 1 SD of the dataset within it.\n * @example\n *\n * const bbox = [-74, 40.72, -73.98, 40.74];\n * const points = turf.randomPoint(400, {bbox: bbox});\n * const sdEllipse = turf.standardDeviationalEllipse(points);\n *\n * //addToMap\n * const addToMap = [points, sdEllipse];\n *\n */\nfunction standardDeviationalEllipse(\n points: FeatureCollection<Point>,\n options?: {\n properties?: GeoJsonProperties;\n weight?: string;\n steps?: number;\n }\n): StandardDeviationalEllipse {\n // Optional params\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const steps = options.steps || 64;\n const weightTerm = options.weight;\n const properties = options.properties || {};\n\n // Validation:\n if (!isNumber(steps)) throw new Error(\"steps must be a number\");\n if (!isObject(properties)) throw new Error(\"properties must be a number\");\n\n // Calculate mean center & number of features:\n const numberOfFeatures = coordAll(points).length;\n const meanCenter = centerMean(points, { weight: weightTerm });\n\n // Calculate angle of rotation:\n // [X, Y] = mean center of all [x, y].\n // theta = arctan( (A + B) / C )\n // A = sum((x - X)^2) - sum((y - Y)^2)\n // B = sqrt(A^2 + 4(sum((x - X)(y - Y))^2))\n // C = 2(sum((x - X)(y - Y)))\n\n let xDeviationSquaredSum = 0;\n let yDeviationSquaredSum = 0;\n let xyDeviationSum = 0;\n\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n xDeviationSquaredSum += Math.pow(deviation.x, 2) * weight;\n yDeviationSquaredSum += Math.pow(deviation.y, 2) * weight;\n xyDeviationSum += deviation.x * deviation.y * weight;\n });\n\n const bigA = xDeviationSquaredSum - yDeviationSquaredSum;\n const bigB = Math.sqrt(Math.pow(bigA, 2) + 4 * Math.pow(xyDeviationSum, 2));\n const bigC = 2 * xyDeviationSum;\n const theta = Math.atan((bigA + bigB) / bigC);\n const thetaDeg = (theta * 180) / Math.PI;\n\n // Calculate axes:\n // sigmaX = sqrt((1 / n - 2) * sum((((x - X) * cos(theta)) - ((y - Y) * sin(theta)))^2))\n // sigmaY = sqrt((1 / n - 2) * sum((((x - X) * sin(theta)) - ((y - Y) * cos(theta)))^2))\n let sigmaXsum = 0;\n let sigmaYsum = 0;\n let weightsum = 0;\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n sigmaXsum +=\n Math.pow(\n deviation.x * Math.cos(theta) - deviation.y * Math.sin(theta),\n 2\n ) * weight;\n sigmaYsum +=\n Math.pow(\n deviation.x * Math.sin(theta) + deviation.y * Math.cos(theta),\n 2\n ) * weight;\n weightsum += weight;\n });\n\n const sigmaX = Math.sqrt((2 * sigmaXsum) / weightsum);\n const sigmaY = Math.sqrt((2 * sigmaYsum) / weightsum);\n\n const theEllipse: Feature<Polygon> = ellipse(meanCenter, sigmaX, sigmaY, {\n units: \"degrees\",\n angle: thetaDeg,\n steps: steps,\n properties: properties,\n });\n const pointsWithinEllipse = pointsWithinPolygon(\n points,\n featureCollection([theEllipse])\n );\n const standardDeviationalEllipseProperties = {\n meanCenterCoordinates: getCoords(meanCenter),\n semiMajorAxis: sigmaX,\n semiMinorAxis: sigmaY,\n numberOfFeatures: numberOfFeatures,\n angle: thetaDeg,\n percentageWithinEllipse:\n (100 * coordAll(pointsWithinEllipse).length) / numberOfFeatures,\n };\n // Make sure properties object exists.\n theEllipse.properties = theEllipse.properties ?? {};\n theEllipse.properties.standardDeviationalEllipse =\n standardDeviationalEllipseProperties;\n\n // We have added the StandardDeviationalEllipse specific properties, so\n // confirm this to Typescript with a cast.\n return theEllipse as StandardDeviationalEllipse;\n}\n\n/**\n * Get x_i - X and y_i - Y\n *\n * @private\n * @param {Position} coordinates Array of [x_i, y_i]\n * @param {Position} center Array of [X, Y]\n * @returns {Object} { x: n, y: m }\n */\nfunction getDeviations(coordinates: Position, center: Position) {\n return {\n x: coordinates[0] - center[0],\n y: coordinates[1] - center[1],\n };\n}\n\nexport { standardDeviationalEllipse, SDEProps, StandardDeviationalEllipse };\nexport default standardDeviationalEllipse;\n"],"mappings":";AAQA,SAAS,UAAU,mBAAmB;AACtC,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB,UAAU,gBAAgB;AACtD,SAAS,kBAAkB;AAC3B,SAAS,2BAA2B;AACpC,SAAS,eAAe;AAwDxB,SAAS,2BACP,QACA,SAK4B;AA5E9B;AA8EE,YAAU,WAAW,CAAC;AACtB,MAAI,CAAC,SAAS,OAAO;AAAG,UAAM,IAAI,MAAM,oBAAoB;AAC5D,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,aAAa,QAAQ;AAC3B,QAAM,aAAa,QAAQ,cAAc,CAAC;AAG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E,KAAK;AAAA,MACH,UAAU,IAAI,KAAK,IAAI,KAAK,IAAI,UAAU,IAAI,KAAK,IAAI,KAAK;AAAA,MAC5D;AAAA,IACF,IAAI;AACN,iBAAa;AAAA,EACf,CAAC;AAED,QAAM,SAAS,KAAK,KAAM,IAAI,YAAa,SAAS;AACpD,QAAM,SAAS,KAAK,KAAM,IAAI,YAAa,SAAS;AAEpD,QAAM,aAA+B,QAAQ,YAAY,QAAQ,QAAQ;AAAA,IACvE,OAAO;AAAA,IACP,OAAO;AAAA,IACP;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,sBAAsB;AAAA,IAC1B;AAAA,IACA,kBAAkB,CAAC,UAAU,CAAC;AAAA,EAChC;AACA,QAAM,uCAAuC;AAAA,IAC3C,uBAAuB,UAAU,UAAU;AAAA,IAC3C,eAAe;AAAA,IACf,eAAe;AAAA,IACf;AAAA,IACA,OAAO;AAAA,IACP,yBACG,MAAM,SAAS,mBAAmB,EAAE,SAAU;AAAA,EACnD;AAEA,aAAW,cAAa,gBAAW,eAAX,YAAyB,CAAC;AAClD,aAAW,WAAW,6BACpB;AAIF,SAAO;AACT;AAUA,SAAS,cAAc,aAAuB,QAAkB;AAC9D,SAAO;AAAA,IACL,GAAG,YAAY,CAAC,IAAI,OAAO,CAAC;AAAA,IAC5B,GAAG,YAAY,CAAC,IAAI,OAAO,CAAC;AAAA,EAC9B;AACF;AAGA,IAAO,4CAAQ;","names":["_a"]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n FeatureCollection,\n Feature,\n Position,\n Polygon,\n GeoJsonProperties,\n Point,\n} from \"geojson\";\nimport { coordAll, featureEach } from \"@turf/meta\";\nimport { getCoords } from \"@turf/invariant\";\nimport { featureCollection, isObject, isNumber } from \"@turf/helpers\";\nimport { centerMean } from \"@turf/center-mean\";\nimport { pointsWithinPolygon } from \"@turf/points-within-polygon\";\nimport { ellipse } from \"@turf/ellipse\";\n\ndeclare interface SDEProps {\n meanCenterCoordinates: Position;\n semiMajorAxis: number;\n semiMinorAxis: number;\n numberOfFeatures: number;\n angle: number;\n percentageWithinEllipse: number;\n}\n\ndeclare interface StandardDeviationalEllipse extends Feature<Polygon> {\n properties: {\n standardDeviationalEllipse: SDEProps;\n [key: string]: any;\n } | null;\n}\n\n/**\n * Takes a collection of features and returns a standard deviational ellipse,\n * also known as a “directional distribution.” The standard deviational ellipse\n * aims to show the direction and the distribution of a dataset by drawing\n * an ellipse that contains about one standard deviation’s worth (~ 70%) of the\n * data.\n *\n * This module mirrors the functionality of {@link http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-statistics-toolbox/directional-distribution.htm|Directional Distribution}\n * in ArcGIS and the {@link http://arken.nmbu.no/~havatv/gis/qgisplugins/SDEllipse/|QGIS Standard Deviational Ellipse Plugin}\n *\n * **Bibliography**\n *\n * • Robert S. Yuill, “The Standard Deviational Ellipse; An Updated Tool for\n * Spatial Description,” _Geografiska Annaler_ 53, no. 1 (1971): 28–39,\n * doi:{@link https://doi.org/10.2307/490885|10.2307/490885}.\n *\n * • Paul Hanly Furfey, “A Note on Lefever’s “Standard Deviational Ellipse,”\n * _American Journal of Sociology_ 33, no. 1 (1927): 94—98,\n * doi:{@link https://doi.org/10.1086/214336|10.1086/214336}.\n *\n *\n * @function\n * @param {FeatureCollection<Point>} points GeoJSON points\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.weight] the property name used to weight the center\n * @param {number} [options.steps=64] number of steps for the polygon\n * @param {Object} [options.properties={}] properties to pass to the resulting ellipse\n * @returns {Feature<Polygon>} an elliptical Polygon that includes approximately 1 SD of the dataset within it.\n * @example\n *\n * const bbox = [-74, 40.72, -73.98, 40.74];\n * const points = turf.randomPoint(400, {bbox: bbox});\n * const sdEllipse = turf.standardDeviationalEllipse(points);\n *\n * //addToMap\n * const addToMap = [points, sdEllipse];\n *\n */\nfunction standardDeviationalEllipse(\n points: FeatureCollection<Point>,\n options?: {\n properties?: GeoJsonProperties;\n weight?: string;\n steps?: number;\n }\n): StandardDeviationalEllipse {\n // Optional params\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const steps = options.steps || 64;\n const weightTerm = options.weight;\n const properties = options.properties || {};\n\n // Validation:\n if (!isNumber(steps)) throw new Error(\"steps must be a number\");\n if (!isObject(properties)) throw new Error(\"properties must be a number\");\n\n // Calculate mean center & number of features:\n const numberOfFeatures = coordAll(points).length;\n const meanCenter = centerMean(points, { weight: weightTerm });\n\n // Calculate angle of rotation:\n // [X, Y] = mean center of all [x, y].\n // theta = arctan( (A + B) / C )\n // A = sum((x - X)^2) - sum((y - Y)^2)\n // B = sqrt(A^2 + 4(sum((x - X)(y - Y))^2))\n // C = 2(sum((x - X)(y - Y)))\n\n let xDeviationSquaredSum = 0;\n let yDeviationSquaredSum = 0;\n let xyDeviationSum = 0;\n\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n xDeviationSquaredSum += Math.pow(deviation.x, 2) * weight;\n yDeviationSquaredSum += Math.pow(deviation.y, 2) * weight;\n xyDeviationSum += deviation.x * deviation.y * weight;\n });\n\n const bigA = xDeviationSquaredSum - yDeviationSquaredSum;\n const bigB = Math.sqrt(Math.pow(bigA, 2) + 4 * Math.pow(xyDeviationSum, 2));\n const bigC = 2 * xyDeviationSum;\n const theta = Math.atan((bigA + bigB) / bigC);\n const thetaDeg = (theta * 180) / Math.PI;\n\n // Calculate axes:\n // sigmaX = sqrt((1 / n - 2) * sum((((x - X) * cos(theta)) - ((y - Y) * sin(theta)))^2))\n // sigmaY = sqrt((1 / n - 2) * sum((((x - X) * sin(theta)) - ((y - Y) * cos(theta)))^2))\n let sigmaXsum = 0;\n let sigmaYsum = 0;\n let weightsum = 0;\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n sigmaXsum +=\n Math.pow(\n deviation.x * Math.cos(theta) - deviation.y * Math.sin(theta),\n 2\n ) * weight;\n sigmaYsum +=\n Math.pow(\n deviation.x * Math.sin(theta) + deviation.y * Math.cos(theta),\n 2\n ) * weight;\n weightsum += weight;\n });\n\n const sigmaX = Math.sqrt((2 * sigmaXsum) / weightsum);\n const sigmaY = Math.sqrt((2 * sigmaYsum) / weightsum);\n\n const theEllipse: Feature<Polygon> = ellipse(meanCenter, sigmaX, sigmaY, {\n units: \"degrees\",\n angle: thetaDeg,\n steps: steps,\n properties: properties,\n });\n const pointsWithinEllipse = pointsWithinPolygon(\n points,\n featureCollection([theEllipse])\n );\n const standardDeviationalEllipseProperties = {\n meanCenterCoordinates: getCoords(meanCenter),\n semiMajorAxis: sigmaX,\n semiMinorAxis: sigmaY,\n numberOfFeatures: numberOfFeatures,\n angle: thetaDeg,\n percentageWithinEllipse:\n (100 * coordAll(pointsWithinEllipse).length) / numberOfFeatures,\n };\n // Make sure properties object exists.\n theEllipse.properties = theEllipse.properties ?? {};\n theEllipse.properties.standardDeviationalEllipse =\n standardDeviationalEllipseProperties;\n\n // We have added the StandardDeviationalEllipse specific properties, so\n // confirm this to Typescript with a cast.\n return theEllipse as StandardDeviationalEllipse;\n}\n\n/**\n * Get x_i - X and y_i - Y\n *\n * @private\n * @param {Position} coordinates Array of [x_i, y_i]\n * @param {Position} center Array of [X, Y]\n * @returns {Object} { x: n, y: m }\n */\nfunction getDeviations(coordinates: Position, center: Position) {\n return {\n x: coordinates[0] - center[0],\n y: coordinates[1] - center[1],\n };\n}\n\nexport { standardDeviationalEllipse, SDEProps, StandardDeviationalEllipse };\nexport default standardDeviationalEllipse;\n"],"mappings":";AAQA,SAAS,UAAU,mBAAmB;AACtC,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB,UAAU,gBAAgB;AACtD,SAAS,kBAAkB;AAC3B,SAAS,2BAA2B;AACpC,SAAS,eAAe;AAw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turf standard-deviational-ellipse module",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
@@ -55,28 +55,28 @@
55
55
  "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"
56
56
  },
57
57
  "devDependencies": {
58
- "@turf/random": "^7.1.0",
59
- "@turf/truncate": "^7.1.0",
58
+ "@turf/random": "^7.2.0",
59
+ "@turf/truncate": "^7.2.0",
60
60
  "@types/benchmark": "^2.1.5",
61
- "@types/tape": "^4.2.32",
61
+ "@types/tape": "^4.13.4",
62
62
  "benchmark": "^2.1.4",
63
63
  "load-json-file": "^7.0.1",
64
64
  "npm-run-all": "^4.1.5",
65
- "tape": "^5.7.2",
66
- "tsup": "^8.0.1",
67
- "tsx": "^4.6.2",
68
- "typescript": "^5.2.2",
65
+ "tape": "^5.9.0",
66
+ "tsup": "^8.3.5",
67
+ "tsx": "^4.19.2",
68
+ "typescript": "^5.5.4",
69
69
  "write-json-file": "^5.0.0"
70
70
  },
71
71
  "dependencies": {
72
- "@turf/center-mean": "^7.1.0",
73
- "@turf/ellipse": "^7.1.0",
74
- "@turf/helpers": "^7.1.0",
75
- "@turf/invariant": "^7.1.0",
76
- "@turf/meta": "^7.1.0",
77
- "@turf/points-within-polygon": "^7.1.0",
72
+ "@turf/center-mean": "^7.2.0",
73
+ "@turf/ellipse": "^7.2.0",
74
+ "@turf/helpers": "^7.2.0",
75
+ "@turf/invariant": "^7.2.0",
76
+ "@turf/meta": "^7.2.0",
77
+ "@turf/points-within-polygon": "^7.2.0",
78
78
  "@types/geojson": "^7946.0.10",
79
- "tslib": "^2.6.2"
79
+ "tslib": "^2.8.1"
80
80
  },
81
- "gitHead": "68915eeebc9278bb40dec3f1034499698a0561ef"
81
+ "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
82
82
  }
@@ -6,8 +6,7 @@ function tag(points, polygons, field, outField) {
6
6
  points = _clone.clone.call(void 0, points);
7
7
  polygons = _clone.clone.call(void 0, polygons);
8
8
  _meta.featureEach.call(void 0, points, function(pt) {
9
- if (!pt.properties)
10
- pt.properties = {};
9
+ if (!pt.properties) pt.properties = {};
11
10
  _meta.featureEach.call(void 0, polygons, function(poly) {
12
11
  if (pt.properties && poly.properties) {
13
12
  if (pt.properties[outField] === void 0) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"names":[],"mappings":";AACA,SAAS,6BAA6B;AACtC,SAAS,aAAa;AACtB,SAAS,mBAAmB;AAqC5B,SAAS,IACP,QACA,UACA,OACA,UAC0B;AAE1B,WAAS,MAAM,MAAM;AACrB,aAAW,MAAM,QAAQ;AACzB,cAAY,QAAQ,SAAU,IAAI;AAChC,QAAI,CAAC,GAAG;AAAY,SAAG,aAAa,CAAC;AACrC,gBAAY,UAAU,SAAU,MAAM;AACpC,UAAI,GAAG,cAAc,KAAK,YAAY;AACpC,YAAI,GAAG,WAAW,QAAQ,MAAM,QAAW;AACzC,cAAI,sBAAsB,IAAI,IAAI;AAChC,eAAG,WAAW,QAAQ,IAAI,KAAK,WAAW,KAAK;AAAA,QACnD;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACD,SAAO;AACT;AAGA,IAAO,mBAAQ","sourcesContent":["import { Point, FeatureCollection, Polygon, MultiPolygon } from \"geojson\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { clone } from \"@turf/clone\";\nimport { featureEach } from \"@turf/meta\";\n\n/**\n * Takes a set of {@link Point|points} and a set of {@link Polygon|polygons} and/or {@link MultiPolygon|multipolygons} and performs a spatial join.\n *\n * @name tag\n * @param {FeatureCollection<Point>} points input points\n * @param {FeatureCollection<Polygon|MultiPolygon>} polygons input (multi)polygons\n * @param {string} field property in `polygons` to add to joined {<Point>} features\n * @param {string} outField property in `points` in which to store joined property from `polygons`\n * @returns {FeatureCollection<Point>} points with `containingPolyId` property containing values from `polyId`\n * @example\n * var pt1 = turf.point([-77, 44]);\n * var pt2 = turf.point([-77, 38]);\n * var poly1 = turf.polygon([[\n * [-81, 41],\n * [-81, 47],\n * [-72, 47],\n * [-72, 41],\n * [-81, 41]\n * ]], {pop: 3000});\n * var poly2 = turf.polygon([[\n * [-81, 35],\n * [-81, 41],\n * [-72, 41],\n * [-72, 35],\n * [-81, 35]\n * ]], {pop: 1000});\n *\n * var points = turf.featureCollection([pt1, pt2]);\n * var polygons = turf.featureCollection([poly1, poly2]);\n *\n * var tagged = turf.tag(points, polygons, 'pop', 'population');\n *\n * //addToMap\n * var addToMap = [tagged, polygons]\n */\nfunction tag(\n points: FeatureCollection<Point>,\n polygons: FeatureCollection<Polygon | MultiPolygon>,\n field: string,\n outField: string\n): FeatureCollection<Point> {\n // prevent mutations\n points = clone(points);\n polygons = clone(polygons);\n featureEach(points, function (pt) {\n if (!pt.properties) pt.properties = {};\n featureEach(polygons, function (poly) {\n if (pt.properties && poly.properties) {\n if (pt.properties[outField] === undefined) {\n if (booleanPointInPolygon(pt, poly))\n pt.properties[outField] = poly.properties[field];\n }\n }\n });\n });\n return points;\n}\n\nexport { tag };\nexport default tag;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-tag/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACCA,uEAAsC;AACtC,oCAAsB;AACtB,kCAA4B;AAqC5B,SAAS,GAAA,CACP,MAAA,EACA,QAAA,EACA,KAAA,EACA,QAAA,EAC0B;AAE1B,EAAA,OAAA,EAAS,0BAAA,MAAY,CAAA;AACrB,EAAA,SAAA,EAAW,0BAAA,QAAc,CAAA;AACzB,EAAA,+BAAA,MAAY,EAAQ,QAAA,CAAU,EAAA,EAAI;AAChC,IAAA,GAAA,CAAI,CAAC,EAAA,CAAG,UAAA,EAAY,EAAA,CAAG,WAAA,EAAa,CAAC,CAAA;AACrC,IAAA,+BAAA,QAAY,EAAU,QAAA,CAAU,IAAA,EAAM;AACpC,MAAA,GAAA,CAAI,EAAA,CAAG,WAAA,GAAc,IAAA,CAAK,UAAA,EAAY;AACpC,QAAA,GAAA,CAAI,EAAA,CAAG,UAAA,CAAW,QAAQ,EAAA,IAAM,KAAA,CAAA,EAAW;AACzC,UAAA,GAAA,CAAI,0DAAA,EAAsB,EAAI,IAAI,CAAA;AAChC,YAAA,EAAA,CAAG,UAAA,CAAW,QAAQ,EAAA,EAAI,IAAA,CAAK,UAAA,CAAW,KAAK,CAAA;AAAA,QACnD;AAAA,MACF;AAAA,IACF,CAAC,CAAA;AAAA,EACH,CAAC,CAAA;AACD,EAAA,OAAO,MAAA;AACT;AAGA,IAAO,iBAAA,EAAQ,GAAA;AD3Cf;AACE;AACA;AACF,sDAAC","file":"/home/runner/work/turf/turf/packages/turf-tag/dist/cjs/index.cjs","sourcesContent":[null,"import { Point, FeatureCollection, Polygon, MultiPolygon } from \"geojson\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { clone } from \"@turf/clone\";\nimport { featureEach } from \"@turf/meta\";\n\n/**\n * Takes a set of {@link Point|points} and a set of {@link Polygon|polygons} and/or {@link MultiPolygon|multipolygons} and performs a spatial join.\n *\n * @function\n * @param {FeatureCollection<Point>} points input points\n * @param {FeatureCollection<Polygon|MultiPolygon>} polygons input (multi)polygons\n * @param {string} field property in `polygons` to add to joined {<Point>} features\n * @param {string} outField property in `points` in which to store joined property from `polygons`\n * @returns {FeatureCollection<Point>} points with `containingPolyId` property containing values from `polyId`\n * @example\n * var pt1 = turf.point([-77, 44]);\n * var pt2 = turf.point([-77, 38]);\n * var poly1 = turf.polygon([[\n * [-81, 41],\n * [-81, 47],\n * [-72, 47],\n * [-72, 41],\n * [-81, 41]\n * ]], {pop: 3000});\n * var poly2 = turf.polygon([[\n * [-81, 35],\n * [-81, 41],\n * [-72, 41],\n * [-72, 35],\n * [-81, 35]\n * ]], {pop: 1000});\n *\n * var points = turf.featureCollection([pt1, pt2]);\n * var polygons = turf.featureCollection([poly1, poly2]);\n *\n * var tagged = turf.tag(points, polygons, 'pop', 'population');\n *\n * //addToMap\n * var addToMap = [tagged, polygons]\n */\nfunction tag(\n points: FeatureCollection<Point>,\n polygons: FeatureCollection<Polygon | MultiPolygon>,\n field: string,\n outField: string\n): FeatureCollection<Point> {\n // prevent mutations\n points = clone(points);\n polygons = clone(polygons);\n featureEach(points, function (pt) {\n if (!pt.properties) pt.properties = {};\n featureEach(polygons, function (poly) {\n if (pt.properties && poly.properties) {\n if (pt.properties[outField] === undefined) {\n if (booleanPointInPolygon(pt, poly))\n pt.properties[outField] = poly.properties[field];\n }\n }\n });\n });\n return points;\n}\n\nexport { tag };\nexport default tag;\n"]}
@@ -3,7 +3,7 @@ import { FeatureCollection, Point, Polygon, MultiPolygon } from 'geojson';
3
3
  /**
4
4
  * Takes a set of {@link Point|points} and a set of {@link Polygon|polygons} and/or {@link MultiPolygon|multipolygons} and performs a spatial join.
5
5
  *
6
- * @name tag
6
+ * @function
7
7
  * @param {FeatureCollection<Point>} points input points
8
8
  * @param {FeatureCollection<Polygon|MultiPolygon>} polygons input (multi)polygons
9
9
  * @param {string} field property in `polygons` to add to joined {<Point>} features
@@ -3,7 +3,7 @@ import { FeatureCollection, Point, Polygon, MultiPolygon } from 'geojson';
3
3
  /**
4
4
  * Takes a set of {@link Point|points} and a set of {@link Polygon|polygons} and/or {@link MultiPolygon|multipolygons} and performs a spatial join.
5
5
  *
6
- * @name tag
6
+ * @function
7
7
  * @param {FeatureCollection<Point>} points input points
8
8
  * @param {FeatureCollection<Polygon|MultiPolygon>} polygons input (multi)polygons
9
9
  * @param {string} field property in `polygons` to add to joined {<Point>} features
@@ -6,8 +6,7 @@ function tag(points, polygons, field, outField) {
6
6
  points = clone(points);
7
7
  polygons = clone(polygons);
8
8
  featureEach(points, function(pt) {
9
- if (!pt.properties)
10
- pt.properties = {};
9
+ if (!pt.properties) pt.properties = {};
11
10
  featureEach(polygons, function(poly) {
12
11
  if (pt.properties && poly.properties) {
13
12
  if (pt.properties[outField] === void 0) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Point, FeatureCollection, Polygon, MultiPolygon } from \"geojson\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { clone } from \"@turf/clone\";\nimport { featureEach } from \"@turf/meta\";\n\n/**\n * Takes a set of {@link Point|points} and a set of {@link Polygon|polygons} and/or {@link MultiPolygon|multipolygons} and performs a spatial join.\n *\n * @name tag\n * @param {FeatureCollection<Point>} points input points\n * @param {FeatureCollection<Polygon|MultiPolygon>} polygons input (multi)polygons\n * @param {string} field property in `polygons` to add to joined {<Point>} features\n * @param {string} outField property in `points` in which to store joined property from `polygons`\n * @returns {FeatureCollection<Point>} points with `containingPolyId` property containing values from `polyId`\n * @example\n * var pt1 = turf.point([-77, 44]);\n * var pt2 = turf.point([-77, 38]);\n * var poly1 = turf.polygon([[\n * [-81, 41],\n * [-81, 47],\n * [-72, 47],\n * [-72, 41],\n * [-81, 41]\n * ]], {pop: 3000});\n * var poly2 = turf.polygon([[\n * [-81, 35],\n * [-81, 41],\n * [-72, 41],\n * [-72, 35],\n * [-81, 35]\n * ]], {pop: 1000});\n *\n * var points = turf.featureCollection([pt1, pt2]);\n * var polygons = turf.featureCollection([poly1, poly2]);\n *\n * var tagged = turf.tag(points, polygons, 'pop', 'population');\n *\n * //addToMap\n * var addToMap = [tagged, polygons]\n */\nfunction tag(\n points: FeatureCollection<Point>,\n polygons: FeatureCollection<Polygon | MultiPolygon>,\n field: string,\n outField: string\n): FeatureCollection<Point> {\n // prevent mutations\n points = clone(points);\n polygons = clone(polygons);\n featureEach(points, function (pt) {\n if (!pt.properties) pt.properties = {};\n featureEach(polygons, function (poly) {\n if (pt.properties && poly.properties) {\n if (pt.properties[outField] === undefined) {\n if (booleanPointInPolygon(pt, poly))\n pt.properties[outField] = poly.properties[field];\n }\n }\n });\n });\n return points;\n}\n\nexport { tag };\nexport default tag;\n"],"mappings":";AACA,SAAS,6BAA6B;AACtC,SAAS,aAAa;AACtB,SAAS,mBAAmB;AAqC5B,SAAS,IACP,QACA,UACA,OACA,UAC0B;AAE1B,WAAS,MAAM,MAAM;AACrB,aAAW,MAAM,QAAQ;AACzB,cAAY,QAAQ,SAAU,IAAI;AAChC,QAAI,CAAC,GAAG;AAAY,SAAG,aAAa,CAAC;AACrC,gBAAY,UAAU,SAAU,MAAM;AACpC,UAAI,GAAG,cAAc,KAAK,YAAY;AACpC,YAAI,GAAG,WAAW,QAAQ,MAAM,QAAW;AACzC,cAAI,sBAAsB,IAAI,IAAI;AAChC,eAAG,WAAW,QAAQ,IAAI,KAAK,WAAW,KAAK;AAAA,QACnD;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACD,SAAO;AACT;AAGA,IAAO,mBAAQ;","names":[]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Point, FeatureCollection, Polygon, MultiPolygon } from \"geojson\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { clone } from \"@turf/clone\";\nimport { featureEach } from \"@turf/meta\";\n\n/**\n * Takes a set of {@link Point|points} and a set of {@link Polygon|polygons} and/or {@link MultiPolygon|multipolygons} and performs a spatial join.\n *\n * @function\n * @param {FeatureCollection<Point>} points input points\n * @param {FeatureCollection<Polygon|MultiPolygon>} polygons input (multi)polygons\n * @param {string} field property in `polygons` to add to joined {<Point>} features\n * @param {string} outField property in `points` in which to store joined property from `polygons`\n * @returns {FeatureCollection<Point>} points with `containingPolyId` property containing values from `polyId`\n * @example\n * var pt1 = turf.point([-77, 44]);\n * var pt2 = turf.point([-77, 38]);\n * var poly1 = turf.polygon([[\n * [-81, 41],\n * [-81, 47],\n * [-72, 47],\n * [-72, 41],\n * [-81, 41]\n * ]], {pop: 3000});\n * var poly2 = turf.polygon([[\n * [-81, 35],\n * [-81, 41],\n * [-72, 41],\n * [-72, 35],\n * [-81, 35]\n * ]], {pop: 1000});\n *\n * var points = turf.featureCollection([pt1, pt2]);\n * var polygons = turf.featureCollection([poly1, poly2]);\n *\n * var tagged = turf.tag(points, polygons, 'pop', 'population');\n *\n * //addToMap\n * var addToMap = [tagged, polygons]\n */\nfunction tag(\n points: FeatureCollection<Point>,\n polygons: FeatureCollection<Polygon | MultiPolygon>,\n field: string,\n outField: string\n): FeatureCollection<Point> {\n // prevent mutations\n points = clone(points);\n polygons = clone(polygons);\n featureEach(points, function (pt) {\n if (!pt.properties) pt.properties = {};\n featureEach(polygons, function (poly) {\n if (pt.properties && poly.properties) {\n if (pt.properties[outField] === undefined) {\n if (booleanPointInPolygon(pt, poly))\n pt.properties[outField] = poly.properties[field];\n }\n }\n });\n });\n return points;\n}\n\nexport { tag };\nexport default tag;\n"],"mappings":";AACA,SAAS,6BAA6B;AACtC,SAAS,aAAa;AACtB,SAAS,mBAAmB;AAqC5B,SAAS,IACP,QACA,UACA,OACA,UAC0B;AAE1B,WAAS,MAAM,MAAM;AACrB,aAAW,MAAM,QAAQ;AACzB,cAAY,QAAQ,SAAU,IAAI;AAChC,QAAI,CAAC,GAAG,WAAY,IAAG,aAAa,CAAC;AACrC,gBAAY,UAAU,SAAU,MAAM;AACpC,UAAI,GAAG,cAAc,KAAK,YAAY;AACpC,YAAI,GAAG,WAAW,QAAQ,MAAM,QAAW;AACzC,cAAI,sBAAsB,IAAI,IAAI;AAChC,eAAG,WAAW,QAAQ,IAAI,KAAK,WAAW,KAAK;AAAA,QACnD;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACD,SAAO;AACT;AAGA,IAAO,mBAAQ;","names":[]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/tag",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "turf tag module",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
@@ -56,22 +56,22 @@
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/benchmark": "^2.1.5",
59
- "@types/tape": "^4.2.32",
59
+ "@types/tape": "^4.13.4",
60
60
  "benchmark": "^2.1.4",
61
61
  "load-json-file": "^7.0.1",
62
62
  "npm-run-all": "^4.1.5",
63
- "tape": "^5.7.2",
64
- "tsup": "^8.0.1",
65
- "tsx": "^4.6.2",
66
- "typescript": "^5.2.2"
63
+ "tape": "^5.9.0",
64
+ "tsup": "^8.3.5",
65
+ "tsx": "^4.19.2",
66
+ "typescript": "^5.5.4"
67
67
  },
68
68
  "dependencies": {
69
- "@turf/boolean-point-in-polygon": "^7.1.0",
70
- "@turf/clone": "^7.1.0",
71
- "@turf/helpers": "^7.1.0",
72
- "@turf/meta": "^7.1.0",
69
+ "@turf/boolean-point-in-polygon": "^7.2.0",
70
+ "@turf/clone": "^7.2.0",
71
+ "@turf/helpers": "^7.2.0",
72
+ "@turf/meta": "^7.2.0",
73
73
  "@types/geojson": "^7946.0.10",
74
- "tslib": "^2.6.2"
74
+ "tslib": "^2.8.1"
75
75
  },
76
- "gitHead": "68915eeebc9278bb40dec3f1034499698a0561ef"
76
+ "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
77
77
  }
@@ -44,8 +44,7 @@ function flattenCoords(data) {
44
44
  let holeIndex = 0;
45
45
  for (let i = 0; i < data.length; i++) {
46
46
  for (let j = 0; j < data[i].length; j++) {
47
- for (let d = 0; d < dim; d++)
48
- result.vertices.push(data[i][j][d]);
47
+ for (let d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);
49
48
  }
50
49
  if (i > 0) {
51
50
  holeIndex += data[i - 1].length;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"names":["i"],"mappings":";AAOA,OAAO,YAAY;AACnB,SAAS,eAAe;AAgBxB,SAAS,UACP,MAC4B;AAC5B,MACE,CAAC,KAAK,YACL,KAAK,SAAS,SAAS,aAAa,KAAK,SAAS,SAAS,gBAC5D;AACA,UAAM,IAAI,MAAM,yCAAyC;AAAA,EAC3D;AAEA,QAAM,KAAiC;AAAA,IACrC,MAAM;AAAA,IACN,UAAU,CAAC;AAAA,EACb;AAEA,MAAI,KAAK,SAAS,SAAS,WAAW;AACpC,OA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AI,CAAC,EAAE;AACzB,aAAO,MAAM,KAAK,SAAS;AAAA,IAC7B;AAAA,EACF;AAEA,SAAO;AACT;AAGA,IAAO,yBAAQ","sourcesContent":["import {\n Feature,\n FeatureCollection,\n MultiPolygon,\n Polygon,\n Position,\n} from \"geojson\";\nimport earcut from \"earcut\";\nimport { polygon } from \"@turf/helpers\";\n\n/**\n * Tesselates a polygon or multipolygon into a collection of triangle polygons\n * using [earcut](https://github.com/mapbox/earcut).\n *\n * @name tesselate\n * @param {Feature<Polygon|MultiPolygon>} poly the polygon to tesselate\n * @returns {FeatureCollection<Polygon>} collection of polygon tesselations\n * @example\n * const poly = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\n * const triangles = turf.tesselate(poly);\n *\n * //addToMap\n * const addToMap = [poly, triangles]\n */\nfunction tesselate(\n poly: Feature<Polygon | MultiPolygon>\n): FeatureCollection<Polygon> {\n if (\n !poly.geometry ||\n (poly.geometry.type !== \"Polygon\" && poly.geometry.type !== \"MultiPolygon\")\n ) {\n throw new Error(\"input must be a Polygon or MultiPolygon\");\n }\n\n const fc: FeatureCollection<Polygon> = {\n type: \"FeatureCollection\",\n features: [],\n };\n\n if (poly.geometry.type === \"Polygon\") {\n fc.features = processPolygon(poly.geometry.coordinates);\n } else {\n poly.geometry.coordinates.forEach(function (coordinates) {\n fc.features = fc.features.concat(processPolygon(coordinates));\n });\n }\n\n return fc;\n}\n\nfunction processPolygon(coordinates: Position[][]) {\n const data = flattenCoords(coordinates);\n const dim = 2;\n const result = earcut(data.vertices, data.holes, dim);\n\n const features: Feature<Polygon>[] = [];\n const vertices: Position[] = [];\n\n result.forEach(function (vert: any, i: number) {\n const index = result[i];\n vertices.push([data.vertices[index * dim], data.vertices[index * dim + 1]]);\n });\n\n for (var i = 0; i < vertices.length; i += 3) {\n const coords = vertices.slice(i, i + 3);\n coords.push(vertices[i]);\n features.push(polygon([coords]));\n }\n\n return features;\n}\n\nfunction flattenCoords(data: Position[][]) {\n const dim: number = data[0][0].length,\n result: { vertices: number[]; holes: number[]; dimensions: number } = {\n vertices: [],\n holes: [],\n dimensions: dim,\n };\n let holeIndex = 0;\n\n for (let i = 0; i < data.length; i++) {\n for (let j = 0; j < data[i].length; j++) {\n for (let d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n }\n if (i > 0) {\n holeIndex += data[i - 1].length;\n result.holes.push(holeIndex);\n }\n }\n\n return result;\n}\n\nexport { tesselate };\nexport default tesselate;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-tesselate/dist/cjs/index.cjs","../../index.ts"],"names":["i"],"mappings":"AAAA;ACOA,gFAAmB;AACnB,wCAAwB;AAgBxB,SAAS,SAAA,CACP,IAAA,EAC4B;AAC5B,EAAA,GAAA,CACE,CAAC,IAAA,CAAK,SAAA,GACL,IAAA,CAAK,QAAA,CAAS,KAAA,IAAS,UAAA,GAAa,IAAA,CAAK,QAAA,CAAS,KAAA,IAAS,cAAA,EAC5D;AACA,IAAA,MAAM,IAAI,KAAA,CAAM,yCAAyC,CAAA;AAAA,EAC3D;AAEA,EAAA,MAAM,GAAA,EAAiC;AAAA,IACrC,IAAA,EAAM,mBAAA;AAAA,IACN,QAAA,EAAU,CAAC;AAAA,EACb,CAAA;AAEA,EAAA,GAAA,CAAI,IAAA,CAAK,QAAA,CAAS,KAAA,IAAS,SAAA,EAAW;AACpC,IAAA,EAAA,CAAG,SAAA,EAAW,cAAA,CAAe,IAAA,CAAK,QAAA,CAAS,WAAW,CAAA;AAAA,EACxD,EAAA,KAAO;AACL,IAAA,IAAA,CAAK,QAAA,CAAS,WAAA,CAAY,OAAA,CAAQ,QAAA,CAAU,WAAA,EAAa;AACvD,MAAA,EAAA,CAAG,SAAA,EAAW,EAAA,CAAG,QAAA,CAAS,MAAA,CAAO,cAAA,CAAe,WAAW,CAAC,CAAA;AAAA,IAC9D,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,OAAO,EAAA;A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O,CAAC,CAAA;AAAA,IACR,UAAA,EAAY;AAAA,EACd,CAAA;AACF,EAAA,IAAI,UAAA,EAAY,CAAA;AAEhB,EAAA,IAAA,CAAA,IAAS,EAAA,EAAI,CAAA,EAAG,EAAA,EAAI,IAAA,CAAK,MAAA,EAAQ,CAAA,EAAA,EAAK;AACpC,IAAA,IAAA,CAAA,IAAS,EAAA,EAAI,CAAA,EAAG,EAAA,EAAI,IAAA,CAAK,CAAC,CAAA,CAAE,MAAA,EAAQ,CAAA,EAAA,EAAK;AACvC,MAAA,IAAA,CAAA,IAAS,EAAA,EAAI,CAAA,EAAG,EAAA,EAAI,GAAA,EAAK,CAAA,EAAA,EAAK,MAAA,CAAO,QAAA,CAAS,IAAA,CAAK,IAAA,CAAK,CAAC,CAAA,CAAE,CAAC,CAAA,CAAE,CAAC,CAAC,CAAA;AAAA,IAClE;AACA,IAAA,GAAA,CAAI,EAAA,EAAI,CAAA,EAAG;AACT,MAAA,UAAA,GAAa,IAAA,CAAK,EAAA,EAAI,CAAC,CAAA,CAAE,MAAA;AACzB,MAAA,MAAA,CAAO,KAAA,CAAM,IAAA,CAAK,SAAS,CAAA;AAAA,IAC7B;AAAA,EACF;AAEA,EAAA,OAAO,MAAA;AACT;AAGA,IAAO,uBAAA,EAAQ,SAAA;ADvCf;AACE;AACA;AACF,wEAAC","file":"/home/runner/work/turf/turf/packages/turf-tesselate/dist/cjs/index.cjs","sourcesContent":[null,"import {\n Feature,\n FeatureCollection,\n MultiPolygon,\n Polygon,\n Position,\n} from \"geojson\";\nimport earcut from \"earcut\";\nimport { polygon } from \"@turf/helpers\";\n\n/**\n * Tesselates a polygon or multipolygon into a collection of triangle polygons\n * using [earcut](https://github.com/mapbox/earcut).\n *\n * @function\n * @param {Feature<Polygon|MultiPolygon>} poly the polygon to tesselate\n * @returns {FeatureCollection<Polygon>} collection of polygon tesselations\n * @example\n * const poly = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\n * const triangles = turf.tesselate(poly);\n *\n * //addToMap\n * const addToMap = [poly, triangles]\n */\nfunction tesselate(\n poly: Feature<Polygon | MultiPolygon>\n): FeatureCollection<Polygon> {\n if (\n !poly.geometry ||\n (poly.geometry.type !== \"Polygon\" && poly.geometry.type !== \"MultiPolygon\")\n ) {\n throw new Error(\"input must be a Polygon or MultiPolygon\");\n }\n\n const fc: FeatureCollection<Polygon> = {\n type: \"FeatureCollection\",\n features: [],\n };\n\n if (poly.geometry.type === \"Polygon\") {\n fc.features = processPolygon(poly.geometry.coordinates);\n } else {\n poly.geometry.coordinates.forEach(function (coordinates) {\n fc.features = fc.features.concat(processPolygon(coordinates));\n });\n }\n\n return fc;\n}\n\nfunction processPolygon(coordinates: Position[][]) {\n const data = flattenCoords(coordinates);\n const dim = 2;\n const result = earcut(data.vertices, data.holes, dim);\n\n const features: Feature<Polygon>[] = [];\n const vertices: Position[] = [];\n\n result.forEach(function (vert: any, i: number) {\n const index = result[i];\n vertices.push([data.vertices[index * dim], data.vertices[index * dim + 1]]);\n });\n\n for (var i = 0; i < vertices.length; i += 3) {\n const coords = vertices.slice(i, i + 3);\n coords.push(vertices[i]);\n features.push(polygon([coords]));\n }\n\n return features;\n}\n\nfunction flattenCoords(data: Position[][]) {\n const dim: number = data[0][0].length,\n result: { vertices: number[]; holes: number[]; dimensions: number } = {\n vertices: [],\n holes: [],\n dimensions: dim,\n };\n let holeIndex = 0;\n\n for (let i = 0; i < data.length; i++) {\n for (let j = 0; j < data[i].length; j++) {\n for (let d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n }\n if (i > 0) {\n holeIndex += data[i - 1].length;\n result.holes.push(holeIndex);\n }\n }\n\n return result;\n}\n\nexport { tesselate };\nexport default tesselate;\n"]}
@@ -4,7 +4,7 @@ import { Feature, Polygon, MultiPolygon, FeatureCollection } from 'geojson';
4
4
  * Tesselates a polygon or multipolygon into a collection of triangle polygons
5
5
  * using [earcut](https://github.com/mapbox/earcut).
6
6
  *
7
- * @name tesselate
7
+ * @function
8
8
  * @param {Feature<Polygon|MultiPolygon>} poly the polygon to tesselate
9
9
  * @returns {FeatureCollection<Polygon>} collection of polygon tesselations
10
10
  * @example
@@ -4,7 +4,7 @@ import { Feature, Polygon, MultiPolygon, FeatureCollection } from 'geojson';
4
4
  * Tesselates a polygon or multipolygon into a collection of triangle polygons
5
5
  * using [earcut](https://github.com/mapbox/earcut).
6
6
  *
7
- * @name tesselate
7
+ * @function
8
8
  * @param {Feature<Polygon|MultiPolygon>} poly the polygon to tesselate
9
9
  * @returns {FeatureCollection<Polygon>} collection of polygon tesselations
10
10
  * @example
@@ -44,8 +44,7 @@ function flattenCoords(data) {
44
44
  let holeIndex = 0;
45
45
  for (let i = 0; i < data.length; i++) {
46
46
  for (let j = 0; j < data[i].length; j++) {
47
- for (let d = 0; d < dim; d++)
48
- result.vertices.push(data[i][j][d]);
47
+ for (let d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);
49
48
  }
50
49
  if (i > 0) {
51
50
  holeIndex += data[i - 1].length;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n Feature,\n FeatureCollection,\n MultiPolygon,\n Polygon,\n Position,\n} from \"geojson\";\nimport earcut from \"earcut\";\nimport { polygon } from \"@turf/helpers\";\n\n/**\n * Tesselates a polygon or multipolygon into a collection of triangle polygons\n * using [earcut](https://github.com/mapbox/earcut).\n *\n * @name tesselate\n * @param {Feature<Polygon|MultiPolygon>} poly the polygon to tesselate\n * @returns {FeatureCollection<Polygon>} collection of polygon tesselations\n * @example\n * const poly = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\n * const triangles = turf.tesselate(poly);\n *\n * //addToMap\n * const addToMap = [poly, triangles]\n */\nfunction tesselate(\n poly: Feature<Polygon | MultiPolygon>\n): FeatureCollection<Polygon> {\n if (\n !poly.geometry ||\n (poly.geometry.type !== \"Polygon\" && poly.geometry.type !== \"MultiPolygon\")\n ) {\n throw new Error(\"input must be a Polygon or MultiPolygon\");\n }\n\n const fc: FeatureCollection<Polygon> = {\n type: \"FeatureCollection\",\n features: [],\n };\n\n if (poly.geometry.type === \"Polygon\") {\n fc.features = processPolygon(poly.geometry.coordinates);\n } else {\n poly.geometry.coordinates.forEach(function (coordinates) {\n fc.features = fc.features.concat(processPolygon(coordinates));\n });\n }\n\n return fc;\n}\n\nfunction processPolygon(coordinates: Position[][]) {\n const data = flattenCoords(coordinates);\n const dim = 2;\n const result = earcut(data.vertices, data.holes, dim);\n\n const features: Feature<Polygon>[] = [];\n const vertices: Position[] = [];\n\n result.forEach(function (vert: any, i: number) {\n const index = result[i];\n vertices.push([data.vertices[index * dim], data.vertices[index * dim + 1]]);\n });\n\n for (var i = 0; i < vertices.length; i += 3) {\n const coords = vertices.slice(i, i + 3);\n coords.push(vertices[i]);\n features.push(polygon([coords]));\n }\n\n return features;\n}\n\nfunction flattenCoords(data: Position[][]) {\n const dim: number = data[0][0].length,\n result: { vertices: number[]; holes: number[]; dimensions: number } = {\n vertices: [],\n holes: [],\n dimensions: dim,\n };\n let holeIndex = 0;\n\n for (let i = 0; i < data.length; i++) {\n for (let j = 0; j < data[i].length; j++) {\n for (let d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n }\n if (i > 0) {\n holeIndex += data[i - 1].length;\n result.holes.push(holeIndex);\n }\n }\n\n return result;\n}\n\nexport { tesselate };\nexport default tesselate;\n"],"mappings":";AAOA,OAAO,YAAY;AACnB,SAAS,eAAe;AAgBxB,SAAS,UACP,MAC4B;AAC5B,MACE,CAAC,KAAK,YACL,KAAK,SAAS,SAAS,aAAa,KAAK,SAAS,SAAS,gBAC5D;AACA,UAAM,IAAI,MAAM,yCAAyC;AAAA,EAC3D;AAEA,QAAM,KAAiC;AAAA,IACrC,MAAM;AAAA,IACN,UAAU,CAAC;AAAA,EACb;AAEA,MAAI,KAAK,SAAS,SAAS,WAAW;AACpC,OAAG,WAAW,eAAe,KAAK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,aAAO,MAAM,KAAK,SAAS;AAAA,IAC7B;AAAA,EACF;AAEA,SAAO;AACT;AAGA,IAAO,yBAAQ;","names":["i"]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n Feature,\n FeatureCollection,\n MultiPolygon,\n Polygon,\n Position,\n} from \"geojson\";\nimport earcut from \"earcut\";\nimport { polygon } from \"@turf/helpers\";\n\n/**\n * Tesselates a polygon or multipolygon into a collection of triangle polygons\n * using [earcut](https://github.com/mapbox/earcut).\n *\n * @function\n * @param {Feature<Polygon|MultiPolygon>} poly the polygon to tesselate\n * @returns {FeatureCollection<Polygon>} collection of polygon tesselations\n * @example\n * const poly = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\n * const triangles = turf.tesselate(poly);\n *\n * //addToMap\n * const addToMap = [poly, triangles]\n */\nfunction tesselate(\n poly: Feature<Polygon | MultiPolygon>\n): FeatureCollection<Polygon> {\n if (\n !poly.geometry ||\n (poly.geometry.type !== \"Polygon\" && poly.geometry.type !== \"MultiPolygon\")\n ) {\n throw new Error(\"input must be a Polygon or MultiPolygon\");\n }\n\n const fc: FeatureCollection<Polygon> = {\n type: \"FeatureCollection\",\n features: [],\n };\n\n if (poly.geometry.type === \"Polygon\") {\n fc.features = processPolygon(poly.geometry.coordinates);\n } else {\n poly.geometry.coordinates.forEach(function (coordinates) {\n fc.features = fc.features.concat(processPolygon(coordinates));\n });\n }\n\n return fc;\n}\n\nfunction processPolygon(coordinates: Position[][]) {\n const data = flattenCoords(coordinates);\n const dim = 2;\n const result = earcut(data.vertices, data.holes, dim);\n\n const features: Feature<Polygon>[] = [];\n const vertices: Position[] = [];\n\n result.forEach(function (vert: any, i: number) {\n const index = result[i];\n vertices.push([data.vertices[index * dim], data.vertices[index * dim + 1]]);\n });\n\n for (var i = 0; i < vertices.length; i += 3) {\n const coords = vertices.slice(i, i + 3);\n coords.push(vertices[i]);\n features.push(polygon([coords]));\n }\n\n return features;\n}\n\nfunction flattenCoords(data: Position[][]) {\n const dim: number = data[0][0].length,\n result: { vertices: number[]; holes: number[]; dimensions: number } = {\n vertices: [],\n holes: [],\n dimensions: dim,\n };\n let holeIndex = 0;\n\n for (let i = 0; i < data.length; i++) {\n for (let j = 0; j < data[i].length; j++) {\n for (let d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n }\n if (i > 0) {\n holeIndex += data[i - 1].length;\n result.holes.push(holeIndex);\n }\n }\n\n return result;\n}\n\nexport { tesselate };\nexport default tesselate;\n"],"mappings":";AAOA,OAAO,YAAY;AACnB,SAAS,eAAe;AAgBxB,SAAS,UACP,MAC4B;AAC5B,MACE,CAAC,KAAK,YACL,KAAK,SAAS,SAAS,aAAa,KAAK,SAAS,SAAS,gBAC5D;AACA,UAAM,IAAI,MAAM,yCAAyC;AAAA,EAC3D;AAEA,QAAM,KAAiC;AAAA,IACrC,MAAM;AAAA,IACN,UAAU,CAAC;AAAA,EACb;AAEA,MAAI,KAAK,SAAS,SAAS,WAAW;AACpC,OAAG,WAAW,eAAe,KAAK,SAAS,WAAW;AAAA,EACxD,OAAO;AACL,SAAK,SAAS,YAAY,QAAQ,SAAU,aAAa;AACvD,SAAG,WAAW,GAAG,SAAS,OAAO,eAAe,WAAW,CAAC;AAAA,IAC9D,CAAC;AAAA,EACH;AAEA,SAAO;AACT;AAEA,SAAS,eAAe,aAA2B;AACjD,QAAM,OAAO,cAAc,WAAW;AACtC,QAAM,MAAM;AACZ,QAAM,SAAS,OAAO,KAAK,UAAU,KAAK,OAAO,GAAG;AAEpD,QAAM,WAA+B,CAAC;AACtC,QAAM,WAAuB,CAAC;AAE9B,SAAO,QAAQ,SAAU,MAAWA,IAAW;AAC7C,UAAM,QAAQ,OAAOA,EAAC;AACtB,aAAS,KAAK,CAAC,KAAK,SAAS,QAAQ,GAAG,GAAG,KAAK,SAAS,QAAQ,MAAM,CAAC,CAAC,CAAC;AAAA,EAC5E,CAAC;AAED,WAAS,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK,GAAG;AAC3C,UAAM,SAAS,SAAS,MAAM,GAAG,IAAI,CAAC;AACtC,WAAO,KAAK,SAAS,CAAC,CAAC;AACvB,aAAS,KAAK,QAAQ,CAAC,MAAM,CAAC,CAAC;AAAA,EACjC;AAEA,SAAO;AACT;AAEA,SAAS,cAAc,MAAoB;AACzC,QAAM,MAAc,KAAK,CAAC,EAAE,CAAC,EAAE,QAC7B,SAAsE;AAAA,IACpE,UAAU,CAAC;AAAA,IACX,OAAO,CAAC;AAAA,IACR,YAAY;AAAA,EACd;AACF,MAAI,YAAY;AAEhB,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,aAAS,IAAI,GAAG,IAAI,KAAK,CAAC,EAAE,QAAQ,KAAK;AACvC,eAAS,IAAI,GAAG,IAAI,KAAK,IAAK,QAAO,SAAS,KAAK,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAAA,IAClE;AACA,QAAI,IAAI,GAAG;AACT,mBAAa,KAAK,IAAI,CAAC,EAAE;AACzB,aAAO,MAAM,KAAK,SAAS;AAAA,IAC7B;AAAA,EACF;AAEA,SAAO;AACT;AAGA,IAAO,yBAAQ;","names":["i"]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/tesselate",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "turf tesselate module",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
@@ -60,19 +60,19 @@
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/benchmark": "^2.1.5",
63
- "@types/tape": "^4.2.32",
63
+ "@types/tape": "^4.13.4",
64
64
  "benchmark": "^2.1.4",
65
65
  "npm-run-all": "^4.1.5",
66
- "tape": "^5.7.2",
67
- "tsup": "^8.0.1",
68
- "tsx": "^4.6.2",
69
- "typescript": "^5.2.2"
66
+ "tape": "^5.9.0",
67
+ "tsup": "^8.3.5",
68
+ "tsx": "^4.19.2",
69
+ "typescript": "^5.5.4"
70
70
  },
71
71
  "dependencies": {
72
- "@turf/helpers": "^7.1.0",
72
+ "@turf/helpers": "^7.2.0",
73
73
  "@types/geojson": "^7946.0.10",
74
74
  "earcut": "^2.2.4",
75
- "tslib": "^2.6.2"
75
+ "tslib": "^2.8.1"
76
76
  },
77
- "gitHead": "68915eeebc9278bb40dec3f1034499698a0561ef"
77
+ "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
78
78
  }