node-red-contrib-tak-registration 0.16.1 → 0.16.3

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 (799) hide show
  1. package/node_modules/@turf/along/README.md +3 -1
  2. package/node_modules/@turf/along/dist/cjs/index.cjs +2 -2
  3. package/node_modules/@turf/along/dist/cjs/index.cjs.map +1 -1
  4. package/node_modules/@turf/along/dist/cjs/index.d.cts +1 -1
  5. package/node_modules/@turf/along/dist/esm/index.d.ts +1 -1
  6. package/node_modules/@turf/along/dist/esm/index.js +2 -2
  7. package/node_modules/@turf/along/dist/esm/index.js.map +1 -1
  8. package/node_modules/@turf/along/package.json +12 -12
  9. package/node_modules/@turf/angle/dist/cjs/index.cjs +2 -2
  10. package/node_modules/@turf/angle/dist/cjs/index.cjs.map +1 -1
  11. package/node_modules/@turf/angle/dist/esm/index.js +2 -2
  12. package/node_modules/@turf/angle/dist/esm/index.js.map +1 -1
  13. package/node_modules/@turf/angle/package.json +16 -16
  14. package/node_modules/@turf/area/dist/cjs/index.cjs +2 -2
  15. package/node_modules/@turf/area/dist/cjs/index.cjs.map +1 -1
  16. package/node_modules/@turf/area/dist/esm/index.js +2 -2
  17. package/node_modules/@turf/area/dist/esm/index.js.map +1 -1
  18. package/node_modules/@turf/area/package.json +10 -10
  19. package/node_modules/@turf/bbox/dist/cjs/index.cjs +2 -2
  20. package/node_modules/@turf/bbox/dist/cjs/index.cjs.map +1 -1
  21. package/node_modules/@turf/bbox/dist/esm/index.js +2 -2
  22. package/node_modules/@turf/bbox/dist/esm/index.js.map +1 -1
  23. package/node_modules/@turf/bbox/package.json +9 -9
  24. package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs +2 -2
  25. package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs.map +1 -1
  26. package/node_modules/@turf/bbox-clip/dist/esm/index.js +2 -2
  27. package/node_modules/@turf/bbox-clip/dist/esm/index.js.map +1 -1
  28. package/node_modules/@turf/bbox-clip/package.json +11 -11
  29. package/node_modules/@turf/bbox-polygon/dist/cjs/index.cjs +2 -2
  30. package/node_modules/@turf/bbox-polygon/dist/cjs/index.cjs.map +1 -1
  31. package/node_modules/@turf/bbox-polygon/dist/esm/index.js +2 -2
  32. package/node_modules/@turf/bbox-polygon/dist/esm/index.js.map +1 -1
  33. package/node_modules/@turf/bbox-polygon/package.json +8 -8
  34. package/node_modules/@turf/bearing/dist/cjs/index.cjs +2 -2
  35. package/node_modules/@turf/bearing/dist/cjs/index.cjs.map +1 -1
  36. package/node_modules/@turf/bearing/dist/esm/index.js +2 -2
  37. package/node_modules/@turf/bearing/dist/esm/index.js.map +1 -1
  38. package/node_modules/@turf/bearing/package.json +11 -11
  39. package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs +2 -2
  40. package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs.map +1 -1
  41. package/node_modules/@turf/bezier-spline/dist/esm/index.js +2 -2
  42. package/node_modules/@turf/bezier-spline/dist/esm/index.js.map +1 -1
  43. package/node_modules/@turf/bezier-spline/package.json +10 -10
  44. package/node_modules/@turf/boolean-clockwise/dist/cjs/index.cjs +2 -2
  45. package/node_modules/@turf/boolean-clockwise/dist/cjs/index.cjs.map +1 -1
  46. package/node_modules/@turf/boolean-clockwise/dist/esm/index.js +2 -2
  47. package/node_modules/@turf/boolean-clockwise/dist/esm/index.js.map +1 -1
  48. package/node_modules/@turf/boolean-clockwise/package.json +10 -10
  49. package/node_modules/@turf/boolean-concave/dist/cjs/index.cjs +2 -2
  50. package/node_modules/@turf/boolean-concave/dist/cjs/index.cjs.map +1 -1
  51. package/node_modules/@turf/boolean-concave/dist/esm/index.js +2 -2
  52. package/node_modules/@turf/boolean-concave/dist/esm/index.js.map +1 -1
  53. package/node_modules/@turf/boolean-concave/package.json +10 -10
  54. package/node_modules/@turf/boolean-contains/dist/cjs/index.cjs +2 -2
  55. package/node_modules/@turf/boolean-contains/dist/cjs/index.cjs.map +1 -1
  56. package/node_modules/@turf/boolean-contains/dist/esm/index.js +2 -2
  57. package/node_modules/@turf/boolean-contains/dist/esm/index.js.map +1 -1
  58. package/node_modules/@turf/boolean-contains/package.json +13 -13
  59. package/node_modules/@turf/boolean-crosses/dist/cjs/index.cjs +2 -2
  60. package/node_modules/@turf/boolean-crosses/dist/cjs/index.cjs.map +1 -1
  61. package/node_modules/@turf/boolean-crosses/dist/esm/index.js +2 -2
  62. package/node_modules/@turf/boolean-crosses/dist/esm/index.js.map +1 -1
  63. package/node_modules/@turf/boolean-crosses/package.json +13 -13
  64. package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs +2 -2
  65. package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs.map +1 -1
  66. package/node_modules/@turf/boolean-disjoint/dist/esm/index.js +2 -2
  67. package/node_modules/@turf/boolean-disjoint/dist/esm/index.js.map +1 -1
  68. package/node_modules/@turf/boolean-disjoint/package.json +12 -12
  69. package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs +2 -2
  70. package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs.map +1 -1
  71. package/node_modules/@turf/boolean-equal/dist/esm/index.js +2 -2
  72. package/node_modules/@turf/boolean-equal/dist/esm/index.js.map +1 -1
  73. package/node_modules/@turf/boolean-equal/package.json +11 -11
  74. package/node_modules/@turf/boolean-intersects/README.md +1 -1
  75. package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs +2 -2
  76. package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs.map +1 -1
  77. package/node_modules/@turf/boolean-intersects/dist/esm/index.js +2 -2
  78. package/node_modules/@turf/boolean-intersects/dist/esm/index.js.map +1 -1
  79. package/node_modules/@turf/boolean-intersects/package.json +10 -10
  80. package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs +2 -2
  81. package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs.map +1 -1
  82. package/node_modules/@turf/boolean-overlap/dist/esm/index.js +2 -2
  83. package/node_modules/@turf/boolean-overlap/dist/esm/index.js.map +1 -1
  84. package/node_modules/@turf/boolean-overlap/package.json +13 -13
  85. package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs +2 -2
  86. package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs.map +1 -1
  87. package/node_modules/@turf/boolean-parallel/dist/esm/index.js +2 -2
  88. package/node_modules/@turf/boolean-parallel/dist/esm/index.js.map +1 -1
  89. package/node_modules/@turf/boolean-parallel/package.json +12 -12
  90. package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs +2 -2
  91. package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs.map +1 -1
  92. package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +2 -2
  93. package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js.map +1 -1
  94. package/node_modules/@turf/boolean-point-in-polygon/package.json +9 -9
  95. package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs +2 -2
  96. package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs.map +1 -1
  97. package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js +2 -2
  98. package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js.map +1 -1
  99. package/node_modules/@turf/boolean-point-on-line/package.json +11 -11
  100. package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs +2 -2
  101. package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs.map +1 -1
  102. package/node_modules/@turf/boolean-touches/dist/esm/index.js +2 -2
  103. package/node_modules/@turf/boolean-touches/dist/esm/index.js.map +1 -1
  104. package/node_modules/@turf/boolean-touches/package.json +12 -12
  105. package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs +2 -2
  106. package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs.map +1 -1
  107. package/node_modules/@turf/boolean-valid/dist/esm/index.js +2 -2
  108. package/node_modules/@turf/boolean-valid/dist/esm/index.js.map +1 -1
  109. package/node_modules/@turf/boolean-valid/package.json +17 -17
  110. package/node_modules/@turf/boolean-within/dist/cjs/index.cjs +2 -2
  111. package/node_modules/@turf/boolean-within/dist/cjs/index.cjs.map +1 -1
  112. package/node_modules/@turf/boolean-within/dist/esm/index.js +2 -2
  113. package/node_modules/@turf/boolean-within/dist/esm/index.js.map +1 -1
  114. package/node_modules/@turf/boolean-within/package.json +13 -13
  115. package/node_modules/@turf/buffer/README.md +3 -3
  116. package/node_modules/@turf/buffer/dist/cjs/index.cjs +2 -2
  117. package/node_modules/@turf/buffer/dist/cjs/index.cjs.map +1 -1
  118. package/node_modules/@turf/buffer/dist/esm/index.js +2 -2
  119. package/node_modules/@turf/buffer/dist/esm/index.js.map +1 -1
  120. package/node_modules/@turf/buffer/package.json +13 -13
  121. package/node_modules/@turf/center/dist/cjs/index.cjs +2 -2
  122. package/node_modules/@turf/center/dist/cjs/index.cjs.map +1 -1
  123. package/node_modules/@turf/center/dist/esm/index.js +2 -2
  124. package/node_modules/@turf/center/dist/esm/index.js.map +1 -1
  125. package/node_modules/@turf/center/package.json +13 -13
  126. package/node_modules/@turf/center-mean/dist/cjs/index.cjs +2 -2
  127. package/node_modules/@turf/center-mean/dist/cjs/index.cjs.map +1 -1
  128. package/node_modules/@turf/center-mean/dist/esm/index.js +2 -2
  129. package/node_modules/@turf/center-mean/dist/esm/index.js.map +1 -1
  130. package/node_modules/@turf/center-mean/package.json +14 -14
  131. package/node_modules/@turf/center-median/dist/cjs/index.cjs +2 -2
  132. package/node_modules/@turf/center-median/dist/cjs/index.cjs.map +1 -1
  133. package/node_modules/@turf/center-median/dist/esm/index.js +2 -2
  134. package/node_modules/@turf/center-median/dist/esm/index.js.map +1 -1
  135. package/node_modules/@turf/center-median/package.json +17 -17
  136. package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs +2 -2
  137. package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs.map +1 -1
  138. package/node_modules/@turf/center-of-mass/dist/esm/index.js +2 -2
  139. package/node_modules/@turf/center-of-mass/dist/esm/index.js.map +1 -1
  140. package/node_modules/@turf/center-of-mass/package.json +14 -14
  141. package/node_modules/@turf/centroid/dist/cjs/index.cjs +2 -2
  142. package/node_modules/@turf/centroid/dist/cjs/index.cjs.map +1 -1
  143. package/node_modules/@turf/centroid/dist/esm/index.js +2 -2
  144. package/node_modules/@turf/centroid/dist/esm/index.js.map +1 -1
  145. package/node_modules/@turf/centroid/package.json +11 -11
  146. package/node_modules/@turf/circle/README.md +13 -13
  147. package/node_modules/@turf/circle/dist/cjs/index.cjs +2 -2
  148. package/node_modules/@turf/circle/dist/cjs/index.cjs.map +1 -1
  149. package/node_modules/@turf/circle/dist/cjs/index.d.cts +2 -2
  150. package/node_modules/@turf/circle/dist/esm/index.d.ts +2 -2
  151. package/node_modules/@turf/circle/dist/esm/index.js +2 -2
  152. package/node_modules/@turf/circle/dist/esm/index.js.map +1 -1
  153. package/node_modules/@turf/circle/package.json +11 -11
  154. package/node_modules/@turf/clean-coords/dist/cjs/index.cjs +33 -49
  155. package/node_modules/@turf/clean-coords/dist/cjs/index.cjs.map +1 -1
  156. package/node_modules/@turf/clean-coords/dist/esm/index.js +33 -49
  157. package/node_modules/@turf/clean-coords/dist/esm/index.js.map +1 -1
  158. package/node_modules/@turf/clean-coords/package.json +15 -12
  159. package/node_modules/@turf/clone/dist/cjs/index.cjs +2 -2
  160. package/node_modules/@turf/clone/dist/cjs/index.cjs.map +1 -1
  161. package/node_modules/@turf/clone/dist/esm/index.js +2 -2
  162. package/node_modules/@turf/clone/dist/esm/index.js.map +1 -1
  163. package/node_modules/@turf/clone/package.json +9 -9
  164. package/node_modules/@turf/clusters/package.json +9 -9
  165. package/node_modules/@turf/clusters-dbscan/README.md +2 -2
  166. package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs +3 -8
  167. package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs.map +1 -1
  168. package/node_modules/@turf/clusters-dbscan/dist/cjs/index.d.cts +1 -1
  169. package/node_modules/@turf/clusters-dbscan/dist/esm/index.d.ts +1 -1
  170. package/node_modules/@turf/clusters-dbscan/dist/esm/index.js +4 -9
  171. package/node_modules/@turf/clusters-dbscan/dist/esm/index.js.map +1 -1
  172. package/node_modules/@turf/clusters-dbscan/package.json +15 -15
  173. package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs +2 -2
  174. package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs.map +1 -1
  175. package/node_modules/@turf/clusters-kmeans/dist/cjs/index.d.cts +1 -1
  176. package/node_modules/@turf/clusters-kmeans/dist/esm/index.d.ts +1 -1
  177. package/node_modules/@turf/clusters-kmeans/dist/esm/index.js +2 -2
  178. package/node_modules/@turf/clusters-kmeans/dist/esm/index.js.map +1 -1
  179. package/node_modules/@turf/clusters-kmeans/package.json +15 -15
  180. package/node_modules/@turf/collect/dist/cjs/index.cjs +3 -8
  181. package/node_modules/@turf/collect/dist/cjs/index.cjs.map +1 -1
  182. package/node_modules/@turf/collect/dist/esm/index.js +3 -8
  183. package/node_modules/@turf/collect/dist/esm/index.js.map +1 -1
  184. package/node_modules/@turf/collect/package.json +11 -11
  185. package/node_modules/@turf/combine/dist/cjs/index.cjs +2 -2
  186. package/node_modules/@turf/combine/dist/cjs/index.cjs.map +1 -1
  187. package/node_modules/@turf/combine/dist/esm/index.js +2 -2
  188. package/node_modules/@turf/combine/dist/esm/index.js.map +1 -1
  189. package/node_modules/@turf/combine/package.json +9 -9
  190. package/node_modules/@turf/concave/README.md +2 -2
  191. package/node_modules/@turf/concave/dist/cjs/index.cjs +2 -2
  192. package/node_modules/@turf/concave/dist/cjs/index.cjs.map +1 -1
  193. package/node_modules/@turf/concave/dist/cjs/index.d.cts +1 -1
  194. package/node_modules/@turf/concave/dist/esm/index.d.ts +1 -1
  195. package/node_modules/@turf/concave/dist/esm/index.js +2 -2
  196. package/node_modules/@turf/concave/dist/esm/index.js.map +1 -1
  197. package/node_modules/@turf/concave/package.json +14 -14
  198. package/node_modules/@turf/convex/dist/cjs/index.cjs +2 -2
  199. package/node_modules/@turf/convex/dist/cjs/index.cjs.map +1 -1
  200. package/node_modules/@turf/convex/dist/esm/index.js +2 -2
  201. package/node_modules/@turf/convex/dist/esm/index.js.map +1 -1
  202. package/node_modules/@turf/convex/package.json +11 -11
  203. package/node_modules/@turf/destination/README.md +2 -2
  204. package/node_modules/@turf/destination/dist/cjs/index.cjs +5 -2
  205. package/node_modules/@turf/destination/dist/cjs/index.cjs.map +1 -1
  206. package/node_modules/@turf/destination/dist/cjs/index.d.cts +1 -1
  207. package/node_modules/@turf/destination/dist/esm/index.d.ts +1 -1
  208. package/node_modules/@turf/destination/dist/esm/index.js +5 -2
  209. package/node_modules/@turf/destination/dist/esm/index.js.map +1 -1
  210. package/node_modules/@turf/destination/package.json +14 -11
  211. package/node_modules/@turf/difference/dist/cjs/index.cjs +2 -2
  212. package/node_modules/@turf/difference/dist/cjs/index.cjs.map +1 -1
  213. package/node_modules/@turf/difference/dist/esm/index.js +2 -2
  214. package/node_modules/@turf/difference/dist/esm/index.js.map +1 -1
  215. package/node_modules/@turf/difference/package.json +11 -11
  216. package/node_modules/@turf/dissolve/dist/cjs/index.cjs +2 -2
  217. package/node_modules/@turf/dissolve/dist/cjs/index.cjs.map +1 -1
  218. package/node_modules/@turf/dissolve/dist/esm/index.js +2 -2
  219. package/node_modules/@turf/dissolve/dist/esm/index.js.map +1 -1
  220. package/node_modules/@turf/dissolve/package.json +12 -12
  221. package/node_modules/@turf/distance/README.md +2 -2
  222. package/node_modules/@turf/distance/dist/cjs/index.cjs +2 -2
  223. package/node_modules/@turf/distance/dist/cjs/index.cjs.map +1 -1
  224. package/node_modules/@turf/distance/dist/cjs/index.d.cts +1 -1
  225. package/node_modules/@turf/distance/dist/esm/index.d.ts +1 -1
  226. package/node_modules/@turf/distance/dist/esm/index.js +2 -2
  227. package/node_modules/@turf/distance/dist/esm/index.js.map +1 -1
  228. package/node_modules/@turf/distance/package.json +10 -10
  229. package/node_modules/@turf/distance-weight/dist/cjs/index.cjs +2 -2
  230. package/node_modules/@turf/distance-weight/dist/cjs/index.cjs.map +1 -1
  231. package/node_modules/@turf/distance-weight/dist/esm/index.js +2 -2
  232. package/node_modules/@turf/distance-weight/dist/esm/index.js.map +1 -1
  233. package/node_modules/@turf/distance-weight/package.json +12 -12
  234. package/node_modules/@turf/ellipse/README.md +2 -2
  235. package/node_modules/@turf/ellipse/dist/cjs/index.cjs +62 -39
  236. package/node_modules/@turf/ellipse/dist/cjs/index.cjs.map +1 -1
  237. package/node_modules/@turf/ellipse/dist/cjs/index.d.cts +1 -1
  238. package/node_modules/@turf/ellipse/dist/esm/index.d.ts +1 -1
  239. package/node_modules/@turf/ellipse/dist/esm/index.js +64 -41
  240. package/node_modules/@turf/ellipse/dist/esm/index.js.map +1 -1
  241. package/node_modules/@turf/ellipse/package.json +21 -18
  242. package/node_modules/@turf/envelope/dist/cjs/index.cjs +2 -2
  243. package/node_modules/@turf/envelope/dist/cjs/index.cjs.map +1 -1
  244. package/node_modules/@turf/envelope/dist/esm/index.js +2 -2
  245. package/node_modules/@turf/envelope/dist/esm/index.js.map +1 -1
  246. package/node_modules/@turf/envelope/package.json +10 -10
  247. package/node_modules/@turf/explode/dist/cjs/index.cjs +2 -2
  248. package/node_modules/@turf/explode/dist/cjs/index.cjs.map +1 -1
  249. package/node_modules/@turf/explode/dist/esm/index.js +2 -2
  250. package/node_modules/@turf/explode/dist/esm/index.js.map +1 -1
  251. package/node_modules/@turf/explode/package.json +10 -10
  252. package/node_modules/@turf/flatten/dist/cjs/index.cjs +2 -2
  253. package/node_modules/@turf/flatten/dist/cjs/index.cjs.map +1 -1
  254. package/node_modules/@turf/flatten/dist/esm/index.js +2 -2
  255. package/node_modules/@turf/flatten/dist/esm/index.js.map +1 -1
  256. package/node_modules/@turf/flatten/package.json +10 -10
  257. package/node_modules/@turf/flip/dist/cjs/index.cjs +2 -2
  258. package/node_modules/@turf/flip/dist/cjs/index.cjs.map +1 -1
  259. package/node_modules/@turf/flip/dist/esm/index.js +2 -2
  260. package/node_modules/@turf/flip/dist/esm/index.js.map +1 -1
  261. package/node_modules/@turf/flip/package.json +11 -11
  262. package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs +2 -2
  263. package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs.map +1 -1
  264. package/node_modules/@turf/geojson-rbush/dist/esm/index.js +2 -2
  265. package/node_modules/@turf/geojson-rbush/dist/esm/index.js.map +1 -1
  266. package/node_modules/@turf/geojson-rbush/package.json +12 -12
  267. package/node_modules/@turf/great-circle/dist/cjs/index.cjs +3 -3
  268. package/node_modules/@turf/great-circle/dist/cjs/index.cjs.map +1 -1
  269. package/node_modules/@turf/great-circle/dist/esm/index.js +3 -3
  270. package/node_modules/@turf/great-circle/dist/esm/index.js.map +1 -1
  271. package/node_modules/@turf/great-circle/package.json +10 -10
  272. package/node_modules/@turf/helpers/README.md +1 -1
  273. package/node_modules/@turf/helpers/dist/cjs/index.cjs.map +1 -1
  274. package/node_modules/@turf/helpers/dist/cjs/index.d.cts +1 -1
  275. package/node_modules/@turf/helpers/dist/esm/index.d.ts +1 -1
  276. package/node_modules/@turf/helpers/dist/esm/index.js.map +1 -1
  277. package/node_modules/@turf/helpers/package.json +7 -7
  278. package/node_modules/@turf/hex-grid/README.md +7 -5
  279. package/node_modules/@turf/hex-grid/dist/cjs/index.cjs +2 -2
  280. package/node_modules/@turf/hex-grid/dist/cjs/index.cjs.map +1 -1
  281. package/node_modules/@turf/hex-grid/dist/cjs/index.d.cts +4 -4
  282. package/node_modules/@turf/hex-grid/dist/esm/index.d.ts +4 -4
  283. package/node_modules/@turf/hex-grid/dist/esm/index.js +2 -2
  284. package/node_modules/@turf/hex-grid/dist/esm/index.js.map +1 -1
  285. package/node_modules/@turf/hex-grid/package.json +14 -14
  286. package/node_modules/@turf/interpolate/README.md +7 -5
  287. package/node_modules/@turf/interpolate/dist/cjs/index.cjs +2 -2
  288. package/node_modules/@turf/interpolate/dist/cjs/index.cjs.map +1 -1
  289. package/node_modules/@turf/interpolate/dist/esm/index.js +2 -2
  290. package/node_modules/@turf/interpolate/dist/esm/index.js.map +1 -1
  291. package/node_modules/@turf/interpolate/package.json +19 -19
  292. package/node_modules/@turf/intersect/dist/cjs/index.cjs +2 -2
  293. package/node_modules/@turf/intersect/dist/cjs/index.cjs.map +1 -1
  294. package/node_modules/@turf/intersect/dist/esm/index.js +2 -2
  295. package/node_modules/@turf/intersect/dist/esm/index.js.map +1 -1
  296. package/node_modules/@turf/intersect/package.json +11 -11
  297. package/node_modules/@turf/invariant/package.json +8 -8
  298. package/node_modules/@turf/isobands/README.md +1 -1
  299. package/node_modules/@turf/isobands/dist/cjs/index.cjs +313 -9
  300. package/node_modules/@turf/isobands/dist/cjs/index.cjs.map +1 -1
  301. package/node_modules/@turf/isobands/dist/cjs/index.d.cts +1 -1
  302. package/node_modules/@turf/isobands/dist/esm/index.d.ts +1 -1
  303. package/node_modules/@turf/isobands/dist/esm/index.js +313 -9
  304. package/node_modules/@turf/isobands/dist/esm/index.js.map +1 -1
  305. package/node_modules/@turf/isobands/package.json +22 -22
  306. package/node_modules/@turf/isolines/README.md +1 -1
  307. package/node_modules/@turf/isolines/dist/cjs/index.cjs +192 -7
  308. package/node_modules/@turf/isolines/dist/cjs/index.cjs.map +1 -1
  309. package/node_modules/@turf/isolines/dist/cjs/index.d.cts +1 -1
  310. package/node_modules/@turf/isolines/dist/esm/index.d.ts +1 -1
  311. package/node_modules/@turf/isolines/dist/esm/index.js +192 -7
  312. package/node_modules/@turf/isolines/dist/esm/index.js.map +1 -1
  313. package/node_modules/@turf/isolines/package.json +19 -19
  314. package/node_modules/@turf/kinks/dist/cjs/index.cjs +2 -2
  315. package/node_modules/@turf/kinks/dist/cjs/index.cjs.map +1 -1
  316. package/node_modules/@turf/kinks/dist/esm/index.js +2 -2
  317. package/node_modules/@turf/kinks/dist/esm/index.js.map +1 -1
  318. package/node_modules/@turf/kinks/package.json +10 -10
  319. package/node_modules/@turf/length/README.md +2 -2
  320. package/node_modules/@turf/length/dist/cjs/index.cjs +2 -2
  321. package/node_modules/@turf/length/dist/cjs/index.cjs.map +1 -1
  322. package/node_modules/@turf/length/dist/cjs/index.d.cts +1 -1
  323. package/node_modules/@turf/length/dist/esm/index.d.ts +1 -1
  324. package/node_modules/@turf/length/dist/esm/index.js +2 -2
  325. package/node_modules/@turf/length/dist/esm/index.js.map +1 -1
  326. package/node_modules/@turf/length/package.json +11 -11
  327. package/node_modules/@turf/line-arc/README.md +2 -2
  328. package/node_modules/@turf/line-arc/dist/cjs/index.cjs +2 -2
  329. package/node_modules/@turf/line-arc/dist/cjs/index.cjs.map +1 -1
  330. package/node_modules/@turf/line-arc/dist/cjs/index.d.cts +1 -1
  331. package/node_modules/@turf/line-arc/dist/esm/index.d.ts +1 -1
  332. package/node_modules/@turf/line-arc/dist/esm/index.js +2 -2
  333. package/node_modules/@turf/line-arc/dist/esm/index.js.map +1 -1
  334. package/node_modules/@turf/line-arc/package.json +12 -12
  335. package/node_modules/@turf/line-chunk/README.md +2 -2
  336. package/node_modules/@turf/line-chunk/dist/cjs/index.cjs +2 -2
  337. package/node_modules/@turf/line-chunk/dist/cjs/index.cjs.map +1 -1
  338. package/node_modules/@turf/line-chunk/dist/esm/index.js +2 -2
  339. package/node_modules/@turf/line-chunk/dist/esm/index.js.map +1 -1
  340. package/node_modules/@turf/line-chunk/package.json +12 -12
  341. package/node_modules/@turf/line-intersect/dist/cjs/index.cjs +2 -2
  342. package/node_modules/@turf/line-intersect/dist/cjs/index.cjs.map +1 -1
  343. package/node_modules/@turf/line-intersect/dist/esm/index.js +2 -2
  344. package/node_modules/@turf/line-intersect/dist/esm/index.js.map +1 -1
  345. package/node_modules/@turf/line-intersect/package.json +10 -10
  346. package/node_modules/@turf/line-offset/README.md +2 -2
  347. package/node_modules/@turf/line-offset/dist/cjs/index.cjs +2 -2
  348. package/node_modules/@turf/line-offset/dist/cjs/index.cjs.map +1 -1
  349. package/node_modules/@turf/line-offset/dist/esm/index.js +2 -2
  350. package/node_modules/@turf/line-offset/dist/esm/index.js.map +1 -1
  351. package/node_modules/@turf/line-offset/package.json +11 -11
  352. package/node_modules/@turf/line-overlap/dist/cjs/index.cjs +2 -2
  353. package/node_modules/@turf/line-overlap/dist/cjs/index.cjs.map +1 -1
  354. package/node_modules/@turf/line-overlap/dist/esm/index.js +2 -2
  355. package/node_modules/@turf/line-overlap/dist/esm/index.js.map +1 -1
  356. package/node_modules/@turf/line-overlap/package.json +15 -15
  357. package/node_modules/@turf/line-segment/dist/cjs/index.cjs +2 -2
  358. package/node_modules/@turf/line-segment/dist/cjs/index.cjs.map +1 -1
  359. package/node_modules/@turf/line-segment/dist/esm/index.js +2 -2
  360. package/node_modules/@turf/line-segment/dist/esm/index.js.map +1 -1
  361. package/node_modules/@turf/line-segment/package.json +11 -11
  362. package/node_modules/@turf/line-slice/dist/cjs/index.cjs +2 -2
  363. package/node_modules/@turf/line-slice/dist/cjs/index.cjs.map +1 -1
  364. package/node_modules/@turf/line-slice/dist/esm/index.js +2 -2
  365. package/node_modules/@turf/line-slice/dist/esm/index.js.map +1 -1
  366. package/node_modules/@turf/line-slice/package.json +11 -11
  367. package/node_modules/@turf/line-slice-along/README.md +2 -2
  368. package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs +2 -2
  369. package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs.map +1 -1
  370. package/node_modules/@turf/line-slice-along/dist/esm/index.js +2 -2
  371. package/node_modules/@turf/line-slice-along/dist/esm/index.js.map +1 -1
  372. package/node_modules/@turf/line-slice-along/package.json +12 -12
  373. package/node_modules/@turf/line-split/README.md +4 -1
  374. package/node_modules/@turf/line-split/dist/cjs/index.cjs +2 -7
  375. package/node_modules/@turf/line-split/dist/cjs/index.cjs.map +1 -1
  376. package/node_modules/@turf/line-split/dist/esm/index.js +2 -7
  377. package/node_modules/@turf/line-split/dist/esm/index.js.map +1 -1
  378. package/node_modules/@turf/line-split/package.json +16 -17
  379. package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs +2 -2
  380. package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs.map +1 -1
  381. package/node_modules/@turf/line-to-polygon/dist/esm/index.js +2 -2
  382. package/node_modules/@turf/line-to-polygon/dist/esm/index.js.map +1 -1
  383. package/node_modules/@turf/line-to-polygon/package.json +12 -12
  384. package/node_modules/@turf/mask/dist/cjs/index.cjs +2 -2
  385. package/node_modules/@turf/mask/dist/cjs/index.cjs.map +1 -1
  386. package/node_modules/@turf/mask/dist/esm/index.js +2 -2
  387. package/node_modules/@turf/mask/dist/esm/index.js.map +1 -1
  388. package/node_modules/@turf/mask/package.json +10 -10
  389. package/node_modules/@turf/meta/package.json +7 -7
  390. package/node_modules/@turf/midpoint/dist/cjs/index.cjs +2 -2
  391. package/node_modules/@turf/midpoint/dist/cjs/index.cjs.map +1 -1
  392. package/node_modules/@turf/midpoint/dist/esm/index.js +2 -2
  393. package/node_modules/@turf/midpoint/dist/esm/index.js.map +1 -1
  394. package/node_modules/@turf/midpoint/package.json +11 -11
  395. package/node_modules/@turf/moran-index/dist/cjs/index.cjs +2 -2
  396. package/node_modules/@turf/moran-index/dist/cjs/index.cjs.map +1 -1
  397. package/node_modules/@turf/moran-index/dist/esm/index.js +2 -2
  398. package/node_modules/@turf/moran-index/dist/esm/index.js.map +1 -1
  399. package/node_modules/@turf/moran-index/package.json +11 -11
  400. package/node_modules/@turf/nearest-neighbor-analysis/README.md +1 -1
  401. package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.cjs +2 -2
  402. package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.cjs.map +1 -1
  403. package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.d.cts +2 -2
  404. package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.d.ts +2 -2
  405. package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js +2 -2
  406. package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js.map +1 -1
  407. package/node_modules/@turf/nearest-neighbor-analysis/package.json +17 -17
  408. package/node_modules/@turf/nearest-point/README.md +2 -2
  409. package/node_modules/@turf/nearest-point/dist/cjs/index.cjs +2 -2
  410. package/node_modules/@turf/nearest-point/dist/cjs/index.cjs.map +1 -1
  411. package/node_modules/@turf/nearest-point/dist/cjs/index.d.cts +6 -7
  412. package/node_modules/@turf/nearest-point/dist/esm/index.d.ts +6 -7
  413. package/node_modules/@turf/nearest-point/dist/esm/index.js +2 -2
  414. package/node_modules/@turf/nearest-point/dist/esm/index.js.map +1 -1
  415. package/node_modules/@turf/nearest-point/package.json +12 -12
  416. package/node_modules/@turf/nearest-point-on-line/README.md +6 -2
  417. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs +45 -52
  418. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs.map +1 -1
  419. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.d.cts +5 -1
  420. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.d.ts +5 -1
  421. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js +45 -52
  422. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js.map +1 -1
  423. package/node_modules/@turf/nearest-point-on-line/package.json +20 -15
  424. package/node_modules/@turf/nearest-point-to-line/README.md +2 -2
  425. package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.cjs +2 -2
  426. package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.cjs.map +1 -1
  427. package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.d.cts +1 -1
  428. package/node_modules/@turf/nearest-point-to-line/dist/esm/index.d.ts +1 -1
  429. package/node_modules/@turf/nearest-point-to-line/dist/esm/index.js +2 -2
  430. package/node_modules/@turf/nearest-point-to-line/dist/esm/index.js.map +1 -1
  431. package/node_modules/@turf/nearest-point-to-line/package.json +14 -14
  432. package/node_modules/@turf/planepoint/dist/cjs/index.cjs +2 -2
  433. package/node_modules/@turf/planepoint/dist/cjs/index.cjs.map +1 -1
  434. package/node_modules/@turf/planepoint/dist/esm/index.js +2 -2
  435. package/node_modules/@turf/planepoint/dist/esm/index.js.map +1 -1
  436. package/node_modules/@turf/planepoint/package.json +9 -9
  437. package/node_modules/@turf/point-grid/dist/cjs/index.cjs +2 -2
  438. package/node_modules/@turf/point-grid/dist/cjs/index.cjs.map +1 -1
  439. package/node_modules/@turf/point-grid/dist/esm/index.js +2 -2
  440. package/node_modules/@turf/point-grid/dist/esm/index.js.map +1 -1
  441. package/node_modules/@turf/point-grid/package.json +14 -14
  442. package/node_modules/@turf/point-on-feature/dist/cjs/index.cjs +2 -2
  443. package/node_modules/@turf/point-on-feature/dist/cjs/index.cjs.map +1 -1
  444. package/node_modules/@turf/point-on-feature/dist/esm/index.js +2 -2
  445. package/node_modules/@turf/point-on-feature/dist/esm/index.js.map +1 -1
  446. package/node_modules/@turf/point-on-feature/package.json +15 -15
  447. package/node_modules/@turf/point-to-line-distance/README.md +5 -4
  448. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs +2 -2
  449. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs.map +1 -1
  450. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.d.cts +1 -2
  451. package/node_modules/@turf/point-to-line-distance/dist/esm/index.d.ts +1 -2
  452. package/node_modules/@turf/point-to-line-distance/dist/esm/index.js +2 -2
  453. package/node_modules/@turf/point-to-line-distance/dist/esm/index.js.map +1 -1
  454. package/node_modules/@turf/point-to-line-distance/package.json +18 -18
  455. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs +3 -3
  456. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs.map +1 -1
  457. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js +3 -3
  458. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js.map +1 -1
  459. package/node_modules/@turf/point-to-polygon-distance/package.json +14 -14
  460. package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs +2 -2
  461. package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs.map +1 -1
  462. package/node_modules/@turf/points-within-polygon/dist/esm/index.js +2 -2
  463. package/node_modules/@turf/points-within-polygon/dist/esm/index.js.map +1 -1
  464. package/node_modules/@turf/points-within-polygon/package.json +10 -10
  465. package/node_modules/@turf/polygon-smooth/README.md +1 -1
  466. package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs +2 -2
  467. package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs.map +1 -1
  468. package/node_modules/@turf/polygon-smooth/dist/cjs/index.d.cts +1 -1
  469. package/node_modules/@turf/polygon-smooth/dist/esm/index.d.ts +1 -1
  470. package/node_modules/@turf/polygon-smooth/dist/esm/index.js +2 -2
  471. package/node_modules/@turf/polygon-smooth/dist/esm/index.js.map +1 -1
  472. package/node_modules/@turf/polygon-smooth/package.json +11 -11
  473. package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs +2 -2
  474. package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs.map +1 -1
  475. package/node_modules/@turf/polygon-tangents/dist/esm/index.js +2 -2
  476. package/node_modules/@turf/polygon-tangents/dist/esm/index.js.map +1 -1
  477. package/node_modules/@turf/polygon-tangents/package.json +14 -14
  478. package/node_modules/@turf/polygon-to-line/dist/cjs/index.cjs +2 -2
  479. package/node_modules/@turf/polygon-to-line/dist/cjs/index.cjs.map +1 -1
  480. package/node_modules/@turf/polygon-to-line/dist/esm/index.js +2 -2
  481. package/node_modules/@turf/polygon-to-line/dist/esm/index.js.map +1 -1
  482. package/node_modules/@turf/polygon-to-line/package.json +10 -10
  483. package/node_modules/@turf/polygonize/dist/cjs/index.cjs +2 -2
  484. package/node_modules/@turf/polygonize/dist/cjs/index.cjs.map +1 -1
  485. package/node_modules/@turf/polygonize/dist/esm/index.js +2 -2
  486. package/node_modules/@turf/polygonize/dist/esm/index.js.map +1 -1
  487. package/node_modules/@turf/polygonize/package.json +13 -13
  488. package/node_modules/@turf/projection/package.json +12 -12
  489. package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs +2 -2
  490. package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs.map +1 -1
  491. package/node_modules/@turf/quadrat-analysis/dist/esm/index.js +2 -2
  492. package/node_modules/@turf/quadrat-analysis/dist/esm/index.js.map +1 -1
  493. package/node_modules/@turf/quadrat-analysis/package.json +18 -18
  494. package/node_modules/@turf/random/package.json +9 -9
  495. package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs +2 -2
  496. package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs.map +1 -1
  497. package/node_modules/@turf/rectangle-grid/dist/esm/index.js +2 -2
  498. package/node_modules/@turf/rectangle-grid/dist/esm/index.js.map +1 -1
  499. package/node_modules/@turf/rectangle-grid/package.json +13 -13
  500. package/node_modules/@turf/rewind/dist/cjs/index.cjs +2 -2
  501. package/node_modules/@turf/rewind/dist/cjs/index.cjs.map +1 -1
  502. package/node_modules/@turf/rewind/dist/esm/index.js +2 -2
  503. package/node_modules/@turf/rewind/dist/esm/index.js.map +1 -1
  504. package/node_modules/@turf/rewind/package.json +13 -13
  505. package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs +2 -2
  506. package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs.map +1 -1
  507. package/node_modules/@turf/rhumb-bearing/dist/esm/index.js +2 -2
  508. package/node_modules/@turf/rhumb-bearing/dist/esm/index.js.map +1 -1
  509. package/node_modules/@turf/rhumb-bearing/package.json +11 -11
  510. package/node_modules/@turf/rhumb-destination/README.md +2 -2
  511. package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs +2 -2
  512. package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs.map +1 -1
  513. package/node_modules/@turf/rhumb-destination/dist/cjs/index.d.cts +1 -1
  514. package/node_modules/@turf/rhumb-destination/dist/esm/index.d.ts +1 -1
  515. package/node_modules/@turf/rhumb-destination/dist/esm/index.js +2 -2
  516. package/node_modules/@turf/rhumb-destination/dist/esm/index.js.map +1 -1
  517. package/node_modules/@turf/rhumb-destination/package.json +11 -11
  518. package/node_modules/@turf/rhumb-distance/README.md +8 -9
  519. package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs +2 -2
  520. package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs.map +1 -1
  521. package/node_modules/@turf/rhumb-distance/dist/cjs/index.d.cts +2 -3
  522. package/node_modules/@turf/rhumb-distance/dist/esm/index.d.ts +2 -3
  523. package/node_modules/@turf/rhumb-distance/dist/esm/index.js +2 -2
  524. package/node_modules/@turf/rhumb-distance/dist/esm/index.js.map +1 -1
  525. package/node_modules/@turf/rhumb-distance/package.json +11 -11
  526. package/node_modules/@turf/sample/dist/cjs/index.cjs +2 -2
  527. package/node_modules/@turf/sample/dist/cjs/index.cjs.map +1 -1
  528. package/node_modules/@turf/sample/dist/esm/index.js +2 -2
  529. package/node_modules/@turf/sample/dist/esm/index.js.map +1 -1
  530. package/node_modules/@turf/sample/package.json +8 -8
  531. package/node_modules/@turf/sector/README.md +2 -2
  532. package/node_modules/@turf/sector/dist/cjs/index.cjs +2 -2
  533. package/node_modules/@turf/sector/dist/cjs/index.cjs.map +1 -1
  534. package/node_modules/@turf/sector/dist/cjs/index.d.cts +1 -1
  535. package/node_modules/@turf/sector/dist/esm/index.d.ts +1 -1
  536. package/node_modules/@turf/sector/dist/esm/index.js +2 -2
  537. package/node_modules/@turf/sector/dist/esm/index.js.map +1 -1
  538. package/node_modules/@turf/sector/package.json +14 -14
  539. package/node_modules/@turf/shortest-path/README.md +5 -3
  540. package/node_modules/@turf/shortest-path/dist/cjs/index.cjs +10 -14
  541. package/node_modules/@turf/shortest-path/dist/cjs/index.cjs.map +1 -1
  542. package/node_modules/@turf/shortest-path/dist/cjs/index.d.cts +1 -1
  543. package/node_modules/@turf/shortest-path/dist/esm/index.d.ts +1 -1
  544. package/node_modules/@turf/shortest-path/dist/esm/index.js +10 -14
  545. package/node_modules/@turf/shortest-path/dist/esm/index.js.map +1 -1
  546. package/node_modules/@turf/shortest-path/package.json +20 -19
  547. package/node_modules/@turf/simplify/README.md +13 -13
  548. package/node_modules/@turf/simplify/dist/cjs/index.cjs +6 -3
  549. package/node_modules/@turf/simplify/dist/cjs/index.cjs.map +1 -1
  550. package/node_modules/@turf/simplify/dist/cjs/index.d.cts +11 -12
  551. package/node_modules/@turf/simplify/dist/esm/index.d.ts +11 -12
  552. package/node_modules/@turf/simplify/dist/esm/index.js +6 -3
  553. package/node_modules/@turf/simplify/dist/esm/index.js.map +1 -1
  554. package/node_modules/@turf/simplify/package.json +13 -13
  555. package/node_modules/@turf/square/dist/cjs/index.cjs +2 -2
  556. package/node_modules/@turf/square/dist/cjs/index.cjs.map +1 -1
  557. package/node_modules/@turf/square/dist/esm/index.js +2 -2
  558. package/node_modules/@turf/square/dist/esm/index.js.map +1 -1
  559. package/node_modules/@turf/square/package.json +9 -9
  560. package/node_modules/@turf/square-grid/dist/cjs/index.cjs +2 -2
  561. package/node_modules/@turf/square-grid/dist/cjs/index.cjs.map +1 -1
  562. package/node_modules/@turf/square-grid/dist/esm/index.js +2 -2
  563. package/node_modules/@turf/square-grid/dist/esm/index.js.map +1 -1
  564. package/node_modules/@turf/square-grid/package.json +12 -12
  565. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs +2 -2
  566. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs.map +1 -1
  567. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.d.cts +1 -1
  568. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.d.ts +1 -1
  569. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js +2 -2
  570. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js.map +1 -1
  571. package/node_modules/@turf/standard-deviational-ellipse/package.json +16 -16
  572. package/node_modules/@turf/tag/dist/cjs/index.cjs +2 -2
  573. package/node_modules/@turf/tag/dist/cjs/index.cjs.map +1 -1
  574. package/node_modules/@turf/tag/dist/esm/index.js +2 -2
  575. package/node_modules/@turf/tag/dist/esm/index.js.map +1 -1
  576. package/node_modules/@turf/tag/package.json +11 -11
  577. package/node_modules/@turf/tesselate/dist/cjs/index.cjs +2 -2
  578. package/node_modules/@turf/tesselate/dist/cjs/index.cjs.map +1 -1
  579. package/node_modules/@turf/tesselate/dist/esm/index.js +2 -2
  580. package/node_modules/@turf/tesselate/dist/esm/index.js.map +1 -1
  581. package/node_modules/@turf/tesselate/package.json +8 -8
  582. package/node_modules/@turf/tin/dist/cjs/index.cjs +2 -2
  583. package/node_modules/@turf/tin/dist/cjs/index.cjs.map +1 -1
  584. package/node_modules/@turf/tin/dist/esm/index.js +2 -2
  585. package/node_modules/@turf/tin/dist/esm/index.js.map +1 -1
  586. package/node_modules/@turf/tin/package.json +8 -8
  587. package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs +2 -2
  588. package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs.map +1 -1
  589. package/node_modules/@turf/transform-rotate/dist/esm/index.js +2 -2
  590. package/node_modules/@turf/transform-rotate/dist/esm/index.js.map +1 -1
  591. package/node_modules/@turf/transform-rotate/package.json +17 -17
  592. package/node_modules/@turf/transform-scale/dist/cjs/index.cjs +2 -2
  593. package/node_modules/@turf/transform-scale/dist/cjs/index.cjs.map +1 -1
  594. package/node_modules/@turf/transform-scale/dist/esm/index.js +2 -2
  595. package/node_modules/@turf/transform-scale/dist/esm/index.js.map +1 -1
  596. package/node_modules/@turf/transform-scale/package.json +21 -21
  597. package/node_modules/@turf/transform-translate/README.md +8 -3
  598. package/node_modules/@turf/transform-translate/dist/cjs/index.cjs +2 -2
  599. package/node_modules/@turf/transform-translate/dist/cjs/index.cjs.map +1 -1
  600. package/node_modules/@turf/transform-translate/dist/cjs/index.d.cts +4 -1
  601. package/node_modules/@turf/transform-translate/dist/esm/index.d.ts +4 -1
  602. package/node_modules/@turf/transform-translate/dist/esm/index.js +2 -2
  603. package/node_modules/@turf/transform-translate/dist/esm/index.js.map +1 -1
  604. package/node_modules/@turf/transform-translate/package.json +14 -14
  605. package/node_modules/@turf/triangle-grid/dist/cjs/index.cjs +2 -2
  606. package/node_modules/@turf/triangle-grid/dist/cjs/index.cjs.map +1 -1
  607. package/node_modules/@turf/triangle-grid/dist/esm/index.js +2 -2
  608. package/node_modules/@turf/triangle-grid/dist/esm/index.js.map +1 -1
  609. package/node_modules/@turf/triangle-grid/package.json +13 -13
  610. package/node_modules/@turf/truncate/dist/cjs/index.cjs +2 -2
  611. package/node_modules/@turf/truncate/dist/cjs/index.cjs.map +1 -1
  612. package/node_modules/@turf/truncate/dist/esm/index.js +2 -2
  613. package/node_modules/@turf/truncate/dist/esm/index.js.map +1 -1
  614. package/node_modules/@turf/truncate/package.json +10 -10
  615. package/node_modules/@turf/turf/package.json +125 -125
  616. package/node_modules/@turf/turf/turf.min.js +2 -11
  617. package/node_modules/@turf/union/dist/cjs/index.cjs +2 -2
  618. package/node_modules/@turf/union/dist/cjs/index.cjs.map +1 -1
  619. package/node_modules/@turf/union/dist/esm/index.js +2 -2
  620. package/node_modules/@turf/union/dist/esm/index.js.map +1 -1
  621. package/node_modules/@turf/union/package.json +11 -11
  622. package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs +2 -2
  623. package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs.map +1 -1
  624. package/node_modules/@turf/unkink-polygon/dist/esm/index.js +2 -2
  625. package/node_modules/@turf/unkink-polygon/dist/esm/index.js.map +1 -1
  626. package/node_modules/@turf/unkink-polygon/package.json +13 -13
  627. package/node_modules/@turf/voronoi/dist/cjs/index.cjs +2 -2
  628. package/node_modules/@turf/voronoi/dist/cjs/index.cjs.map +1 -1
  629. package/node_modules/@turf/voronoi/dist/esm/index.js +2 -2
  630. package/node_modules/@turf/voronoi/dist/esm/index.js.map +1 -1
  631. package/node_modules/@turf/voronoi/package.json +12 -12
  632. package/node_modules/@types/node/README.md +1 -1
  633. package/node_modules/@types/node/assert/strict.d.ts +105 -2
  634. package/node_modules/@types/node/assert.d.ts +154 -95
  635. package/node_modules/@types/node/buffer.buffer.d.ts +9 -0
  636. package/node_modules/@types/node/buffer.d.ts +8 -4
  637. package/node_modules/@types/node/child_process.d.ts +65 -42
  638. package/node_modules/@types/node/cluster.d.ts +4 -5
  639. package/node_modules/@types/node/console.d.ts +3 -2
  640. package/node_modules/@types/node/crypto.d.ts +1173 -322
  641. package/node_modules/@types/node/dgram.d.ts +9 -8
  642. package/node_modules/@types/node/diagnostics_channel.d.ts +0 -2
  643. package/node_modules/@types/node/dns.d.ts +6 -1
  644. package/node_modules/@types/node/events.d.ts +80 -34
  645. package/node_modules/@types/node/fs/promises.d.ts +39 -21
  646. package/node_modules/@types/node/fs.d.ts +328 -87
  647. package/node_modules/@types/node/globals.d.ts +2 -0
  648. package/node_modules/@types/node/globals.typedarray.d.ts +19 -0
  649. package/node_modules/@types/node/http.d.ts +119 -31
  650. package/node_modules/@types/node/http2.d.ts +178 -52
  651. package/node_modules/@types/node/https.d.ts +96 -62
  652. package/node_modules/@types/node/index.d.ts +3 -1
  653. package/node_modules/@types/node/inspector.d.ts +205 -4139
  654. package/node_modules/@types/node/inspector.generated.d.ts +4233 -0
  655. package/node_modules/@types/node/net.d.ts +33 -11
  656. package/node_modules/@types/node/os.d.ts +14 -3
  657. package/node_modules/@types/node/package.json +3 -3
  658. package/node_modules/@types/node/perf_hooks.d.ts +6 -8
  659. package/node_modules/@types/node/process.d.ts +19 -23
  660. package/node_modules/@types/node/readline/promises.d.ts +1 -1
  661. package/node_modules/@types/node/sea.d.ts +9 -0
  662. package/node_modules/@types/node/sqlite.d.ts +233 -10
  663. package/node_modules/@types/node/stream/consumers.d.ts +2 -2
  664. package/node_modules/@types/node/stream/web.d.ts +6 -55
  665. package/node_modules/@types/node/stream.d.ts +38 -23
  666. package/node_modules/@types/node/string_decoder.d.ts +2 -2
  667. package/node_modules/@types/node/test.d.ts +31 -26
  668. package/node_modules/@types/node/tls.d.ts +122 -66
  669. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
  670. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +16 -0
  671. package/node_modules/@types/node/ts5.6/index.d.ts +3 -1
  672. package/node_modules/@types/node/ts5.7/index.d.ts +3 -1
  673. package/node_modules/@types/node/url.d.ts +48 -16
  674. package/node_modules/@types/node/util.d.ts +23 -7
  675. package/node_modules/@types/node/v8.d.ts +38 -5
  676. package/node_modules/@types/node/vm.d.ts +169 -88
  677. package/node_modules/@types/node/wasi.d.ts +1 -1
  678. package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
  679. package/node_modules/@types/node/web-globals/events.d.ts +3 -0
  680. package/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
  681. package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
  682. package/node_modules/@types/node/worker_threads.d.ts +142 -51
  683. package/node_modules/@types/node/zlib.d.ts +31 -24
  684. package/node_modules/axios/CHANGELOG.md +410 -346
  685. package/node_modules/axios/README.md +79 -51
  686. package/node_modules/axios/dist/axios.js +121 -46
  687. package/node_modules/axios/dist/axios.js.map +1 -1
  688. package/node_modules/axios/dist/axios.min.js +2 -2
  689. package/node_modules/axios/dist/axios.min.js.map +1 -1
  690. package/node_modules/axios/dist/browser/axios.cjs +126 -57
  691. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  692. package/node_modules/axios/dist/esm/axios.js +126 -57
  693. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  694. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  695. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  696. package/node_modules/axios/dist/node/axios.cjs +351 -97
  697. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  698. package/node_modules/axios/index.d.cts +4 -0
  699. package/node_modules/axios/index.d.ts +4 -0
  700. package/node_modules/axios/lib/adapters/adapters.js +85 -40
  701. package/node_modules/axios/lib/adapters/fetch.js +1 -1
  702. package/node_modules/axios/lib/adapters/http.js +224 -42
  703. package/node_modules/axios/lib/core/InterceptorManager.js +1 -1
  704. package/node_modules/axios/lib/core/mergeConfig.js +4 -4
  705. package/node_modules/axios/lib/env/data.js +1 -1
  706. package/node_modules/axios/lib/helpers/HttpStatusCode.js +6 -0
  707. package/node_modules/axios/lib/helpers/bind.js +7 -0
  708. package/node_modules/axios/lib/helpers/cookies.js +24 -13
  709. package/node_modules/axios/package.json +9 -4
  710. package/node_modules/fast-xml-parser/CHANGELOG.md +9 -0
  711. package/node_modules/fast-xml-parser/README.md +1 -1
  712. package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
  713. package/node_modules/fast-xml-parser/lib/fxp.d.cts +1 -1
  714. package/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
  715. package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
  716. package/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
  717. package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
  718. package/node_modules/fast-xml-parser/package.json +1 -1
  719. package/node_modules/fast-xml-parser/src/fxp.d.ts +2 -2
  720. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +1 -1
  721. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +4 -4
  722. package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +297 -287
  723. package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +24 -12
  724. package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +4 -4
  725. package/node_modules/form-data/CHANGELOG.md +60 -2
  726. package/node_modules/form-data/README.md +4 -4
  727. package/node_modules/form-data/lib/form_data.js +2 -2
  728. package/node_modules/form-data/package.json +4 -4
  729. package/node_modules/undici-types/agent.d.ts +1 -4
  730. package/node_modules/undici-types/client.d.ts +0 -2
  731. package/node_modules/undici-types/diagnostics-channel.d.ts +0 -1
  732. package/node_modules/undici-types/dispatcher.d.ts +0 -6
  733. package/node_modules/undici-types/errors.d.ts +5 -15
  734. package/node_modules/undici-types/eventsource.d.ts +6 -1
  735. package/node_modules/undici-types/h2c-client.d.ts +0 -2
  736. package/node_modules/undici-types/index.d.ts +6 -1
  737. package/node_modules/undici-types/interceptors.d.ts +5 -0
  738. package/node_modules/undici-types/mock-interceptor.d.ts +0 -1
  739. package/node_modules/undici-types/package.json +1 -1
  740. package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  741. package/node_modules/undici-types/webidl.d.ts +92 -21
  742. package/node_modules/undici-types/websocket.d.ts +2 -0
  743. package/package.json +5 -5
  744. package/tak-registration.js +11 -11
  745. package/node_modules/marchingsquares/.eslintrc.json +0 -81
  746. package/node_modules/marchingsquares/Changelog.md +0 -81
  747. package/node_modules/marchingsquares/LICENSE.md +0 -37
  748. package/node_modules/marchingsquares/README.md +0 -312
  749. package/node_modules/marchingsquares/VERSION +0 -1
  750. package/node_modules/marchingsquares/agpl-3.0.txt +0 -661
  751. package/node_modules/marchingsquares/dist/marchingsquares-esm.js +0 -3410
  752. package/node_modules/marchingsquares/dist/marchingsquares-isobands.js +0 -2513
  753. package/node_modules/marchingsquares/dist/marchingsquares-isobands.min.js +0 -9
  754. package/node_modules/marchingsquares/dist/marchingsquares-isocontours.js +0 -1209
  755. package/node_modules/marchingsquares/dist/marchingsquares-isocontours.min.js +0 -9
  756. package/node_modules/marchingsquares/dist/marchingsquares-isolines.js +0 -1209
  757. package/node_modules/marchingsquares/dist/marchingsquares-isolines.min.js +0 -9
  758. package/node_modules/marchingsquares/dist/marchingsquares.js +0 -3424
  759. package/node_modules/marchingsquares/dist/marchingsquares.min.js +0 -9
  760. package/node_modules/marchingsquares/examples/contour/index.html +0 -117
  761. package/node_modules/marchingsquares/examples/editor/draw-lines.js +0 -60
  762. package/node_modules/marchingsquares/examples/editor/index.html +0 -39
  763. package/node_modules/marchingsquares/examples/editor/script.js +0 -110
  764. package/node_modules/marchingsquares/examples/editor/styles.css +0 -37
  765. package/node_modules/marchingsquares/examples/require/app.js +0 -9
  766. package/node_modules/marchingsquares/examples/require/index.html +0 -14
  767. package/node_modules/marchingsquares/examples/require/main.js +0 -98
  768. package/node_modules/marchingsquares/examples/require/require.js +0 -5
  769. package/node_modules/marchingsquares/examples/simple/index.html +0 -115
  770. package/node_modules/marchingsquares/examples/vienna/index.html +0 -229
  771. package/node_modules/marchingsquares/examples/vienna/vienna_basin.png +0 -0
  772. package/node_modules/marchingsquares/examples/vienna/vienna_data.js +0 -514
  773. package/node_modules/marchingsquares/package.json +0 -47
  774. package/node_modules/marchingsquares/rollup.config.js +0 -122
  775. package/node_modules/marchingsquares/rollup.config.test.js +0 -14
  776. package/node_modules/marchingsquares/src/interpolation.js +0 -84
  777. package/node_modules/marchingsquares/src/isobands.js +0 -1883
  778. package/node_modules/marchingsquares/src/isolines.js +0 -638
  779. package/node_modules/marchingsquares/src/main.js +0 -4
  780. package/node_modules/marchingsquares/src/options.js +0 -80
  781. package/node_modules/marchingsquares/src/polygons.js +0 -531
  782. package/node_modules/marchingsquares/src/quadtree.js +0 -228
  783. package/node_modules/marchingsquares/test/data/in/isoBands-example-case.json +0 -14
  784. package/node_modules/marchingsquares/test/data/in/isoBands-issue#6-0_3.json +0 -12
  785. package/node_modules/marchingsquares/test/data/in/isoBands-issue#6-3_5.json +0 -12
  786. package/node_modules/marchingsquares/test/data/in/isoBands-issue#6-5_7.json +0 -12
  787. package/node_modules/marchingsquares/test/data/in/isoBands-minimal.json +0 -8
  788. package/node_modules/marchingsquares/test/data/in/isoBands-simple.json +0 -9
  789. package/node_modules/marchingsquares/test/data/in/isoLines-example-case.json +0 -13
  790. package/node_modules/marchingsquares/test/data/in/isoLines-simple.json +0 -8
  791. package/node_modules/marchingsquares/test/data/out/isoBands-example-case.json +0 -72
  792. package/node_modules/marchingsquares/test/data/out/isoBands-issue#6-0_3.json +0 -9
  793. package/node_modules/marchingsquares/test/data/out/isoBands-issue#6-3_5.json +0 -36
  794. package/node_modules/marchingsquares/test/data/out/isoBands-issue#6-5_7.json +0 -8
  795. package/node_modules/marchingsquares/test/data/out/isoBands-minimal.json +0 -10
  796. package/node_modules/marchingsquares/test/data/out/isoBands-simple.json +0 -25
  797. package/node_modules/marchingsquares/test/data/out/isoLines-example-case.json +0 -481
  798. package/node_modules/marchingsquares/test/data/out/isoLines-simple.json +0 -8
  799. package/node_modules/marchingsquares/test/test.js +0 -152
@@ -21,9 +21,9 @@ function booleanConcave(polygon) {
21
21
  }
22
22
  return false;
23
23
  }
24
- var turf_boolean_concave_default = booleanConcave;
24
+ var index_default = booleanConcave;
25
25
 
26
26
 
27
27
 
28
- exports.booleanConcave = booleanConcave; exports.default = turf_boolean_concave_default;
28
+ exports.booleanConcave = booleanConcave; exports.default = index_default;
29
29
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
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,IAAA,EAAM,MAAA,CAAO,CAAC,CAAA,CAAA,CAAG,EAAA,EAAI,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAC,EAAA,EAAI,MAAA,CAAO,CAAC,CAAA,CAAA,CAAG,EAAA,EAAI,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAC,CAAA;AAChE,IAAA,MAAM,IAAA,EAAM,MAAA,CAAO,CAAC,CAAA,CAAA,CAAG,EAAA,EAAI,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAC,EAAA,EAAI,MAAA,CAAO,CAAC,CAAA,CAAA,CAAG,EAAA,EAAI,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAC,CAAA;AAChE,IAAA,MAAM,IAAA,EAAM,MAAA,CAAO,CAAC,CAAA,CAAE,CAAC,CAAA,CAAE,CAAC,EAAA,EAAI,MAAA,CAAO,CAAC,CAAA,CAAA,CAAG,EAAA,EAAI,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAC,CAAA;AACtD,IAAA,MAAM,IAAA,EAAM,MAAA,CAAO,CAAC,CAAA,CAAE,CAAC,CAAA,CAAE,CAAC,EAAA,EAAI,MAAA,CAAO,CAAC,CAAA,CAAA,CAAG,EAAA,EAAI,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAC,CAAA;AACtD,IAAA,MAAM,cAAA,EAAgB,IAAA,EAAM,IAAA,EAAM,IAAA,EAAM,GAAA;AACxC,IAAA,GAAA,CAAI,EAAA,IAAM,CAAA,EAAG;AACX,MAAA,KAAA,EAAO,cAAA,EAAgB,CAAA;AAAA,IACzB,EAAA,KAAA,GAAA,CAAW,KAAA,IAAS,cAAA,EAAgB,CAAA,EAAG;AACrC,MAAA,OAAO,IAAA;AAAA,IACT;AAAA,EACF;AACA,EAAA,OAAO,KAAA;AACT;AAGA,IAAO,6BAAA,EAAQ,cAAA;ADhBf;AACE;AACA;AACF,wFAAC","file":"/home/runner/work/turf/turf/packages/turf-boolean-concave/dist/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"]}
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,IAAA,EAAM,MAAA,CAAO,CAAC,CAAA,CAAA,CAAG,EAAA,EAAI,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAC,EAAA,EAAI,MAAA,CAAO,CAAC,CAAA,CAAA,CAAG,EAAA,EAAI,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAC,CAAA;AAChE,IAAA,MAAM,IAAA,EAAM,MAAA,CAAO,CAAC,CAAA,CAAA,CAAG,EAAA,EAAI,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAC,EAAA,EAAI,MAAA,CAAO,CAAC,CAAA,CAAA,CAAG,EAAA,EAAI,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAC,CAAA;AAChE,IAAA,MAAM,IAAA,EAAM,MAAA,CAAO,CAAC,CAAA,CAAE,CAAC,CAAA,CAAE,CAAC,EAAA,EAAI,MAAA,CAAO,CAAC,CAAA,CAAA,CAAG,EAAA,EAAI,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAC,CAAA;AACtD,IAAA,MAAM,IAAA,EAAM,MAAA,CAAO,CAAC,CAAA,CAAE,CAAC,CAAA,CAAE,CAAC,EAAA,EAAI,MAAA,CAAO,CAAC,CAAA,CAAA,CAAG,EAAA,EAAI,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAC,CAAA;AACtD,IAAA,MAAM,cAAA,EAAgB,IAAA,EAAM,IAAA,EAAM,IAAA,EAAM,GAAA;AACxC,IAAA,GAAA,CAAI,EAAA,IAAM,CAAA,EAAG;AACX,MAAA,KAAA,EAAO,cAAA,EAAgB,CAAA;AAAA,IACzB,EAAA,KAAA,GAAA,CAAW,KAAA,IAAS,cAAA,EAAgB,CAAA,EAAG;AACrC,MAAA,OAAO,IAAA;AAAA,IACT;AAAA,EACF;AACA,EAAA,OAAO,KAAA;AACT;AAGA,IAAO,cAAA,EAAQ,cAAA;ADhBf;AACE;AACA;AACF,yEAAC","file":"/home/runner/work/turf/turf/packages/turf-boolean-concave/dist/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"]}
@@ -21,9 +21,9 @@ function booleanConcave(polygon) {
21
21
  }
22
22
  return false;
23
23
  }
24
- var turf_boolean_concave_default = booleanConcave;
24
+ var index_default = booleanConcave;
25
25
  export {
26
26
  booleanConcave,
27
- turf_boolean_concave_default as default
27
+ index_default as default
28
28
  };
29
29
  //# sourceMappingURL=index.js.map
@@ -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 * @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
+ {"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,gBAAQ;","names":[]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turf/boolean-concave",
3
- "version": "7.2.0",
4
- "description": "turf boolean-concave module",
3
+ "version": "7.3.0",
4
+ "description": "Takes a polygon and return true or false as to whether it is concave or not.",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
7
7
  "Rowan Winsemius <@rowanwins>"
@@ -56,21 +56,21 @@
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/benchmark": "^2.1.5",
59
- "@types/tape": "^4.13.4",
59
+ "@types/tape": "^5.8.1",
60
60
  "benchmark": "^2.1.4",
61
- "glob": "^10.3.10",
61
+ "glob": "^11.0.2",
62
62
  "load-json-file": "^7.0.1",
63
63
  "npm-run-all": "^4.1.5",
64
64
  "tape": "^5.9.0",
65
- "tsup": "^8.3.5",
66
- "tsx": "^4.19.2",
67
- "typescript": "^5.5.4"
65
+ "tsup": "^8.4.0",
66
+ "tsx": "^4.19.4",
67
+ "typescript": "^5.8.3"
68
68
  },
69
69
  "dependencies": {
70
- "@turf/helpers": "^7.2.0",
71
- "@turf/invariant": "^7.2.0",
70
+ "@turf/helpers": "7.3.0",
71
+ "@turf/invariant": "7.3.0",
72
72
  "@types/geojson": "^7946.0.10",
73
73
  "tslib": "^2.8.1"
74
74
  },
75
- "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
75
+ "gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
76
76
  }
@@ -197,7 +197,7 @@ function compareCoords(pair1, pair2) {
197
197
  function getMidpoint(pair1, pair2) {
198
198
  return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];
199
199
  }
200
- var turf_boolean_contains_default = booleanContains;
200
+ var index_default = booleanContains;
201
201
 
202
202
 
203
203
 
@@ -212,5 +212,5 @@ var turf_boolean_contains_default = booleanContains;
212
212
 
213
213
 
214
214
 
215
- exports.booleanContains = booleanContains; exports.compareCoords = compareCoords; exports.default = turf_boolean_contains_default; exports.doBBoxOverlap = doBBoxOverlap; exports.getMidpoint = getMidpoint; exports.isLineInPoly = isLineInPoly; exports.isLineOnLine = isLineOnLine; exports.isMultiPointInMultiPoint = isMultiPointInMultiPoint; exports.isMultiPointInPoly = isMultiPointInPoly; exports.isMultiPointOnLine = isMultiPointOnLine; exports.isPointInMultiPoint = isPointInMultiPoint; exports.isPolyInPoly = isPolyInPoly; exports.isPolygonInMultiPolygon = isPolygonInMultiPolygon;
215
+ exports.booleanContains = booleanContains; exports.compareCoords = compareCoords; exports.default = index_default; exports.doBBoxOverlap = doBBoxOverlap; exports.getMidpoint = getMidpoint; exports.isLineInPoly = isLineInPoly; exports.isLineOnLine = isLineOnLine; exports.isMultiPointInMultiPoint = isMultiPointInMultiPoint; exports.isMultiPointInPoly = isMultiPointInPoly; exports.isMultiPointOnLine = isMultiPointOnLine; exports.isPointInMultiPoint = isPointInMultiPoint; exports.isPolyInPoly = isPolyInPoly; exports.isPolygonInMultiPolygon = isPolygonInMultiPolygon;
216
216
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
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,MAAM,MAAA,EAAQ,gCAAA,QAAgB,CAAA;AAC9B,EAAA,MAAM,MAAA,EAAQ,KAAA,CAAM,IAAA;AACpB,EAAA,MAAM,MAAA,EAAQ,KAAA,CAAM,IAAA;AACpB,EAAA,MAAM,QAAA,EAAU,KAAA,CAAM,WAAA;AACtB,EAAA,MAAM,QAAA,EAAU,KAAA,CAAM,WAAA;AAEtB,EAAA,OAAA,CAAQ,KAAA,EAAO;AAAA,IACb,KAAK,OAAA;AACH,MAAA,OAAA,CAAQ,KAAA,EAAO;AAAA,QACb,KAAK,OAAA;AACH,UAAA,OAAO,aAAA,CAAc,OAAA,EAAS,OAAO,CAAA;AAAA,QACvC,OAAA;AACE,UAAA,MAAM,IAAI,KAAA,CAAM,YAAA,EAAc,MAAA,EAAQ,yBAAyB,CAAA;AAAA,MACnE;AAAA,IACF,KAAK,YAAA;AACH,MAAA,OAAA,CAAQ,KAAA,EAAO;AAAA,QACb,KAAK,OAAA;AACH,UAAA,OAAO,mBAAA,CAAoB,KAAA,EAAO,KAAK,CAAA;AAAA,QACzC,KAAK,YAAA;AACH,UAAA,OAAO,wBAAA,CAAyB,KAAA,EAAO,KAAK,CAAA;AAAA,QAC9C,OAAA;AACE,UAAA,MAAM,IAAI,KAAA,CAAM,YAAA,EAAc,MAAA,EAAQ,yBAAyB,CAAA;AAAA,MACnE;AAAA,IACF,KAAK,YAAA;AACH,MAAA,OAAA,CAAQ,KAAA,EAAO;AAAA,QACb,KAAK,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AAA,IAAM,KAAA,CAAM,CAAC,CAAA;AACtD;AAEA,SAAS,WAAA,CAAY,KAAA,EAAiB,KAAA,EAAiB;AACrD,EAAA,OAAO,CAAA,CAAE,KAAA,CAAM,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAA,EAAK,CAAA,EAAA,CAAI,KAAA,CAAM,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAA,EAAK,CAAC,CAAA;AAC9D;AAiBA,IAAO,8BAAA,EAAQ,eAAA;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"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-contains/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAA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I,KAAA,CAAM,CAAC,CAAA,EAAA,EAAK,CAAA,EAAA,CAAI,KAAA,CAAM,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAA,EAAK,CAAC,CAAA;AAC9D;AAiBA,IAAO,cAAA,EAAQ,eAAA;AD1Ff;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wjBAAC","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"]}
@@ -197,11 +197,11 @@ function compareCoords(pair1, pair2) {
197
197
  function getMidpoint(pair1, pair2) {
198
198
  return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];
199
199
  }
200
- var turf_boolean_contains_default = booleanContains;
200
+ var index_default = booleanContains;
201
201
  export {
202
202
  booleanContains,
203
203
  compareCoords,
204
- turf_boolean_contains_default as default,
204
+ index_default as default,
205
205
  doBBoxOverlap,
206
206
  getMidpoint,
207
207
  isLineInPoly,
@@ -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 * @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"],"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,yBAAy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AAG;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 doBBoxOverlap,\n compareCoords,\n getMidpoint,\n};\n\nexport default booleanContains;\n"],"mappings":";AAUA,SAAS,QAAQ,gBAAgB;AACjC,SAAS,6BAA6B;AACt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AAI,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,gBAAQ;","names":[]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turf/boolean-contains",
3
- "version": "7.2.0",
4
- "description": "turf boolean-contains module",
3
+ "version": "7.3.0",
4
+ "description": "Determines whether the second geometry is completely within the first geometry.",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
7
7
  "Rowan Winsemius <@rowanwins>",
@@ -56,26 +56,26 @@
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/benchmark": "^2.1.5",
59
- "@types/tape": "^4.13.4",
59
+ "@types/tape": "^5.8.1",
60
60
  "benchmark": "^2.1.4",
61
61
  "boolean-jsts": "*",
62
62
  "boolean-shapely": "*",
63
- "glob": "^10.3.10",
63
+ "glob": "^11.0.2",
64
64
  "load-json-file": "^7.0.1",
65
65
  "npm-run-all": "^4.1.5",
66
66
  "tape": "^5.9.0",
67
- "tsup": "^8.3.5",
68
- "tsx": "^4.19.2",
69
- "typescript": "^5.5.4"
67
+ "tsup": "^8.4.0",
68
+ "tsx": "^4.19.4",
69
+ "typescript": "^5.8.3"
70
70
  },
71
71
  "dependencies": {
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",
72
+ "@turf/bbox": "7.3.0",
73
+ "@turf/boolean-point-in-polygon": "7.3.0",
74
+ "@turf/boolean-point-on-line": "7.3.0",
75
+ "@turf/helpers": "7.3.0",
76
+ "@turf/invariant": "7.3.0",
77
77
  "@types/geojson": "^7946.0.10",
78
78
  "tslib": "^2.8.1"
79
79
  },
80
- "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
80
+ "gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
81
81
  }
@@ -133,9 +133,9 @@ function isPointOnLineSegment(lineSegmentStart, lineSegmentEnd, pt, incEnd) {
133
133
  return dyl > 0 ? lineSegmentStart[1] < pt[1] && pt[1] < lineSegmentEnd[1] : lineSegmentEnd[1] < pt[1] && pt[1] < lineSegmentStart[1];
134
134
  }
135
135
  }
136
- var turf_boolean_crosses_default = booleanCrosses;
136
+ var index_default = booleanCrosses;
137
137
 
138
138
 
139
139
 
140
- exports.booleanCrosses = booleanCrosses; exports.default = turf_boolean_crosses_default;
140
+ exports.booleanCrosses = booleanCrosses; exports.default = index_default;
141
141
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-crosses/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":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,EACT,gBAAA,CAAiB,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,EAAA,GAAK,EAAA,CAAG,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"]}
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,wCAAsB;AAqBtB,SAAS,cAAA,CACP,QAAA,EACA,QAAA,EACS;AACT,EAAA,IAAI,MAAA,EAAQ,gCAAA,QAAgB,CAAA;AAC5B,EAAA,IAAI,MAAA,EAAQ,gCAAA,QAAgB,CAAA;AAC5B,EAAA,IAAI,MAAA,EAAQ,KAAA,CAAM,IAAA;AAClB,EAAA,IAAI,MAAA,EAAQ,KAAA,CAAM,IAAA;AAElB,EAAA,OAAA,CAAQ,KAAA,EAAO;AAAA,IACb,KAAK,YAAA;AACH,MAAA,OAAA,CAAQ,KAAA,EAAO;AAAA,QACb,KAAK,YAAA;AACH,UAAA,OAAO,8BAAA,CAA+B,KAAA,EAAO,KAAK,CAAA;AAAA,QACpD,KAAK,SAAA;AACH,UAAA,OAAO,uBAAA,CAAwB,KAAA,EAAO,KAAK,CAAA;AAAA,QAC7C,OAAA;AACE,UAAA,MAAM,IAAI,KAAA,CAAM,YAAA,EAAc,MAAA,EAAQ,yBAAyB,CAAA;AAAA,MACnE;AAAA,IACF,KAAK,YAAA;AACH,MAAA,OAAA,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C,EAAA,GAAK,gBAAA,CAAiB,CAAC,CAAA;AAAA,EAC/D,EAAA,KAAO;AACL,IAAA,GAAA,CAAI,IAAA,CAAK,GAAA,CAAI,GAAG,EAAA,GAAK,IAAA,CAAK,GAAA,CAAI,GAAG,CAAA,EAAG;AAClC,MAAA,OAAO,IAAA,EAAM,EAAA,EACT,gBAAA,CAAiB,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,EAAA,GAAK,EAAA,CAAG,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,IAC7D;AACA,IAAA,OAAO,IAAA,EAAM,EAAA,EACT,gBAAA,CAAiB,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,EAAA,GAAK,EAAA,CAAG,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,cAAA,EAAQ,cAAA;AD/Df;AACE;AACA;AACF,yEAAC","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"]}
@@ -133,9 +133,9 @@ function isPointOnLineSegment(lineSegmentStart, lineSegmentEnd, pt, incEnd) {
133
133
  return dyl > 0 ? lineSegmentStart[1] < pt[1] && pt[1] < lineSegmentEnd[1] : lineSegmentEnd[1] < pt[1] && pt[1] < lineSegmentStart[1];
134
134
  }
135
135
  }
136
- var turf_boolean_crosses_default = booleanCrosses;
136
+ var index_default = booleanCrosses;
137
137
  export {
138
138
  booleanCrosses,
139
- turf_boolean_crosses_default as default
139
+ index_default as default
140
140
  };
141
141
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"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 * @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 :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AAK,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;","names":[]}
1
+ {"version":3,"sources":["../../index.ts"],"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 * @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"],"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,KAAK;AACH,iBAAO,wBAAwB,OAAO,KAAK;AAAA,QAC7C;AACE,gBAAM,IAAI,MAAM,cAAc,QAAQ,yBAAyB;AAAA,MACnE;AAAA,IACF,KAAK;AACH,cAAQ,OAAO;AAAA,QACb,KAAK;AACH,iBAAO,+BAA+B,OAAO,KAAK;AAAA,QACpD,KAAK;AACH,iBAAO,mBAAmB,OAAO,KAAK;AAAA,QACxC,KAAK;AACH,iBAAO,4BAA4B,OAAO,KAAK;AAAA,QACjD;AACE,gBAAM,IAAI,MAAM,cAAc,QAAQ,yBAAyB;AAAA,MACnE;AAAA,IACF,KAAK;AACH,cAAQ,OAAO;AAAA,QACb,KAAK;AACH,iBAAO,wBAAwB,OAAO,KAAK;AAAA,QAC7C,KAAK;AACH,iBAAO,4BAA4B,OAAO,KAAK;AAAA,QACjD;AACE,gBAAM,IAAI,MAAM,cAAc,Q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C,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,gBAAQ;","names":[]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turf/boolean-crosses",
3
- "version": "7.2.0",
4
- "description": "turf boolean-crosses module",
3
+ "version": "7.3.0",
4
+ "description": "Checks if two geometries cross each other.",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
7
7
  "Rowan Winsemius <@rowanwins>",
@@ -56,25 +56,25 @@
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/benchmark": "^2.1.5",
59
- "@types/tape": "^4.13.4",
59
+ "@types/tape": "^5.8.1",
60
60
  "benchmark": "^2.1.4",
61
61
  "boolean-shapely": "*",
62
- "glob": "^10.3.10",
62
+ "glob": "^11.0.2",
63
63
  "load-json-file": "^7.0.1",
64
64
  "npm-run-all": "^4.1.5",
65
65
  "tape": "^5.9.0",
66
- "tsup": "^8.3.5",
67
- "tsx": "^4.19.2",
68
- "typescript": "^5.5.4"
66
+ "tsup": "^8.4.0",
67
+ "tsx": "^4.19.4",
68
+ "typescript": "^5.8.3"
69
69
  },
70
70
  "dependencies": {
71
- "@turf/boolean-point-in-polygon": "^7.2.0",
72
- "@turf/helpers": "^7.2.0",
73
- "@turf/invariant": "^7.2.0",
74
- "@turf/line-intersect": "^7.2.0",
75
- "@turf/polygon-to-line": "^7.2.0",
71
+ "@turf/boolean-point-in-polygon": "7.3.0",
72
+ "@turf/helpers": "7.3.0",
73
+ "@turf/invariant": "7.3.0",
74
+ "@turf/line-intersect": "7.3.0",
75
+ "@turf/polygon-to-line": "7.3.0",
76
76
  "@types/geojson": "^7946.0.10",
77
77
  "tslib": "^2.8.1"
78
78
  },
79
- "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
79
+ "gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
80
80
  }
@@ -135,9 +135,9 @@ function isPointOnLineSegment(lineSegmentStart, lineSegmentEnd, pt) {
135
135
  function compareCoords(pair1, pair2) {
136
136
  return pair1[0] === pair2[0] && pair1[1] === pair2[1];
137
137
  }
138
- var turf_boolean_disjoint_default = booleanDisjoint;
138
+ var index_default = booleanDisjoint;
139
139
 
140
140
 
141
141
 
142
- exports.booleanDisjoint = booleanDisjoint; exports.default = turf_boolean_disjoint_default;
142
+ exports.booleanDisjoint = booleanDisjoint; exports.default = index_default;
143
143
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-disjoint/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACQA,uEAAsC;AACtC,qDAA8B;AAC9B,kCAA4B;AAC5B,sDAA8B;AAkB9B,SAAS,eAAA,CACP,QAAA,EACA,QAAA,EACA;AAAA,EACE,wBAAA,EAA0B;AAC5B,EAAA,EAEI,EAAE,uBAAA,EAAyB,KAAK,CAAA,EAC3B;AACT,EAAA,IAAI,KAAA,EAAO,IAAA;AACX,EAAA,+BAAA,QAAY,EAAU,CAAC,QAAA,EAAA,GAAa;AAClC,IAAA,+BAAA,QAAY,EAAU,CAAC,QAAA,EAAA,GAAa;AAClC,MAAA,GAAA,CAAI,KAAA,IAAS,KAAA,EAAO;AAClB,QAAA,OAAO,KAAA;AAAA,MACT;AACA,MAAA,KAAA,EAAO,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AAM,CAAC,CAAA;AACtD;AAGA,IAAO,8BAAA,EAAQ,eAAA;ADvFf;AACE;AACA;AACF,2FAAC","file":"/home/runner/work/turf/turf/packages/turf-boolean-disjoint/dist/cjs/index.cjs","sourcesContent":[null,"import {\n Feature,\n Geometry,\n LineString,\n Point,\n Polygon,\n Position,\n} from \"geojson\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { lineIntersect } from \"@turf/line-intersect\";\nimport { flattenEach } from \"@turf/meta\";\nimport { polygonToLine } from \"@turf/polygon-to-line\";\n\n/**\n * Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.ignoreSelfIntersections=true] ignore self-intersections on input features\n * @returns {boolean} true if the intersection is an empty set, false otherwise\n * @example\n * var point = turf.point([2, 2]);\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n *\n * turf.booleanDisjoint(line, point);\n * //=true\n */\nfunction booleanDisjoint(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry,\n {\n ignoreSelfIntersections = true,\n }: {\n ignoreSelfIntersections?: boolean;\n } = { ignoreSelfIntersections: true }\n): boolean {\n let bool = true;\n flattenEach(feature1, (flatten1) => {\n flattenEach(feature2, (flatten2) => {\n if (bool === false) {\n return false;\n }\n bool = disjoint(\n flatten1.geometry,\n flatten2.geometry,\n ignoreSelfIntersections\n );\n });\n });\n return bool;\n}\n\n/**\n * Disjoint operation for simple Geometries (Point/LineString/Polygon)\n *\n * @private\n * @param {Geometry<any>} geom1 GeoJSON Geometry\n * @param {Geometry<any>} geom2 GeoJSON Geometry\n * @param {boolean} ignoreSelfIntersections ignore self-intersections on input features\n * @returns {boolean} true if disjoint, false otherwise\n */\nfunction disjoint(geom1: any, geom2: any, ignoreSelfIntersections: boolean) {\n switch (geom1.type) {\n case \"Point\":\n switch (geom2.type) {\n case \"Point\":\n return !compareCoords(geom1.coordinates, geom2.coordinates);\n case \"LineString\":\n return !isPointOnLine(geom2, geom1);\n case \"Polygon\":\n return !booleanPointInPolygon(geom1, geom2);\n }\n /* istanbul ignore next */\n break;\n case \"LineString\":\n switch (geom2.type) {\n case \"Point\":\n return !isPointOnLine(geom1, geom2);\n case \"LineString\":\n return !isLineOnLine(geom1, geom2, ignoreSelfIntersections);\n case \"Polygon\":\n return !isLineInPoly(geom2, geom1, ignoreSelfIntersections);\n }\n /* istanbul ignore next */\n break;\n case \"Polygon\":\n switch (geom2.type) {\n case \"Point\":\n return !booleanPointInPolygon(geom2, geom1);\n case \"LineString\":\n return !isLineInPoly(geom1, geom2, ignoreSelfIntersections);\n case \"Polygon\":\n return !isPolyInPoly(geom2, geom1, ignoreSelfIntersections);\n }\n }\n return false;\n}\n\n// http://stackoverflow.com/a/11908158/1979085\nfunction isPointOnLine(lineString: LineString, pt: Point) {\n for (let i = 0; i < lineString.coordinates.length - 1; i++) {\n if (\n isPointOnLineSegment(\n lineString.coordinates[i],\n lineString.coordinates[i + 1],\n pt.coordinates\n )\n ) {\n return true;\n }\n }\n return false;\n}\n\nfunction isLineOnLine(\n lineString1: LineString,\n lineString2: LineString,\n ignoreSelfIntersections: boolean\n) {\n const doLinesIntersect = lineIntersect(lineString1, lineString2, {\n ignoreSelfIntersections,\n });\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\nfunction isLineInPoly(\n polygon: Polygon,\n lineString: LineString,\n ignoreSelfIntersections: boolean\n) {\n for (const coord of lineString.coordinates) {\n if (booleanPointInPolygon(coord, polygon)) {\n return true;\n }\n }\n const doLinesIntersect = lineIntersect(lineString, polygonToLine(polygon), {\n ignoreSelfIntersections,\n });\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\n/**\n * Is Polygon (geom1) in Polygon (geom2)\n * Only takes into account outer rings\n * See http://stackoverflow.com/a/4833823/1979085\n *\n * @private\n * @param {Geometry|Feature<Polygon>} feature1 Polygon1\n * @param {Geometry|Feature<Polygon>} feature2 Polygon2\n * @param {boolean} ignoreSelfIntersections ignore self-intersections on input features\n * @returns {boolean} true if geom1 is in geom2, false otherwise\n */\nfunction isPolyInPoly(\n feature1: Polygon,\n feature2: Polygon,\n ignoreSelfIntersections: boolean\n) {\n for (const coord1 of feature1.coordinates[0]) {\n if (booleanPointInPolygon(coord1, feature2)) {\n return true;\n }\n }\n for (const coord2 of feature2.coordinates[0]) {\n if (booleanPointInPolygon(coord2, feature1)) {\n return true;\n }\n }\n const doLinesIntersect = lineIntersect(\n polygonToLine(feature1),\n polygonToLine(feature2),\n { ignoreSelfIntersections }\n );\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\nfunction isPointOnLineSegment(\n lineSegmentStart: Position,\n lineSegmentEnd: Position,\n pt: Position\n) {\n const dxc = pt[0] - lineSegmentStart[0];\n const dyc = pt[1] - lineSegmentStart[1];\n const dxl = lineSegmentEnd[0] - lineSegmentStart[0];\n const dyl = lineSegmentEnd[1] - lineSegmentStart[1];\n const cross = dxc * dyl - dyc * dxl;\n if (cross !== 0) {\n return false;\n }\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n if (dxl > 0) {\n return lineSegmentStart[0] <= pt[0] && pt[0] <= lineSegmentEnd[0];\n } else {\n return lineSegmentEnd[0] <= pt[0] && pt[0] <= lineSegmentStart[0];\n }\n } else if (dyl > 0) {\n return lineSegmentStart[1] <= pt[1] && pt[1] <= lineSegmentEnd[1];\n } else {\n return lineSegmentEnd[1] <= pt[1] && pt[1] <= lineSegmentStart[1];\n }\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 if coord pairs match, false otherwise\n */\nfunction compareCoords(pair1: Position, pair2: Position) {\n return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\n\nexport { booleanDisjoint };\nexport default booleanDisjoint;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-disjoint/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACQA,uEAAsC;AACtC,qDAA8B;AAC9B,kCAA4B;AAC5B,sDAA8B;AAkB9B,SAAS,eAAA,CACP,QAAA,EACA,QAAA,EACA;AAAA,EACE,wBAAA,EAA0B;AAC5B,EAAA,EAEI,EAAE,uBAAA,EAAyB,KAAK,CAAA,EAC3B;AACT,EAAA,IAAI,KAAA,EAAO,IAAA;AACX,EAAA,+BAAA,QAAY,EAAU,CAAC,QAAA,EAAA,GAAa;AAClC,IAAA,+BAAA,QAAY,EAAU,CAAC,QAAA,EAAA,GAAa;AAClC,MAAA,GAAA,CAAI,KAAA,IAAS,KAAA,EAAO;AAClB,QAAA,OAAO,KAAA;AAAA,MACT;AACA,MAAA,KAAA,EAAO,QAAA;AAAA,QACL,QAAA,CAAS,QAAA;AAAA,QACT,QAAA,CAAS,QAAA;AAAA,QACT;AAAA,MACF,CAAA;AAAA,IACF,CAAC,CAAA;AAAA,EACH,CAAC,CAAA;AACD,EAAA,OAAO,IAAA;AACT;AAWA,SAAS,QAAA,CAAS,KAAA,EAAY,KAAA,EAAY,uBAAA,EAAkC;AAC1E,EAAA,OAAA,CAAQ,KAAA,CAAM,IAAA,EAAM;AAAA,IAClB,KAAK,OAAA;AACH,MAAA,OAAA,CAAQ,KAAA,CAAM,IAAA,EAAM;AAAA,QAClB,KAAK,OAAA;AACH,UAAA,OAAO,CAAC,aAAA,CAAc,KAAA,CAAM,WAAA,EAAa,KAAA,CAAM,WAAW,CAAA;AAAA,QAC5D,KAAK,YAAA;AACH,UAAA,OAAO,CAAC,aAAA,CAAc,KAAA,EAAO,KAAK,CAAA;AAAA,QACpC,KAAK,SAAA;AACH,UAAA,OAAO,CAAC,0DAAA,KAAsB,EAAO,KAAK,CAAA;AAAA,MAC9C;AAEA,MAAA,KAAA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A,GAAK,gBAAA,CAAiB,CAAC,CAAA;AAAA,IAClE;AAAA,EACF,EAAA,KAAA,GAAA,CAAW,IAAA,EAAM,CAAA,EAAG;AAClB,IAAA,OAAO,gBAAA,CAAiB,CAAC,EAAA,GAAK,EAAA,CAAG,CAAC,EAAA,GAAK,EAAA,CAAG,CAAC,EAAA,GAAK,cAAA,CAAe,CAAC,CAAA;AAAA,EAClE,EAAA,KAAO;AACL,IAAA,OAAO,cAAA,CAAe,CAAC,EAAA,GAAK,EAAA,CAAG,CAAC,EAAA,GAAK,EAAA,CAAG,CAAC,EAAA,GAAK,gBAAA,CAAiB,CAAC,CAAA;AAAA,EAClE;AACF;AAUA,SAAS,aAAA,CAAc,KAAA,EAAiB,KAAA,EAAiB;AACvD,EAAA,OAAO,KAAA,CAAM,CAAC,EAAA,IAAM,KAAA,CAAM,CAAC,EAAA,GAAK,KAAA,CAAM,CAAC,EAAA,IAAM,KAAA,CAAM,CAAC,CAAA;AACtD;AAGA,IAAO,cAAA,EAAQ,eAAA;ADvFf;AACE;AACA;AACF,2EAAC","file":"/home/runner/work/turf/turf/packages/turf-boolean-disjoint/dist/cjs/index.cjs","sourcesContent":[null,"import {\n Feature,\n Geometry,\n LineString,\n Point,\n Polygon,\n Position,\n} from \"geojson\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { lineIntersect } from \"@turf/line-intersect\";\nimport { flattenEach } from \"@turf/meta\";\nimport { polygonToLine } from \"@turf/polygon-to-line\";\n\n/**\n * Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.ignoreSelfIntersections=true] ignore self-intersections on input features\n * @returns {boolean} true if the intersection is an empty set, false otherwise\n * @example\n * var point = turf.point([2, 2]);\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n *\n * turf.booleanDisjoint(line, point);\n * //=true\n */\nfunction booleanDisjoint(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry,\n {\n ignoreSelfIntersections = true,\n }: {\n ignoreSelfIntersections?: boolean;\n } = { ignoreSelfIntersections: true }\n): boolean {\n let bool = true;\n flattenEach(feature1, (flatten1) => {\n flattenEach(feature2, (flatten2) => {\n if (bool === false) {\n return false;\n }\n bool = disjoint(\n flatten1.geometry,\n flatten2.geometry,\n ignoreSelfIntersections\n );\n });\n });\n return bool;\n}\n\n/**\n * Disjoint operation for simple Geometries (Point/LineString/Polygon)\n *\n * @private\n * @param {Geometry<any>} geom1 GeoJSON Geometry\n * @param {Geometry<any>} geom2 GeoJSON Geometry\n * @param {boolean} ignoreSelfIntersections ignore self-intersections on input features\n * @returns {boolean} true if disjoint, false otherwise\n */\nfunction disjoint(geom1: any, geom2: any, ignoreSelfIntersections: boolean) {\n switch (geom1.type) {\n case \"Point\":\n switch (geom2.type) {\n case \"Point\":\n return !compareCoords(geom1.coordinates, geom2.coordinates);\n case \"LineString\":\n return !isPointOnLine(geom2, geom1);\n case \"Polygon\":\n return !booleanPointInPolygon(geom1, geom2);\n }\n /* istanbul ignore next */\n break;\n case \"LineString\":\n switch (geom2.type) {\n case \"Point\":\n return !isPointOnLine(geom1, geom2);\n case \"LineString\":\n return !isLineOnLine(geom1, geom2, ignoreSelfIntersections);\n case \"Polygon\":\n return !isLineInPoly(geom2, geom1, ignoreSelfIntersections);\n }\n /* istanbul ignore next */\n break;\n case \"Polygon\":\n switch (geom2.type) {\n case \"Point\":\n return !booleanPointInPolygon(geom2, geom1);\n case \"LineString\":\n return !isLineInPoly(geom1, geom2, ignoreSelfIntersections);\n case \"Polygon\":\n return !isPolyInPoly(geom2, geom1, ignoreSelfIntersections);\n }\n }\n return false;\n}\n\n// http://stackoverflow.com/a/11908158/1979085\nfunction isPointOnLine(lineString: LineString, pt: Point) {\n for (let i = 0; i < lineString.coordinates.length - 1; i++) {\n if (\n isPointOnLineSegment(\n lineString.coordinates[i],\n lineString.coordinates[i + 1],\n pt.coordinates\n )\n ) {\n return true;\n }\n }\n return false;\n}\n\nfunction isLineOnLine(\n lineString1: LineString,\n lineString2: LineString,\n ignoreSelfIntersections: boolean\n) {\n const doLinesIntersect = lineIntersect(lineString1, lineString2, {\n ignoreSelfIntersections,\n });\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\nfunction isLineInPoly(\n polygon: Polygon,\n lineString: LineString,\n ignoreSelfIntersections: boolean\n) {\n for (const coord of lineString.coordinates) {\n if (booleanPointInPolygon(coord, polygon)) {\n return true;\n }\n }\n const doLinesIntersect = lineIntersect(lineString, polygonToLine(polygon), {\n ignoreSelfIntersections,\n });\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\n/**\n * Is Polygon (geom1) in Polygon (geom2)\n * Only takes into account outer rings\n * See http://stackoverflow.com/a/4833823/1979085\n *\n * @private\n * @param {Geometry|Feature<Polygon>} feature1 Polygon1\n * @param {Geometry|Feature<Polygon>} feature2 Polygon2\n * @param {boolean} ignoreSelfIntersections ignore self-intersections on input features\n * @returns {boolean} true if geom1 is in geom2, false otherwise\n */\nfunction isPolyInPoly(\n feature1: Polygon,\n feature2: Polygon,\n ignoreSelfIntersections: boolean\n) {\n for (const coord1 of feature1.coordinates[0]) {\n if (booleanPointInPolygon(coord1, feature2)) {\n return true;\n }\n }\n for (const coord2 of feature2.coordinates[0]) {\n if (booleanPointInPolygon(coord2, feature1)) {\n return true;\n }\n }\n const doLinesIntersect = lineIntersect(\n polygonToLine(feature1),\n polygonToLine(feature2),\n { ignoreSelfIntersections }\n );\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\nfunction isPointOnLineSegment(\n lineSegmentStart: Position,\n lineSegmentEnd: Position,\n pt: Position\n) {\n const dxc = pt[0] - lineSegmentStart[0];\n const dyc = pt[1] - lineSegmentStart[1];\n const dxl = lineSegmentEnd[0] - lineSegmentStart[0];\n const dyl = lineSegmentEnd[1] - lineSegmentStart[1];\n const cross = dxc * dyl - dyc * dxl;\n if (cross !== 0) {\n return false;\n }\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n if (dxl > 0) {\n return lineSegmentStart[0] <= pt[0] && pt[0] <= lineSegmentEnd[0];\n } else {\n return lineSegmentEnd[0] <= pt[0] && pt[0] <= lineSegmentStart[0];\n }\n } else if (dyl > 0) {\n return lineSegmentStart[1] <= pt[1] && pt[1] <= lineSegmentEnd[1];\n } else {\n return lineSegmentEnd[1] <= pt[1] && pt[1] <= lineSegmentStart[1];\n }\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 if coord pairs match, false otherwise\n */\nfunction compareCoords(pair1: Position, pair2: Position) {\n return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\n\nexport { booleanDisjoint };\nexport default booleanDisjoint;\n"]}
@@ -135,9 +135,9 @@ function isPointOnLineSegment(lineSegmentStart, lineSegmentEnd, pt) {
135
135
  function compareCoords(pair1, pair2) {
136
136
  return pair1[0] === pair2[0] && pair1[1] === pair2[1];
137
137
  }
138
- var turf_boolean_disjoint_default = booleanDisjoint;
138
+ var index_default = booleanDisjoint;
139
139
  export {
140
140
  booleanDisjoint,
141
- turf_boolean_disjoint_default as default
141
+ index_default as default
142
142
  };
143
143
  //# sourceMappingURL=index.js.map