node-red-contrib-tak-registration 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1151) 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/jsts/dist/jsts.min.js +1 -1
  355. package/node_modules/@turf/jsts/dist/jsts.min.js.map +1 -0
  356. package/node_modules/@turf/jsts/package.json +17 -17
  357. package/node_modules/@turf/kinks/dist/cjs/index.cjs.map +1 -1
  358. package/node_modules/@turf/kinks/dist/cjs/index.d.cts +1 -1
  359. package/node_modules/@turf/kinks/dist/esm/index.d.ts +1 -1
  360. package/node_modules/@turf/kinks/dist/esm/index.js.map +1 -1
  361. package/node_modules/@turf/kinks/package.json +10 -10
  362. package/node_modules/@turf/length/dist/cjs/index.cjs.map +1 -1
  363. package/node_modules/@turf/length/dist/cjs/index.d.cts +1 -1
  364. package/node_modules/@turf/length/dist/esm/index.d.ts +1 -1
  365. package/node_modules/@turf/length/dist/esm/index.js.map +1 -1
  366. package/node_modules/@turf/length/package.json +11 -11
  367. package/node_modules/@turf/line-arc/dist/cjs/index.cjs.map +1 -1
  368. package/node_modules/@turf/line-arc/dist/cjs/index.d.cts +1 -1
  369. package/node_modules/@turf/line-arc/dist/esm/index.d.ts +1 -1
  370. package/node_modules/@turf/line-arc/dist/esm/index.js.map +1 -1
  371. package/node_modules/@turf/line-arc/package.json +12 -12
  372. package/node_modules/@turf/line-chunk/dist/cjs/index.cjs +3 -6
  373. package/node_modules/@turf/line-chunk/dist/cjs/index.cjs.map +1 -1
  374. package/node_modules/@turf/line-chunk/dist/esm/index.js +3 -6
  375. package/node_modules/@turf/line-chunk/dist/esm/index.js.map +1 -1
  376. package/node_modules/@turf/line-chunk/package.json +11 -11
  377. package/node_modules/@turf/line-intersect/README.md +1 -1
  378. package/node_modules/@turf/line-intersect/dist/cjs/index.cjs +3 -5
  379. package/node_modules/@turf/line-intersect/dist/cjs/index.cjs.map +1 -1
  380. package/node_modules/@turf/line-intersect/dist/cjs/index.d.cts +2 -2
  381. package/node_modules/@turf/line-intersect/dist/esm/index.d.ts +2 -2
  382. package/node_modules/@turf/line-intersect/dist/esm/index.js +3 -5
  383. package/node_modules/@turf/line-intersect/dist/esm/index.js.map +1 -1
  384. package/node_modules/@turf/line-intersect/package.json +10 -10
  385. package/node_modules/@turf/line-offset/dist/cjs/index.cjs +3 -6
  386. package/node_modules/@turf/line-offset/dist/cjs/index.cjs.map +1 -1
  387. package/node_modules/@turf/line-offset/dist/esm/index.js +3 -6
  388. package/node_modules/@turf/line-offset/dist/esm/index.js.map +1 -1
  389. package/node_modules/@turf/line-offset/package.json +10 -10
  390. package/node_modules/@turf/line-overlap/dist/cjs/index.cjs +10 -20
  391. package/node_modules/@turf/line-overlap/dist/cjs/index.cjs.map +1 -1
  392. package/node_modules/@turf/line-overlap/dist/cjs/index.d.cts +1 -1
  393. package/node_modules/@turf/line-overlap/dist/esm/index.d.ts +1 -1
  394. package/node_modules/@turf/line-overlap/dist/esm/index.js +10 -20
  395. package/node_modules/@turf/line-overlap/dist/esm/index.js.map +1 -1
  396. package/node_modules/@turf/line-overlap/package.json +15 -15
  397. package/node_modules/@turf/line-segment/dist/cjs/index.cjs.map +1 -1
  398. package/node_modules/@turf/line-segment/dist/cjs/index.d.cts +1 -1
  399. package/node_modules/@turf/line-segment/dist/esm/index.d.ts +1 -1
  400. package/node_modules/@turf/line-segment/dist/esm/index.js.map +1 -1
  401. package/node_modules/@turf/line-segment/package.json +11 -11
  402. package/node_modules/@turf/line-slice/dist/cjs/index.cjs.map +1 -1
  403. package/node_modules/@turf/line-slice/dist/esm/index.js.map +1 -1
  404. package/node_modules/@turf/line-slice/package.json +10 -10
  405. package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs +5 -10
  406. package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs.map +1 -1
  407. package/node_modules/@turf/line-slice-along/dist/esm/index.js +5 -10
  408. package/node_modules/@turf/line-slice-along/dist/esm/index.js.map +1 -1
  409. package/node_modules/@turf/line-slice-along/package.json +12 -12
  410. package/node_modules/@turf/line-split/dist/cjs/index.cjs +7 -14
  411. package/node_modules/@turf/line-split/dist/cjs/index.cjs.map +1 -1
  412. package/node_modules/@turf/line-split/dist/esm/index.js +7 -14
  413. package/node_modules/@turf/line-split/dist/esm/index.js.map +1 -1
  414. package/node_modules/@turf/line-split/package.json +16 -16
  415. package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs +4 -8
  416. package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs.map +1 -1
  417. package/node_modules/@turf/line-to-polygon/dist/cjs/index.d.cts +1 -1
  418. package/node_modules/@turf/line-to-polygon/dist/esm/index.d.ts +1 -1
  419. package/node_modules/@turf/line-to-polygon/dist/esm/index.js +4 -8
  420. package/node_modules/@turf/line-to-polygon/dist/esm/index.js.map +1 -1
  421. package/node_modules/@turf/line-to-polygon/package.json +12 -12
  422. package/node_modules/@turf/mask/dist/cjs/index.cjs +7 -7
  423. package/node_modules/@turf/mask/dist/cjs/index.cjs.map +1 -1
  424. package/node_modules/@turf/mask/dist/cjs/index.d.cts +1 -1
  425. package/node_modules/@turf/mask/dist/esm/index.d.ts +1 -1
  426. package/node_modules/@turf/mask/dist/esm/index.js +6 -6
  427. package/node_modules/@turf/mask/dist/esm/index.js.map +1 -1
  428. package/node_modules/@turf/mask/package.json +11 -11
  429. package/node_modules/@turf/meta/README.md +145 -93
  430. package/node_modules/@turf/meta/dist/cjs/index.cjs +22 -44
  431. package/node_modules/@turf/meta/dist/cjs/index.cjs.map +1 -1
  432. package/node_modules/@turf/meta/dist/esm/index.js +22 -44
  433. package/node_modules/@turf/meta/dist/esm/index.js.map +1 -1
  434. package/node_modules/@turf/meta/package.json +7 -7
  435. package/node_modules/@turf/midpoint/dist/cjs/index.cjs.map +1 -1
  436. package/node_modules/@turf/midpoint/dist/cjs/index.d.cts +1 -1
  437. package/node_modules/@turf/midpoint/dist/esm/index.d.ts +1 -1
  438. package/node_modules/@turf/midpoint/dist/esm/index.js.map +1 -1
  439. package/node_modules/@turf/midpoint/package.json +12 -12
  440. package/node_modules/@turf/moran-index/README.md +25 -47
  441. package/node_modules/@turf/moran-index/dist/cjs/index.cjs.map +1 -1
  442. package/node_modules/@turf/moran-index/dist/cjs/index.d.cts +16 -8
  443. package/node_modules/@turf/moran-index/dist/esm/index.d.ts +16 -8
  444. package/node_modules/@turf/moran-index/dist/esm/index.js.map +1 -1
  445. package/node_modules/@turf/moran-index/package.json +11 -11
  446. package/node_modules/@turf/nearest-neighbor-analysis/README.md +50 -21
  447. package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.cjs.map +1 -1
  448. package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.d.cts +25 -6
  449. package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.d.ts +25 -6
  450. package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js.map +1 -1
  451. package/node_modules/@turf/nearest-neighbor-analysis/package.json +17 -17
  452. package/node_modules/@turf/nearest-point/dist/cjs/index.cjs +2 -4
  453. package/node_modules/@turf/nearest-point/dist/cjs/index.cjs.map +1 -1
  454. package/node_modules/@turf/nearest-point/dist/cjs/index.d.cts +1 -1
  455. package/node_modules/@turf/nearest-point/dist/esm/index.d.ts +1 -1
  456. package/node_modules/@turf/nearest-point/dist/esm/index.js +2 -4
  457. package/node_modules/@turf/nearest-point/dist/esm/index.js.map +1 -1
  458. package/node_modules/@turf/nearest-point/package.json +12 -12
  459. package/node_modules/@turf/nearest-point-on-line/README.md +9 -9
  460. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs +97 -53
  461. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs.map +1 -1
  462. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.d.cts +2 -2
  463. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.d.ts +2 -2
  464. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js +99 -55
  465. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js.map +1 -1
  466. package/node_modules/@turf/nearest-point-on-line/package.json +15 -18
  467. package/node_modules/@turf/nearest-point-to-line/README.md +1 -9
  468. package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.cjs.map +1 -1
  469. package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.d.cts +1 -1
  470. package/node_modules/@turf/nearest-point-to-line/dist/esm/index.d.ts +1 -1
  471. package/node_modules/@turf/nearest-point-to-line/dist/esm/index.js.map +1 -1
  472. package/node_modules/@turf/nearest-point-to-line/package.json +14 -14
  473. package/node_modules/@turf/planepoint/dist/cjs/index.cjs.map +1 -1
  474. package/node_modules/@turf/planepoint/dist/cjs/index.d.cts +1 -1
  475. package/node_modules/@turf/planepoint/dist/esm/index.d.ts +1 -1
  476. package/node_modules/@turf/planepoint/dist/esm/index.js.map +1 -1
  477. package/node_modules/@turf/planepoint/package.json +10 -10
  478. package/node_modules/@turf/point-grid/dist/cjs/index.cjs +2 -4
  479. package/node_modules/@turf/point-grid/dist/cjs/index.cjs.map +1 -1
  480. package/node_modules/@turf/point-grid/dist/cjs/index.d.cts +1 -1
  481. package/node_modules/@turf/point-grid/dist/esm/index.d.ts +1 -1
  482. package/node_modules/@turf/point-grid/dist/esm/index.js +2 -4
  483. package/node_modules/@turf/point-grid/dist/esm/index.js.map +1 -1
  484. package/node_modules/@turf/point-grid/package.json +14 -14
  485. package/node_modules/@turf/point-on-feature/dist/cjs/index.cjs.map +1 -1
  486. package/node_modules/@turf/point-on-feature/dist/cjs/index.d.cts +1 -1
  487. package/node_modules/@turf/point-on-feature/dist/esm/index.d.ts +1 -1
  488. package/node_modules/@turf/point-on-feature/dist/esm/index.js.map +1 -1
  489. package/node_modules/@turf/point-on-feature/package.json +15 -15
  490. package/node_modules/@turf/point-to-line-distance/README.md +10 -10
  491. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs +21 -19
  492. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs.map +1 -1
  493. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.d.cts +3 -3
  494. package/node_modules/@turf/point-to-line-distance/dist/esm/index.d.ts +3 -3
  495. package/node_modules/@turf/point-to-line-distance/dist/esm/index.js +22 -20
  496. package/node_modules/@turf/point-to-line-distance/dist/esm/index.js.map +1 -1
  497. package/node_modules/@turf/point-to-line-distance/package.json +18 -17
  498. package/node_modules/@turf/point-to-polygon-distance/LICENSE +20 -0
  499. package/node_modules/@turf/point-to-polygon-distance/README.md +61 -0
  500. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs +49 -0
  501. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs.map +1 -0
  502. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.d.cts +23 -0
  503. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.d.ts +23 -0
  504. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js +49 -0
  505. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js.map +1 -0
  506. package/node_modules/@turf/point-to-polygon-distance/package.json +80 -0
  507. package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs.map +1 -1
  508. package/node_modules/@turf/points-within-polygon/dist/cjs/index.d.cts +1 -1
  509. package/node_modules/@turf/points-within-polygon/dist/esm/index.d.ts +1 -1
  510. package/node_modules/@turf/points-within-polygon/dist/esm/index.js.map +1 -1
  511. package/node_modules/@turf/points-within-polygon/package.json +11 -11
  512. package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs +1 -2
  513. package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs.map +1 -1
  514. package/node_modules/@turf/polygon-smooth/dist/cjs/index.d.cts +1 -1
  515. package/node_modules/@turf/polygon-smooth/dist/esm/index.d.ts +1 -1
  516. package/node_modules/@turf/polygon-smooth/dist/esm/index.js +1 -2
  517. package/node_modules/@turf/polygon-smooth/dist/esm/index.js.map +1 -1
  518. package/node_modules/@turf/polygon-smooth/package.json +10 -10
  519. package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs +1 -2
  520. package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs.map +1 -1
  521. package/node_modules/@turf/polygon-tangents/dist/cjs/index.d.cts +1 -1
  522. package/node_modules/@turf/polygon-tangents/dist/esm/index.d.ts +1 -1
  523. package/node_modules/@turf/polygon-tangents/dist/esm/index.js +1 -2
  524. package/node_modules/@turf/polygon-tangents/dist/esm/index.js.map +1 -1
  525. package/node_modules/@turf/polygon-tangents/package.json +14 -14
  526. package/node_modules/@turf/polygon-to-line/dist/cjs/index.cjs.map +1 -1
  527. package/node_modules/@turf/polygon-to-line/dist/cjs/index.d.cts +1 -1
  528. package/node_modules/@turf/polygon-to-line/dist/esm/index.d.ts +1 -1
  529. package/node_modules/@turf/polygon-to-line/dist/esm/index.js.map +1 -1
  530. package/node_modules/@turf/polygon-to-line/package.json +10 -10
  531. package/node_modules/@turf/polygonize/dist/cjs/index.cjs +20 -40
  532. package/node_modules/@turf/polygonize/dist/cjs/index.cjs.map +1 -1
  533. package/node_modules/@turf/polygonize/dist/cjs/index.d.cts +1 -1
  534. package/node_modules/@turf/polygonize/dist/esm/index.d.ts +1 -1
  535. package/node_modules/@turf/polygonize/dist/esm/index.js +20 -40
  536. package/node_modules/@turf/polygonize/dist/esm/index.js.map +1 -1
  537. package/node_modules/@turf/polygonize/package.json +13 -13
  538. package/node_modules/@turf/projection/README.md +2 -2
  539. package/node_modules/@turf/projection/dist/cjs/index.cjs +6 -12
  540. package/node_modules/@turf/projection/dist/cjs/index.cjs.map +1 -1
  541. package/node_modules/@turf/projection/dist/cjs/index.d.cts +2 -2
  542. package/node_modules/@turf/projection/dist/esm/index.d.ts +2 -2
  543. package/node_modules/@turf/projection/dist/esm/index.js +6 -12
  544. package/node_modules/@turf/projection/dist/esm/index.js.map +1 -1
  545. package/node_modules/@turf/projection/package.json +12 -12
  546. package/node_modules/@turf/quadrat-analysis/README.md +10 -10
  547. package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs.map +1 -1
  548. package/node_modules/@turf/quadrat-analysis/dist/cjs/index.d.cts +4 -4
  549. package/node_modules/@turf/quadrat-analysis/dist/esm/index.d.ts +4 -4
  550. package/node_modules/@turf/quadrat-analysis/dist/esm/index.js.map +1 -1
  551. package/node_modules/@turf/quadrat-analysis/package.json +18 -18
  552. package/node_modules/@turf/random/README.md +27 -29
  553. package/node_modules/@turf/random/dist/cjs/index.cjs +1 -3
  554. package/node_modules/@turf/random/dist/cjs/index.cjs.map +1 -1
  555. package/node_modules/@turf/random/dist/cjs/index.d.cts +11 -11
  556. package/node_modules/@turf/random/dist/esm/index.d.ts +11 -11
  557. package/node_modules/@turf/random/dist/esm/index.js +1 -3
  558. package/node_modules/@turf/random/dist/esm/index.js.map +1 -1
  559. package/node_modules/@turf/random/package.json +9 -9
  560. package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs.map +1 -1
  561. package/node_modules/@turf/rectangle-grid/dist/cjs/index.d.cts +1 -1
  562. package/node_modules/@turf/rectangle-grid/dist/esm/index.d.ts +1 -1
  563. package/node_modules/@turf/rectangle-grid/dist/esm/index.js.map +1 -1
  564. package/node_modules/@turf/rectangle-grid/package.json +13 -13
  565. package/node_modules/@turf/rewind/dist/cjs/index.cjs +3 -6
  566. package/node_modules/@turf/rewind/dist/cjs/index.cjs.map +1 -1
  567. package/node_modules/@turf/rewind/dist/cjs/index.d.cts +1 -1
  568. package/node_modules/@turf/rewind/dist/esm/index.d.ts +1 -1
  569. package/node_modules/@turf/rewind/dist/esm/index.js +3 -6
  570. package/node_modules/@turf/rewind/dist/esm/index.js.map +1 -1
  571. package/node_modules/@turf/rewind/package.json +13 -13
  572. package/node_modules/@turf/rhumb-bearing/README.md +1 -1
  573. package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs.map +1 -1
  574. package/node_modules/@turf/rhumb-bearing/dist/cjs/index.d.cts +1 -1
  575. package/node_modules/@turf/rhumb-bearing/dist/esm/index.d.ts +1 -1
  576. package/node_modules/@turf/rhumb-bearing/dist/esm/index.js.map +1 -1
  577. package/node_modules/@turf/rhumb-bearing/package.json +11 -11
  578. package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs +1 -2
  579. package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs.map +1 -1
  580. package/node_modules/@turf/rhumb-destination/dist/cjs/index.d.cts +1 -1
  581. package/node_modules/@turf/rhumb-destination/dist/esm/index.d.ts +1 -1
  582. package/node_modules/@turf/rhumb-destination/dist/esm/index.js +1 -2
  583. package/node_modules/@turf/rhumb-destination/dist/esm/index.js.map +1 -1
  584. package/node_modules/@turf/rhumb-destination/package.json +11 -11
  585. package/node_modules/@turf/rhumb-distance/README.md +1 -1
  586. package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs.map +1 -1
  587. package/node_modules/@turf/rhumb-distance/dist/cjs/index.d.cts +1 -1
  588. package/node_modules/@turf/rhumb-distance/dist/esm/index.d.ts +1 -1
  589. package/node_modules/@turf/rhumb-distance/dist/esm/index.js.map +1 -1
  590. package/node_modules/@turf/rhumb-distance/package.json +11 -11
  591. package/node_modules/@turf/sample/README.md +2 -1
  592. package/node_modules/@turf/sample/dist/cjs/index.cjs +3 -6
  593. package/node_modules/@turf/sample/dist/cjs/index.cjs.map +1 -1
  594. package/node_modules/@turf/sample/dist/cjs/index.d.cts +1 -1
  595. package/node_modules/@turf/sample/dist/esm/index.d.ts +1 -1
  596. package/node_modules/@turf/sample/dist/esm/index.js +3 -6
  597. package/node_modules/@turf/sample/dist/esm/index.js.map +1 -1
  598. package/node_modules/@turf/sample/package.json +9 -9
  599. package/node_modules/@turf/sector/dist/cjs/index.cjs +4 -8
  600. package/node_modules/@turf/sector/dist/cjs/index.cjs.map +1 -1
  601. package/node_modules/@turf/sector/dist/cjs/index.d.cts +1 -1
  602. package/node_modules/@turf/sector/dist/esm/index.d.ts +1 -1
  603. package/node_modules/@turf/sector/dist/esm/index.js +4 -8
  604. package/node_modules/@turf/sector/dist/esm/index.js.map +1 -1
  605. package/node_modules/@turf/sector/package.json +14 -14
  606. package/node_modules/@turf/shortest-path/README.md +13 -19
  607. package/node_modules/@turf/shortest-path/dist/cjs/index.cjs +3 -6
  608. package/node_modules/@turf/shortest-path/dist/cjs/index.cjs.map +1 -1
  609. package/node_modules/@turf/shortest-path/dist/cjs/index.d.cts +5 -5
  610. package/node_modules/@turf/shortest-path/dist/esm/index.d.ts +5 -5
  611. package/node_modules/@turf/shortest-path/dist/esm/index.js +3 -6
  612. package/node_modules/@turf/shortest-path/dist/esm/index.js.map +1 -1
  613. package/node_modules/@turf/shortest-path/package.json +18 -18
  614. package/node_modules/@turf/simplify/dist/cjs/index.cjs +8 -16
  615. package/node_modules/@turf/simplify/dist/cjs/index.cjs.map +1 -1
  616. package/node_modules/@turf/simplify/dist/cjs/index.d.cts +1 -1
  617. package/node_modules/@turf/simplify/dist/esm/index.d.ts +1 -1
  618. package/node_modules/@turf/simplify/dist/esm/index.js +8 -16
  619. package/node_modules/@turf/simplify/dist/esm/index.js.map +1 -1
  620. package/node_modules/@turf/simplify/package.json +13 -13
  621. package/node_modules/@turf/square/dist/cjs/index.cjs.map +1 -1
  622. package/node_modules/@turf/square/dist/cjs/index.d.cts +1 -1
  623. package/node_modules/@turf/square/dist/esm/index.d.ts +1 -1
  624. package/node_modules/@turf/square/dist/esm/index.js.map +1 -1
  625. package/node_modules/@turf/square/package.json +10 -10
  626. package/node_modules/@turf/square-grid/dist/cjs/index.cjs.map +1 -1
  627. package/node_modules/@turf/square-grid/dist/cjs/index.d.cts +1 -1
  628. package/node_modules/@turf/square-grid/dist/esm/index.d.ts +1 -1
  629. package/node_modules/@turf/square-grid/dist/esm/index.js.map +1 -1
  630. package/node_modules/@turf/square-grid/package.json +12 -12
  631. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs +3 -6
  632. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs.map +1 -1
  633. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.d.cts +1 -1
  634. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.d.ts +1 -1
  635. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js +3 -6
  636. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js.map +1 -1
  637. package/node_modules/@turf/standard-deviational-ellipse/package.json +16 -16
  638. package/node_modules/@turf/tag/dist/cjs/index.cjs +1 -2
  639. package/node_modules/@turf/tag/dist/cjs/index.cjs.map +1 -1
  640. package/node_modules/@turf/tag/dist/cjs/index.d.cts +1 -1
  641. package/node_modules/@turf/tag/dist/esm/index.d.ts +1 -1
  642. package/node_modules/@turf/tag/dist/esm/index.js +1 -2
  643. package/node_modules/@turf/tag/dist/esm/index.js.map +1 -1
  644. package/node_modules/@turf/tag/package.json +12 -12
  645. package/node_modules/@turf/tesselate/dist/cjs/index.cjs +1 -2
  646. package/node_modules/@turf/tesselate/dist/cjs/index.cjs.map +1 -1
  647. package/node_modules/@turf/tesselate/dist/cjs/index.d.cts +1 -1
  648. package/node_modules/@turf/tesselate/dist/esm/index.d.ts +1 -1
  649. package/node_modules/@turf/tesselate/dist/esm/index.js +1 -2
  650. package/node_modules/@turf/tesselate/dist/esm/index.js.map +1 -1
  651. package/node_modules/@turf/tesselate/package.json +9 -9
  652. package/node_modules/@turf/tin/dist/cjs/index.cjs +13 -14
  653. package/node_modules/@turf/tin/dist/cjs/index.cjs.map +1 -1
  654. package/node_modules/@turf/tin/dist/cjs/index.d.cts +1 -1
  655. package/node_modules/@turf/tin/dist/esm/index.d.ts +1 -1
  656. package/node_modules/@turf/tin/dist/esm/index.js +13 -14
  657. package/node_modules/@turf/tin/dist/esm/index.js.map +1 -1
  658. package/node_modules/@turf/tin/package.json +9 -9
  659. package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs +4 -8
  660. package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs.map +1 -1
  661. package/node_modules/@turf/transform-rotate/dist/cjs/index.d.cts +1 -1
  662. package/node_modules/@turf/transform-rotate/dist/esm/index.d.ts +1 -1
  663. package/node_modules/@turf/transform-rotate/dist/esm/index.js +4 -8
  664. package/node_modules/@turf/transform-rotate/dist/esm/index.js.map +1 -1
  665. package/node_modules/@turf/transform-rotate/package.json +17 -17
  666. package/node_modules/@turf/transform-scale/dist/cjs/index.cjs +18 -12
  667. package/node_modules/@turf/transform-scale/dist/cjs/index.cjs.map +1 -1
  668. package/node_modules/@turf/transform-scale/dist/cjs/index.d.cts +1 -1
  669. package/node_modules/@turf/transform-scale/dist/esm/index.d.ts +1 -1
  670. package/node_modules/@turf/transform-scale/dist/esm/index.js +18 -12
  671. package/node_modules/@turf/transform-scale/dist/esm/index.js.map +1 -1
  672. package/node_modules/@turf/transform-scale/package.json +21 -21
  673. package/node_modules/@turf/transform-translate/dist/cjs/index.cjs +4 -8
  674. package/node_modules/@turf/transform-translate/dist/cjs/index.cjs.map +1 -1
  675. package/node_modules/@turf/transform-translate/dist/cjs/index.d.cts +1 -1
  676. package/node_modules/@turf/transform-translate/dist/esm/index.d.ts +1 -1
  677. package/node_modules/@turf/transform-translate/dist/esm/index.js +4 -8
  678. package/node_modules/@turf/transform-translate/dist/esm/index.js.map +1 -1
  679. package/node_modules/@turf/transform-translate/package.json +14 -14
  680. package/node_modules/@turf/triangle-grid/dist/cjs/index.cjs.map +1 -1
  681. package/node_modules/@turf/triangle-grid/dist/cjs/index.d.cts +1 -1
  682. package/node_modules/@turf/triangle-grid/dist/esm/index.d.ts +1 -1
  683. package/node_modules/@turf/triangle-grid/dist/esm/index.js.map +1 -1
  684. package/node_modules/@turf/triangle-grid/package.json +13 -13
  685. package/node_modules/@turf/truncate/dist/cjs/index.cjs +3 -6
  686. package/node_modules/@turf/truncate/dist/cjs/index.cjs.map +1 -1
  687. package/node_modules/@turf/truncate/dist/cjs/index.d.cts +1 -1
  688. package/node_modules/@turf/truncate/dist/esm/index.d.ts +1 -1
  689. package/node_modules/@turf/truncate/dist/esm/index.js +3 -6
  690. package/node_modules/@turf/truncate/dist/esm/index.js.map +1 -1
  691. package/node_modules/@turf/truncate/package.json +10 -10
  692. package/node_modules/@turf/turf/dist/cjs/index.cjs +3 -1
  693. package/node_modules/@turf/turf/dist/cjs/index.cjs.map +1 -1
  694. package/node_modules/@turf/turf/dist/cjs/index.d.cts +1 -0
  695. package/node_modules/@turf/turf/dist/esm/index.d.ts +1 -0
  696. package/node_modules/@turf/turf/dist/esm/index.js +2 -0
  697. package/node_modules/@turf/turf/dist/esm/index.js.map +1 -1
  698. package/node_modules/@turf/turf/package.json +126 -125
  699. package/node_modules/@turf/turf/turf.min.js +3 -26
  700. package/node_modules/@turf/union/README.md +44 -24
  701. package/node_modules/@turf/union/dist/cjs/index.cjs +9 -12
  702. package/node_modules/@turf/union/dist/cjs/index.cjs.map +1 -1
  703. package/node_modules/@turf/union/dist/cjs/index.d.cts +40 -21
  704. package/node_modules/@turf/union/dist/esm/index.d.ts +40 -21
  705. package/node_modules/@turf/union/dist/esm/index.js +8 -11
  706. package/node_modules/@turf/union/dist/esm/index.js.map +1 -1
  707. package/node_modules/@turf/union/package.json +11 -11
  708. package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs +14 -28
  709. package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs.map +1 -1
  710. package/node_modules/@turf/unkink-polygon/dist/cjs/index.d.cts +1 -1
  711. package/node_modules/@turf/unkink-polygon/dist/esm/index.d.ts +1 -1
  712. package/node_modules/@turf/unkink-polygon/dist/esm/index.js +14 -28
  713. package/node_modules/@turf/unkink-polygon/dist/esm/index.js.map +1 -1
  714. package/node_modules/@turf/unkink-polygon/package.json +13 -13
  715. package/node_modules/@turf/voronoi/dist/cjs/index.cjs +3 -6
  716. package/node_modules/@turf/voronoi/dist/cjs/index.cjs.map +1 -1
  717. package/node_modules/@turf/voronoi/dist/cjs/index.d.cts +1 -1
  718. package/node_modules/@turf/voronoi/dist/esm/index.d.ts +1 -1
  719. package/node_modules/@turf/voronoi/dist/esm/index.js +3 -6
  720. package/node_modules/@turf/voronoi/dist/esm/index.js.map +1 -1
  721. package/node_modules/@turf/voronoi/package.json +11 -11
  722. package/node_modules/@types/geojson/README.md +1 -1
  723. package/node_modules/@types/geojson/index.d.ts +4 -1
  724. package/node_modules/@types/geojson/package.json +4 -3
  725. package/node_modules/@types/node/README.md +2 -2
  726. package/node_modules/@types/node/assert.d.ts +2 -2
  727. package/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  728. package/node_modules/@types/node/compatibility/index.d.ts +9 -0
  729. package/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
  730. package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  731. package/node_modules/@types/node/crypto.d.ts +33 -9
  732. package/node_modules/@types/node/events.d.ts +3 -3
  733. package/node_modules/@types/node/fs/promises.d.ts +16 -5
  734. package/node_modules/@types/node/fs.d.ts +14 -8
  735. package/node_modules/@types/node/globals.d.ts +25 -54
  736. package/node_modules/@types/node/http.d.ts +38 -1
  737. package/node_modules/@types/node/http2.d.ts +4 -1
  738. package/node_modules/@types/node/https.d.ts +0 -1
  739. package/node_modules/@types/node/index.d.ts +8 -10
  740. package/node_modules/@types/node/module.d.ts +112 -4
  741. package/node_modules/@types/node/net.d.ts +3 -0
  742. package/node_modules/@types/node/package.json +5 -9
  743. package/node_modules/@types/node/perf_hooks.d.ts +24 -0
  744. package/node_modules/@types/node/process.d.ts +96 -12
  745. package/node_modules/@types/node/readline/promises.d.ts +14 -2
  746. package/node_modules/@types/node/readline.d.ts +58 -9
  747. package/node_modules/@types/node/sqlite.d.ts +30 -9
  748. package/node_modules/@types/node/stream/promises.d.ts +8 -1
  749. package/node_modules/@types/node/stream/web.d.ts +5 -2
  750. package/node_modules/@types/node/stream.d.ts +2 -2
  751. package/node_modules/@types/node/test.d.ts +155 -5
  752. package/node_modules/@types/node/timers/promises.d.ts +1 -1
  753. package/node_modules/@types/node/tls.d.ts +6 -0
  754. package/node_modules/@types/node/ts5.6/index.d.ts +8 -10
  755. package/node_modules/@types/node/url.d.ts +7 -4
  756. package/node_modules/@types/node/util.d.ts +80 -10
  757. package/node_modules/@types/node/v8.d.ts +1 -1
  758. package/node_modules/@types/node/vm.d.ts +81 -27
  759. package/node_modules/@types/node/worker_threads.d.ts +34 -1
  760. package/node_modules/axios/CHANGELOG.md +49 -0
  761. package/node_modules/axios/README.md +20 -8
  762. package/node_modules/axios/dist/axios.js +34 -63
  763. package/node_modules/axios/dist/axios.js.map +1 -1
  764. package/node_modules/axios/dist/axios.min.js +1 -1
  765. package/node_modules/axios/dist/axios.min.js.map +1 -1
  766. package/node_modules/axios/dist/browser/axios.cjs +40 -71
  767. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  768. package/node_modules/axios/dist/esm/axios.js +40 -71
  769. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  770. package/node_modules/axios/dist/esm/axios.min.js +1 -1
  771. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  772. package/node_modules/axios/dist/node/axios.cjs +45 -75
  773. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  774. package/node_modules/axios/index.d.cts +5 -1
  775. package/node_modules/axios/index.d.ts +8 -1
  776. package/node_modules/axios/lib/adapters/http.js +4 -4
  777. package/node_modules/axios/lib/core/Axios.js +7 -2
  778. package/node_modules/axios/lib/core/mergeConfig.js +5 -5
  779. package/node_modules/axios/lib/env/data.js +1 -1
  780. package/node_modules/axios/lib/helpers/buildURL.js +7 -1
  781. package/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
  782. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +12 -65
  783. package/node_modules/axios/lib/helpers/validator.js +8 -0
  784. package/node_modules/axios/package.json +3 -3
  785. package/node_modules/bignumber.js/CHANGELOG.md +295 -0
  786. package/node_modules/bignumber.js/LICENCE.md +26 -0
  787. package/node_modules/bignumber.js/README.md +286 -0
  788. package/node_modules/bignumber.js/bignumber.d.ts +1831 -0
  789. package/node_modules/bignumber.js/bignumber.js +2922 -0
  790. package/node_modules/bignumber.js/bignumber.mjs +2907 -0
  791. package/node_modules/bignumber.js/doc/API.html +2249 -0
  792. package/node_modules/bignumber.js/package.json +50 -0
  793. package/node_modules/fast-xml-parser/CHANGELOG.md +4 -0
  794. package/node_modules/fast-xml-parser/README.md +3 -2
  795. package/node_modules/fast-xml-parser/package.json +1 -1
  796. package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +21 -17
  797. package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +1 -0
  798. package/node_modules/long/index.d.ts +1 -456
  799. package/node_modules/long/package.json +1 -1
  800. package/node_modules/long/umd/index.d.ts +456 -1
  801. package/node_modules/point-in-polygon-hao/README.md +8 -7
  802. package/node_modules/point-in-polygon-hao/dist/cjs/index.cjs +322 -0
  803. package/node_modules/point-in-polygon-hao/dist/esm/index.d.ts +10 -0
  804. package/node_modules/point-in-polygon-hao/dist/esm/index.js +56 -0
  805. package/node_modules/point-in-polygon-hao/dist/pointInPolygon.js +286 -42
  806. package/node_modules/point-in-polygon-hao/dist/pointInPolygon.min.js +1 -1
  807. package/node_modules/point-in-polygon-hao/package.json +24 -20
  808. package/node_modules/polyclip-ts/LICENSE +21 -0
  809. package/node_modules/{polygon-clipping → polyclip-ts}/README.md +35 -36
  810. package/node_modules/polyclip-ts/dist/cjs/index.cjs +1179 -0
  811. package/node_modules/polyclip-ts/dist/cjs/index.cjs.map +1 -0
  812. package/node_modules/polyclip-ts/dist/cjs/index.d.cts +12 -0
  813. package/node_modules/polyclip-ts/dist/esm/index.d.ts +12 -0
  814. package/node_modules/polyclip-ts/dist/esm/index.js +1138 -0
  815. package/node_modules/polyclip-ts/dist/esm/index.js.map +1 -0
  816. package/node_modules/polyclip-ts/dist/polyclip-ts.umd.js +4811 -0
  817. package/node_modules/polyclip-ts/dist/polyclip-ts.umd.min.js +2 -0
  818. package/node_modules/polyclip-ts/package.json +72 -0
  819. package/node_modules/splaytree-ts/LICENSE +29 -0
  820. package/node_modules/splaytree-ts/README.md +296 -0
  821. package/node_modules/splaytree-ts/dist/cjs/index.cjs +714 -0
  822. package/node_modules/splaytree-ts/dist/cjs/index.cjs.map +1 -0
  823. package/node_modules/splaytree-ts/dist/cjs/index.d.cts +105 -0
  824. package/node_modules/splaytree-ts/dist/esm/index.d.ts +105 -0
  825. package/node_modules/splaytree-ts/dist/esm/index.js +688 -0
  826. package/node_modules/splaytree-ts/dist/esm/index.js.map +1 -0
  827. package/node_modules/splaytree-ts/dist/splaytree-ts.umd.js +736 -0
  828. package/node_modules/splaytree-ts/dist/splaytree-ts.umd.min.js +2 -0
  829. package/node_modules/splaytree-ts/package.json +59 -0
  830. package/node_modules/tslib/modules/index.d.ts +1 -0
  831. package/node_modules/tslib/modules/index.js +2 -0
  832. package/node_modules/tslib/package.json +1 -1
  833. package/node_modules/tslib/tslib.d.ts +7 -0
  834. package/node_modules/tslib/tslib.es6.js +24 -1
  835. package/node_modules/tslib/tslib.es6.mjs +24 -1
  836. package/node_modules/tslib/tslib.js +56 -1
  837. package/node_modules/undici-types/eventsource.d.ts +0 -2
  838. package/node_modules/undici-types/filereader.d.ts +1 -1
  839. package/node_modules/undici-types/interceptors.d.ts +3 -1
  840. package/node_modules/undici-types/package.json +1 -1
  841. package/node_modules/undici-types/patch.d.ts +0 -38
  842. package/node_modules/undici-types/websocket.d.ts +0 -2
  843. package/node_modules/uuid/README.md +82 -156
  844. package/node_modules/uuid/dist/cjs/index.d.ts +15 -0
  845. package/node_modules/uuid/dist/cjs/index.js +31 -0
  846. package/node_modules/uuid/dist/cjs/max.d.ts +2 -0
  847. package/node_modules/uuid/dist/cjs/max.js +3 -0
  848. package/node_modules/uuid/dist/cjs/md5.d.ts +4 -0
  849. package/node_modules/uuid/dist/cjs/md5.js +13 -0
  850. package/node_modules/uuid/dist/cjs/native.d.ts +6 -0
  851. package/node_modules/uuid/dist/cjs/native.js +4 -0
  852. package/node_modules/uuid/dist/cjs/nil.d.ts +2 -0
  853. package/node_modules/uuid/dist/cjs/nil.js +3 -0
  854. package/node_modules/uuid/dist/cjs/package.json +1 -0
  855. package/node_modules/uuid/dist/cjs/parse.d.ts +2 -0
  856. package/node_modules/uuid/dist/cjs/parse.js +11 -0
  857. package/node_modules/uuid/dist/cjs/regex.d.ts +2 -0
  858. package/node_modules/uuid/dist/cjs/regex.js +3 -0
  859. package/node_modules/uuid/dist/cjs/rng.d.ts +1 -0
  860. package/node_modules/uuid/dist/cjs/rng.js +13 -0
  861. package/node_modules/uuid/dist/cjs/sha1.d.ts +4 -0
  862. package/node_modules/uuid/dist/cjs/sha1.js +13 -0
  863. package/node_modules/uuid/dist/cjs/stringify.d.ts +3 -0
  864. package/node_modules/uuid/dist/cjs/stringify.js +39 -0
  865. package/node_modules/uuid/dist/cjs/types.d.ts +21 -0
  866. package/node_modules/uuid/dist/cjs/types.js +2 -0
  867. package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +1 -0
  868. package/node_modules/uuid/dist/cjs/uuid-bin.js +72 -0
  869. package/node_modules/uuid/dist/cjs/v1.d.ts +11 -0
  870. package/node_modules/uuid/dist/cjs/v1.js +87 -0
  871. package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +2 -0
  872. package/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
  873. package/node_modules/uuid/dist/cjs/v3.d.ts +9 -0
  874. package/node_modules/uuid/dist/cjs/v3.js +14 -0
  875. package/node_modules/uuid/dist/cjs/v35.d.ts +7 -0
  876. package/node_modules/uuid/dist/cjs/v35.js +41 -0
  877. package/node_modules/uuid/dist/cjs/v4.d.ts +4 -0
  878. package/node_modules/uuid/dist/cjs/v4.js +29 -0
  879. package/node_modules/uuid/dist/cjs/v5.d.ts +9 -0
  880. package/node_modules/uuid/dist/cjs/v5.js +14 -0
  881. package/node_modules/uuid/dist/cjs/v6.d.ts +4 -0
  882. package/node_modules/uuid/dist/cjs/v6.js +19 -0
  883. package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +2 -0
  884. package/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
  885. package/node_modules/uuid/dist/cjs/v7.d.ts +9 -0
  886. package/node_modules/uuid/dist/cjs/v7.js +69 -0
  887. package/node_modules/uuid/dist/cjs/validate.d.ts +2 -0
  888. package/node_modules/uuid/dist/cjs/validate.js +7 -0
  889. package/node_modules/uuid/dist/cjs/version.d.ts +2 -0
  890. package/node_modules/uuid/dist/cjs/version.js +10 -0
  891. package/node_modules/uuid/dist/cjs-browser/index.d.ts +15 -0
  892. package/node_modules/uuid/dist/cjs-browser/index.js +31 -0
  893. package/node_modules/uuid/dist/cjs-browser/max.d.ts +2 -0
  894. package/node_modules/uuid/dist/cjs-browser/max.js +3 -0
  895. package/node_modules/uuid/dist/cjs-browser/md5.d.ts +2 -0
  896. package/node_modules/uuid/dist/cjs-browser/md5.js +137 -0
  897. package/node_modules/uuid/dist/cjs-browser/native.d.ts +4 -0
  898. package/node_modules/uuid/dist/cjs-browser/native.js +4 -0
  899. package/node_modules/uuid/dist/cjs-browser/nil.d.ts +2 -0
  900. package/node_modules/uuid/dist/cjs-browser/nil.js +3 -0
  901. package/node_modules/uuid/dist/cjs-browser/package.json +1 -0
  902. package/node_modules/uuid/dist/cjs-browser/parse.d.ts +2 -0
  903. package/node_modules/uuid/dist/cjs-browser/parse.js +11 -0
  904. package/node_modules/uuid/dist/cjs-browser/regex.d.ts +2 -0
  905. package/node_modules/uuid/dist/cjs-browser/regex.js +3 -0
  906. package/node_modules/uuid/dist/cjs-browser/rng.d.ts +1 -0
  907. package/node_modules/uuid/dist/cjs-browser/rng.js +14 -0
  908. package/node_modules/uuid/dist/cjs-browser/sha1.d.ts +2 -0
  909. package/node_modules/uuid/dist/cjs-browser/sha1.js +72 -0
  910. package/node_modules/uuid/dist/cjs-browser/stringify.d.ts +3 -0
  911. package/node_modules/uuid/dist/cjs-browser/stringify.js +39 -0
  912. package/node_modules/uuid/dist/cjs-browser/types.d.ts +21 -0
  913. package/node_modules/uuid/dist/cjs-browser/types.js +2 -0
  914. package/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +1 -0
  915. package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +72 -0
  916. package/node_modules/uuid/dist/cjs-browser/v1.d.ts +11 -0
  917. package/node_modules/uuid/dist/cjs-browser/v1.js +87 -0
  918. package/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +2 -0
  919. package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +13 -0
  920. package/node_modules/uuid/dist/cjs-browser/v3.d.ts +9 -0
  921. package/node_modules/uuid/dist/cjs-browser/v3.js +14 -0
  922. package/node_modules/uuid/dist/cjs-browser/v35.d.ts +7 -0
  923. package/node_modules/uuid/dist/cjs-browser/v35.js +41 -0
  924. package/node_modules/uuid/dist/cjs-browser/v4.d.ts +4 -0
  925. package/node_modules/uuid/dist/cjs-browser/v4.js +29 -0
  926. package/node_modules/uuid/dist/cjs-browser/v5.d.ts +9 -0
  927. package/node_modules/uuid/dist/cjs-browser/v5.js +14 -0
  928. package/node_modules/uuid/dist/cjs-browser/v6.d.ts +4 -0
  929. package/node_modules/uuid/dist/cjs-browser/v6.js +19 -0
  930. package/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +2 -0
  931. package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +13 -0
  932. package/node_modules/uuid/dist/cjs-browser/v7.d.ts +9 -0
  933. package/node_modules/uuid/dist/cjs-browser/v7.js +69 -0
  934. package/node_modules/uuid/dist/cjs-browser/validate.d.ts +2 -0
  935. package/node_modules/uuid/dist/cjs-browser/validate.js +7 -0
  936. package/node_modules/uuid/dist/cjs-browser/version.d.ts +2 -0
  937. package/node_modules/uuid/dist/cjs-browser/version.js +10 -0
  938. package/node_modules/uuid/dist/esm/bin/uuid +2 -0
  939. package/node_modules/uuid/dist/esm/index.d.ts +15 -0
  940. package/node_modules/uuid/dist/{esm-node → esm}/index.js +1 -1
  941. package/node_modules/uuid/dist/esm/max.d.ts +2 -0
  942. package/node_modules/uuid/dist/esm/max.js +1 -0
  943. package/node_modules/uuid/dist/esm/md5.d.ts +4 -0
  944. package/node_modules/uuid/dist/esm/md5.js +11 -0
  945. package/node_modules/uuid/dist/esm/native.d.ts +6 -0
  946. package/node_modules/uuid/dist/esm/native.js +2 -0
  947. package/node_modules/uuid/dist/esm/nil.d.ts +2 -0
  948. package/node_modules/uuid/dist/esm/nil.js +1 -0
  949. package/node_modules/uuid/dist/esm/parse.d.ts +2 -0
  950. package/node_modules/uuid/dist/esm/parse.js +9 -0
  951. package/node_modules/uuid/dist/esm/regex.d.ts +2 -0
  952. package/node_modules/uuid/dist/{esm-node → esm}/regex.js +1 -1
  953. package/node_modules/uuid/dist/esm/rng.d.ts +1 -0
  954. package/node_modules/uuid/dist/esm/rng.js +10 -0
  955. package/node_modules/uuid/dist/esm/sha1.d.ts +4 -0
  956. package/node_modules/uuid/dist/esm/sha1.js +11 -0
  957. package/node_modules/uuid/dist/esm/stringify.d.ts +3 -0
  958. package/node_modules/uuid/dist/esm/stringify.js +35 -0
  959. package/node_modules/uuid/dist/esm/types.d.ts +21 -0
  960. package/node_modules/uuid/dist/esm/types.js +1 -0
  961. package/node_modules/uuid/dist/esm/uuid-bin.d.ts +1 -0
  962. package/node_modules/uuid/dist/esm/uuid-bin.js +70 -0
  963. package/node_modules/uuid/dist/esm/v1.d.ts +11 -0
  964. package/node_modules/uuid/dist/esm/v1.js +83 -0
  965. package/node_modules/uuid/dist/esm/v1ToV6.d.ts +2 -0
  966. package/node_modules/uuid/dist/esm/v1ToV6.js +10 -0
  967. package/node_modules/uuid/dist/esm/v3.d.ts +9 -0
  968. package/node_modules/uuid/dist/esm/v3.js +9 -0
  969. package/node_modules/uuid/dist/esm/v35.d.ts +7 -0
  970. package/node_modules/uuid/dist/esm/v35.js +36 -0
  971. package/node_modules/uuid/dist/esm/v4.d.ts +4 -0
  972. package/node_modules/uuid/dist/esm/v4.js +27 -0
  973. package/node_modules/uuid/dist/esm/v5.d.ts +9 -0
  974. package/node_modules/uuid/dist/esm/v5.js +9 -0
  975. package/node_modules/uuid/dist/esm/v6.d.ts +4 -0
  976. package/node_modules/uuid/dist/esm/v6.js +17 -0
  977. package/node_modules/uuid/dist/esm/v6ToV1.d.ts +2 -0
  978. package/node_modules/uuid/dist/esm/v6ToV1.js +10 -0
  979. package/node_modules/uuid/dist/esm/v7.d.ts +9 -0
  980. package/node_modules/uuid/dist/esm/v7.js +65 -0
  981. package/node_modules/uuid/dist/esm/validate.d.ts +2 -0
  982. package/node_modules/uuid/dist/esm/validate.js +5 -0
  983. package/node_modules/uuid/dist/esm/version.d.ts +2 -0
  984. package/node_modules/uuid/dist/esm/version.js +8 -0
  985. package/node_modules/uuid/dist/esm-browser/index.d.ts +15 -0
  986. package/node_modules/uuid/dist/esm-browser/index.js +1 -1
  987. package/node_modules/uuid/dist/esm-browser/max.d.ts +2 -0
  988. package/node_modules/uuid/dist/esm-browser/max.js +1 -1
  989. package/node_modules/uuid/dist/esm-browser/md5.d.ts +2 -0
  990. package/node_modules/uuid/dist/esm-browser/md5.js +113 -172
  991. package/node_modules/uuid/dist/esm-browser/native.d.ts +4 -0
  992. package/node_modules/uuid/dist/esm-browser/native.js +2 -4
  993. package/node_modules/uuid/dist/esm-browser/nil.d.ts +2 -0
  994. package/node_modules/uuid/dist/esm-browser/nil.js +1 -1
  995. package/node_modules/uuid/dist/esm-browser/parse.d.ts +2 -0
  996. package/node_modules/uuid/dist/esm-browser/parse.js +6 -34
  997. package/node_modules/uuid/dist/esm-browser/regex.d.ts +2 -0
  998. package/node_modules/uuid/dist/esm-browser/regex.js +1 -1
  999. package/node_modules/uuid/dist/esm-browser/rng.d.ts +1 -0
  1000. package/node_modules/uuid/dist/esm-browser/rng.js +8 -14
  1001. package/node_modules/uuid/dist/esm-browser/sha1.d.ts +2 -0
  1002. package/node_modules/uuid/dist/esm-browser/sha1.js +62 -68
  1003. package/node_modules/uuid/dist/esm-browser/stringify.d.ts +3 -0
  1004. package/node_modules/uuid/dist/esm-browser/stringify.js +29 -25
  1005. package/node_modules/uuid/dist/esm-browser/types.d.ts +21 -0
  1006. package/node_modules/uuid/dist/esm-browser/types.js +1 -0
  1007. package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +1 -0
  1008. package/node_modules/uuid/dist/esm-browser/uuid-bin.js +70 -0
  1009. package/node_modules/uuid/dist/esm-browser/v1.d.ts +11 -0
  1010. package/node_modules/uuid/dist/esm-browser/v1.js +75 -117
  1011. package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +2 -0
  1012. package/node_modules/uuid/dist/esm-browser/v1ToV6.js +6 -16
  1013. package/node_modules/uuid/dist/esm-browser/v3.d.ts +9 -0
  1014. package/node_modules/uuid/dist/esm-browser/v3.js +8 -3
  1015. package/node_modules/uuid/dist/esm-browser/v35.d.ts +7 -0
  1016. package/node_modules/uuid/dist/esm-browser/v35.js +28 -47
  1017. package/node_modules/uuid/dist/esm-browser/v4.d.ts +4 -0
  1018. package/node_modules/uuid/dist/esm-browser/v4.js +21 -19
  1019. package/node_modules/uuid/dist/esm-browser/v5.d.ts +9 -0
  1020. package/node_modules/uuid/dist/esm-browser/v5.js +8 -3
  1021. package/node_modules/uuid/dist/esm-browser/v6.d.ts +4 -0
  1022. package/node_modules/uuid/dist/esm-browser/v6.js +13 -32
  1023. package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +2 -0
  1024. package/node_modules/uuid/dist/esm-browser/v6ToV1.js +5 -15
  1025. package/node_modules/uuid/dist/esm-browser/v7.d.ts +9 -0
  1026. package/node_modules/uuid/dist/esm-browser/v7.js +58 -139
  1027. package/node_modules/uuid/dist/esm-browser/validate.d.ts +2 -0
  1028. package/node_modules/uuid/dist/esm-browser/validate.js +2 -2
  1029. package/node_modules/uuid/dist/esm-browser/version.d.ts +2 -0
  1030. package/node_modules/uuid/dist/esm-browser/version.js +5 -5
  1031. package/node_modules/uuid/package.json +65 -75
  1032. package/package.json +6 -6
  1033. package/tak-registration.js +1 -4
  1034. package/node_modules/@types/node/globals.global.d.ts +0 -1
  1035. package/node_modules/point-in-polygon-hao/.eslintrc +0 -10
  1036. package/node_modules/point-in-polygon-hao/CHANGES.md +0 -8
  1037. package/node_modules/point-in-polygon-hao/FUNDING.yml +0 -2
  1038. package/node_modules/point-in-polygon-hao/dist/pointInPolygon.mjs +0 -76
  1039. package/node_modules/point-in-polygon-hao/rollup.config.js +0 -19
  1040. package/node_modules/point-in-polygon-hao/src/index.js +0 -74
  1041. package/node_modules/polygon-clipping/LICENSE.md +0 -11
  1042. package/node_modules/polygon-clipping/dist/polygon-clipping.cjs.js +0 -1803
  1043. package/node_modules/polygon-clipping/dist/polygon-clipping.d.ts +0 -14
  1044. package/node_modules/polygon-clipping/dist/polygon-clipping.esm.js +0 -1532
  1045. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.js +0 -2496
  1046. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js +0 -24
  1047. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js.map +0 -1
  1048. package/node_modules/polygon-clipping/package.json +0 -79
  1049. package/node_modules/splaytree/Readme.md +0 -222
  1050. package/node_modules/splaytree/dist/splay.esm.js +0 -686
  1051. package/node_modules/splaytree/dist/splay.esm.js.map +0 -1
  1052. package/node_modules/splaytree/dist/splay.js +0 -694
  1053. package/node_modules/splaytree/dist/splay.js.map +0 -1
  1054. package/node_modules/splaytree/package.json +0 -91
  1055. package/node_modules/splaytree/src/index.ts +0 -679
  1056. package/node_modules/splaytree/src/node.ts +0 -15
  1057. package/node_modules/splaytree/src/types.ts +0 -2
  1058. package/node_modules/splaytree/typings/index.d.ts +0 -82
  1059. package/node_modules/splaytree/typings/node.d.ts +0 -8
  1060. package/node_modules/splaytree/typings/types.d.ts +0 -2
  1061. package/node_modules/uuid/CHANGELOG.md +0 -292
  1062. package/node_modules/uuid/CONTRIBUTING.md +0 -18
  1063. package/node_modules/uuid/dist/bin/uuid +0 -2
  1064. package/node_modules/uuid/dist/commonjs-browser/index.js +0 -104
  1065. package/node_modules/uuid/dist/commonjs-browser/max.js +0 -7
  1066. package/node_modules/uuid/dist/commonjs-browser/md5.js +0 -200
  1067. package/node_modules/uuid/dist/commonjs-browser/native.js +0 -10
  1068. package/node_modules/uuid/dist/commonjs-browser/nil.js +0 -7
  1069. package/node_modules/uuid/dist/commonjs-browser/parse.js +0 -44
  1070. package/node_modules/uuid/dist/commonjs-browser/regex.js +0 -7
  1071. package/node_modules/uuid/dist/commonjs-browser/rng.js +0 -23
  1072. package/node_modules/uuid/dist/commonjs-browser/sha1.js +0 -82
  1073. package/node_modules/uuid/dist/commonjs-browser/stringify.js +0 -38
  1074. package/node_modules/uuid/dist/commonjs-browser/v1.js +0 -131
  1075. package/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +0 -26
  1076. package/node_modules/uuid/dist/commonjs-browser/v3.js +0 -11
  1077. package/node_modules/uuid/dist/commonjs-browser/v35.js +0 -63
  1078. package/node_modules/uuid/dist/commonjs-browser/v4.js +0 -32
  1079. package/node_modules/uuid/dist/commonjs-browser/v5.js +0 -11
  1080. package/node_modules/uuid/dist/commonjs-browser/v6.js +0 -42
  1081. package/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +0 -26
  1082. package/node_modules/uuid/dist/commonjs-browser/v7.js +0 -152
  1083. package/node_modules/uuid/dist/commonjs-browser/validate.js +0 -12
  1084. package/node_modules/uuid/dist/commonjs-browser/version.js +0 -15
  1085. package/node_modules/uuid/dist/esm-node/max.js +0 -1
  1086. package/node_modules/uuid/dist/esm-node/md5.js +0 -10
  1087. package/node_modules/uuid/dist/esm-node/native.js +0 -4
  1088. package/node_modules/uuid/dist/esm-node/nil.js +0 -1
  1089. package/node_modules/uuid/dist/esm-node/parse.js +0 -37
  1090. package/node_modules/uuid/dist/esm-node/rng.js +0 -10
  1091. package/node_modules/uuid/dist/esm-node/sha1.js +0 -10
  1092. package/node_modules/uuid/dist/esm-node/stringify.js +0 -31
  1093. package/node_modules/uuid/dist/esm-node/v1.js +0 -125
  1094. package/node_modules/uuid/dist/esm-node/v1ToV6.js +0 -20
  1095. package/node_modules/uuid/dist/esm-node/v3.js +0 -4
  1096. package/node_modules/uuid/dist/esm-node/v35.js +0 -55
  1097. package/node_modules/uuid/dist/esm-node/v4.js +0 -25
  1098. package/node_modules/uuid/dist/esm-node/v5.js +0 -4
  1099. package/node_modules/uuid/dist/esm-node/v6.js +0 -32
  1100. package/node_modules/uuid/dist/esm-node/v6ToV1.js +0 -20
  1101. package/node_modules/uuid/dist/esm-node/v7.js +0 -146
  1102. package/node_modules/uuid/dist/esm-node/validate.js +0 -5
  1103. package/node_modules/uuid/dist/esm-node/version.js +0 -8
  1104. package/node_modules/uuid/dist/index.js +0 -104
  1105. package/node_modules/uuid/dist/max.js +0 -7
  1106. package/node_modules/uuid/dist/md5-browser.js +0 -200
  1107. package/node_modules/uuid/dist/md5.js +0 -17
  1108. package/node_modules/uuid/dist/native-browser.js +0 -10
  1109. package/node_modules/uuid/dist/native.js +0 -11
  1110. package/node_modules/uuid/dist/nil.js +0 -7
  1111. package/node_modules/uuid/dist/parse.js +0 -44
  1112. package/node_modules/uuid/dist/regex.js +0 -7
  1113. package/node_modules/uuid/dist/rng-browser.js +0 -23
  1114. package/node_modules/uuid/dist/rng.js +0 -17
  1115. package/node_modules/uuid/dist/sha1-browser.js +0 -82
  1116. package/node_modules/uuid/dist/sha1.js +0 -17
  1117. package/node_modules/uuid/dist/stringify.js +0 -38
  1118. package/node_modules/uuid/dist/uuid-bin.js +0 -75
  1119. package/node_modules/uuid/dist/v1.js +0 -131
  1120. package/node_modules/uuid/dist/v1ToV6.js +0 -26
  1121. package/node_modules/uuid/dist/v3.js +0 -11
  1122. package/node_modules/uuid/dist/v35.js +0 -63
  1123. package/node_modules/uuid/dist/v4.js +0 -32
  1124. package/node_modules/uuid/dist/v5.js +0 -11
  1125. package/node_modules/uuid/dist/v6.js +0 -38
  1126. package/node_modules/uuid/dist/v6ToV1.js +0 -26
  1127. package/node_modules/uuid/dist/v7.js +0 -152
  1128. package/node_modules/uuid/dist/validate.js +0 -12
  1129. package/node_modules/uuid/dist/version.js +0 -15
  1130. package/node_modules/uuid/wrapper.mjs +0 -15
  1131. /package/node_modules/point-in-polygon-hao/{index.d.ts → dist/cjs/index.d.cts} +0 -0
  1132. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/LICENSE +0 -0
  1133. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/README.md +0 -0
  1134. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/incircle.js +0 -0
  1135. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/insphere.js +0 -0
  1136. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/orient2d.js +0 -0
  1137. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/orient3d.js +0 -0
  1138. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/util.js +0 -0
  1139. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/index.d.ts +0 -0
  1140. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/index.js +0 -0
  1141. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/package.json +0 -0
  1142. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/incircle.js +0 -0
  1143. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/incircle.min.js +0 -0
  1144. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/insphere.js +0 -0
  1145. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/insphere.min.js +0 -0
  1146. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient2d.js +0 -0
  1147. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient2d.min.js +0 -0
  1148. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient3d.js +0 -0
  1149. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient3d.min.js +0 -0
  1150. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/predicates.js +0 -0
  1151. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/predicates.min.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../lib/spline.ts"],"sourcesContent":["import { Feature, LineString, GeoJsonProperties } from \"geojson\";\nimport { lineString } from \"@turf/helpers\";\nimport { getGeom } from \"@turf/invariant\";\nimport { Spline } from \"./lib/spline.js\";\n\n/**\n * Takes a {@link LineString|line} and returns a curved version\n * by applying a [Bezier spline](http://en.wikipedia.org/wiki/B%C3%A9zier_spline)\n * algorithm.\n *\n * The bezier spline implementation is by [Leszek Rybicki](http://leszek.rybicki.cc/).\n *\n * @name bezierSpline\n * @param {Feature<LineString>} line input LineString\n * @param {Object} [options={}] Optional parameters\n * @param {Object} [options.properties={}] Translate properties to output\n * @param {number} [options.resolution=10000] time in milliseconds between points\n * @param {number} [options.sharpness=0.85] a measure of how curvy the path should be between splines\n * @returns {Feature<LineString>} curved line\n * @example\n * var line = turf.lineString([\n * [-76.091308, 18.427501],\n * [-76.695556, 18.729501],\n * [-76.552734, 19.40443],\n * [-74.61914, 19.134789],\n * [-73.652343, 20.07657],\n * [-73.157958, 20.210656]\n * ]);\n *\n * var curved = turf.bezierSpline(line);\n *\n * //addToMap\n * var addToMap = [line, curved]\n * curved.properties = { stroke: '#0F0' };\n */\nfunction bezierSpline<P extends GeoJsonProperties = GeoJsonProperties>(\n line: Feature<LineString> | LineString,\n options: {\n properties?: P;\n resolution?: number;\n sharpness?: number;\n } = {}\n): Feature<LineString, P> {\n // Optional params\n const resolution = options.resolution || 10000;\n const sharpness = options.sharpness || 0.85;\n\n const coords: [number, number][] = [];\n const points = getGeom(line).coordinates.map((pt) => {\n return { x: pt[0], y: pt[1] };\n });\n const spline = new Spline({\n duration: resolution,\n points,\n sharpness,\n });\n\n const pushCoord = (time: number) => {\n var pos = spline.pos(time);\n if (Math.floor(time / 100) % 2 === 0) {\n coords.push([pos.x, pos.y]);\n }\n };\n\n for (var i = 0; i < spline.duration; i += 10) {\n pushCoord(i);\n }\n pushCoord(spline.duration);\n\n return lineString(coords, options.properties);\n}\n\nexport { bezierSpline };\nexport default bezierSpline;\n","interface Point {\n x: number;\n y: number;\n z: number;\n}\n\n/**\n * BezierSpline\n * https://github.com/leszekr/bezier-spline-js\n *\n * @private\n * @copyright\n * Copyright (c) 2013 Leszek Rybicki\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nclass Spline {\n public duration: number;\n public points: Point[];\n public sharpness: number;\n public centers: Point[];\n public controls: Array<[Point, Point]>;\n public stepLength: number;\n public length: number;\n public delay: number;\n public steps: number[];\n\n constructor(options?: any) {\n this.points = options.points || [];\n this.duration = options.duration || 10000;\n this.sharpness = options.sharpness || 0.85;\n this.centers = [];\n this.controls = [];\n this.stepLength = options.stepLength || 60;\n this.length = this.points.length;\n this.delay = 0;\n\n // this is to ensure compatibility with the 2d version\n for (let i = 0; i < this.length; i++) {\n this.points[i].z = this.points[i].z || 0;\n }\n for (let i = 0; i < this.length - 1; i++) {\n const p1 = this.points[i];\n const p2 = this.points[i + 1];\n this.centers.push({\n x: (p1.x + p2.x) / 2,\n y: (p1.y + p2.y) / 2,\n z: (p1.z + p2.z) / 2,\n });\n }\n this.controls.push([this.points[0], this.points[0]]);\n for (let i = 0; i < this.centers.length - 1; i++) {\n const dx =\n this.points[i + 1].x - (this.centers[i].x + this.centers[i + 1].x) / 2;\n const dy =\n this.points[i + 1].y - (this.centers[i].y + this.centers[i + 1].y) / 2;\n const dz =\n this.points[i + 1].z - (this.centers[i].y + this.centers[i + 1].z) / 2;\n this.controls.push([\n {\n x:\n (1.0 - this.sharpness) * this.points[i + 1].x +\n this.sharpness * (this.centers[i].x + dx),\n y:\n (1.0 - this.sharpness) * this.points[i + 1].y +\n this.sharpness * (this.centers[i].y + dy),\n z:\n (1.0 - this.sharpness) * this.points[i + 1].z +\n this.sharpness * (this.centers[i].z + dz),\n },\n {\n x:\n (1.0 - this.sharpness) * this.points[i + 1].x +\n this.sharpness * (this.centers[i + 1].x + dx),\n y:\n (1.0 - this.sharpness) * this.points[i + 1].y +\n this.sharpness * (this.centers[i + 1].y + dy),\n z:\n (1.0 - this.sharpness) * this.points[i + 1].z +\n this.sharpness * (this.centers[i + 1].z + dz),\n },\n ]);\n }\n this.controls.push([\n this.points[this.length - 1],\n this.points[this.length - 1],\n ]);\n this.steps = this.cacheSteps(this.stepLength);\n return this;\n }\n /**\n * Caches an array of equidistant (more or less) points on the curve.\n */\n public cacheSteps(mindist: number) {\n const steps = [];\n let laststep = this.pos(0);\n steps.push(0);\n for (let t = 0; t < this.duration; t += 10) {\n const step = this.pos(t);\n const dist = Math.sqrt(\n (step.x - laststep.x) * (step.x - laststep.x) +\n (step.y - laststep.y) * (step.y - laststep.y) +\n (step.z - laststep.z) * (step.z - laststep.z)\n );\n if (dist > mindist) {\n steps.push(t);\n laststep = step;\n }\n }\n return steps;\n }\n\n /**\n * returns angle and speed in the given point in the curve\n */\n public vector(t: number) {\n const p1 = this.pos(t + 10);\n const p2 = this.pos(t - 10);\n return {\n angle: (180 * Math.atan2(p1.y - p2.y, p1.x - p2.x)) / 3.14,\n speed: Math.sqrt(\n (p2.x - p1.x) * (p2.x - p1.x) +\n (p2.y - p1.y) * (p2.y - p1.y) +\n (p2.z - p1.z) * (p2.z - p1.z)\n ),\n };\n }\n\n /**\n * Gets the position of the point, given time.\n *\n * WARNING: The speed is not constant. The time it takes between control points is constant.\n *\n * For constant speed, use Spline.steps[i];\n */\n public pos(time: number) {\n let t = time - this.delay;\n if (t < 0) {\n t = 0;\n }\n if (t > this.duration) {\n t = this.duration - 1;\n }\n // t = t-this.delay;\n const t2 = t / this.duration;\n if (t2 >= 1) {\n return this.points[this.length - 1];\n }\n\n const n = Math.floor((this.points.length - 1) * t2);\n const t1 = (this.length - 1) * t2 - n;\n return bezier(\n t1,\n this.points[n],\n this.controls[n][1],\n this.controls[n + 1][0],\n this.points[n + 1]\n );\n }\n}\n\nfunction bezier(t: number, p1: Point, c1: Point, c2: Point, p2: Point) {\n const b = B(t);\n const pos = {\n x: p2.x * b[0] + c2.x * b[1] + c1.x * b[2] + p1.x * b[3],\n y: p2.y * b[0] + c2.y * b[1] + c1.y * b[2] + p1.y * b[3],\n z: p2.z * b[0] + c2.z * b[1] + c1.z * b[2] + p1.z * b[3],\n };\n return pos;\n}\nfunction B(t: number) {\n const t2 = t * t;\n const t3 = t2 * t;\n return [\n t3,\n 3 * t2 * (1 - t),\n 3 * t * (1 - t) * (1 - t),\n (1 - t) * (1 - t) * (1 - t),\n ];\n}\n\nexport { Spline, Point };\nexport default Spline;\n"],"mappings":";AACA,SAAS,kBAAkB;AAC3B,SAAS,eAAe;;;AC8BxB,IAAM,SAAN,MAAa;AAAA,EAWX,YAAY,SAAe;AACzB,SAAK,SAAS,QAAQ,UAAU,CAAC;AACjC,SAAK,WAAW,QAAQ,YAAY;AACpC,SAAK,YAAY,QAAQ,aAAa;AACtC,SAAK,UAAU,CAAC;AAChB,SAAK,WAAW,CAAC;AACjB,SAAK,aAAa,QAAQ,cAAc;AACxC,SAAK,SAAS,KAAK,OAAO;AAC1B,SAAK,QAAQ;AAGb,aAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,WAAK,OAAO,CAAC,EAAE,IAAI,KAAK,OAAO,CAAC,EAAE,KAAK;AAAA,IACzC;AACA,aAAS,IAAI,GAAG,IAAI,KAAK,SAAS,GAAG,KAAK;AACxC,YAAM,KAAK,KAAK,OAAO,CAAC;AACxB,YAAM,KAAK,KAAK,OAAO,IAAI,CAAC;AAC5B,WAAK,QAAQ,KAAK;AAAA,QAChB,IAAI,GAAG,IAAI,GAAG,KAAK;AAAA,QACnB,IAAI,GAAG,IAAI,GAAG,KAAK;AAAA,QACnB,IAAI,GAAG,IAAI,GAAG,KAAK;AAAA,MACrB,CAAC;AAAA,IACH;AACA,SAAK,SAAS,KAAK,CAAC,KAAK,OAAO,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d,IAAI,KAAK,IAAI,MAAM,IAAI;AAAA,KACtB,IAAI,MAAM,IAAI,MAAM,IAAI;AAAA,EAC3B;AACF;;;ADhKA,SAAS,aACP,MACA,UAII,CAAC,GACmB;AAExB,QAAM,aAAa,QAAQ,cAAc;AACzC,QAAM,YAAY,QAAQ,aAAa;AAEvC,QAAM,SAA6B,CAAC;AACpC,QAAM,SAAS,QAAQ,IAAI,EAAE,YAAY,IAAI,CAAC,OAAO;AACnD,WAAO,EAAE,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE;AAAA,EAC9B,CAAC;AACD,QAAM,SAAS,IAAI,OAAO;AAAA,IACxB,UAAU;AAAA,IACV;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,YAAY,CAAC,SAAiB;AAClC,QAAI,MAAM,OAAO,IAAI,IAAI;AACzB,QAAI,KAAK,MAAM,OAAO,GAAG,IAAI,MAAM,GAAG;AACpC,aAAO,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;AAAA,IAC5B;AAAA,EACF;AAEA,WAAS,IAAI,GAAG,IAAI,OAAO,UAAU,KAAK,IAAI;AAC5C,cAAU,CAAC;AAAA,EACb;AACA,YAAU,OAAO,QAAQ;AAEzB,SAAO,WAAW,QAAQ,QAAQ,UAAU;AAC9C;AAGA,IAAO,6BAAQ;","names":[]}
1
+ {"version":3,"sources":["../../index.ts","../../lib/spline.ts"],"sourcesContent":["import { Feature, LineString, GeoJsonProperties } from \"geojson\";\nimport { lineString } from \"@turf/helpers\";\nimport { getGeom } from \"@turf/invariant\";\nimport { Spline } from \"./lib/spline.js\";\n\n/**\n * Takes a {@link LineString|line} and returns a curved version\n * by applying a [Bezier spline](http://en.wikipedia.org/wiki/B%C3%A9zier_spline)\n * algorithm.\n *\n * The bezier spline implementation is by [Leszek Rybicki](http://leszek.rybicki.cc/).\n *\n * @function\n * @param {Feature<LineString>} line input LineString\n * @param {Object} [options={}] Optional parameters\n * @param {Object} [options.properties={}] Translate properties to output\n * @param {number} [options.resolution=10000] time in milliseconds between points\n * @param {number} [options.sharpness=0.85] a measure of how curvy the path should be between splines\n * @returns {Feature<LineString>} curved line\n * @example\n * var line = turf.lineString([\n * [-76.091308, 18.427501],\n * [-76.695556, 18.729501],\n * [-76.552734, 19.40443],\n * [-74.61914, 19.134789],\n * [-73.652343, 20.07657],\n * [-73.157958, 20.210656]\n * ]);\n *\n * var curved = turf.bezierSpline(line);\n *\n * //addToMap\n * var addToMap = [line, curved]\n * curved.properties = { stroke: '#0F0' };\n */\nfunction bezierSpline<P extends GeoJsonProperties = GeoJsonProperties>(\n line: Feature<LineString> | LineString,\n options: {\n properties?: P;\n resolution?: number;\n sharpness?: number;\n } = {}\n): Feature<LineString, P> {\n // Optional params\n const resolution = options.resolution || 10000;\n const sharpness = options.sharpness || 0.85;\n\n const coords: [number, number][] = [];\n const points = getGeom(line).coordinates.map((pt) => {\n return { x: pt[0], y: pt[1] };\n });\n const spline = new Spline({\n duration: resolution,\n points,\n sharpness,\n });\n\n const pushCoord = (time: number) => {\n var pos = spline.pos(time);\n if (Math.floor(time / 100) % 2 === 0) {\n coords.push([pos.x, pos.y]);\n }\n };\n\n for (var i = 0; i < spline.duration; i += 10) {\n pushCoord(i);\n }\n pushCoord(spline.duration);\n\n return lineString(coords, options.properties);\n}\n\nexport { bezierSpline };\nexport default bezierSpline;\n","interface Point {\n x: number;\n y: number;\n z: number;\n}\n\n/**\n * BezierSpline\n * https://github.com/leszekr/bezier-spline-js\n *\n * @private\n * @copyright\n * Copyright (c) 2013 Leszek Rybicki\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nclass Spline {\n public duration: number;\n public points: Point[];\n public sharpness: number;\n public centers: Point[];\n public controls: Array<[Point, Point]>;\n public stepLength: number;\n public length: number;\n public delay: number;\n public steps: number[];\n\n constructor(options?: any) {\n this.points = options.points || [];\n this.duration = options.duration || 10000;\n this.sharpness = options.sharpness || 0.85;\n this.centers = [];\n this.controls = [];\n this.stepLength = options.stepLength || 60;\n this.length = this.points.length;\n this.delay = 0;\n\n // this is to ensure compatibility with the 2d version\n for (let i = 0; i < this.length; i++) {\n this.points[i].z = this.points[i].z || 0;\n }\n for (let i = 0; i < this.length - 1; i++) {\n const p1 = this.points[i];\n const p2 = this.points[i + 1];\n this.centers.push({\n x: (p1.x + p2.x) / 2,\n y: (p1.y + p2.y) / 2,\n z: (p1.z + p2.z) / 2,\n });\n }\n this.controls.push([this.points[0], this.points[0]]);\n for (let i = 0; i < this.centers.length - 1; i++) {\n const dx =\n this.points[i + 1].x - (this.centers[i].x + this.centers[i + 1].x) / 2;\n const dy =\n this.points[i + 1].y - (this.centers[i].y + this.centers[i + 1].y) / 2;\n const dz =\n this.points[i + 1].z - (this.centers[i].y + this.centers[i + 1].z) / 2;\n this.controls.push([\n {\n x:\n (1.0 - this.sharpness) * this.points[i + 1].x +\n this.sharpness * (this.centers[i].x + dx),\n y:\n (1.0 - this.sharpness) * this.points[i + 1].y +\n this.sharpness * (this.centers[i].y + dy),\n z:\n (1.0 - this.sharpness) * this.points[i + 1].z +\n this.sharpness * (this.centers[i].z + dz),\n },\n {\n x:\n (1.0 - this.sharpness) * this.points[i + 1].x +\n this.sharpness * (this.centers[i + 1].x + dx),\n y:\n (1.0 - this.sharpness) * this.points[i + 1].y +\n this.sharpness * (this.centers[i + 1].y + dy),\n z:\n (1.0 - this.sharpness) * this.points[i + 1].z +\n this.sharpness * (this.centers[i + 1].z + dz),\n },\n ]);\n }\n this.controls.push([\n this.points[this.length - 1],\n this.points[this.length - 1],\n ]);\n this.steps = this.cacheSteps(this.stepLength);\n return this;\n }\n /**\n * Caches an array of equidistant (more or less) points on the curve.\n */\n public cacheSteps(mindist: number) {\n const steps = [];\n let laststep = this.pos(0);\n steps.push(0);\n for (let t = 0; t < this.duration; t += 10) {\n const step = this.pos(t);\n const dist = Math.sqrt(\n (step.x - laststep.x) * (step.x - laststep.x) +\n (step.y - laststep.y) * (step.y - laststep.y) +\n (step.z - laststep.z) * (step.z - laststep.z)\n );\n if (dist > mindist) {\n steps.push(t);\n laststep = step;\n }\n }\n return steps;\n }\n\n /**\n * returns angle and speed in the given point in the curve\n */\n public vector(t: number) {\n const p1 = this.pos(t + 10);\n const p2 = this.pos(t - 10);\n return {\n angle: (180 * Math.atan2(p1.y - p2.y, p1.x - p2.x)) / 3.14,\n speed: Math.sqrt(\n (p2.x - p1.x) * (p2.x - p1.x) +\n (p2.y - p1.y) * (p2.y - p1.y) +\n (p2.z - p1.z) * (p2.z - p1.z)\n ),\n };\n }\n\n /**\n * Gets the position of the point, given time.\n *\n * WARNING: The speed is not constant. The time it takes between control points is constant.\n *\n * For constant speed, use Spline.steps[i];\n */\n public pos(time: number) {\n let t = time - this.delay;\n if (t < 0) {\n t = 0;\n }\n if (t > this.duration) {\n t = this.duration - 1;\n }\n // t = t-this.delay;\n const t2 = t / this.duration;\n if (t2 >= 1) {\n return this.points[this.length - 1];\n }\n\n const n = Math.floor((this.points.length - 1) * t2);\n const t1 = (this.length - 1) * t2 - n;\n return bezier(\n t1,\n this.points[n],\n this.controls[n][1],\n this.controls[n + 1][0],\n this.points[n + 1]\n );\n }\n}\n\nfunction bezier(t: number, p1: Point, c1: Point, c2: Point, p2: Point) {\n const b = B(t);\n const pos = {\n x: p2.x * b[0] + c2.x * b[1] + c1.x * b[2] + p1.x * b[3],\n y: p2.y * b[0] + c2.y * b[1] + c1.y * b[2] + p1.y * b[3],\n z: p2.z * b[0] + c2.z * b[1] + c1.z * b[2] + p1.z * b[3],\n };\n return pos;\n}\nfunction B(t: number) {\n const t2 = t * t;\n const t3 = t2 * t;\n return [\n t3,\n 3 * t2 * (1 - t),\n 3 * t * (1 - t) * (1 - t),\n (1 - t) * (1 - t) * (1 - t),\n ];\n}\n\nexport { Spline, Point };\nexport default Spline;\n"],"mappings":";AACA,SAAS,kBAAkB;AAC3B,SAAS,eAAe;;;AC8BxB,IAAM,SAAN,MAAa;AAAA,EAWX,YAAY,SAAe;AACzB,SAAK,SAAS,QAAQ,UAAU,CAAC;AACjC,SAAK,WAAW,QAAQ,YAAY;AACpC,SAAK,YAAY,QAAQ,aAAa;AACtC,SAAK,UAAU,CAAC;AAChB,SAAK,WAAW,CAAC;AACjB,SAAK,aAAa,QAAQ,cAAc;AACxC,SAAK,SAAS,KAAK,OAAO;AAC1B,SAAK,QAAQ;AAGb,aAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,WAAK,OAAO,CAAC,EAAE,IAAI,KAAK,OAAO,CAAC,EAAE,KAAK;AAAA,IACzC;AACA,aAAS,IAAI,GAAG,IAAI,KAAK,SAAS,GAAG,KAAK;AACxC,YAAM,KAAK,KAAK,OAAO,CAAC;AACxB,YAAM,KAAK,KAAK,OAAO,IAAI,CAAC;AAC5B,WAAK,QAAQ,KAAK;AAAA,QAChB,IAAI,GAAG,IAAI,GAAG,KAAK;AAAA,QACnB,IAAI,GAAG,IAAI,GAAG,KAAK;AAAA,QACnB,IAAI,GAAG,IAAI,GAAG,KAAK;AAA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KAAK;AAChB,SAAO;AAAA,IACL;AAAA,IACA,IAAI,MAAM,IAAI;AAAA,IACd,IAAI,KAAK,IAAI,MAAM,IAAI;AAAA,KACtB,IAAI,MAAM,IAAI,MAAM,IAAI;AAAA,EAC3B;AACF;;;ADhKA,SAAS,aACP,MACA,UAII,CAAC,GACmB;AAExB,QAAM,aAAa,QAAQ,cAAc;AACzC,QAAM,YAAY,QAAQ,aAAa;AAEvC,QAAM,SAA6B,CAAC;AACpC,QAAM,SAAS,QAAQ,IAAI,EAAE,YAAY,IAAI,CAAC,OAAO;AACnD,WAAO,EAAE,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE;AAAA,EAC9B,CAAC;AACD,QAAM,SAAS,IAAI,OAAO;AAAA,IACxB,UAAU;AAAA,IACV;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,YAAY,CAAC,SAAiB;AAClC,QAAI,MAAM,OAAO,IAAI,IAAI;AACzB,QAAI,KAAK,MAAM,OAAO,GAAG,IAAI,MAAM,GAAG;AACpC,aAAO,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;AAAA,IAC5B;AAAA,EACF;AAEA,WAAS,IAAI,GAAG,IAAI,OAAO,UAAU,KAAK,IAAI;AAC5C,cAAU,CAAC;AAAA,EACb;AACA,YAAU,OAAO,QAAQ;AAEzB,SAAO,WAAW,QAAQ,QAAQ,UAAU;AAC9C;AAGA,IAAO,6BAAQ;","names":[]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/bezier-spline",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "turf bezier-spline module",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
@@ -53,21 +53,21 @@
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/benchmark": "^2.1.5",
56
- "@types/tape": "^4.2.32",
56
+ "@types/tape": "^4.13.4",
57
57
  "benchmark": "^2.1.4",
58
58
  "load-json-file": "^7.0.1",
59
59
  "npm-run-all": "^4.1.5",
60
- "tape": "^5.7.2",
61
- "tsup": "^8.0.1",
62
- "tsx": "^4.6.2",
63
- "typescript": "^5.2.2",
60
+ "tape": "^5.9.0",
61
+ "tsup": "^8.3.5",
62
+ "tsx": "^4.19.2",
63
+ "typescript": "^5.5.4",
64
64
  "write-json-file": "^5.0.0"
65
65
  },
66
66
  "dependencies": {
67
- "@turf/helpers": "^7.1.0",
68
- "@turf/invariant": "^7.1.0",
67
+ "@turf/helpers": "^7.2.0",
68
+ "@turf/invariant": "^7.2.0",
69
69
  "@types/geojson": "^7946.0.10",
70
- "tslib": "^2.6.2"
70
+ "tslib": "^2.8.1"
71
71
  },
72
- "gitHead": "68915eeebc9278bb40dec3f1034499698a0561ef"
72
+ "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
73
73
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"names":[],"mappings":";AACA,SAAS,iBAAiB;AAiB1B,SAAS,iBACP,MACS;AACT,QAAM,OAAO,UAAU,IAAI;AAC3B,MAAI,MAAM;AACV,MAAI,IAAI;AACR,MAAI;AACJ,MAAI;AAEJ,SAAO,IAAI,KAAK,QAAQ;AACtB,WAAO,OAAO,KAAK,CAAC;AACpB,UAAM,KAAK,CAAC;AACZ,YAAQ,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,CAAC;AAC5C;AAAA,EACF;AACA,SAAO,MAAM;AACf;AAGA,IAAO,iCAAQ","sourcesContent":["import { Feature, LineString, Position } from \"geojson\";\nimport { getCoords } from \"@turf/invariant\";\n\n/**\n * Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise.\n *\n * @name booleanClockwise\n * @param {Feature<LineString>|LineString|Array<Array<number>>} line to be evaluated\n * @returns {boolean} true/false\n * @example\n * var clockwiseRing = turf.lineString([[0,0],[1,1],[1,0],[0,0]]);\n * var counterClockwiseRing = turf.lineString([[0,0],[1,0],[1,1],[0,0]]);\n *\n * turf.booleanClockwise(clockwiseRing)\n * //=true\n * turf.booleanClockwise(counterClockwiseRing)\n * //=false\n */\nfunction booleanClockwise(\n line: Feature<LineString> | LineString | Position[]\n): boolean {\n const ring = getCoords(line);\n let sum = 0;\n let i = 1;\n let prev;\n let cur;\n\n while (i < ring.length) {\n prev = cur || ring[0];\n cur = ring[i];\n sum += (cur[0] - prev[0]) * (cur[1] + prev[1]);\n i++;\n }\n return sum > 0;\n}\n\nexport { booleanClockwise };\nexport default booleanClockwise;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-clockwise/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACCA,4CAA0B;AAiB1B,SAAS,gBAAA,CACP,IAAA,EACS;AACT,EAAA,MAAM,KAAA,EAAO,kCAAA,IAAc,CAAA;AAC3B,EAAA,IAAI,IAAA,EAAM,CAAA;AACV,EAAA,IAAI,EAAA,EAAI,CAAA;AACR,EAAA,IAAI,IAAA;AACJ,EAAA,IAAI,GAAA;AAEJ,EAAA,MAAA,CAAO,EAAA,EAAI,IAAA,CAAK,MAAA,EAAQ;AACtB,IAAA,KAAA,EAAO,IAAA,GAAO,IAAA,CAAK,CAAC,CAAA;AACpB,IAAA,IAAA,EAAM,IAAA,CAAK,CAAC,CAAA;AACZ,IAAA,IAAA,GAAA,CAAQ,GAAA,CAAI,CAAC,EAAA,EAAI,IAAA,CAAK,CAAC,CAAA,EAAA,EAAA,CAAM,GAAA,CAAI,CAAC,EAAA,EAAI,IAAA,CAAK,CAAC,CAAA,CAAA;AAC5C,IAAA,CAAA,EAAA;AAAA,EACF;AACA,EAAA,OAAO,IAAA,EAAM,CAAA;AACf;AAGA,IAAO,+BAAA,EAAQ,gBAAA;ADpBf;AACE;AACA;AACF,8FAAC","file":"/home/runner/work/turf/turf/packages/turf-boolean-clockwise/dist/cjs/index.cjs","sourcesContent":[null,"import { Feature, LineString, Position } from \"geojson\";\nimport { getCoords } from \"@turf/invariant\";\n\n/**\n * Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise.\n *\n * @function\n * @param {Feature<LineString>|LineString|Array<Array<number>>} line to be evaluated\n * @returns {boolean} true/false\n * @example\n * var clockwiseRing = turf.lineString([[0,0],[1,1],[1,0],[0,0]]);\n * var counterClockwiseRing = turf.lineString([[0,0],[1,0],[1,1],[0,0]]);\n *\n * turf.booleanClockwise(clockwiseRing)\n * //=true\n * turf.booleanClockwise(counterClockwiseRing)\n * //=false\n */\nfunction booleanClockwise(\n line: Feature<LineString> | LineString | Position[]\n): boolean {\n const ring = getCoords(line);\n let sum = 0;\n let i = 1;\n let prev;\n let cur;\n\n while (i < ring.length) {\n prev = cur || ring[0];\n cur = ring[i];\n sum += (cur[0] - prev[0]) * (cur[1] + prev[1]);\n i++;\n }\n return sum > 0;\n}\n\nexport { booleanClockwise };\nexport default booleanClockwise;\n"]}
@@ -3,7 +3,7 @@ import { Feature, LineString, Position } from 'geojson';
3
3
  /**
4
4
  * Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise.
5
5
  *
6
- * @name booleanClockwise
6
+ * @function
7
7
  * @param {Feature<LineString>|LineString|Array<Array<number>>} line to be evaluated
8
8
  * @returns {boolean} true/false
9
9
  * @example
@@ -3,7 +3,7 @@ import { Feature, LineString, Position } from 'geojson';
3
3
  /**
4
4
  * Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise.
5
5
  *
6
- * @name booleanClockwise
6
+ * @function
7
7
  * @param {Feature<LineString>|LineString|Array<Array<number>>} line to be evaluated
8
8
  * @returns {boolean} true/false
9
9
  * @example
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, LineString, Position } from \"geojson\";\nimport { getCoords } from \"@turf/invariant\";\n\n/**\n * Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise.\n *\n * @name booleanClockwise\n * @param {Feature<LineString>|LineString|Array<Array<number>>} line to be evaluated\n * @returns {boolean} true/false\n * @example\n * var clockwiseRing = turf.lineString([[0,0],[1,1],[1,0],[0,0]]);\n * var counterClockwiseRing = turf.lineString([[0,0],[1,0],[1,1],[0,0]]);\n *\n * turf.booleanClockwise(clockwiseRing)\n * //=true\n * turf.booleanClockwise(counterClockwiseRing)\n * //=false\n */\nfunction booleanClockwise(\n line: Feature<LineString> | LineString | Position[]\n): boolean {\n const ring = getCoords(line);\n let sum = 0;\n let i = 1;\n let prev;\n let cur;\n\n while (i < ring.length) {\n prev = cur || ring[0];\n cur = ring[i];\n sum += (cur[0] - prev[0]) * (cur[1] + prev[1]);\n i++;\n }\n return sum > 0;\n}\n\nexport { booleanClockwise };\nexport default booleanClockwise;\n"],"mappings":";AACA,SAAS,iBAAiB;AAiB1B,SAAS,iBACP,MACS;AACT,QAAM,OAAO,UAAU,IAAI;AAC3B,MAAI,MAAM;AACV,MAAI,IAAI;AACR,MAAI;AACJ,MAAI;AAEJ,SAAO,IAAI,KAAK,QAAQ;AACtB,WAAO,OAAO,KAAK,CAAC;AACpB,UAAM,KAAK,CAAC;AACZ,YAAQ,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,CAAC;AAC5C;AAAA,EACF;AACA,SAAO,MAAM;AACf;AAGA,IAAO,iCAAQ;","names":[]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, LineString, Position } from \"geojson\";\nimport { getCoords } from \"@turf/invariant\";\n\n/**\n * Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise.\n *\n * @function\n * @param {Feature<LineString>|LineString|Array<Array<number>>} line to be evaluated\n * @returns {boolean} true/false\n * @example\n * var clockwiseRing = turf.lineString([[0,0],[1,1],[1,0],[0,0]]);\n * var counterClockwiseRing = turf.lineString([[0,0],[1,0],[1,1],[0,0]]);\n *\n * turf.booleanClockwise(clockwiseRing)\n * //=true\n * turf.booleanClockwise(counterClockwiseRing)\n * //=false\n */\nfunction booleanClockwise(\n line: Feature<LineString> | LineString | Position[]\n): boolean {\n const ring = getCoords(line);\n let sum = 0;\n let i = 1;\n let prev;\n let cur;\n\n while (i < ring.length) {\n prev = cur || ring[0];\n cur = ring[i];\n sum += (cur[0] - prev[0]) * (cur[1] + prev[1]);\n i++;\n }\n return sum > 0;\n}\n\nexport { booleanClockwise };\nexport default booleanClockwise;\n"],"mappings":";AACA,SAAS,iBAAiB;AAiB1B,SAAS,iBACP,MACS;AACT,QAAM,OAAO,UAAU,IAAI;AAC3B,MAAI,MAAM;AACV,MAAI,IAAI;AACR,MAAI;AACJ,MAAI;AAEJ,SAAO,IAAI,KAAK,QAAQ;AACtB,WAAO,OAAO,KAAK,CAAC;AACpB,UAAM,KAAK,CAAC;AACZ,YAAQ,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,CAAC;AAC5C;AAAA,EACF;AACA,SAAO,MAAM;AACf;AAGA,IAAO,iCAAQ;","names":[]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/boolean-clockwise",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "turf boolean-clockwise module",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
@@ -57,21 +57,21 @@
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/benchmark": "^2.1.5",
60
- "@types/tape": "^4.2.32",
60
+ "@types/tape": "^4.13.4",
61
61
  "benchmark": "^2.1.4",
62
62
  "glob": "^10.3.10",
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
  },
70
70
  "dependencies": {
71
- "@turf/helpers": "^7.1.0",
72
- "@turf/invariant": "^7.1.0",
71
+ "@turf/helpers": "^7.2.0",
72
+ "@turf/invariant": "^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
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"names":[],"mappings":";AACA,SAAS,eAAe;AAcxB,SAAS,eAAe,SAAqC;AAE3D,QAAM,SAAS,QAAQ,OAAO,EAAE;AAChC,MAAI,OAAO,CAAC,EAAE,UAAU,GAAG;AACzB,WAAO;AAAA,EACT;AAEA,MAAI,OAAO;AACX,QAAM,IAAI,OAAO,CAAC,EAAE,SAAS;AAC7B,WAAS,IAAI,GAAG,IAAI,GAAG,KAAK;AAC1B,UAAM,MAAM,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AAChE,UAAM,MAAM,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AAChE,UAAM,MAAM,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AACtD,UAAM,MAAM,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AACtD,UAAM,gBAAgB,MAAM,MAAM,MAAM;AACxC,QAAI,MAAM,GAAG;AACX,aAAO,gBAAgB;AAAA,IACzB,WAAW,SAAS,gBAAgB,GAAG;AACrC,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAGA,IAAO,+BAAQ","sourcesContent":["import { Feature, Polygon } from \"geojson\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Takes a polygon and return true or false as to whether it is concave or not.\n *\n * @name booleanConcave\n * @param {Feature<Polygon>} polygon to be evaluated\n * @returns {boolean} true/false\n * @example\n * var convexPolygon = turf.polygon([[[0,0],[0,1],[1,1],[1,0],[0,0]]]);\n *\n * turf.booleanConcave(convexPolygon)\n * //=false\n */\nfunction booleanConcave(polygon: Feature<Polygon> | Polygon) {\n // Taken from https://stackoverflow.com/a/1881201 & https://stackoverflow.com/a/25304159\n const coords = getGeom(polygon).coordinates;\n if (coords[0].length <= 4) {\n return false;\n }\n\n let sign = false;\n const n = coords[0].length - 1;\n for (let i = 0; i < n; i++) {\n const dx1 = coords[0][(i + 2) % n][0] - coords[0][(i + 1) % n][0];\n const dy1 = coords[0][(i + 2) % n][1] - coords[0][(i + 1) % n][1];\n const dx2 = coords[0][i][0] - coords[0][(i + 1) % n][0];\n const dy2 = coords[0][i][1] - coords[0][(i + 1) % n][1];\n const zcrossproduct = dx1 * dy2 - dy1 * dx2;\n if (i === 0) {\n sign = zcrossproduct > 0;\n } else if (sign !== zcrossproduct > 0) {\n return true;\n }\n }\n return false;\n}\n\nexport { booleanConcave };\nexport default booleanConcave;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-concave/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACCA,4CAAwB;AAcxB,SAAS,cAAA,CAAe,OAAA,EAAqC;AAE3D,EAAA,MAAM,OAAA,EAAS,gCAAA,OAAe,CAAA,CAAE,WAAA;AAChC,EAAA,GAAA,CAAI,MAAA,CAAO,CAAC,CAAA,CAAE,OAAA,GAAU,CAAA,EAAG;AACzB,IAAA,OAAO,KAAA;AAAA,EACT;AAEA,EAAA,IAAI,KAAA,EAAO,KAAA;AACX,EAAA,MAAM,EAAA,EAAI,MAAA,CAAO,CAAC,CAAA,CAAE,OAAA,EAAS,CAAA;AAC7B,EAAA,IAAA,CAAA,IAAS,EAAA,EAAI,CAAA,EAAG,EAAA,EAAI,CAAA,EAAG,CAAA,EAAA,EAAK;AAC1B,IAAA,MAAM,IAA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cjs/index.cjs","sourcesContent":[null,"import { Feature, Polygon } from \"geojson\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Takes a polygon and return true or false as to whether it is concave or not.\n *\n * @function\n * @param {Feature<Polygon>} polygon to be evaluated\n * @returns {boolean} true/false\n * @example\n * var convexPolygon = turf.polygon([[[0,0],[0,1],[1,1],[1,0],[0,0]]]);\n *\n * turf.booleanConcave(convexPolygon)\n * //=false\n */\nfunction booleanConcave(polygon: Feature<Polygon> | Polygon) {\n // Taken from https://stackoverflow.com/a/1881201 & https://stackoverflow.com/a/25304159\n const coords = getGeom(polygon).coordinates;\n if (coords[0].length <= 4) {\n return false;\n }\n\n let sign = false;\n const n = coords[0].length - 1;\n for (let i = 0; i < n; i++) {\n const dx1 = coords[0][(i + 2) % n][0] - coords[0][(i + 1) % n][0];\n const dy1 = coords[0][(i + 2) % n][1] - coords[0][(i + 1) % n][1];\n const dx2 = coords[0][i][0] - coords[0][(i + 1) % n][0];\n const dy2 = coords[0][i][1] - coords[0][(i + 1) % n][1];\n const zcrossproduct = dx1 * dy2 - dy1 * dx2;\n if (i === 0) {\n sign = zcrossproduct > 0;\n } else if (sign !== zcrossproduct > 0) {\n return true;\n }\n }\n return false;\n}\n\nexport { booleanConcave };\nexport default booleanConcave;\n"]}
@@ -3,7 +3,7 @@ import { Feature, Polygon } from 'geojson';
3
3
  /**
4
4
  * Takes a polygon and return true or false as to whether it is concave or not.
5
5
  *
6
- * @name booleanConcave
6
+ * @function
7
7
  * @param {Feature<Polygon>} polygon to be evaluated
8
8
  * @returns {boolean} true/false
9
9
  * @example
@@ -3,7 +3,7 @@ import { Feature, Polygon } from 'geojson';
3
3
  /**
4
4
  * Takes a polygon and return true or false as to whether it is concave or not.
5
5
  *
6
- * @name booleanConcave
6
+ * @function
7
7
  * @param {Feature<Polygon>} polygon to be evaluated
8
8
  * @returns {boolean} true/false
9
9
  * @example
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, Polygon } from \"geojson\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Takes a polygon and return true or false as to whether it is concave or not.\n *\n * @name booleanConcave\n * @param {Feature<Polygon>} polygon to be evaluated\n * @returns {boolean} true/false\n * @example\n * var convexPolygon = turf.polygon([[[0,0],[0,1],[1,1],[1,0],[0,0]]]);\n *\n * turf.booleanConcave(convexPolygon)\n * //=false\n */\nfunction booleanConcave(polygon: Feature<Polygon> | Polygon) {\n // Taken from https://stackoverflow.com/a/1881201 & https://stackoverflow.com/a/25304159\n const coords = getGeom(polygon).coordinates;\n if (coords[0].length <= 4) {\n return false;\n }\n\n let sign = false;\n const n = coords[0].length - 1;\n for (let i = 0; i < n; i++) {\n const dx1 = coords[0][(i + 2) % n][0] - coords[0][(i + 1) % n][0];\n const dy1 = coords[0][(i + 2) % n][1] - coords[0][(i + 1) % n][1];\n const dx2 = coords[0][i][0] - coords[0][(i + 1) % n][0];\n const dy2 = coords[0][i][1] - coords[0][(i + 1) % n][1];\n const zcrossproduct = dx1 * dy2 - dy1 * dx2;\n if (i === 0) {\n sign = zcrossproduct > 0;\n } else if (sign !== zcrossproduct > 0) {\n return true;\n }\n }\n return false;\n}\n\nexport { booleanConcave };\nexport default booleanConcave;\n"],"mappings":";AACA,SAAS,eAAe;AAcxB,SAAS,eAAe,SAAqC;AAE3D,QAAM,SAAS,QAAQ,OAAO,EAAE;AAChC,MAAI,OAAO,CAAC,EAAE,UAAU,GAAG;AACzB,WAAO;AAAA,EACT;AAEA,MAAI,OAAO;AACX,QAAM,IAAI,OAAO,CAAC,EAAE,SAAS;AAC7B,WAAS,IAAI,GAAG,IAAI,GAAG,KAAK;AAC1B,UAAM,MAAM,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AAChE,UAAM,MAAM,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AAChE,UAAM,MAAM,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AACtD,UAAM,MAAM,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AACtD,UAAM,gBAAgB,MAAM,MAAM,MAAM;AACxC,QAAI,MAAM,GAAG;AACX,aAAO,gBAAgB;AAAA,IACzB,WAAW,SAAS,gBAAgB,GAAG;AACrC,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAGA,IAAO,+BAAQ;","names":[]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, Polygon } from \"geojson\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Takes a polygon and return true or false as to whether it is concave or not.\n *\n * @function\n * @param {Feature<Polygon>} polygon to be evaluated\n * @returns {boolean} true/false\n * @example\n * var convexPolygon = turf.polygon([[[0,0],[0,1],[1,1],[1,0],[0,0]]]);\n *\n * turf.booleanConcave(convexPolygon)\n * //=false\n */\nfunction booleanConcave(polygon: Feature<Polygon> | Polygon) {\n // Taken from https://stackoverflow.com/a/1881201 & https://stackoverflow.com/a/25304159\n const coords = getGeom(polygon).coordinates;\n if (coords[0].length <= 4) {\n return false;\n }\n\n let sign = false;\n const n = coords[0].length - 1;\n for (let i = 0; i < n; i++) {\n const dx1 = coords[0][(i + 2) % n][0] - coords[0][(i + 1) % n][0];\n const dy1 = coords[0][(i + 2) % n][1] - coords[0][(i + 1) % n][1];\n const dx2 = coords[0][i][0] - coords[0][(i + 1) % n][0];\n const dy2 = coords[0][i][1] - coords[0][(i + 1) % n][1];\n const zcrossproduct = dx1 * dy2 - dy1 * dx2;\n if (i === 0) {\n sign = zcrossproduct > 0;\n } else if (sign !== zcrossproduct > 0) {\n return true;\n }\n }\n return false;\n}\n\nexport { booleanConcave };\nexport default booleanConcave;\n"],"mappings":";AACA,SAAS,eAAe;AAcxB,SAAS,eAAe,SAAqC;AAE3D,QAAM,SAAS,QAAQ,OAAO,EAAE;AAChC,MAAI,OAAO,CAAC,EAAE,UAAU,GAAG;AACzB,WAAO;AAAA,EACT;AAEA,MAAI,OAAO;AACX,QAAM,IAAI,OAAO,CAAC,EAAE,SAAS;AAC7B,WAAS,IAAI,GAAG,IAAI,GAAG,KAAK;AAC1B,UAAM,MAAM,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AAChE,UAAM,MAAM,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AAChE,UAAM,MAAM,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AACtD,UAAM,MAAM,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AACtD,UAAM,gBAAgB,MAAM,MAAM,MAAM;AACxC,QAAI,MAAM,GAAG;AACX,aAAO,gBAAgB;AAAA,IACzB,WAAW,SAAS,gBAAgB,GAAG;AACrC,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAGA,IAAO,+BAAQ;","names":[]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/boolean-concave",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "turf boolean-concave module",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
@@ -56,21 +56,21 @@
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
  "glob": "^10.3.10",
62
62
  "load-json-file": "^7.0.1",
63
63
  "npm-run-all": "^4.1.5",
64
- "tape": "^5.7.2",
65
- "tsup": "^8.0.1",
66
- "tsx": "^4.6.2",
67
- "typescript": "^5.2.2"
64
+ "tape": "^5.9.0",
65
+ "tsup": "^8.3.5",
66
+ "tsx": "^4.19.2",
67
+ "typescript": "^5.5.4"
68
68
  },
69
69
  "dependencies": {
70
- "@turf/helpers": "^7.1.0",
71
- "@turf/invariant": "^7.1.0",
70
+ "@turf/helpers": "^7.2.0",
71
+ "@turf/invariant": "^7.2.0",
72
72
  "@types/geojson": "^7946.0.10",
73
- "tslib": "^2.6.2"
73
+ "tslib": "^2.8.1"
74
74
  },
75
- "gitHead": "68915eeebc9278bb40dec3f1034499698a0561ef"
75
+ "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
76
76
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"names":[],"mappings":";AAUA,SAAS,QAAQ,gBAAgB;AACjC,SAAS,6BAA6B;AACtC,SAAS,sBAAsB,qBAAqB;AACpD,SAAS,eAAe;AAmBxB,SAAS,gBACP,UACA,UACA;AACA,QAAM,QAAQ,QAAQ,QAAQ;AAC9B,QAAM,QAAQ,QAAQ,QAAQ;AAC9B,QAAM,QAAQ,MAAM;AACpB,QAAM,QAAQ,MAAM;AACpB,QAAM,UAAU,MAAM;AACtB,QAAM,UAAU,MAAM;AAEtB,UAAQ,OAAO;AAAA,IACb,KAAK;AACH,cAAQ,OAAO;AAAA,QACb,KAAK;AACH,iBAAO,cAAc,SAAS,OAAO;AAAA,QACvC;AACE,gBAAM,IAAI,MAAM,cAAc,QAAQ,yBAAyB;AAAA,MACnE;AAAA,IACF,KAAK;AACH,cAAQ,OAAO;AAAA,QACb,KAAK;AACH,iBAAO,oBAAoB,OAAO,KAAK;AAAA,QACzC,KAAK;AACH,iBAAO,yBAAyB,OAAO,KAAK;AAAA,QAC9C;AACE,gBAAM,IAAI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ACT;AAUA,SAAS,cAAc,OAAiB,OAAiB;AACvD,SAAO,MAAM,CAAC,MAAM,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,MAAM,CAAC;AACtD;AAEA,SAAS,YAAY,OAAiB,OAAiB;AACrD,SAAO,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC;AAC9D;AAiBA,IAAO,gCAAQ","sourcesContent":["import {\n BBox,\n Feature,\n Geometry,\n LineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport { bbox as calcBbox } from \"@turf/bbox\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { booleanPointOnLine as isPointOnLine } from \"@turf/boolean-point-on-line\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Boolean-contains returns True if the second geometry is completely contained by the first geometry.\n * The interiors of both geometries must intersect and, the interior and boundary of the secondary (geometry b)\n * must not intersect the exterior of the primary (geometry a).\n * Boolean-contains returns the exact opposite result of the `@turf/boolean-within`.\n *\n * @name booleanContains\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n * var point = turf.point([1, 2]);\n *\n * turf.booleanContains(line, point);\n * //=true\n */\nfunction booleanContains(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry\n) {\n const geom1 = getGeom(feature1);\n const geom2 = getGeom(feature2);\n const type1 = geom1.type;\n const type2 = geom2.type;\n const coords1 = geom1.coordinates;\n const coords2 = geom2.coordinates;\n\n switch (type1) {\n case \"Point\":\n switch (type2) {\n case \"Point\":\n return compareCoords(coords1, coords2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPoint\":\n switch (type2) {\n case \"Point\":\n return isPointInMultiPoint(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInMultiPoint(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"LineString\":\n switch (type2) {\n case \"Point\":\n return isPointOnLine(geom2, geom1, { ignoreEndVertices: true });\n case \"LineString\":\n return isLineOnLine(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointOnLine(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"Polygon\":\n switch (type2) {\n case \"Point\":\n return booleanPointInPolygon(geom2, geom1, { ignoreBoundary: true });\n case \"LineString\":\n return isLineInPoly(geom1, geom2);\n case \"Polygon\":\n return isPolyInPoly(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInPoly(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPolygon\":\n switch (type2) {\n case \"Polygon\":\n return isPolygonInMultiPolygon(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n default:\n throw new Error(\"feature1 \" + type1 + \" geometry not supported\");\n }\n}\n\nfunction isPolygonInMultiPolygon(multiPolygon: MultiPolygon, polygon: Polygon) {\n return multiPolygon.coordinates.some((coords) =>\n isPolyInPoly({ type: \"Polygon\", coordinates: coords }, polygon)\n );\n}\n\nfunction isPointInMultiPoint(multiPoint: MultiPoint, pt: Point) {\n let i;\n let output = false;\n for (i = 0; i < multiPoint.coordinates.length; i++) {\n if (compareCoords(multiPoint.coordinates[i], pt.coordinates)) {\n output = true;\n break;\n }\n }\n return output;\n}\n\nfunction isMultiPointInMultiPoint(\n multiPoint1: MultiPoint,\n multiPoint2: MultiPoint\n) {\n for (const coord2 of multiPoint2.coordinates) {\n let matchFound = false;\n for (const coord1 of multiPoint1.coordinates) {\n if (compareCoords(coord2, coord1)) {\n matchFound = true;\n break;\n }\n }\n if (!matchFound) {\n return false;\n }\n }\n return true;\n}\n\nfunction isMultiPointOnLine(lineString: LineString, multiPoint: MultiPoint) {\n let haveFoundInteriorPoint = false;\n for (const coord of multiPoint.coordinates) {\n if (isPointOnLine(coord, lineString, { ignoreEndVertices: true })) {\n haveFoundInteriorPoint = true;\n }\n if (!isPointOnLine(coord, lineString)) {\n return false;\n }\n }\n if (haveFoundInteriorPoint) {\n return true;\n }\n return false;\n}\n\nfunction isMultiPointInPoly(polygon: Polygon, multiPoint: MultiPoint) {\n for (const coord of multiPoint.coordinates) {\n if (!booleanPointInPolygon(coord, polygon, { ignoreBoundary: true })) {\n return false;\n }\n }\n return true;\n}\n\nfunction isLineOnLine(lineString1: LineString, lineString2: LineString) {\n let haveFoundInteriorPoint = false;\n for (const coords of lineString2.coordinates) {\n if (\n isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: true,\n })\n ) {\n haveFoundInteriorPoint = true;\n }\n if (\n !isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: false,\n })\n ) {\n return false;\n }\n }\n return haveFoundInteriorPoint;\n}\n\nfunction isLineInPoly(polygon: Polygon, linestring: LineString) {\n let output = false;\n let i = 0;\n\n const polyBbox = calcBbox(polygon);\n const lineBbox = calcBbox(linestring);\n if (!doBBoxOverlap(polyBbox, lineBbox)) {\n return false;\n }\n for (i; i < linestring.coordinates.length - 1; i++) {\n const midPoint = getMidpoint(\n linestring.coordinates[i],\n linestring.coordinates[i + 1]\n );\n if (\n booleanPointInPolygon({ type: \"Point\", coordinates: midPoint }, polygon, {\n ignoreBoundary: true,\n })\n ) {\n output = true;\n break;\n }\n }\n return output;\n}\n\n/**\n * Is Polygon2 in Polygon1\n * Only takes into account outer rings\n *\n * @private\n * @param {Geometry|Feature<Polygon>} feature1 Polygon1\n * @param {Geometry|Feature<Polygon>} feature2 Polygon2\n * @returns {boolean} true/false\n */\nfunction isPolyInPoly(\n feature1: Feature<Polygon> | Polygon,\n feature2: Feature<Polygon> | Polygon\n) {\n // Handle Nulls\n if (feature1.type === \"Feature\" && feature1.geometry === null) {\n return false;\n }\n if (feature2.type === \"Feature\" && feature2.geometry === null) {\n return false;\n }\n\n const poly1Bbox = calcBbox(feature1);\n const poly2Bbox = calcBbox(feature2);\n if (!doBBoxOverlap(poly1Bbox, poly2Bbox)) {\n return false;\n }\n\n const coords = getGeom(feature2).coordinates;\n for (const ring of coords) {\n for (const coord of ring) {\n if (!booleanPointInPolygon(coord, feature1)) {\n return false;\n }\n }\n }\n return true;\n}\n\nfunction doBBoxOverlap(bbox1: BBox, bbox2: BBox) {\n if (bbox1[0] > bbox2[0]) {\n return false;\n }\n if (bbox1[2] < bbox2[2]) {\n return false;\n }\n if (bbox1[1] > bbox2[1]) {\n return false;\n }\n if (bbox1[3] < bbox2[3]) {\n return false;\n }\n return true;\n}\n\n/**\n * compareCoords\n *\n * @private\n * @param {Position} pair1 point [x,y]\n * @param {Position} pair2 point [x,y]\n * @returns {boolean} true/false if coord pairs match\n */\nfunction compareCoords(pair1: number[], pair2: number[]) {\n return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\n\nfunction getMidpoint(pair1: number[], pair2: number[]) {\n return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];\n}\n\nexport {\n booleanContains,\n isPolygonInMultiPolygon,\n isPointInMultiPoint,\n isMultiPointInMultiPoint,\n isMultiPointOnLine,\n isMultiPointInPoly,\n isLineOnLine,\n isLineInPoly,\n isPolyInPoly,\n doBBoxOverlap,\n compareCoords,\n getMidpoint,\n};\n\nexport default booleanContains;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-contains/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACUA,kCAAiC;AACjC,uEAAsC;AACtC,iEAAoD;AACpD,4CAAwB;AAmBxB,SAAS,eAAA,CACP,QAAA,EACA,QAAA,EACA;AACA,EAAA,MAAM,MAAA,EAAQ,gCAAA,QAAgB,CAAA;AAC9B,EAAA,MAA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;AD1Ff;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wkBAAC","file":"/home/runner/work/turf/turf/packages/turf-boolean-contains/dist/cjs/index.cjs","sourcesContent":[null,"import {\n BBox,\n Feature,\n Geometry,\n LineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport { bbox as calcBbox } from \"@turf/bbox\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { booleanPointOnLine as isPointOnLine } from \"@turf/boolean-point-on-line\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Boolean-contains returns True if the second geometry is completely contained by the first geometry.\n * The interiors of both geometries must intersect and, the interior and boundary of the secondary (geometry b)\n * must not intersect the exterior of the primary (geometry a).\n * Boolean-contains returns the exact opposite result of the `@turf/boolean-within`.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n * var point = turf.point([1, 2]);\n *\n * turf.booleanContains(line, point);\n * //=true\n */\nfunction booleanContains(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry\n) {\n const geom1 = getGeom(feature1);\n const geom2 = getGeom(feature2);\n const type1 = geom1.type;\n const type2 = geom2.type;\n const coords1 = geom1.coordinates;\n const coords2 = geom2.coordinates;\n\n switch (type1) {\n case \"Point\":\n switch (type2) {\n case \"Point\":\n return compareCoords(coords1, coords2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPoint\":\n switch (type2) {\n case \"Point\":\n return isPointInMultiPoint(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInMultiPoint(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"LineString\":\n switch (type2) {\n case \"Point\":\n return isPointOnLine(geom2, geom1, { ignoreEndVertices: true });\n case \"LineString\":\n return isLineOnLine(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointOnLine(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"Polygon\":\n switch (type2) {\n case \"Point\":\n return booleanPointInPolygon(geom2, geom1, { ignoreBoundary: true });\n case \"LineString\":\n return isLineInPoly(geom1, geom2);\n case \"Polygon\":\n return isPolyInPoly(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInPoly(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPolygon\":\n switch (type2) {\n case \"Polygon\":\n return isPolygonInMultiPolygon(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n default:\n throw new Error(\"feature1 \" + type1 + \" geometry not supported\");\n }\n}\n\nfunction isPolygonInMultiPolygon(multiPolygon: MultiPolygon, polygon: Polygon) {\n return multiPolygon.coordinates.some((coords) =>\n isPolyInPoly({ type: \"Polygon\", coordinates: coords }, polygon)\n );\n}\n\nfunction isPointInMultiPoint(multiPoint: MultiPoint, pt: Point) {\n let i;\n let output = false;\n for (i = 0; i < multiPoint.coordinates.length; i++) {\n if (compareCoords(multiPoint.coordinates[i], pt.coordinates)) {\n output = true;\n break;\n }\n }\n return output;\n}\n\nfunction isMultiPointInMultiPoint(\n multiPoint1: MultiPoint,\n multiPoint2: MultiPoint\n) {\n for (const coord2 of multiPoint2.coordinates) {\n let matchFound = false;\n for (const coord1 of multiPoint1.coordinates) {\n if (compareCoords(coord2, coord1)) {\n matchFound = true;\n break;\n }\n }\n if (!matchFound) {\n return false;\n }\n }\n return true;\n}\n\nfunction isMultiPointOnLine(lineString: LineString, multiPoint: MultiPoint) {\n let haveFoundInteriorPoint = false;\n for (const coord of multiPoint.coordinates) {\n if (isPointOnLine(coord, lineString, { ignoreEndVertices: true })) {\n haveFoundInteriorPoint = true;\n }\n if (!isPointOnLine(coord, lineString)) {\n return false;\n }\n }\n if (haveFoundInteriorPoint) {\n return true;\n }\n return false;\n}\n\nfunction isMultiPointInPoly(polygon: Polygon, multiPoint: MultiPoint) {\n for (const coord of multiPoint.coordinates) {\n if (!booleanPointInPolygon(coord, polygon, { ignoreBoundary: true })) {\n return false;\n }\n }\n return true;\n}\n\nfunction isLineOnLine(lineString1: LineString, lineString2: LineString) {\n let haveFoundInteriorPoint = false;\n for (const coords of lineString2.coordinates) {\n if (\n isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: true,\n })\n ) {\n haveFoundInteriorPoint = true;\n }\n if (\n !isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: false,\n })\n ) {\n return false;\n }\n }\n return haveFoundInteriorPoint;\n}\n\nfunction isLineInPoly(polygon: Polygon, linestring: LineString) {\n let output = false;\n let i = 0;\n\n const polyBbox = calcBbox(polygon);\n const lineBbox = calcBbox(linestring);\n if (!doBBoxOverlap(polyBbox, lineBbox)) {\n return false;\n }\n for (i; i < linestring.coordinates.length - 1; i++) {\n const midPoint = getMidpoint(\n linestring.coordinates[i],\n linestring.coordinates[i + 1]\n );\n if (\n booleanPointInPolygon({ type: \"Point\", coordinates: midPoint }, polygon, {\n ignoreBoundary: true,\n })\n ) {\n output = true;\n break;\n }\n }\n return output;\n}\n\n/**\n * Is Polygon2 in Polygon1\n * Only takes into account outer rings\n *\n * @private\n * @param {Geometry|Feature<Polygon>} feature1 Polygon1\n * @param {Geometry|Feature<Polygon>} feature2 Polygon2\n * @returns {boolean} true/false\n */\nfunction isPolyInPoly(\n feature1: Feature<Polygon> | Polygon,\n feature2: Feature<Polygon> | Polygon\n) {\n // Handle Nulls\n if (feature1.type === \"Feature\" && feature1.geometry === null) {\n return false;\n }\n if (feature2.type === \"Feature\" && feature2.geometry === null) {\n return false;\n }\n\n const poly1Bbox = calcBbox(feature1);\n const poly2Bbox = calcBbox(feature2);\n if (!doBBoxOverlap(poly1Bbox, poly2Bbox)) {\n return false;\n }\n\n const coords = getGeom(feature2).coordinates;\n for (const ring of coords) {\n for (const coord of ring) {\n if (!booleanPointInPolygon(coord, feature1)) {\n return false;\n }\n }\n }\n return true;\n}\n\nfunction doBBoxOverlap(bbox1: BBox, bbox2: BBox) {\n if (bbox1[0] > bbox2[0]) {\n return false;\n }\n if (bbox1[2] < bbox2[2]) {\n return false;\n }\n if (bbox1[1] > bbox2[1]) {\n return false;\n }\n if (bbox1[3] < bbox2[3]) {\n return false;\n }\n return true;\n}\n\n/**\n * compareCoords\n *\n * @private\n * @param {Position} pair1 point [x,y]\n * @param {Position} pair2 point [x,y]\n * @returns {boolean} true/false if coord pairs match\n */\nfunction compareCoords(pair1: number[], pair2: number[]) {\n return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\n\nfunction getMidpoint(pair1: number[], pair2: number[]) {\n return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];\n}\n\nexport {\n booleanContains,\n isPolygonInMultiPolygon,\n isPointInMultiPoint,\n isMultiPointInMultiPoint,\n isMultiPointOnLine,\n isMultiPointInPoly,\n isLineOnLine,\n isLineInPoly,\n isPolyInPoly,\n doBBoxOverlap,\n compareCoords,\n getMidpoint,\n};\n\nexport default booleanContains;\n"]}
@@ -6,7 +6,7 @@ import { Feature, Geometry, MultiPolygon, Polygon, MultiPoint, Point, LineString
6
6
  * must not intersect the exterior of the primary (geometry a).
7
7
  * Boolean-contains returns the exact opposite result of the `@turf/boolean-within`.
8
8
  *
9
- * @name booleanContains
9
+ * @function
10
10
  * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry
11
11
  * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry
12
12
  * @returns {boolean} true/false
@@ -6,7 +6,7 @@ import { Feature, Geometry, MultiPolygon, Polygon, MultiPoint, Point, LineString
6
6
  * must not intersect the exterior of the primary (geometry a).
7
7
  * Boolean-contains returns the exact opposite result of the `@turf/boolean-within`.
8
8
  *
9
- * @name booleanContains
9
+ * @function
10
10
  * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry
11
11
  * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry
12
12
  * @returns {boolean} true/false
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n BBox,\n Feature,\n Geometry,\n LineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport { bbox as calcBbox } from \"@turf/bbox\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { booleanPointOnLine as isPointOnLine } from \"@turf/boolean-point-on-line\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Boolean-contains returns True if the second geometry is completely contained by the first geometry.\n * The interiors of both geometries must intersect and, the interior and boundary of the secondary (geometry b)\n * must not intersect the exterior of the primary (geometry a).\n * Boolean-contains returns the exact opposite result of the `@turf/boolean-within`.\n *\n * @name booleanContains\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n * var point = turf.point([1, 2]);\n *\n * turf.booleanContains(line, point);\n * //=true\n */\nfunction booleanContains(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry\n) {\n const geom1 = getGeom(feature1);\n const geom2 = getGeom(feature2);\n const type1 = geom1.type;\n const type2 = geom2.type;\n const coords1 = geom1.coordinates;\n const coords2 = geom2.coordinates;\n\n switch (type1) {\n case \"Point\":\n switch (type2) {\n case \"Point\":\n return compareCoords(coords1, coords2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPoint\":\n switch (type2) {\n case \"Point\":\n return isPointInMultiPoint(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInMultiPoint(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"LineString\":\n switch (type2) {\n case \"Point\":\n return isPointOnLine(geom2, geom1, { ignoreEndVertices: true });\n case \"LineString\":\n return isLineOnLine(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointOnLine(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"Polygon\":\n switch (type2) {\n case \"Point\":\n return booleanPointInPolygon(geom2, geom1, { ignoreBoundary: true });\n case \"LineString\":\n return isLineInPoly(geom1, geom2);\n case \"Polygon\":\n return isPolyInPoly(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInPoly(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPolygon\":\n switch (type2) {\n case \"Polygon\":\n return isPolygonInMultiPolygon(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n default:\n throw new Error(\"feature1 \" + type1 + \" geometry not supported\");\n }\n}\n\nfunction isPolygonInMultiPolygon(multiPolygon: MultiPolygon, polygon: Polygon) {\n return multiPolygon.coordinates.some((coords) =>\n isPolyInPoly({ type: \"Polygon\", coordinates: coords }, polygon)\n );\n}\n\nfunction isPointInMultiPoint(multiPoint: MultiPoint, pt: Point) {\n let i;\n let output = false;\n for (i = 0; i < multiPoint.coordinates.length; i++) {\n if (compareCoords(multiPoint.coordinates[i], pt.coordinates)) {\n output = true;\n break;\n }\n }\n return output;\n}\n\nfunction isMultiPointInMultiPoint(\n multiPoint1: MultiPoint,\n multiPoint2: MultiPoint\n) {\n for (const coord2 of multiPoint2.coordinates) {\n let matchFound = false;\n for (const coord1 of multiPoint1.coordinates) {\n if (compareCoords(coord2, coord1)) {\n matchFound = true;\n break;\n }\n }\n if (!matchFound) {\n return false;\n }\n }\n return true;\n}\n\nfunction isMultiPointOnLine(lineString: LineString, multiPoint: MultiPoint) {\n let haveFoundInteriorPoint = false;\n for (const coord of multiPoint.coordinates) {\n if (isPointOnLine(coord, lineString, { ignoreEndVertices: true })) {\n haveFoundInteriorPoint = true;\n }\n if (!isPointOnLine(coord, lineString)) {\n return false;\n }\n }\n if (haveFoundInteriorPoint) {\n return true;\n }\n return false;\n}\n\nfunction isMultiPointInPoly(polygon: Polygon, multiPoint: MultiPoint) {\n for (const coord of multiPoint.coordinates) {\n if (!booleanPointInPolygon(coord, polygon, { ignoreBoundary: true })) {\n return false;\n }\n }\n return true;\n}\n\nfunction isLineOnLine(lineString1: LineString, lineString2: LineString) {\n let haveFoundInteriorPoint = false;\n for (const coords of lineString2.coordinates) {\n if (\n isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: true,\n })\n ) {\n haveFoundInteriorPoint = true;\n }\n if (\n !isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: false,\n })\n ) {\n return false;\n }\n }\n return haveFoundInteriorPoint;\n}\n\nfunction isLineInPoly(polygon: Polygon, linestring: LineString) {\n let output = false;\n let i = 0;\n\n const polyBbox = calcBbox(polygon);\n const lineBbox = calcBbox(linestring);\n if (!doBBoxOverlap(polyBbox, lineBbox)) {\n return false;\n }\n for (i; i < linestring.coordinates.length - 1; i++) {\n const midPoint = getMidpoint(\n linestring.coordinates[i],\n linestring.coordinates[i + 1]\n );\n if (\n booleanPointInPolygon({ type: \"Point\", coordinates: midPoint }, polygon, {\n ignoreBoundary: true,\n })\n ) {\n output = true;\n break;\n }\n }\n return output;\n}\n\n/**\n * Is Polygon2 in Polygon1\n * Only takes into account outer rings\n *\n * @private\n * @param {Geometry|Feature<Polygon>} feature1 Polygon1\n * @param {Geometry|Feature<Polygon>} feature2 Polygon2\n * @returns {boolean} true/false\n */\nfunction isPolyInPoly(\n feature1: Feature<Polygon> | Polygon,\n feature2: Feature<Polygon> | Polygon\n) {\n // Handle Nulls\n if (feature1.type === \"Feature\" && feature1.geometry === null) {\n return false;\n }\n if (feature2.type === \"Feature\" && feature2.geometry === null) {\n return false;\n }\n\n const poly1Bbox = calcBbox(feature1);\n const poly2Bbox = calcBbox(feature2);\n if (!doBBoxOverlap(poly1Bbox, poly2Bbox)) {\n return false;\n }\n\n const coords = getGeom(feature2).coordinates;\n for (const ring of coords) {\n for (const coord of ring) {\n if (!booleanPointInPolygon(coord, feature1)) {\n return false;\n }\n }\n }\n return true;\n}\n\nfunction doBBoxOverlap(bbox1: BBox, bbox2: BBox) {\n if (bbox1[0] > bbox2[0]) {\n return false;\n }\n if (bbox1[2] < bbox2[2]) {\n return false;\n }\n if (bbox1[1] > bbox2[1]) {\n return false;\n }\n if (bbox1[3] < bbox2[3]) {\n return false;\n }\n return true;\n}\n\n/**\n * compareCoords\n *\n * @private\n * @param {Position} pair1 point [x,y]\n * @param {Position} pair2 point [x,y]\n * @returns {boolean} true/false if coord pairs match\n */\nfunction compareCoords(pair1: number[], pair2: number[]) {\n return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\n\nfunction getMidpoint(pair1: number[], pair2: number[]) {\n return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];\n}\n\nexport {\n booleanContains,\n isPolygonInMultiPolygon,\n isPointInMultiPoint,\n isMultiPointInMultiPoint,\n isMultiPointOnLine,\n isMultiPointInPoly,\n isLineOnLine,\n isLineInPoly,\n isPolyInPoly,\n doBBoxOverlap,\n compareCoords,\n getMidpoint,\n};\n\nexport default booleanContains;\n"],"mappings":";AAUA,SAAS,QAAQ,gBAAgB;AACjC,SAAS,6BAA6B;AACtC,SAAS,sBAAsB,qBAAqB;AACpD,SAAS,eAAe;AAmBxB,SAAS,gBACP,UACA,UACA;AACA,QAAM,QAAQ,QAAQ,QAAQ;AAC9B,QAAM,QAAQ,QAAQ,QAAQ;AAC9B,QAAM,QAAQ,MAAM;AACpB,QAAM,QAAQ,MAAM;AACpB,QAAM,UAAU,MAAM;AACtB,QAAM,UAAU,MAAM;AAEtB,UAAQ,OAAO;AAAA,IACb,KAAK;AACH,cAA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C/C,MAAI,MAAM,CAAC,IAAI,MAAM,CAAC,GAAG;AACvB,WAAO;AAAA,EACT;AACA,MAAI,MAAM,CAAC,IAAI,MAAM,CAAC,GAAG;AACvB,WAAO;AAAA,EACT;AACA,MAAI,MAAM,CAAC,IAAI,MAAM,CAAC,GAAG;AACvB,WAAO;AAAA,EACT;AACA,MAAI,MAAM,CAAC,IAAI,MAAM,CAAC,GAAG;AACvB,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAUA,SAAS,cAAc,OAAiB,OAAiB;AACvD,SAAO,MAAM,CAAC,MAAM,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,MAAM,CAAC;AACtD;AAEA,SAAS,YAAY,OAAiB,OAAiB;AACrD,SAAO,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC;AAC9D;AAiBA,IAAO,gCAAQ;","names":[]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n BBox,\n Feature,\n Geometry,\n LineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport { bbox as calcBbox } from \"@turf/bbox\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { booleanPointOnLine as isPointOnLine } from \"@turf/boolean-point-on-line\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Boolean-contains returns True if the second geometry is completely contained by the first geometry.\n * The interiors of both geometries must intersect and, the interior and boundary of the secondary (geometry b)\n * must not intersect the exterior of the primary (geometry a).\n * Boolean-contains returns the exact opposite result of the `@turf/boolean-within`.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n * var point = turf.point([1, 2]);\n *\n * turf.booleanContains(line, point);\n * //=true\n */\nfunction booleanContains(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry\n) {\n const geom1 = getGeom(feature1);\n const geom2 = getGeom(feature2);\n const type1 = geom1.type;\n const type2 = geom2.type;\n const coords1 = geom1.coordinates;\n const coords2 = geom2.coordinates;\n\n switch (type1) {\n case \"Point\":\n switch (type2) {\n case \"Point\":\n return compareCoords(coords1, coords2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPoint\":\n switch (type2) {\n case \"Point\":\n return isPointInMultiPoint(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInMultiPoint(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"LineString\":\n switch (type2) {\n case \"Point\":\n return isPointOnLine(geom2, geom1, { ignoreEndVertices: true });\n case \"LineString\":\n return isLineOnLine(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointOnLine(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"Polygon\":\n switch (type2) {\n case \"Point\":\n return booleanPointInPolygon(geom2, geom1, { ignoreBoundary: true });\n case \"LineString\":\n return isLineInPoly(geom1, geom2);\n case \"Polygon\":\n return isPolyInPoly(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInPoly(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPolygon\":\n switch (type2) {\n case \"Polygon\":\n return isPolygonInMultiPolygon(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n default:\n throw new Error(\"feature1 \" + type1 + \" geometry not supported\");\n }\n}\n\nfunction isPolygonInMultiPolygon(multiPolygon: MultiPolygon, polygon: Polygon) {\n return multiPolygon.coordinates.some((coords) =>\n isPolyInPoly({ type: \"Polygon\", coordinates: coords }, polygon)\n );\n}\n\nfunction isPointInMultiPoint(multiPoint: MultiPoint, pt: Point) {\n let i;\n let output = false;\n for (i = 0; i < multiPoint.coordinates.length; i++) {\n if (compareCoords(multiPoint.coordinates[i], pt.coordinates)) {\n output = true;\n break;\n }\n }\n return output;\n}\n\nfunction isMultiPointInMultiPoint(\n multiPoint1: MultiPoint,\n multiPoint2: MultiPoint\n) {\n for (const coord2 of multiPoint2.coordinates) {\n let matchFound = false;\n for (const coord1 of multiPoint1.coordinates) {\n if (compareCoords(coord2, coord1)) {\n matchFound = true;\n break;\n }\n }\n if (!matchFound) {\n return false;\n }\n }\n return true;\n}\n\nfunction isMultiPointOnLine(lineString: LineString, multiPoint: MultiPoint) {\n let haveFoundInteriorPoint = false;\n for (const coord of multiPoint.coordinates) {\n if (isPointOnLine(coord, lineString, { ignoreEndVertices: true })) {\n haveFoundInteriorPoint = true;\n }\n if (!isPointOnLine(coord, lineString)) {\n return false;\n }\n }\n if (haveFoundInteriorPoint) {\n return true;\n }\n return false;\n}\n\nfunction isMultiPointInPoly(polygon: Polygon, multiPoint: MultiPoint) {\n for (const coord of multiPoint.coordinates) {\n if (!booleanPointInPolygon(coord, polygon, { ignoreBoundary: true })) {\n return false;\n }\n }\n return true;\n}\n\nfunction isLineOnLine(lineString1: LineString, lineString2: LineString) {\n let haveFoundInteriorPoint = false;\n for (const coords of lineString2.coordinates) {\n if (\n isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: true,\n })\n ) {\n haveFoundInteriorPoint = true;\n }\n if (\n !isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: false,\n })\n ) {\n return false;\n }\n }\n return haveFoundInteriorPoint;\n}\n\nfunction isLineInPoly(polygon: Polygon, linestring: LineString) {\n let output = false;\n let i = 0;\n\n const polyBbox = calcBbox(polygon);\n const lineBbox = calcBbox(linestring);\n if (!doBBoxOverlap(polyBbox, lineBbox)) {\n return false;\n }\n for (i; i < linestring.coordinates.length - 1; i++) {\n const midPoint = getMidpoint(\n linestring.coordinates[i],\n linestring.coordinates[i + 1]\n );\n if (\n booleanPointInPolygon({ type: \"Point\", coordinates: midPoint }, polygon, {\n ignoreBoundary: true,\n })\n ) {\n output = true;\n break;\n }\n }\n return output;\n}\n\n/**\n * Is Polygon2 in Polygon1\n * Only takes into account outer rings\n *\n * @private\n * @param {Geometry|Feature<Polygon>} feature1 Polygon1\n * @param {Geometry|Feature<Polygon>} feature2 Polygon2\n * @returns {boolean} true/false\n */\nfunction isPolyInPoly(\n feature1: Feature<Polygon> | Polygon,\n feature2: Feature<Polygon> | Polygon\n) {\n // Handle Nulls\n if (feature1.type === \"Feature\" && feature1.geometry === null) {\n return false;\n }\n if (feature2.type === \"Feature\" && feature2.geometry === null) {\n return false;\n }\n\n const poly1Bbox = calcBbox(feature1);\n const poly2Bbox = calcBbox(feature2);\n if (!doBBoxOverlap(poly1Bbox, poly2Bbox)) {\n return false;\n }\n\n const coords = getGeom(feature2).coordinates;\n for (const ring of coords) {\n for (const coord of ring) {\n if (!booleanPointInPolygon(coord, feature1)) {\n return false;\n }\n }\n }\n return true;\n}\n\nfunction doBBoxOverlap(bbox1: BBox, bbox2: BBox) {\n if (bbox1[0] > bbox2[0]) {\n return false;\n }\n if (bbox1[2] < bbox2[2]) {\n return false;\n }\n if (bbox1[1] > bbox2[1]) {\n return false;\n }\n if (bbox1[3] < bbox2[3]) {\n return false;\n }\n return true;\n}\n\n/**\n * compareCoords\n *\n * @private\n * @param {Position} pair1 point [x,y]\n * @param {Position} pair2 point [x,y]\n * @returns {boolean} true/false if coord pairs match\n */\nfunction compareCoords(pair1: number[], pair2: number[]) {\n return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\n\nfunction getMidpoint(pair1: number[], pair2: number[]) {\n return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];\n}\n\nexport {\n booleanContains,\n isPolygonInMultiPolygon,\n isPointInMultiPoint,\n isMultiPointInMultiPoint,\n isMultiPointOnLine,\n isMultiPointInPoly,\n isLineOnLine,\n isLineInPoly,\n isPolyInPoly,\n doBB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SAAS,aAAa,MAAM;AAC7D,WAAO;AAAA,EACT;AAEA,QAAM,YAAY,SAAS,QAAQ;AACnC,QAAM,YAAY,SAAS,QAAQ;AACnC,MAAI,CAAC,cAAc,WAAW,SAAS,GAAG;AACxC,WAAO;AAAA,EACT;AAEA,QAAM,SAAS,QAAQ,QAAQ,EAAE;AACjC,aAAW,QAAQ,QAAQ;AACzB,eAAW,SAAS,MAAM;AACxB,UAAI,CAAC,sBAAsB,OAAO,QAAQ,GAAG;AAC3C,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,cAAc,OAAa,OAAa;AAC/C,MAAI,MAAM,CAAC,IAAI,MAAM,CAAC,GAAG;AACvB,WAAO;AAAA,EACT;AACA,MAAI,MAAM,CAAC,IAAI,MAAM,CAAC,GAAG;AACvB,WAAO;AAAA,EACT;AACA,MAAI,MAAM,CAAC,IAAI,MAAM,CAAC,GAAG;AACvB,WAAO;AAAA,EACT;AACA,MAAI,MAAM,CAAC,IAAI,MAAM,CAAC,GAAG;AACvB,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAUA,SAAS,cAAc,OAAiB,OAAiB;AACvD,SAAO,MAAM,CAAC,MAAM,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,MAAM,CAAC;AACtD;AAEA,SAAS,YAAY,OAAiB,OAAiB;AACrD,SAAO,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC;AAC9D;AAiBA,IAAO,gCAAQ;","names":[]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/boolean-contains",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "turf boolean-contains module",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
@@ -56,26 +56,26 @@
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
  "boolean-jsts": "*",
62
62
  "boolean-shapely": "*",
63
63
  "glob": "^10.3.10",
64
64
  "load-json-file": "^7.0.1",
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/bbox": "^7.1.0",
73
- "@turf/boolean-point-in-polygon": "^7.1.0",
74
- "@turf/boolean-point-on-line": "^7.1.0",
75
- "@turf/helpers": "^7.1.0",
76
- "@turf/invariant": "^7.1.0",
72
+ "@turf/bbox": "^7.2.0",
73
+ "@turf/boolean-point-in-polygon": "^7.2.0",
74
+ "@turf/boolean-point-on-line": "^7.2.0",
75
+ "@turf/helpers": "^7.2.0",
76
+ "@turf/invariant": "^7.2.0",
77
77
  "@types/geojson": "^7946.0.10",
78
- "tslib": "^2.6.2"
78
+ "tslib": "^2.8.1"
79
79
  },
80
- "gitHead": "68915eeebc9278bb40dec3f1034499698a0561ef"
80
+ "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
81
81
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"names":[],"mappings":";AACA,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,6BAA6B;AACtC,SAAS,eAAe;AACxB,SAAS,aAAa;AAqBtB,SAAS,eACP,UACA,UACS;AACT,MAAI,QAAQ,QAAQ,QAAQ;AAC5B,MAAI,QAAQ,QAAQ,QAAQ;AAC5B,MAAI,QAAQ,MAAM;AAClB,MAAI,QAAQ,MAAM;AAElB,UAAQ,OAAO;AAAA,IACb,KAAK;AACH,cAAQ,OAAO;AAAA,QACb,KAAK;AACH,iBAAO,+BAA+B,OAAO,KAAK;AAAA,QACpD,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AiB,CAAC;AAChD,MAAI,MAAM,eAAe,CAAC,IAAI,iBAAiB,CAAC;AAChD,MAAI,QAAQ,MAAM,MAAM,MAAM;AAC9B,MAAI,UAAU,GAAG;AACf,WAAO;AAAA,EACT;AACA,MAAI,QAAQ;AACV,QAAI,KAAK,IAAI,GAAG,KAAK,KAAK,IAAI,GAAG,GAAG;AAClC,aAAO,MAAM,IACT,iBAAiB,CAAC,KAAK,GAAG,CAAC,KAAK,GAAG,CAAC,KAAK,eAAe,CAAC,IACzD,eAAe,CAAC,KAAK,GAAG,CAAC,KAAK,GAAG,CAAC,KAAK,iBAAiB,CAAC;AAAA,IAC/D;AACA,WAAO,MAAM,IACT,iBAAiB,CAAC,KAAK,GAAG,CAAC,KAAK,GAAG,CAAC,KAAK,eAAe,CAAC,IACzD,eAAe,CAAC,KAAK,GAAG,CAAC,KAAK,GAAG,CAAC,KAAK,iBAAiB,CAAC;AAAA,EAC/D,OAAO;AACL,QAAI,KAAK,IAAI,GAAG,KAAK,KAAK,IAAI,GAAG,GAAG;AAClC,aAAO,MAAM,IACT,iBAAiB,CAAC,IAAI,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,eAAe,CAAC,IACvD,eAAe,CAAC,IAAI,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,iBAAiB,CAAC;AAAA,IAC7D;AACA,WAAO,MAAM,IACT,iBAAiB,CAAC,IAAI,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,eAAe,CAAC,IACvD,eAAe,CAAC,IAAI,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,iBAAiB,CAAC;AAAA,EAC7D;AACF;AAGA,IAAO,+BAAQ","sourcesContent":["import { Feature, Geometry, Polygon, LineString, MultiPoint } from \"geojson\";\nimport { lineIntersect } from \"@turf/line-intersect\";\nimport { polygonToLine } from \"@turf/polygon-to-line\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { getGeom } from \"@turf/invariant\";\nimport { point } from \"@turf/helpers\";\n\n/**\n * Boolean-Crosses returns True if the intersection results in a geometry whose dimension is one less than\n * the maximum dimension of the two source geometries and the intersection set is interior to\n * both source geometries.\n *\n * Boolean-Crosses returns t (TRUE) for only multipoint/polygon, multipoint/linestring, linestring/linestring, linestring/polygon, and linestring/multipolygon comparisons.\n * Other comparisons are not supported as they are outside the OpenGIS Simple Features spec and may give unexpected results.\n *\n * @name booleanCrosses\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line1 = turf.lineString([[-2, 2], [4, 2]]);\n * var line2 = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n *\n * var cross = turf.booleanCrosses(line1, line2);\n * //=true\n */\nfunction booleanCrosses(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry\n): boolean {\n var geom1 = getGeom(feature1);\n var geom2 = getGeom(feature2);\n var type1 = geom1.type;\n var type2 = geom2.type;\n\n switch (type1) {\n case \"MultiPoint\":\n switch (type2) {\n case \"LineString\":\n return doMultiPointAndLineStringCross(geom1, geom2);\n case \"Polygon\":\n return doesMultiPointCrossPoly(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"LineString\":\n switch (type2) {\n case \"MultiPoint\": // An inverse operation\n return doMultiPointAndLineStringCross(geom2, geom1);\n case \"LineString\":\n return doLineStringsCross(geom1, geom2);\n case \"Polygon\":\n return doLineStringAndPolygonCross(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"Polygon\":\n switch (type2) {\n case \"MultiPoint\": // An inverse operation\n return doesMultiPointCrossPoly(geom2, geom1);\n case \"LineString\": // An inverse operation\n return doLineStringAndPolygonCross(geom2, geom1);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n default:\n throw new Error(\"feature1 \" + type1 + \" geometry not supported\");\n }\n}\n\nfunction doMultiPointAndLineStringCross(\n multiPoint: MultiPoint,\n lineString: LineString\n) {\n var foundIntPoint = false;\n var foundExtPoint = false;\n var pointLength = multiPoint.coordinates.length;\n var i = 0;\n while (i < pointLength && !foundIntPoint && !foundExtPoint) {\n for (var i2 = 0; i2 < lineString.coordinates.length - 1; i2++) {\n var incEndVertices = true;\n if (i2 === 0 || i2 === lineString.coordinates.length - 2) {\n incEndVertices = false;\n }\n if (\n isPointOnLineSegment(\n lineString.coordinates[i2],\n lineString.coordinates[i2 + 1],\n multiPoint.coordinates[i],\n incEndVertices\n )\n ) {\n foundIntPoint = true;\n } else {\n foundExtPoint = true;\n }\n }\n i++;\n }\n return foundIntPoint && foundExtPoint;\n}\n\nfunction doLineStringsCross(lineString1: LineString, lineString2: LineString) {\n var doLinesIntersect = lineIntersect(lineString1, lineString2);\n if (doLinesIntersect.features.length > 0) {\n for (var i = 0; i < lineString1.coordinates.length - 1; i++) {\n for (var i2 = 0; i2 < lineString2.coordinates.length - 1; i2++) {\n var incEndVertices = true;\n if (i2 === 0 || i2 === lineString2.coordinates.length - 2) {\n incEndVertices = false;\n }\n if (\n isPointOnLineSegment(\n lineString1.coordinates[i],\n lineString1.coordinates[i + 1],\n lineString2.coordinates[i2],\n incEndVertices\n )\n ) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\nfunction doLineStringAndPolygonCross(lineString: LineString, polygon: Polygon) {\n const line: any = polygonToLine(polygon);\n const doLinesIntersect = lineIntersect(lineString, line);\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\nfunction doesMultiPointCrossPoly(multiPoint: MultiPoint, polygon: Polygon) {\n var foundIntPoint = false;\n var foundExtPoint = false;\n var pointLength = multiPoint.coordinates.length;\n for (let i = 0; i < pointLength && (!foundIntPoint || !foundExtPoint); i++) {\n if (booleanPointInPolygon(point(multiPoint.coordinates[i]), polygon)) {\n foundIntPoint = true;\n } else {\n foundExtPoint = true;\n }\n }\n\n return foundExtPoint && foundIntPoint;\n}\n\n/**\n * Is a point on a line segment\n * Only takes into account outer rings\n * See http://stackoverflow.com/a/4833823/1979085\n *\n * @private\n * @param {number[]} lineSegmentStart coord pair of start of line\n * @param {number[]} lineSegmentEnd coord pair of end of line\n * @param {number[]} pt coord pair of point to check\n * @param {boolean} incEnd whether the point is allowed to fall on the line ends\n * @returns {boolean} true/false\n */\nfunction isPointOnLineSegment(\n lineSegmentStart: number[],\n lineSegmentEnd: number[],\n pt: number[],\n incEnd: boolean\n) {\n var dxc = pt[0] - lineSegmentStart[0];\n var dyc = pt[1] - lineSegmentStart[1];\n var dxl = lineSegmentEnd[0] - lineSegmentStart[0];\n var dyl = lineSegmentEnd[1] - lineSegmentStart[1];\n var cross = dxc * dyl - dyc * dxl;\n if (cross !== 0) {\n return false;\n }\n if (incEnd) {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0\n ? lineSegmentStart[0] <= pt[0] && pt[0] <= lineSegmentEnd[0]\n : lineSegmentEnd[0] <= pt[0] && pt[0] <= lineSegmentStart[0];\n }\n return dyl > 0\n ? lineSegmentStart[1] <= pt[1] && pt[1] <= lineSegmentEnd[1]\n : lineSegmentEnd[1] <= pt[1] && pt[1] <= lineSegmentStart[1];\n } else {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0\n ? lineSegmentStart[0] < pt[0] && pt[0] < lineSegmentEnd[0]\n : lineSegmentEnd[0] < pt[0] && pt[0] < lineSegmentStart[0];\n }\n return dyl > 0\n ? lineSegmentStart[1] < pt[1] && pt[1] < lineSegmentEnd[1]\n : lineSegmentEnd[1] < pt[1] && pt[1] < lineSegmentStart[1];\n }\n}\n\nexport { booleanCrosses };\nexport default booleanCrosses;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-crosses/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACCA,qDAA8B;AAC9B,sDAA8B;AAC9B,uEAAsC;AACtC,4CAAwB;AACxB,wCA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AG,CAAC,EAAA,EAAI,cAAA,CAAe,CAAC,EAAA,EACvD,cAAA,CAAe,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,EAAA,GAAK,EAAA,CAAG,CAAC,EAAA,EAAI,gBAAA,CAAiB,CAAC,CAAA;AAAA,EAC7D;AACF;AAGA,IAAO,6BAAA,EAAQ,cAAA;AD/Df;AACE;AACA;AACF,wFAAC","file":"/home/runner/work/turf/turf/packages/turf-boolean-crosses/dist/cjs/index.cjs","sourcesContent":[null,"import { Feature, Geometry, Polygon, LineString, MultiPoint } from \"geojson\";\nimport { lineIntersect } from \"@turf/line-intersect\";\nimport { polygonToLine } from \"@turf/polygon-to-line\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { getGeom } from \"@turf/invariant\";\nimport { point } from \"@turf/helpers\";\n\n/**\n * Boolean-Crosses returns True if the intersection results in a geometry whose dimension is one less than\n * the maximum dimension of the two source geometries and the intersection set is interior to\n * both source geometries.\n *\n * Boolean-Crosses returns t (TRUE) for only multipoint/polygon, multipoint/linestring, linestring/linestring, linestring/polygon, and linestring/multipolygon comparisons.\n * Other comparisons are not supported as they are outside the OpenGIS Simple Features spec and may give unexpected results.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line1 = turf.lineString([[-2, 2], [4, 2]]);\n * var line2 = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n *\n * var cross = turf.booleanCrosses(line1, line2);\n * //=true\n */\nfunction booleanCrosses(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry\n): boolean {\n var geom1 = getGeom(feature1);\n var geom2 = getGeom(feature2);\n var type1 = geom1.type;\n var type2 = geom2.type;\n\n switch (type1) {\n case \"MultiPoint\":\n switch (type2) {\n case \"LineString\":\n return doMultiPointAndLineStringCross(geom1, geom2);\n case \"Polygon\":\n return doesMultiPointCrossPoly(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"LineString\":\n switch (type2) {\n case \"MultiPoint\": // An inverse operation\n return doMultiPointAndLineStringCross(geom2, geom1);\n case \"LineString\":\n return doLineStringsCross(geom1, geom2);\n case \"Polygon\":\n return doLineStringAndPolygonCross(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"Polygon\":\n switch (type2) {\n case \"MultiPoint\": // An inverse operation\n return doesMultiPointCrossPoly(geom2, geom1);\n case \"LineString\": // An inverse operation\n return doLineStringAndPolygonCross(geom2, geom1);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n default:\n throw new Error(\"feature1 \" + type1 + \" geometry not supported\");\n }\n}\n\nfunction doMultiPointAndLineStringCross(\n multiPoint: MultiPoint,\n lineString: LineString\n) {\n var foundIntPoint = false;\n var foundExtPoint = false;\n var pointLength = multiPoint.coordinates.length;\n var i = 0;\n while (i < pointLength && !foundIntPoint && !foundExtPoint) {\n for (var i2 = 0; i2 < lineString.coordinates.length - 1; i2++) {\n var incEndVertices = true;\n if (i2 === 0 || i2 === lineString.coordinates.length - 2) {\n incEndVertices = false;\n }\n if (\n isPointOnLineSegment(\n lineString.coordinates[i2],\n lineString.coordinates[i2 + 1],\n multiPoint.coordinates[i],\n incEndVertices\n )\n ) {\n foundIntPoint = true;\n } else {\n foundExtPoint = true;\n }\n }\n i++;\n }\n return foundIntPoint && foundExtPoint;\n}\n\nfunction doLineStringsCross(lineString1: LineString, lineString2: LineString) {\n var doLinesIntersect = lineIntersect(lineString1, lineString2);\n if (doLinesIntersect.features.length > 0) {\n for (var i = 0; i < lineString1.coordinates.length - 1; i++) {\n for (var i2 = 0; i2 < lineString2.coordinates.length - 1; i2++) {\n var incEndVertices = true;\n if (i2 === 0 || i2 === lineString2.coordinates.length - 2) {\n incEndVertices = false;\n }\n if (\n isPointOnLineSegment(\n lineString1.coordinates[i],\n lineString1.coordinates[i + 1],\n lineString2.coordinates[i2],\n incEndVertices\n )\n ) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\nfunction doLineStringAndPolygonCross(lineString: LineString, polygon: Polygon) {\n const line: any = polygonToLine(polygon);\n const doLinesIntersect = lineIntersect(lineString, line);\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\nfunction doesMultiPointCrossPoly(multiPoint: MultiPoint, polygon: Polygon) {\n var foundIntPoint = false;\n var foundExtPoint = false;\n var pointLength = multiPoint.coordinates.length;\n for (let i = 0; i < pointLength && (!foundIntPoint || !foundExtPoint); i++) {\n if (booleanPointInPolygon(point(multiPoint.coordinates[i]), polygon)) {\n foundIntPoint = true;\n } else {\n foundExtPoint = true;\n }\n }\n\n return foundExtPoint && foundIntPoint;\n}\n\n/**\n * Is a point on a line segment\n * Only takes into account outer rings\n * See http://stackoverflow.com/a/4833823/1979085\n *\n * @private\n * @param {number[]} lineSegmentStart coord pair of start of line\n * @param {number[]} lineSegmentEnd coord pair of end of line\n * @param {number[]} pt coord pair of point to check\n * @param {boolean} incEnd whether the point is allowed to fall on the line ends\n * @returns {boolean} true/false\n */\nfunction isPointOnLineSegment(\n lineSegmentStart: number[],\n lineSegmentEnd: number[],\n pt: number[],\n incEnd: boolean\n) {\n var dxc = pt[0] - lineSegmentStart[0];\n var dyc = pt[1] - lineSegmentStart[1];\n var dxl = lineSegmentEnd[0] - lineSegmentStart[0];\n var dyl = lineSegmentEnd[1] - lineSegmentStart[1];\n var cross = dxc * dyl - dyc * dxl;\n if (cross !== 0) {\n return false;\n }\n if (incEnd) {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0\n ? lineSegmentStart[0] <= pt[0] && pt[0] <= lineSegmentEnd[0]\n : lineSegmentEnd[0] <= pt[0] && pt[0] <= lineSegmentStart[0];\n }\n return dyl > 0\n ? lineSegmentStart[1] <= pt[1] && pt[1] <= lineSegmentEnd[1]\n : lineSegmentEnd[1] <= pt[1] && pt[1] <= lineSegmentStart[1];\n } else {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0\n ? lineSegmentStart[0] < pt[0] && pt[0] < lineSegmentEnd[0]\n : lineSegmentEnd[0] < pt[0] && pt[0] < lineSegmentStart[0];\n }\n return dyl > 0\n ? lineSegmentStart[1] < pt[1] && pt[1] < lineSegmentEnd[1]\n : lineSegmentEnd[1] < pt[1] && pt[1] < lineSegmentStart[1];\n }\n}\n\nexport { booleanCrosses };\nexport default booleanCrosses;\n"]}
@@ -8,7 +8,7 @@ import { Feature, Geometry } from 'geojson';
8
8
  * Boolean-Crosses returns t (TRUE) for only multipoint/polygon, multipoint/linestring, linestring/linestring, linestring/polygon, and linestring/multipolygon comparisons.
9
9
  * Other comparisons are not supported as they are outside the OpenGIS Simple Features spec and may give unexpected results.
10
10
  *
11
- * @name booleanCrosses
11
+ * @function
12
12
  * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry
13
13
  * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry
14
14
  * @returns {boolean} true/false
@@ -8,7 +8,7 @@ import { Feature, Geometry } from 'geojson';
8
8
  * Boolean-Crosses returns t (TRUE) for only multipoint/polygon, multipoint/linestring, linestring/linestring, linestring/polygon, and linestring/multipolygon comparisons.
9
9
  * Other comparisons are not supported as they are outside the OpenGIS Simple Features spec and may give unexpected results.
10
10
  *
11
- * @name booleanCrosses
11
+ * @function
12
12
  * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry
13
13
  * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry
14
14
  * @returns {boolean} true/false