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
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.js"],"sourcesContent":["import { geojsonRbush as rbush } from \"@turf/geojson-rbush\";\nimport { square } from \"@turf/square\";\nimport { bbox } from \"@turf/bbox\";\nimport { truncate } from \"@turf/truncate\";\nimport { lineSegment } from \"@turf/line-segment\";\nimport { lineIntersect } from \"@turf/line-intersect\";\nimport { nearestPointOnLine } from \"@turf/nearest-point-on-line\";\nimport { getCoords, getCoord, getType } from \"@turf/invariant\";\nimport { featureEach, featureReduce, flattenEach } from \"@turf/meta\";\nimport { lineString, featureCollection } from \"@turf/helpers\";\n\n/**\n * Split a LineString by another GeoJSON Feature.\n *\n * @function\n * @param {Feature<LineString>} line LineString Feature to split\n * @param {Feature<any>} splitter Feature used to split line\n * @returns {FeatureCollection<LineString>} Split LineStrings\n * @example\n * var line = turf.lineString([[120, -25], [145, -25]]);\n * var splitter = turf.lineString([[130, -15], [130, -35]]);\n *\n * var split = turf.lineSplit(line, splitter);\n *\n * //addToMap\n * var addToMap = [line, splitter]\n */\nfunction lineSplit(line, splitter) {\n if (!line) throw new Error(\"line is required\");\n if (!splitter) throw new Error(\"splitter is required\");\n\n var lineType = getType(line);\n var splitterType = getType(splitter);\n\n if (lineType !== \"LineString\") throw new Error(\"line must be LineString\");\n if (splitterType === \"FeatureCollection\")\n throw new Error(\"splitter cannot be a FeatureCollection\");\n if (splitterType === \"GeometryCollection\")\n throw new Error(\"splitter cannot be a GeometryCollection\");\n\n // remove excessive decimals from splitter\n // to avoid possible approximation issues in rbush\n var truncatedSplitter = truncate(splitter, { precision: 7 });\n\n switch (splitterType) {\n case \"Point\":\n return splitLineWithPoint(line, truncatedSplitter);\n case \"MultiPoint\":\n return splitLineWithPoints(line, truncatedSplitter);\n case \"LineString\":\n case \"MultiLineString\":\n case \"Polygon\":\n case \"MultiPolygon\":\n return splitLineWithPoints(\n line,\n lineIntersect(line, truncatedSplitter, {\n ignoreSelfIntersections: true,\n })\n );\n }\n}\n\n/**\n * Split LineString with MultiPoint\n *\n * @private\n * @param {Feature<LineString>} line LineString\n * @param {FeatureCollection<Point>} splitter Point\n * @returns {FeatureCollection<LineString>} split LineStrings\n */\nfunction splitLineWithPoints(line, splitter) {\n var results = [];\n var tree = rbush();\n\n flattenEach(splitter, function (point) {\n // Add index/id to features (needed for filter)\n results.forEach(function (feature, index) {\n feature.id = index;\n });\n // First Point - doesn't need to handle any previous line results\n if (!results.length) {\n results = splitLineWithPoint(line, point).features;\n\n // Add Square BBox to each feature for GeoJSON-RBush\n results.forEach(function (feature) {\n if (!feature.bbox) feature.bbox = square(bbox(feature));\n });\n tree.load(featureCollection(results));\n // Split with remaining points - lines might needed to be split multiple times\n } else {\n // Find all lines that are within the splitter's bbox\n var search = tree.search(point);\n\n if (search.features.length) {\n // RBush might return multiple lines - only process the closest line to splitter\n var closestLine = findClosestFeature(point, search);\n\n // Remove closest line from results since this will be split into two lines\n // This removes any duplicates inside the results & index\n results = results.filter(function (feature) {\n return feature.id !== closestLine.id;\n });\n tree.remove(closestLine);\n\n // Append the two newly split lines into the results\n featureEach(splitLineWithPoint(closestLine, point), function (line) {\n results.push(line);\n tree.insert(line);\n });\n }\n }\n });\n return featureCollection(results);\n}\n\n/**\n * Split LineString with Point\n *\n * @private\n * @param {Feature<LineString>} line LineString\n * @param {Feature<Point>} splitter Point\n * @returns {FeatureCollection<LineString>} split LineStrings\n */\nfunction splitLineWithPoint(line, splitter) {\n var results = [];\n\n // handle endpoints\n var startPoint = getCoords(line)[0];\n var endPoint = getCoords(line)[line.geometry.coordinates.length - 1];\n if (\n pointsEquals(startPoint, getCoord(splitter)) ||\n pointsEquals(endPoint, getCoord(splitter))\n )\n return featureCollection([line]);\n\n // Create spatial index\n var tree = rbush();\n var segments = lineSegment(line);\n tree.load(segments);\n\n // Find all segments that are within bbox of splitter\n var search = tree.search(splitter);\n\n // Return itself if point is not within spatial index\n if (!search.features.length) return featureCollection([line]);\n\n // RBush might return multiple lines - only process the closest line to splitter\n var closestSegment = findClosestFeature(splitter, search);\n\n // Initial value is the first point of the first segments (beginning of line)\n var initialValue = [startPoint];\n var lastCoords = featureReduce(\n segments,\n function (previous, current, index) {\n var currentCoords = getCoords(current)[1];\n var splitterCoords = getCoord(splitter);\n\n // Location where segment intersects with line\n if (index === closestSegment.id) {\n previous.push(splitterCoords);\n results.push(lineString(previous));\n // Don't duplicate splitter coordinate (Issue #688)\n if (pointsEquals(splitterCoords, currentCoords))\n return [splitterCoords];\n return [splitterCoords, currentCoords];\n\n // Keep iterating over coords until finished or intersection is found\n } else {\n previous.push(currentCoords);\n return previous;\n }\n },\n initialValue\n );\n // Append last line to final split results\n if (lastCoords.length > 1) {\n results.push(lineString(lastCoords));\n }\n return featureCollection(results);\n}\n\n/**\n * Find Closest Feature\n *\n * @private\n * @param {Feature<Point>} point Feature must be closest to this point\n * @param {FeatureCollection<LineString>} lines Collection of Features\n * @returns {Feature<LineString>} closest LineString\n */\nfunction findClosestFeature(point, lines) {\n if (!lines.features.length) throw new Error(\"lines must contain features\");\n // Filter to one segment that is the closest to the line\n if (lines.features.length === 1) return lines.features[0];\n\n var closestFeature;\n var closestDistance = Infinity;\n featureEach(lines, function (segment) {\n var pt = nearestPointOnLine(segment, point);\n var dist = pt.properties.dist;\n if (dist < closestDistance) {\n closestFeature = segment;\n closestDistance = dist;\n }\n });\n return closestFeature;\n}\n\n/**\n * Compares two points and returns if they are equals\n *\n * @private\n * @param {Array<number>} pt1 point\n * @param {Array<number>} pt2 point\n * @returns {boolean} true if they are equals\n */\nfunction pointsEquals(pt1, pt2) {\n return pt1[0] === pt2[0] && pt1[1] === pt2[1];\n}\n\nexport { lineSplit };\nexport default lineSplit;\n"],"mappings":";AAAA,SAAS,gBAAgB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,UAAI,iBAAiB,SAAS,QAAQ;AAGtC,UAAI,UAAU,eAAe,IAAI;AAC/B,iBAAS,KAAK,cAAc;AAC5B,gBAAQ,KAAK,WAAW,QAAQ,CAAC;AAEjC,YAAI,aAAa,gBAAgB,aAAa;AAC5C,iBAAO,CAAC,cAAc;AACxB,eAAO,CAAC,gBAAgB,aAAa;AAAA,MAGvC,OAAO;AACL,iBAAS,KAAK,aAAa;AAC3B,eAAO;AAAA,MACT;AAAA,IACF;AAAA,IACA;AAAA,EACF;AAEA,MAAI,WAAW,SAAS,GAAG;AACzB,YAAQ,KAAK,WAAW,UAAU,CAAC;AAAA,EACrC;AACA,SAAO,kBAAkB,OAAO;AAClC;AAUA,SAAS,mBAAmB,OAAO,OAAO;AACxC,MAAI,CAAC,MAAM,SAAS,OAAQ,OAAM,IAAI,MAAM,6BAA6B;AAEzE,MAAI,MAAM,SAAS,WAAW,EAAG,QAAO,MAAM,SAAS,CAAC;AAExD,MAAI;AACJ,MAAI,kBAAkB;AACtB,cAAY,OAAO,SAAU,SAAS;AACpC,QAAI,KAAK,mBAAmB,SAAS,KAAK;AAC1C,QAAI,OAAO,GAAG,WAAW;AACzB,QAAI,OAAO,iBAAiB;AAC1B,uBAAiB;AACjB,wBAAkB;AAAA,IACpB;AAAA,EACF,CAAC;AACD,SAAO;AACT;AAUA,SAAS,aAAa,KAAK,KAAK;AAC9B,SAAO,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,CAAC;AAC9C;AAGA,IAAO,0BAAQ;","names":["line"]}
1
+ {"version":3,"sources":["../../index.js"],"sourcesContent":["import { geojsonRbush as rbush } from \"@turf/geojson-rbush\";\nimport { truncate } from \"@turf/truncate\";\nimport { lineSegment } from \"@turf/line-segment\";\nimport { lineIntersect } from \"@turf/line-intersect\";\nimport { nearestPointOnLine } from \"@turf/nearest-point-on-line\";\nimport { getCoords, getCoord, getType } from \"@turf/invariant\";\nimport { featureEach, featureReduce, flattenEach } from \"@turf/meta\";\nimport { lineString, featureCollection } from \"@turf/helpers\";\n\n/**\n * Split a LineString by another GeoJSON Feature.\n *\n * @function\n * @param {Feature<LineString>} line LineString Feature to split\n * @param {Feature<any>} splitter Feature used to split line\n * @returns {FeatureCollection<LineString>} Split LineStrings\n * @example\n * var line = turf.lineString([[120, -25], [145, -25]]);\n * var splitter = turf.lineString([[130, -15], [130, -35]]);\n *\n * var split = turf.lineSplit(line, splitter);\n *\n * //addToMap\n * var addToMap = [line, splitter, split]\n *\n * split.features[0].properties.stroke = \"red\";\n * split.features[1].properties.stroke = \"blue\";\n */\nfunction lineSplit(line, splitter) {\n if (!line) throw new Error(\"line is required\");\n if (!splitter) throw new Error(\"splitter is required\");\n\n var lineType = getType(line);\n var splitterType = getType(splitter);\n\n if (lineType !== \"LineString\") throw new Error(\"line must be LineString\");\n if (splitterType === \"FeatureCollection\")\n throw new Error(\"splitter cannot be a FeatureCollection\");\n if (splitterType === \"GeometryCollection\")\n throw new Error(\"splitter cannot be a GeometryCollection\");\n\n // remove excessive decimals from splitter\n // to avoid possible approximation issues in rbush\n var truncatedSplitter = truncate(splitter, { precision: 7 });\n\n switch (splitterType) {\n case \"Point\":\n return splitLineWithPoint(line, truncatedSplitter);\n case \"MultiPoint\":\n return splitLineWithPoints(line, truncatedSplitter);\n case \"LineString\":\n case \"MultiLineString\":\n case \"Polygon\":\n case \"MultiPolygon\":\n return splitLineWithPoints(\n line,\n lineIntersect(line, truncatedSplitter, {\n ignoreSelfIntersections: true,\n })\n );\n }\n}\n\n/**\n * Split LineString with MultiPoint\n *\n * @private\n * @param {Feature<LineString>} line LineString\n * @param {FeatureCollection<Point>} splitter Point\n * @returns {FeatureCollection<LineString>} split LineStrings\n */\nfunction splitLineWithPoints(line, splitter) {\n var results = [];\n var tree = rbush();\n\n flattenEach(splitter, function (point) {\n // Add index/id to features (needed for filter)\n results.forEach(function (feature, index) {\n feature.id = index;\n });\n // First Point - doesn't need to handle any previous line results\n if (!results.length) {\n results = splitLineWithPoint(line, point).features;\n tree.load(featureCollection(results));\n // Split with remaining points - lines might needed to be split multiple times\n } else {\n // Find all lines that are within the splitter's bbox\n var search = tree.search(point);\n\n if (search.features.length) {\n // RBush might return multiple lines - only process the closest line to splitter\n var closestLine = findClosestFeature(point, search);\n\n // Remove closest line from results since this will be split into two lines\n // This removes any duplicates inside the results & index\n results = results.filter(function (feature) {\n return feature.id !== closestLine.id;\n });\n tree.remove(closestLine);\n\n // Append the two newly split lines into the results\n featureEach(splitLineWithPoint(closestLine, point), function (line) {\n results.push(line);\n tree.insert(line);\n });\n }\n }\n });\n return featureCollection(results);\n}\n\n/**\n * Split LineString with Point\n *\n * @private\n * @param {Feature<LineString>} line LineString\n * @param {Feature<Point>} splitter Point\n * @returns {FeatureCollection<LineString>} split LineStrings\n */\nfunction splitLineWithPoint(line, splitter) {\n var results = [];\n\n // handle endpoints\n var startPoint = getCoords(line)[0];\n var endPoint = getCoords(line)[line.geometry.coordinates.length - 1];\n if (\n pointsEquals(startPoint, getCoord(splitter)) ||\n pointsEquals(endPoint, getCoord(splitter))\n )\n return featureCollection([line]);\n\n // Create spatial index\n var tree = rbush();\n var segments = lineSegment(line);\n tree.load(segments);\n\n // Find all segments that are within bbox of splitter\n var search = tree.search(splitter);\n\n // Return itself if point is not within spatial index\n if (!search.features.length) return featureCollection([line]);\n\n // RBush might return multiple lines - only process the closest line to splitter\n var closestSegment = findClosestFeature(splitter, search);\n\n // Initial value is the first point of the first segments (beginning of line)\n var initialValue = [startPoint];\n var lastCoords = featureReduce(\n segments,\n function (previous, current, index) {\n var currentCoords = getCoords(current)[1];\n var splitterCoords = getCoord(splitter);\n\n // Location where segment intersects with line\n if (index === closestSegment.id) {\n previous.push(splitterCoords);\n results.push(lineString(previous));\n // Don't duplicate splitter coordinate (Issue #688)\n if (pointsEquals(splitterCoords, currentCoords))\n return [splitterCoords];\n return [splitterCoords, currentCoords];\n\n // Keep iterating over coords until finished or intersection is found\n } else {\n previous.push(currentCoords);\n return previous;\n }\n },\n initialValue\n );\n // Append last line to final split results\n if (lastCoords.length > 1) {\n results.push(lineString(lastCoords));\n }\n return featureCollection(results);\n}\n\n/**\n * Find Closest Feature\n *\n * @private\n * @param {Feature<Point>} point Feature must be closest to this point\n * @param {FeatureCollection<LineString>} lines Collection of Features\n * @returns {Feature<LineString>} closest LineString\n */\nfunction findClosestFeature(point, lines) {\n if (!lines.features.length) throw new Error(\"lines must contain features\");\n // Filter to one segment that is the closest to the line\n if (lines.features.length === 1) return lines.features[0];\n\n var closestFeature;\n var closestDistance = Infinity;\n featureEach(lines, function (segment) {\n var pt = nearestPointOnLine(segment, point);\n var dist = pt.properties.dist;\n if (dist < closestDistance) {\n closestFeature = segment;\n closestDistance = dist;\n }\n });\n return closestFeature;\n}\n\n/**\n * Compares two points and returns if they are equals\n *\n * @private\n * @param {Array<number>} pt1 point\n * @param {Array<number>} pt2 point\n * @returns {boolean} true if they are equals\n */\nfunction pointsEquals(pt1, pt2) {\n return pt1[0] === pt2[0] && pt1[1] === pt2[1];\n}\n\nexport { lineSplit };\nexport default lineSplit;\n"],"mappings":";AAAA,SAAS,gBAAgB,aAAa;AACtC,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,0BAA0B;AACnC,SAAS,WAAW,UAAU,eAAe;AAC7C,SAAS,aAAa,eAAe,mBAAmB;AACxD,SAAS,YAAY,yBAAyB;AAqB9C,SAAS,UAAU,MAAM,UAAU;AACjC,MAAI,CAAC,KAAM,OAAM,IAAI,MAAM,kBAAkB;AAC7C,MAAI,CAAC,SAAU,OAAM,IAAI,MAAM,sBAAsB;AAErD,MAAI,WAAW,QAAQ,IAAI;AAC3B,MAAI,eAAe,QAAQ,QAAQ;AAEnC,MAAI,aAAa,aAAc,OAAM,IAAI,MAAM,yBAAyB;AACxE,MAAI,iBAAiB;AACnB,UAAM,IAAI,MAAM,wCAAwC;AAC1D,MAAI,iBAAiB;AACnB,UAAM,IAAI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AAS,KAAK;AAC1C,QAAI,OAAO,GAAG,WAAW;AACzB,QAAI,OAAO,iBAAiB;AAC1B,uBAAiB;AACjB,wBAAkB;AAAA,IACpB;AAAA,EACF,CAAC;AACD,SAAO;AACT;AAUA,SAAS,aAAa,KAAK,KAAK;AAC9B,SAAO,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,CAAC;AAC9C;AAGA,IAAO,gBAAQ;","names":["line"]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turf/line-split",
3
- "version": "7.2.0",
4
- "description": "turf line-split module",
3
+ "version": "7.3.0",
4
+ "description": "Split a LineString by another GeoJSON Feature.",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
7
7
  "Denis Carriere <@DenisCarriere>"
@@ -56,27 +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
  "load-json-file": "^7.0.1",
62
62
  "npm-run-all": "^4.1.5",
63
63
  "tape": "^5.9.0",
64
- "tsup": "^8.3.5",
65
- "tsx": "^4.19.2",
66
- "write-json-file": "^5.0.0"
64
+ "tsup": "^8.4.0",
65
+ "tsx": "^4.19.4",
66
+ "write-json-file": "^6.0.0"
67
67
  },
68
68
  "dependencies": {
69
- "@turf/bbox": "^7.2.0",
70
- "@turf/geojson-rbush": "^7.2.0",
71
- "@turf/helpers": "^7.2.0",
72
- "@turf/invariant": "^7.2.0",
73
- "@turf/line-intersect": "^7.2.0",
74
- "@turf/line-segment": "^7.2.0",
75
- "@turf/meta": "^7.2.0",
76
- "@turf/nearest-point-on-line": "^7.2.0",
77
- "@turf/square": "^7.2.0",
78
- "@turf/truncate": "^7.2.0",
69
+ "@turf/bbox": "7.3.0",
70
+ "@turf/geojson-rbush": "7.3.0",
71
+ "@turf/helpers": "7.3.0",
72
+ "@turf/invariant": "7.3.0",
73
+ "@turf/line-intersect": "7.3.0",
74
+ "@turf/line-segment": "7.3.0",
75
+ "@turf/meta": "7.3.0",
76
+ "@turf/nearest-point-on-line": "7.3.0",
77
+ "@turf/truncate": "7.3.0",
79
78
  "@types/geojson": "^7946.0.10"
80
79
  },
81
- "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
80
+ "gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
82
81
  }
@@ -74,9 +74,9 @@ function calculateArea(bbox) {
74
74
  var north = bbox[3];
75
75
  return Math.abs(west - east) * Math.abs(south - north);
76
76
  }
77
- var turf_line_to_polygon_default = lineToPolygon;
77
+ var index_default = lineToPolygon;
78
78
 
79
79
 
80
80
 
81
- exports.default = turf_line_to_polygon_default; exports.lineToPolygon = lineToPolygon;
81
+ exports.default = index_default; exports.lineToPolygon = lineToPolygon;
82
82
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-line-to-polygon/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACSA,kCAAiC;AACjC,4CAAmC;AACnC,wCAAkD;AAClD,oCAAsB;AAqBtB,SAAS,aAAA,CACP,KAAA,EACA,QAAA,EAKI,CAAC,CAAA,EACL;AAzCF,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA;AA2CE,EAAA,IAAI,WAAA,EAAa,OAAA,CAAQ,UAAA;AACzB,EAAA,IAAI,aAAA,EAAA,CAAe,GAAA,EAAA,OAAA,CAAQ,YAAA,EAAA,GAAR,KAAA,EAAA,GAAA,EAAwB,IAAA;AAC3C,EAAA,IAAI,YAAA,EAAA,CAAc,GAAA,EAAA,OAAA,CAAQ,WAAA,EAAA,GAAR,KAAA,EAAA,GAAA,EAAuB,IAAA;AACzC,EAAA,IAAI,OAAA,EAAA,CAAS,GAAA,EAAA,OAAA,CAAQ,MAAA,EAAA,GAAR,KAAA,EAAA,GAAA,EAAkB,KAAA;AAE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A,IAAO,GAAA,GAAM,GAAA,IAAO,EAAA,EAAI;AAC1B,IAAA,MAAA,CAAO,IAAA,CAAK,KAAK,CAAA;AAAA,EACnB;AACA,EAAA,OAAO,MAAA;AACT;AASA,SAAS,aAAA,CAAc,IAAA,EAAY;AACjC,EAAA,IAAI,KAAA,EAAO,IAAA,CAAK,CAAC,CAAA;AACjB,EAAA,IAAI,MAAA,EAAQ,IAAA,CAAK,CAAC,CAAA;AAClB,EAAA,IAAI,KAAA,EAAO,IAAA,CAAK,CAAC,CAAA;AACjB,EAAA,IAAI,MAAA,EAAQ,IAAA,CAAK,CAAC,CAAA;AAClB,EAAA,OAAO,IAAA,CAAK,GAAA,CAAI,KAAA,EAAO,IAAI,EAAA,EAAI,IAAA,CAAK,GAAA,CAAI,MAAA,EAAQ,KAAK,CAAA;AACvD;AAGA,IAAO,6BAAA,EAAQ,aAAA;ADhFf;AACE;AACA;AACF,sFAAC","file":"/home/runner/work/turf/turf/packages/turf-line-to-polygon/dist/cjs/index.cjs","sourcesContent":[null,"import {\n Feature,\n FeatureCollection,\n MultiLineString,\n LineString,\n GeoJsonProperties,\n BBox,\n Position,\n} from \"geojson\";\nimport { bbox as turfBBox } from \"@turf/bbox\";\nimport { getCoords, getGeom } from \"@turf/invariant\";\nimport { polygon, multiPolygon, lineString } from \"@turf/helpers\";\nimport { clone } from \"@turf/clone\";\n\n/**\n * Converts (Multi)LineString(s) to Polygon(s).\n *\n * @function\n * @param {FeatureCollection|Feature<LineString|MultiLineString>} lines Features to convert\n * @param {Object} [options={}] Optional parameters\n * @param {Object} [options.properties={}] translates GeoJSON properties to Feature\n * @param {boolean} [options.autoComplete=true] auto complete linestrings (matches first & last coordinates)\n * @param {boolean} [options.orderCoords=true] sorts linestrings to place outer ring at the first position of the coordinates\n * @param {boolean} [options.mutate=false] mutate the original linestring using autoComplete (matches first & last coordinates)\n * @returns {Feature<Polygon|MultiPolygon>} converted to Polygons\n * @example\n * var line = turf.lineString([[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]);\n *\n * var polygon = turf.lineToPolygon(line);\n *\n * //addToMap\n * var addToMap = [polygon];\n */\nfunction lineToPolygon<G extends LineString | MultiLineString>(\n lines: Feature<G> | FeatureCollection<G> | G,\n options: {\n properties?: GeoJsonProperties;\n autoComplete?: boolean;\n orderCoords?: boolean;\n mutate?: boolean;\n } = {}\n) {\n // Optional parameters\n var properties = options.properties;\n var autoComplete = options.autoComplete ?? true;\n var orderCoords = options.orderCoords ?? true;\n var mutate = options.mutate ?? false;\n\n if (!mutate) {\n lines = clone(lines);\n }\n\n switch (lines.type) {\n case \"FeatureCollection\":\n var coords: number[][][][] = [];\n lines.features.forEach(function (line) {\n coords.push(\n getCoords(lineStringToPolygon(line, {}, autoComplete, orderCoords))\n );\n });\n return multiPolygon(coords, properties);\n default:\n return lineStringToPolygon(lines, properties, autoComplete, orderCoords);\n }\n}\n\n/**\n * LineString to Polygon\n *\n * @private\n * @param {Feature<LineString|MultiLineString>} line line\n * @param {Object} [properties] translates GeoJSON properties to Feature\n * @param {boolean} [autoComplete=true] auto complete linestrings\n * @param {boolean} [orderCoords=true] sorts linestrings to place outer ring at the first position of the coordinates\n * @returns {Feature<Polygon>} line converted to Polygon\n */\nfunction lineStringToPolygon<G extends LineString | MultiLineString>(\n line: Feature<G> | G,\n properties: GeoJsonProperties | undefined,\n autoComplete: boolean,\n orderCoords: boolean\n) {\n properties = properties\n ? properties\n : line.type === \"Feature\"\n ? line.properties\n : {};\n var geom = getGeom(line);\n var coords: Position[] | Position[][] = geom.coordinates;\n var type = geom.type;\n\n if (!coords.length) throw new Error(\"line must contain coordinates\");\n\n switch (type) {\n case \"LineString\":\n if (autoComplete) coords = autoCompleteCoords(coords as Position[]);\n return polygon([coords as Position[]], properties);\n case \"MultiLineString\":\n var multiCoords: number[][][] = [];\n var largestArea = 0;\n\n (coords as Position[][]).forEach(function (coord) {\n if (autoComplete) coord = autoCompleteCoords(coord);\n\n // Largest LineString to be placed in the first position of the coordinates array\n if (orderCoords) {\n var area = calculateArea(turfBBox(lineString(coord)));\n if (area > largestArea) {\n multiCoords.unshift(coord);\n largestArea = area;\n } else multiCoords.push(coord);\n } else {\n multiCoords.push(coord);\n }\n });\n return polygon(multiCoords, properties);\n default:\n throw new Error(\"geometry type \" + type + \" is not supported\");\n }\n}\n\n/**\n * Auto Complete Coords - matches first & last coordinates\n *\n * @private\n * @param {Array<Array<number>>} coords Coordinates\n * @returns {Array<Array<number>>} auto completed coordinates\n */\nfunction autoCompleteCoords(coords: Position[]) {\n var first = coords[0];\n var x1 = first[0];\n var y1 = first[1];\n var last = coords[coords.length - 1];\n var x2 = last[0];\n var y2 = last[1];\n if (x1 !== x2 || y1 !== y2) {\n coords.push(first);\n }\n return coords;\n}\n\n/**\n * area - quick approximate area calculation (used to sort)\n *\n * @private\n * @param {Array<number>} bbox BBox [west, south, east, north]\n * @returns {number} very quick area calculation\n */\nfunction calculateArea(bbox: BBox) {\n var west = bbox[0];\n var south = bbox[1];\n var east = bbox[2];\n var north = bbox[3];\n return Math.abs(west - east) * Math.abs(south - north);\n}\n\nexport { lineToPolygon };\nexport default lineToPolygon;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-line-to-polygon/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACSA,kCAAiC;AACjC,4CAAmC;AACnC,wCAAkD;AAClD,oCAAsB;AAqBtB,SAAS,aAAA,CACP,KAAA,EACA,QAAA,EAKI,CAAC,CAAA,EACL;AAzCF,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA;AA2CE,EAAA,IAAI,WAAA,EAAa,OAAA,CAAQ,UAAA;AACzB,EAAA,IAAI,aAAA,EAAA,CAAe,GAAA,EAAA,OAAA,CAAQ,YAAA,EAAA,GAAR,KAAA,EAAA,GAAA,EAAwB,IAAA;AAC3C,EAAA,IAAI,YAAA,EAAA,CAAc,GAAA,EAAA,OAAA,CAAQ,WAAA,EAAA,GAAR,KAAA,E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AAA;AACnC,EAAA,IAAI,GAAA,EAAK,IAAA,CAAK,CAAC,CAAA;AACf,EAAA,IAAI,GAAA,EAAK,IAAA,CAAK,CAAC,CAAA;AACf,EAAA,GAAA,CAAI,GAAA,IAAO,GAAA,GAAM,GAAA,IAAO,EAAA,EAAI;AAC1B,IAAA,MAAA,CAAO,IAAA,CAAK,KAAK,CAAA;AAAA,EACnB;AACA,EAAA,OAAO,MAAA;AACT;AASA,SAAS,aAAA,CAAc,IAAA,EAAY;AACjC,EAAA,IAAI,KAAA,EAAO,IAAA,CAAK,CAAC,CAAA;AACjB,EAAA,IAAI,MAAA,EAAQ,IAAA,CAAK,CAAC,CAAA;AAClB,EAAA,IAAI,KAAA,EAAO,IAAA,CAAK,CAAC,CAAA;AACjB,EAAA,IAAI,MAAA,EAAQ,IAAA,CAAK,CAAC,CAAA;AAClB,EAAA,OAAO,IAAA,CAAK,GAAA,CAAI,KAAA,EAAO,IAAI,EAAA,EAAI,IAAA,CAAK,GAAA,CAAI,MAAA,EAAQ,KAAK,CAAA;AACvD;AAGA,IAAO,cAAA,EAAQ,aAAA;ADhFf;AACE;AACA;AACF,uEAAC","file":"/home/runner/work/turf/turf/packages/turf-line-to-polygon/dist/cjs/index.cjs","sourcesContent":[null,"import {\n Feature,\n FeatureCollection,\n MultiLineString,\n LineString,\n GeoJsonProperties,\n BBox,\n Position,\n} from \"geojson\";\nimport { bbox as turfBBox } from \"@turf/bbox\";\nimport { getCoords, getGeom } from \"@turf/invariant\";\nimport { polygon, multiPolygon, lineString } from \"@turf/helpers\";\nimport { clone } from \"@turf/clone\";\n\n/**\n * Converts (Multi)LineString(s) to Polygon(s).\n *\n * @function\n * @param {FeatureCollection|Feature<LineString|MultiLineString>} lines Features to convert\n * @param {Object} [options={}] Optional parameters\n * @param {Object} [options.properties={}] translates GeoJSON properties to Feature\n * @param {boolean} [options.autoComplete=true] auto complete linestrings (matches first & last coordinates)\n * @param {boolean} [options.orderCoords=true] sorts linestrings to place outer ring at the first position of the coordinates\n * @param {boolean} [options.mutate=false] mutate the original linestring using autoComplete (matches first & last coordinates)\n * @returns {Feature<Polygon|MultiPolygon>} converted to Polygons\n * @example\n * var line = turf.lineString([[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]);\n *\n * var polygon = turf.lineToPolygon(line);\n *\n * //addToMap\n * var addToMap = [polygon];\n */\nfunction lineToPolygon<G extends LineString | MultiLineString>(\n lines: Feature<G> | FeatureCollection<G> | G,\n options: {\n properties?: GeoJsonProperties;\n autoComplete?: boolean;\n orderCoords?: boolean;\n mutate?: boolean;\n } = {}\n) {\n // Optional parameters\n var properties = options.properties;\n var autoComplete = options.autoComplete ?? true;\n var orderCoords = options.orderCoords ?? true;\n var mutate = options.mutate ?? false;\n\n if (!mutate) {\n lines = clone(lines);\n }\n\n switch (lines.type) {\n case \"FeatureCollection\":\n var coords: number[][][][] = [];\n lines.features.forEach(function (line) {\n coords.push(\n getCoords(lineStringToPolygon(line, {}, autoComplete, orderCoords))\n );\n });\n return multiPolygon(coords, properties);\n default:\n return lineStringToPolygon(lines, properties, autoComplete, orderCoords);\n }\n}\n\n/**\n * LineString to Polygon\n *\n * @private\n * @param {Feature<LineString|MultiLineString>} line line\n * @param {Object} [properties] translates GeoJSON properties to Feature\n * @param {boolean} [autoComplete=true] auto complete linestrings\n * @param {boolean} [orderCoords=true] sorts linestrings to place outer ring at the first position of the coordinates\n * @returns {Feature<Polygon>} line converted to Polygon\n */\nfunction lineStringToPolygon<G extends LineString | MultiLineString>(\n line: Feature<G> | G,\n properties: GeoJsonProperties | undefined,\n autoComplete: boolean,\n orderCoords: boolean\n) {\n properties = properties\n ? properties\n : line.type === \"Feature\"\n ? line.properties\n : {};\n var geom = getGeom(line);\n var coords: Position[] | Position[][] = geom.coordinates;\n var type = geom.type;\n\n if (!coords.length) throw new Error(\"line must contain coordinates\");\n\n switch (type) {\n case \"LineString\":\n if (autoComplete) coords = autoCompleteCoords(coords as Position[]);\n return polygon([coords as Position[]], properties);\n case \"MultiLineString\":\n var multiCoords: number[][][] = [];\n var largestArea = 0;\n\n (coords as Position[][]).forEach(function (coord) {\n if (autoComplete) coord = autoCompleteCoords(coord);\n\n // Largest LineString to be placed in the first position of the coordinates array\n if (orderCoords) {\n var area = calculateArea(turfBBox(lineString(coord)));\n if (area > largestArea) {\n multiCoords.unshift(coord);\n largestArea = area;\n } else multiCoords.push(coord);\n } else {\n multiCoords.push(coord);\n }\n });\n return polygon(multiCoords, properties);\n default:\n throw new Error(\"geometry type \" + type + \" is not supported\");\n }\n}\n\n/**\n * Auto Complete Coords - matches first & last coordinates\n *\n * @private\n * @param {Array<Array<number>>} coords Coordinates\n * @returns {Array<Array<number>>} auto completed coordinates\n */\nfunction autoCompleteCoords(coords: Position[]) {\n var first = coords[0];\n var x1 = first[0];\n var y1 = first[1];\n var last = coords[coords.length - 1];\n var x2 = last[0];\n var y2 = last[1];\n if (x1 !== x2 || y1 !== y2) {\n coords.push(first);\n }\n return coords;\n}\n\n/**\n * area - quick approximate area calculation (used to sort)\n *\n * @private\n * @param {Array<number>} bbox BBox [west, south, east, north]\n * @returns {number} very quick area calculation\n */\nfunction calculateArea(bbox: BBox) {\n var west = bbox[0];\n var south = bbox[1];\n var east = bbox[2];\n var north = bbox[3];\n return Math.abs(west - east) * Math.abs(south - north);\n}\n\nexport { lineToPolygon };\nexport default lineToPolygon;\n"]}
@@ -74,9 +74,9 @@ function calculateArea(bbox) {
74
74
  var north = bbox[3];
75
75
  return Math.abs(west - east) * Math.abs(south - north);
76
76
  }
77
- var turf_line_to_polygon_default = lineToPolygon;
77
+ var index_default = lineToPolygon;
78
78
  export {
79
- turf_line_to_polygon_default as default,
79
+ index_default as default,
80
80
  lineToPolygon
81
81
  };
82
82
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n Feature,\n FeatureCollection,\n MultiLineString,\n LineString,\n GeoJsonProperties,\n BBox,\n Position,\n} from \"geojson\";\nimport { bbox as turfBBox } from \"@turf/bbox\";\nimport { getCoords, getGeom } from \"@turf/invariant\";\nimport { polygon, multiPolygon, lineString } from \"@turf/helpers\";\nimport { clone } from \"@turf/clone\";\n\n/**\n * Converts (Multi)LineString(s) to Polygon(s).\n *\n * @function\n * @param {FeatureCollection|Feature<LineString|MultiLineString>} lines Features to convert\n * @param {Object} [options={}] Optional parameters\n * @param {Object} [options.properties={}] translates GeoJSON properties to Feature\n * @param {boolean} [options.autoComplete=true] auto complete linestrings (matches first & last coordinates)\n * @param {boolean} [options.orderCoords=true] sorts linestrings to place outer ring at the first position of the coordinates\n * @param {boolean} [options.mutate=false] mutate the original linestring using autoComplete (matches first & last coordinates)\n * @returns {Feature<Polygon|MultiPolygon>} converted to Polygons\n * @example\n * var line = turf.lineString([[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]);\n *\n * var polygon = turf.lineToPolygon(line);\n *\n * //addToMap\n * var addToMap = [polygon];\n */\nfunction lineToPolygon<G extends LineString | MultiLineString>(\n lines: Feature<G> | FeatureCollection<G> | G,\n options: {\n properties?: GeoJsonProperties;\n autoComplete?: boolean;\n orderCoords?: boolean;\n mutate?: boolean;\n } = {}\n) {\n // Optional parameters\n var properties = options.properties;\n var autoComplete = options.autoComplete ?? true;\n var orderCoords = options.orderCoords ?? true;\n var mutate = options.mutate ?? false;\n\n if (!mutate) {\n lines = clone(lines);\n }\n\n switch (lines.type) {\n case \"FeatureCollection\":\n var coords: number[][][][] = [];\n lines.features.forEach(function (line) {\n coords.push(\n getCoords(lineStringToPolygon(line, {}, autoComplete, orderCoords))\n );\n });\n return multiPolygon(coords, properties);\n default:\n return lineStringToPolygon(lines, properties, autoComplete, orderCoords);\n }\n}\n\n/**\n * LineString to Polygon\n *\n * @private\n * @param {Feature<LineString|MultiLineString>} line line\n * @param {Object} [properties] translates GeoJSON properties to Feature\n * @param {boolean} [autoComplete=true] auto complete linestrings\n * @param {boolean} [orderCoords=true] sorts linestrings to place outer ring at the first position of the coordinates\n * @returns {Feature<Polygon>} line converted to Polygon\n */\nfunction lineStringToPolygon<G extends LineString | MultiLineString>(\n line: Feature<G> | G,\n properties: GeoJsonProperties | undefined,\n autoComplete: boolean,\n orderCoords: boolean\n) {\n properties = properties\n ? properties\n : line.type === \"Feature\"\n ? line.properties\n : {};\n var geom = getGeom(line);\n var coords: Position[] | Position[][] = geom.coordinates;\n var type = geom.type;\n\n if (!coords.length) throw new Error(\"line must contain coordinates\");\n\n switch (type) {\n case \"LineString\":\n if (autoComplete) coords = autoCompleteCoords(coords as Position[]);\n return polygon([coords as Position[]], properties);\n case \"MultiLineString\":\n var multiCoords: number[][][] = [];\n var largestArea = 0;\n\n (coords as Position[][]).forEach(function (coord) {\n if (autoComplete) coord = autoCompleteCoords(coord);\n\n // Largest LineString to be placed in the first position of the coordinates array\n if (orderCoords) {\n var area = calculateArea(turfBBox(lineString(coord)));\n if (area > largestArea) {\n multiCoords.unshift(coord);\n largestArea = area;\n } else multiCoords.push(coord);\n } else {\n multiCoords.push(coord);\n }\n });\n return polygon(multiCoords, properties);\n default:\n throw new Error(\"geometry type \" + type + \" is not supported\");\n }\n}\n\n/**\n * Auto Complete Coords - matches first & last coordinates\n *\n * @private\n * @param {Array<Array<number>>} coords Coordinates\n * @returns {Array<Array<number>>} auto completed coordinates\n */\nfunction autoCompleteCoords(coords: Position[]) {\n var first = coords[0];\n var x1 = first[0];\n var y1 = first[1];\n var last = coords[coords.length - 1];\n var x2 = last[0];\n var y2 = last[1];\n if (x1 !== x2 || y1 !== y2) {\n coords.push(first);\n }\n return coords;\n}\n\n/**\n * area - quick approximate area calculation (used to sort)\n *\n * @private\n * @param {Array<number>} bbox BBox [west, south, east, north]\n * @returns {number} very quick area calculation\n */\nfunction calculateArea(bbox: BBox) {\n var west = bbox[0];\n var south = bbox[1];\n var east = bbox[2];\n var north = bbox[3];\n return Math.abs(west - east) * Math.abs(south - north);\n}\n\nexport { lineToPolygon };\nexport default lineToPolygon;\n"],"mappings":";AASA,SA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,cAAI,OAAO,aAAa;AACtB,wBAAY,QAAQ,KAAK;AACzB,0BAAc;AAAA,UAChB,MAAO,aAAY,KAAK,KAAK;AAAA,QAC/B,OAAO;AACL,sBAAY,KAAK,KAAK;AAAA,QACxB;AAAA,MACF,CAAC;AACD,aAAO,QAAQ,aAAa,UAAU;AAAA,IACxC;AACE,YAAM,IAAI,MAAM,mBAAmB,OAAO,mBAAmB;AAAA,EACjE;AACF;AASA,SAAS,mBAAmB,QAAoB;AAC9C,MAAI,QAAQ,OAAO,CAAC;AACpB,MAAI,KAAK,MAAM,CAAC;AAChB,MAAI,KAAK,MAAM,CAAC;AAChB,MAAI,OAAO,OAAO,OAAO,SAAS,CAAC;AACnC,MAAI,KAAK,KAAK,CAAC;AACf,MAAI,KAAK,KAAK,CAAC;AACf,MAAI,OAAO,MAAM,OAAO,IAAI;AAC1B,WAAO,KAAK,KAAK;AAAA,EACnB;AACA,SAAO;AACT;AASA,SAAS,cAAc,MAAY;AACjC,MAAI,OAAO,KAAK,CAAC;AACjB,MAAI,QAAQ,KAAK,CAAC;AAClB,MAAI,OAAO,KAAK,CAAC;AACjB,MAAI,QAAQ,KAAK,CAAC;AAClB,SAAO,KAAK,IAAI,OAAO,IAAI,IAAI,KAAK,IAAI,QAAQ,KAAK;AACvD;AAGA,IAAO,+BAAQ;","names":[]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n Feature,\n FeatureCollection,\n MultiLineString,\n LineString,\n GeoJsonProperties,\n BBox,\n Position,\n} from \"geojson\";\nimport { bbox as turfBBox } from \"@turf/bbox\";\nimport { getCoords, getGeom } from \"@turf/invariant\";\nimport { polygon, multiPolygon, lineString } from \"@turf/helpers\";\nimport { clone } from \"@turf/clone\";\n\n/**\n * Converts (Multi)LineString(s) to Polygon(s).\n *\n * @function\n * @param {FeatureCollection|Feature<LineString|MultiLineString>} lines Features to convert\n * @param {Object} [options={}] Optional parameters\n * @param {Object} [options.properties={}] translates GeoJSON properties to Feature\n * @param {boolean} [options.autoComplete=true] auto complete linestrings (matches first & last coordinates)\n * @param {boolean} [options.orderCoords=true] sorts linestrings to place outer ring at the first position of the coordinates\n * @param {boolean} [options.mutate=false] mutate the original linestring using autoComplete (matches first & last coordinates)\n * @returns {Feature<Polygon|MultiPolygon>} converted to Polygons\n * @example\n * var line = turf.lineString([[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]);\n *\n * var polygon = turf.lineToPolygon(line);\n *\n * //addToMap\n * var addToMap = [polygon];\n */\nfunction lineToPolygon<G extends LineString | MultiLineString>(\n lines: Feature<G> | FeatureCollection<G> | G,\n options: {\n properties?: GeoJsonProperties;\n autoComplete?: boolean;\n orderCoords?: boolean;\n mutate?: boolean;\n } = {}\n) {\n // Optional parameters\n var properties = options.properties;\n var autoComplete = options.autoComplete ?? true;\n var orderCoords = options.orderCoords ?? true;\n var mutate = options.mutate ?? false;\n\n if (!mutate) {\n lines = clone(lines);\n }\n\n switch (lines.type) {\n case \"FeatureCollection\":\n var coords: number[][][][] = [];\n lines.features.forEach(function (line) {\n coords.push(\n getCoords(lineStringToPolygon(line, {}, autoComplete, orderCoords))\n );\n });\n return multiPolygon(coords, properties);\n default:\n return lineStringToPolygon(lines, properties, autoComplete, orderCoords);\n }\n}\n\n/**\n * LineString to Polygon\n *\n * @private\n * @param {Feature<LineString|MultiLineString>} line line\n * @param {Object} [properties] translates GeoJSON properties to Feature\n * @param {boolean} [autoComplete=true] auto complete linestrings\n * @param {boolean} [orderCoords=true] sorts linestrings to place outer ring at the first position of the coordinates\n * @returns {Feature<Polygon>} line converted to Polygon\n */\nfunction lineStringToPolygon<G extends LineString | MultiLineString>(\n line: Feature<G> | G,\n properties: GeoJsonProperties | undefined,\n autoComplete: boolean,\n orderCoords: boolean\n) {\n properties = properties\n ? properties\n : line.type === \"Feature\"\n ? line.properties\n : {};\n var geom = getGeom(line);\n var coords: Position[] | Position[][] = geom.coordinates;\n var type = geom.type;\n\n if (!coords.length) throw new Error(\"line must contain coordinates\");\n\n switch (type) {\n case \"LineString\":\n if (autoComplete) coords = autoCompleteCoords(coords as Position[]);\n return polygon([coords as Position[]], properties);\n case \"MultiLineString\":\n var multiCoords: number[][][] = [];\n var largestArea = 0;\n\n (coords as Position[][]).forEach(function (coord) {\n if (autoComplete) coord = autoCompleteCoords(coord);\n\n // Largest LineString to be placed in the first position of the coordinates array\n if (orderCoords) {\n var area = calculateArea(turfBBox(lineString(coord)));\n if (area > largestArea) {\n multiCoords.unshift(coord);\n largestArea = area;\n } else multiCoords.push(coord);\n } else {\n multiCoords.push(coord);\n }\n });\n return polygon(multiCoords, properties);\n default:\n throw new Error(\"geometry type \" + type + \" is not supported\");\n }\n}\n\n/**\n * Auto Complete Coords - matches first & last coordinates\n *\n * @private\n * @param {Array<Array<number>>} coords Coordinates\n * @returns {Array<Array<number>>} auto completed coordinates\n */\nfunction autoCompleteCoords(coords: Position[]) {\n var first = coords[0];\n var x1 = first[0];\n var y1 = first[1];\n var last = coords[coords.length - 1];\n var x2 = last[0];\n var y2 = last[1];\n if (x1 !== x2 || y1 !== y2) {\n coords.push(first);\n }\n return coords;\n}\n\n/**\n * area - quick approximate area calculation (used to sort)\n *\n * @private\n * @param {Array<number>} bbox BBox [west, south, east, north]\n * @returns {number} very quick area calculation\n */\nfunction calculateArea(bbox: BBox) {\n var west = bbox[0];\n var south = bbox[1];\n var east = bbox[2];\n var north = bbox[3];\n return Math.abs(west - east) * Math.abs(south - north);\n}\n\nexport { lineToPolygon };\nexport default lineToPolygon;\n"],"mappings":";AASA,SAAS,QAAQ,gBAAgB;AACjC,SAAS,WAAW,eAAe;AACnC,SAAS,SAAS,cAAc,kBAAkB;AAClD,SAAS,aAAa;AAqBtB,SAAS,cACP,OACA,UAKI,CAAC,GACL;AAzCF;AA2CE,MAAI,aAAa,QAAQ;AACzB,MAAI,gBAAe,aAAQ,iBAAR,YAAwB;AAC3C,MAAI,eAAc,aAAQ,gBAAR,YAAuB;AACzC,MAAI,UAAS,aAAQ,WAAR,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,mBAAmB,QAAoB;AAC9C,MAAI,QAAQ,OAAO,CAAC;AACpB,MAAI,KAAK,MAAM,CAAC;AAChB,MAAI,KAAK,MAAM,CAAC;AAChB,MAAI,OAAO,OAAO,OAAO,SAAS,CAAC;AACnC,MAAI,KAAK,KAAK,CAAC;AACf,MAAI,KAAK,KAAK,CAAC;AACf,MAAI,OAAO,MAAM,OAAO,IAAI;AAC1B,WAAO,KAAK,KAAK;AAAA,EACnB;AACA,SAAO;AACT;AASA,SAAS,cAAc,MAAY;AACjC,MAAI,OAAO,KAAK,CAAC;AACjB,MAAI,QAAQ,KAAK,CAAC;AAClB,MAAI,OAAO,KAAK,CAAC;AACjB,MAAI,QAAQ,KAAK,CAAC;AAClB,SAAO,KAAK,IAAI,OAAO,IAAI,IAAI,KAAK,IAAI,QAAQ,KAAK;AACvD;AAGA,IAAO,gBAAQ;","names":[]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turf/line-to-polygon",
3
- "version": "7.2.0",
4
- "description": "turf line-to-polygon module",
3
+ "version": "7.3.0",
4
+ "description": "Converts line(s) to polygon(s).",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
7
7
  "Denis Carriere <@DenisCarriere>"
@@ -57,23 +57,23 @@
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/benchmark": "^2.1.5",
60
- "@types/tape": "^4.13.4",
60
+ "@types/tape": "^5.8.1",
61
61
  "benchmark": "^2.1.4",
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",
68
- "write-json-file": "^5.0.0"
65
+ "tsup": "^8.4.0",
66
+ "tsx": "^4.19.4",
67
+ "typescript": "^5.8.3",
68
+ "write-json-file": "^6.0.0"
69
69
  },
70
70
  "dependencies": {
71
- "@turf/bbox": "^7.2.0",
72
- "@turf/clone": "^7.2.0",
73
- "@turf/helpers": "^7.2.0",
74
- "@turf/invariant": "^7.2.0",
71
+ "@turf/bbox": "7.3.0",
72
+ "@turf/clone": "7.3.0",
73
+ "@turf/helpers": "7.3.0",
74
+ "@turf/invariant": "7.3.0",
75
75
  "@types/geojson": "^7946.0.10",
76
76
  "tslib": "^2.8.1"
77
77
  },
78
- "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
78
+ "gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
79
79
  }
@@ -62,9 +62,9 @@ function createMask(mask2) {
62
62
  }
63
63
  return _helpers.polygon.call(void 0, coordinates);
64
64
  }
65
- var turf_mask_default = mask;
65
+ var index_default = mask;
66
66
 
67
67
 
68
68
 
69
- exports.default = turf_mask_default; exports.mask = mask;
69
+ exports.default = index_default; exports.mask = mask;
70
70
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-mask/dist/cjs/index.cjs","../../index.ts"],"names":["mask"],"mappings":"AAAA;ACOA,wCAAuD;AACvD,8FAA0B;AAC1B,oCAAsB;AAqBtB,SAAS,IAAA,CACP,OAAA,EACAA,KAAAA,EACA,OAAA,EACkB;AAlCpB,EAAA,IAAA,EAAA;AAmCE,EAAA,MAAM,OAAA,EAAA,CAAS,GAAA,EAAA,QAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,OAAA,CAAS,MAAA,EAAA,GAAT,KAAA,EAAA,GAAA,EAAmB,KAAA;AAElC,EAAA,IAAI,aAAA,EAAeA,KAAAA;AACnB,EAAA,GAAA,CAAIA,MAAAA,GAAQ,OAAA,IAAW,KAAA,EAAO;AAE5B,IAAA,aAAA,EAAe,0BAAA,KAAU,CAAA;AAAA,EAC3B;AAGA,EAAA,MAAM,YAAA,EAAc,UAAA,CAAW,YAAY,CAAA;AAE3C,EAAA,IAAI,cAAA,EAAgB,IAAA;AACpB,EAAA,GAAA,CAAI,OAAA,CAAQ,KAAA,IAAS,mBAAA,EAAqB;AACx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AAA;AAC7B;AASA,SAAS,UAAA,CAAWA,KAAAA,EAA8C;AAChE,EAAA,MAAM,MAAA,EAAQ;AAAA,IACZ;AAAA,MACE,CAAC,GAAA,EAAK,EAAE,CAAA;AAAA,MACR,CAAC,CAAA,GAAA,EAAM,EAAE,CAAA;AAAA,MACT,CAAC,CAAA,GAAA,EAAM,CAAA,EAAG,CAAA;AAAA,MACV,CAAC,GAAA,EAAK,CAAA,EAAG,CAAA;AAAA,MACT,CAAC,GAAA,EAAK,EAAE;AAAA,IACV;AAAA,EACF,CAAA;AACA,EAAA,IAAI,YAAA,EAAc,KAAA;AAClB,EAAA,GAAA,CAAIA,KAAAA,EAAM;AACR,IAAA,GAAA,CAAIA,KAAAA,CAAK,KAAA,IAAS,SAAA,EAAW;AAE3B,MAAA,YAAA,EAAcA,KAAAA,CAAK,QAAA,CAAS,WAAA;AAAA,IAC9B,EAAA,KAAO;AAEL,MAAA,YAAA,EAAcA,KAAAA,CAAK,WAAA;AAAA,IACrB;AAAA,EACF;AACA,EAAA,OAAO,8BAAA,WAAyB,CAAA;AAClC;AAGA,IAAO,kBAAA,EAAQ,IAAA;ADhEf;AACE;AACA;AACF,yDAAC","file":"/home/runner/work/turf/turf/packages/turf-mask/dist/cjs/index.cjs","sourcesContent":[null,"import {\n Feature,\n FeatureCollection,\n Polygon,\n Position,\n MultiPolygon,\n} from \"geojson\";\nimport { polygon as createPolygon, multiPolygon } from \"@turf/helpers\";\nimport * as polyclip from \"polyclip-ts\";\nimport { clone } from \"@turf/clone\";\n\n/**\n * Takes polygons or multipolygons and an optional mask, and returns an exterior\n * ring polygon with holes.\n *\n * @function\n * @param {Polygon|MultiPolygon|Feature<Polygon|MultiPolygon>|FeatureCollection<Polygon|MultiPolygon>} polygon GeoJSON polygon used as interior rings or holes\n * @param {Polygon|Feature<Polygon>} [mask] GeoJSON polygon used as the exterior ring (if undefined, the world extent is used)\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.mutate=false] allows the `mask` GeoJSON input to be mutated (performance improvement if true)\n * @returns {Feature<Polygon>} Masked Polygon (exterior ring with holes)\n * @example\n * const polygon = turf.polygon([[[112, -21], [116, -36], [146, -39], [153, -24], [133, -10], [112, -21]]]);\n * const mask = turf.polygon([[[90, -55], [170, -55], [170, 10], [90, 10], [90, -55]]]);\n *\n * const masked = turf.mask(polygon, mask);\n *\n * //addToMap\n * const addToMap = [masked]\n */\nfunction mask<T extends Polygon | MultiPolygon>(\n polygon: T | Feature<T> | FeatureCollection<T>,\n mask?: Polygon | Feature<Polygon>,\n options?: { mutate?: boolean }\n): Feature<Polygon> {\n const mutate = options?.mutate ?? false; // by default, do not mutate\n\n let maskTemplate = mask;\n if (mask && mutate === false) {\n // Clone mask if requested to avoid side effects\n maskTemplate = clone(mask);\n }\n\n // Define initial mask\n const maskPolygon = createMask(maskTemplate);\n\n let polygonOuters = null;\n if (polygon.type === \"FeatureCollection\") {\n polygonOuters = unionFc(polygon);\n } else if (polygon.type === \"Feature\") {\n // Need to cast below as Position[][] isn't quite as strict as Geom, even\n // though they should be equivalent.\n polygonOuters = createGeomFromPolygonClippingOutput(\n polyclip.union(polygon.geometry.coordinates as polyclip.Geom)\n );\n } else {\n // Geometry\n // Need to cast below as Position[][] isn't quite as strict as Geom, even\n // though they should be equivalent.\n polygonOuters = createGeomFromPolygonClippingOutput(\n polyclip.union(polygon.coordinates as polyclip.Geom)\n );\n }\n\n polygonOuters.geometry.coordinates.forEach(function (contour) {\n maskPolygon.geometry.coordinates.push(contour[0]);\n });\n\n return maskPolygon;\n}\n\nfunction unionFc(fc: FeatureCollection<Polygon | MultiPolygon>) {\n // Need to cast below as Position[][] isn't quite as strict as Geom, even\n // though they should be equivalent.\n\n // Stick with apply() below as spread operator degrades performance. Have\n // to disable prefer-spread lint rule though.\n /* eslint-disable prefer-spread */\n const unioned =\n fc.features.length === 2\n ? polyclip.union(\n fc.features[0].geometry.coordinates as polyclip.Geom,\n fc.features[1].geometry.coordinates as polyclip.Geom\n )\n : polyclip.union.apply(\n polyclip,\n fc.features.map(function (f) {\n return f.geometry.coordinates;\n }) as [polyclip.Geom, ...polyclip.Geom[]]\n );\n /* eslint-enable */\n return createGeomFromPolygonClippingOutput(unioned);\n}\n\nfunction createGeomFromPolygonClippingOutput(unioned: Position[][][]) {\n return multiPolygon(unioned);\n}\n\n/**\n * Create Mask Coordinates\n *\n * @private\n * @param {Feature<Polygon>} [mask] default to world if undefined\n * @returns {Feature<Polygon>} mask as a polygon\n */\nfunction createMask(mask: Feature<Polygon> | Polygon | undefined) {\n const world = [\n [\n [180, 90],\n [-180, 90],\n [-180, -90],\n [180, -90],\n [180, 90],\n ],\n ];\n let coordinates = world;\n if (mask) {\n if (mask.type === \"Feature\") {\n // polygon feature\n coordinates = mask.geometry.coordinates;\n } else {\n // polygon geometry\n coordinates = mask.coordinates;\n }\n }\n return createPolygon(coordinates);\n}\n\nexport { mask };\nexport default mask;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-mask/dist/cjs/index.cjs","../../index.ts"],"names":["mask"],"mappings":"AAAA;ACOA,wCAAuD;AACvD,8FAA0B;AAC1B,oCAAsB;AAqBtB,SAAS,IAAA,CACP,OAAA,EACAA,KAAAA,EACA,OAAA,EACkB;AAlCpB,EAAA,IAAA,EAAA;AAmCE,EAAA,MAAM,OAAA,EAAA,CAAS,GAAA,EAAA,QAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,OAAA,CAAS,MAAA,EAAA,GAAT,KAAA,EAAA,GAAA,EAAmB,KAAA;AAElC,EAAA,IAAI,aAAA,EAAeA,KAAAA;AACnB,EAAA,GAAA,CAAIA,MAAAA,GAAQ,OAAA,IAAW,KAAA,EAAO;AAE5B,IAAA,aAAA,EAAe,0BAAA,KAAU,CAAA;AAAA,EAC3B;AAGA,EAAA,MAAM,YAAA,EAAc,UAAA,CAAW,YAAY,CAAA;AAE3C,EAAA,IAAI,cAAA,EAAgB,IAAA;AACpB,EAAA,GAAA,CAAI,OA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EAAyB;AACpE,EAAA,OAAO,mCAAA,OAAoB,CAAA;AAC7B;AASA,SAAS,UAAA,CAAWA,KAAAA,EAA8C;AAChE,EAAA,MAAM,MAAA,EAAQ;AAAA,IACZ;AAAA,MACE,CAAC,GAAA,EAAK,EAAE,CAAA;AAAA,MACR,CAAC,CAAA,GAAA,EAAM,EAAE,CAAA;AAAA,MACT,CAAC,CAAA,GAAA,EAAM,CAAA,EAAG,CAAA;AAAA,MACV,CAAC,GAAA,EAAK,CAAA,EAAG,CAAA;AAAA,MACT,CAAC,GAAA,EAAK,EAAE;AAAA,IACV;AAAA,EACF,CAAA;AACA,EAAA,IAAI,YAAA,EAAc,KAAA;AAClB,EAAA,GAAA,CAAIA,KAAAA,EAAM;AACR,IAAA,GAAA,CAAIA,KAAAA,CAAK,KAAA,IAAS,SAAA,EAAW;AAE3B,MAAA,YAAA,EAAcA,KAAAA,CAAK,QAAA,CAAS,WAAA;AAAA,IAC9B,EAAA,KAAO;AAEL,MAAA,YAAA,EAAcA,KAAAA,CAAK,WAAA;AAAA,IACrB;AAAA,EACF;AACA,EAAA,OAAO,8BAAA,WAAyB,CAAA;AAClC;AAGA,IAAO,cAAA,EAAQ,IAAA;ADhEf;AACE;AACA;AACF,qDAAC","file":"/home/runner/work/turf/turf/packages/turf-mask/dist/cjs/index.cjs","sourcesContent":[null,"import {\n Feature,\n FeatureCollection,\n Polygon,\n Position,\n MultiPolygon,\n} from \"geojson\";\nimport { polygon as createPolygon, multiPolygon } from \"@turf/helpers\";\nimport * as polyclip from \"polyclip-ts\";\nimport { clone } from \"@turf/clone\";\n\n/**\n * Takes polygons or multipolygons and an optional mask, and returns an exterior\n * ring polygon with holes.\n *\n * @function\n * @param {Polygon|MultiPolygon|Feature<Polygon|MultiPolygon>|FeatureCollection<Polygon|MultiPolygon>} polygon GeoJSON polygon used as interior rings or holes\n * @param {Polygon|Feature<Polygon>} [mask] GeoJSON polygon used as the exterior ring (if undefined, the world extent is used)\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.mutate=false] allows the `mask` GeoJSON input to be mutated (performance improvement if true)\n * @returns {Feature<Polygon>} Masked Polygon (exterior ring with holes)\n * @example\n * const polygon = turf.polygon([[[112, -21], [116, -36], [146, -39], [153, -24], [133, -10], [112, -21]]]);\n * const mask = turf.polygon([[[90, -55], [170, -55], [170, 10], [90, 10], [90, -55]]]);\n *\n * const masked = turf.mask(polygon, mask);\n *\n * //addToMap\n * const addToMap = [masked]\n */\nfunction mask<T extends Polygon | MultiPolygon>(\n polygon: T | Feature<T> | FeatureCollection<T>,\n mask?: Polygon | Feature<Polygon>,\n options?: { mutate?: boolean }\n): Feature<Polygon> {\n const mutate = options?.mutate ?? false; // by default, do not mutate\n\n let maskTemplate = mask;\n if (mask && mutate === false) {\n // Clone mask if requested to avoid side effects\n maskTemplate = clone(mask);\n }\n\n // Define initial mask\n const maskPolygon = createMask(maskTemplate);\n\n let polygonOuters = null;\n if (polygon.type === \"FeatureCollection\") {\n polygonOuters = unionFc(polygon);\n } else if (polygon.type === \"Feature\") {\n // Need to cast below as Position[][] isn't quite as strict as Geom, even\n // though they should be equivalent.\n polygonOuters = createGeomFromPolygonClippingOutput(\n polyclip.union(polygon.geometry.coordinates as polyclip.Geom)\n );\n } else {\n // Geometry\n // Need to cast below as Position[][] isn't quite as strict as Geom, even\n // though they should be equivalent.\n polygonOuters = createGeomFromPolygonClippingOutput(\n polyclip.union(polygon.coordinates as polyclip.Geom)\n );\n }\n\n polygonOuters.geometry.coordinates.forEach(function (contour) {\n maskPolygon.geometry.coordinates.push(contour[0]);\n });\n\n return maskPolygon;\n}\n\nfunction unionFc(fc: FeatureCollection<Polygon | MultiPolygon>) {\n // Need to cast below as Position[][] isn't quite as strict as Geom, even\n // though they should be equivalent.\n\n // Stick with apply() below as spread operator degrades performance. Have\n // to disable prefer-spread lint rule though.\n /* eslint-disable prefer-spread */\n const unioned =\n fc.features.length === 2\n ? polyclip.union(\n fc.features[0].geometry.coordinates as polyclip.Geom,\n fc.features[1].geometry.coordinates as polyclip.Geom\n )\n : polyclip.union.apply(\n polyclip,\n fc.features.map(function (f) {\n return f.geometry.coordinates;\n }) as [polyclip.Geom, ...polyclip.Geom[]]\n );\n /* eslint-enable */\n return createGeomFromPolygonClippingOutput(unioned);\n}\n\nfunction createGeomFromPolygonClippingOutput(unioned: Position[][][]) {\n return multiPolygon(unioned);\n}\n\n/**\n * Create Mask Coordinates\n *\n * @private\n * @param {Feature<Polygon>} [mask] default to world if undefined\n * @returns {Feature<Polygon>} mask as a polygon\n */\nfunction createMask(mask: Feature<Polygon> | Polygon | undefined) {\n const world = [\n [\n [180, 90],\n [-180, 90],\n [-180, -90],\n [180, -90],\n [180, 90],\n ],\n ];\n let coordinates = world;\n if (mask) {\n if (mask.type === \"Feature\") {\n // polygon feature\n coordinates = mask.geometry.coordinates;\n } else {\n // polygon geometry\n coordinates = mask.coordinates;\n }\n }\n return createPolygon(coordinates);\n}\n\nexport { mask };\nexport default mask;\n"]}
@@ -62,9 +62,9 @@ function createMask(mask2) {
62
62
  }
63
63
  return createPolygon(coordinates);
64
64
  }
65
- var turf_mask_default = mask;
65
+ var index_default = mask;
66
66
  export {
67
- turf_mask_default as default,
67
+ index_default as default,
68
68
  mask
69
69
  };
70
70
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n Feature,\n FeatureCollection,\n Polygon,\n Position,\n MultiPolygon,\n} from \"geojson\";\nimport { polygon as createPolygon, multiPolygon } from \"@turf/helpers\";\nimport * as polyclip from \"polyclip-ts\";\nimport { clone } from \"@turf/clone\";\n\n/**\n * Takes polygons or multipolygons and an optional mask, and returns an exterior\n * ring polygon with holes.\n *\n * @function\n * @param {Polygon|MultiPolygon|Feature<Polygon|MultiPolygon>|FeatureCollection<Polygon|MultiPolygon>} polygon GeoJSON polygon used as interior rings or holes\n * @param {Polygon|Feature<Polygon>} [mask] GeoJSON polygon used as the exterior ring (if undefined, the world extent is used)\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.mutate=false] allows the `mask` GeoJSON input to be mutated (performance improvement if true)\n * @returns {Feature<Polygon>} Masked Polygon (exterior ring with holes)\n * @example\n * const polygon = turf.polygon([[[112, -21], [116, -36], [146, -39], [153, -24], [133, -10], [112, -21]]]);\n * const mask = turf.polygon([[[90, -55], [170, -55], [170, 10], [90, 10], [90, -55]]]);\n *\n * const masked = turf.mask(polygon, mask);\n *\n * //addToMap\n * const addToMap = [masked]\n */\nfunction mask<T extends Polygon | MultiPolygon>(\n polygon: T | Feature<T> | FeatureCollection<T>,\n mask?: Polygon | Feature<Polygon>,\n options?: { mutate?: boolean }\n): Feature<Polygon> {\n const mutate = options?.mutate ?? false; // by default, do not mutate\n\n let maskTemplate = mask;\n if (mask && mutate === false) {\n // Clone mask if requested to avoid side effects\n maskTemplate = clone(mask);\n }\n\n // Define initial mask\n const maskPolygon = createMask(maskTemplate);\n\n let polygonOuters = null;\n if (polygon.type === \"FeatureCollection\") {\n polygonOuters = unionFc(polygon);\n } else if (polygon.type === \"Feature\") {\n // Need to cast below as Position[][] isn't quite as strict as Geom, even\n // though they should be equivalent.\n polygonOuters = createGeomFromPolygonClippingOutput(\n polyclip.union(polygon.geometry.coordinates as polyclip.Geom)\n );\n } else {\n // Geometry\n // Need to cast below as Position[][] isn't quite as strict as Geom, even\n // though they should be equivalent.\n polygonOuters = createGeomFromPolygonClippingOutput(\n polyclip.union(polygon.coordinates as polyclip.Geom)\n );\n }\n\n polygonOuters.geometry.coordinates.forEach(function (contour) {\n maskPolygon.geometry.coordinates.push(contour[0]);\n });\n\n return maskPolygon;\n}\n\nfunction unionFc(fc: FeatureCollection<Polygon | MultiPolygon>) {\n // Need to cast below as Position[][] isn't quite as strict as Geom, even\n // though they should be equivalent.\n\n // Stick with apply() below as spread operator degrades performance. Have\n // to disable prefer-spread lint rule though.\n /* eslint-disable prefer-spread */\n const unioned =\n fc.features.length === 2\n ? polyclip.union(\n fc.features[0].geometry.coordinates as polyclip.Geom,\n fc.features[1].geometry.coordinates as polyclip.Geom\n )\n : polyclip.union.apply(\n polyclip,\n fc.features.map(function (f) {\n return f.geometry.coordinates;\n }) as [polyclip.Geom, ...polyclip.Geom[]]\n );\n /* eslint-enable */\n return createGeomFromPolygonClippingOutput(unioned);\n}\n\nfunction createGeomFromPolygonClippingOutput(unioned: Position[][][]) {\n return multiPolygon(unioned);\n}\n\n/**\n * Create Mask Coordinates\n *\n * @private\n * @param {Feature<Polygon>} [mask] default to world if undefined\n * @returns {Feature<Polygon>} mask as a polygon\n */\nfunction createMask(mask: Feature<Polygon> | Polygon | undefined) {\n const world = [\n [\n [180, 90],\n [-180, 90],\n [-180, -90],\n [180, -90],\n [180, 90],\n ],\n ];\n let coordinates = world;\n if (mask) {\n if (mask.type === \"Feature\") {\n // polygon feature\n coordinates = mask.geometry.coordinates;\n } else {\n // polygon geometry\n coordinates = mask.coordinates;\n }\n }\n return createPolygon(coordinates);\n}\n\nexport { mask };\nexport default mask;\n"],"mappings":";AAOA,SAAS,WAAW,eAAe,oBAAoB;AACvD,YAAY,cAAc;AAC1B,SAAS,aAAa;AAqBtB,SAAS,KACP,SACAA,OACA,SACkB;AAlCpB;AAmCE,QAAM,UAAS,wCAAS,WAAT,YAAmB;AAElC,MAAI,eAAeA;AACnB,MAAIA,SAAQ,WAAW,OAAO;AAE5B,mBAAe,MAAMA,KAAI;AAAA,EAC3B;AAGA,QAAM,cAAc,WAAW,YAAY;AAE3C,MAAI,gBAAgB;AACpB,MAAI,QAAQ,SAAS,qBAAqB;AACxC,oBAAgB,QAAQ,OAAO;AAAA,EACjC,WAAW,QAAQ,SAAS,WAAW;AAGrC,oBAAgB;AAAA,MACL,eAAM,QAAQ,SAAS,WAA4B;AAAA,IAC9D;AAAA,EACF,OAAO;AAIL,oBAAgB;AAAA,MACL,eAAM,QAAQ,WAA4B;AAAA,IACrD;AAAA,EACF;AAEA,gBAAc,SAAS,YAAY,QAAQ,SAAU,SAAS;AAC5D,gBAAY,SAAS,YAAY,KAAK,QAAQ,CAAC,CAAC;AAAA,EAClD,CAAC;AAED,SAAO;AACT;AAEA,SAAS,QAAQ,IAA+C;AAO9D,QAAM,UACJ,GAAG,SAAS,WAAW,IACV;AAAA,IACP,GAAG,SAAS,CAAC,EAAE,SAAS;AAAA,IACxB,GAAG,SAAS,CAAC,EAAE,SAAS;AAAA,EAC1B,IACS,eAAM;AAAA,IACb;AAAA,IACA,GAAG,SAAS,IAAI,SAAU,GAAG;AAC3B,aAAO,EAAE,SAAS;AAAA,IACpB,CAAC;AAAA,EACH;AAEN,SAAO,oCAAoC,OAAO;AACpD;AAEA,SAAS,oCAAoC,SAAyB;AACpE,SAAO,aAAa,OAAO;AAC7B;AASA,SAAS,WAAWA,OAA8C;AAChE,QAAM,QAAQ;AAAA,IACZ;AAAA,MACE,CAAC,KAAK,EAAE;AAAA,MACR,CAAC,MAAM,EAAE;AAAA,MACT,CAAC,MAAM,GAAG;AAAA,MACV,CAAC,KAAK,GAAG;AAAA,MACT,CAAC,KAAK,EAAE;AAAA,IACV;AAAA,EACF;AACA,MAAI,cAAc;AAClB,MAAIA,OAAM;AACR,QAAIA,MAAK,SAAS,WAAW;AAE3B,oBAAcA,MAAK,SAAS;AAAA,IAC9B,OAAO;AAEL,oBAAcA,MAAK;AAAA,IACrB;AAAA,EACF;AACA,SAAO,cAAc,WAAW;AAClC;AAGA,IAAO,oBAAQ;","names":["mask"]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n Feature,\n FeatureCollection,\n Polygon,\n Position,\n MultiPolygon,\n} from \"geojson\";\nimport { polygon as createPolygon, multiPolygon } from \"@turf/helpers\";\nimport * as polyclip from \"polyclip-ts\";\nimport { clone } from \"@turf/clone\";\n\n/**\n * Takes polygons or multipolygons and an optional mask, and returns an exterior\n * ring polygon with holes.\n *\n * @function\n * @param {Polygon|MultiPolygon|Feature<Polygon|MultiPolygon>|FeatureCollection<Polygon|MultiPolygon>} polygon GeoJSON polygon used as interior rings or holes\n * @param {Polygon|Feature<Polygon>} [mask] GeoJSON polygon used as the exterior ring (if undefined, the world extent is used)\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.mutate=false] allows the `mask` GeoJSON input to be mutated (performance improvement if true)\n * @returns {Feature<Polygon>} Masked Polygon (exterior ring with holes)\n * @example\n * const polygon = turf.polygon([[[112, -21], [116, -36], [146, -39], [153, -24], [133, -10], [112, -21]]]);\n * const mask = turf.polygon([[[90, -55], [170, -55], [170, 10], [90, 10], [90, -55]]]);\n *\n * const masked = turf.mask(polygon, mask);\n *\n * //addToMap\n * const addToMap = [masked]\n */\nfunction mask<T extends Polygon | MultiPolygon>(\n polygon: T | Feature<T> | FeatureCollection<T>,\n mask?: Polygon | Feature<Polygon>,\n options?: { mutate?: boolean }\n): Feature<Polygon> {\n const mutate = options?.mutate ?? false; // by default, do not mutate\n\n let maskTemplate = mask;\n if (mask && mutate === false) {\n // Clone mask if requested to avoid side effects\n maskTemplate = clone(mask);\n }\n\n // Define initial mask\n const maskPolygon = createMask(maskTemplate);\n\n let polygonOuters = null;\n if (polygon.type === \"FeatureCollection\") {\n polygonOuters = unionFc(polygon);\n } else if (polygon.type === \"Feature\") {\n // Need to cast below as Position[][] isn't quite as strict as Geom, even\n // though they should be equivalent.\n polygonOuters = createGeomFromPolygonClippingOutput(\n polyclip.union(polygon.geometry.coordinates as polyclip.Geom)\n );\n } else {\n // Geometry\n // Need to cast below as Position[][] isn't quite as strict as Geom, even\n // though they should be equivalent.\n polygonOuters = createGeomFromPolygonClippingOutput(\n polyclip.union(polygon.coordinates as polyclip.Geom)\n );\n }\n\n polygonOuters.geometry.coordinates.forEach(function (contour) {\n maskPolygon.geometry.coordinates.push(contour[0]);\n });\n\n return maskPolygon;\n}\n\nfunction unionFc(fc: FeatureCollection<Polygon | MultiPolygon>) {\n // Need to cast below as Position[][] isn't quite as strict as Geom, even\n // though they should be equivalent.\n\n // Stick with apply() below as spread operator degrades performance. Have\n // to disable prefer-spread lint rule though.\n /* eslint-disable prefer-spread */\n const unioned =\n fc.features.length === 2\n ? polyclip.union(\n fc.features[0].geometry.coordinates as polyclip.Geom,\n fc.features[1].geometry.coordinates as polyclip.Geom\n )\n : polyclip.union.apply(\n polyclip,\n fc.features.map(function (f) {\n return f.geometry.coordinates;\n }) as [polyclip.Geom, ...polyclip.Geom[]]\n );\n /* eslint-enable */\n return createGeomFromPolygonClippingOutput(unioned);\n}\n\nfunction createGeomFromPolygonClippingOutput(unioned: Position[][][]) {\n return multiPolygon(unioned);\n}\n\n/**\n * Create Mask Coordinates\n *\n * @private\n * @param {Feature<Polygon>} [mask] default to world if undefined\n * @returns {Feature<Polygon>} mask as a polygon\n */\nfunction createMask(mask: Feature<Polygon> | Polygon | undefined) {\n const world = [\n [\n [180, 90],\n [-180, 90],\n [-180, -90],\n [180, -90],\n [180, 90],\n ],\n ];\n let coordinates = world;\n if (mask) {\n if (mask.type === \"Feature\") {\n // polygon feature\n coordinates = mask.geometry.coordinates;\n } else {\n // polygon geometry\n coordinates = mask.coordinates;\n }\n }\n return createPolygon(coordinates);\n}\n\nexport { mask };\nexport default mask;\n"],"mappings":";AAOA,SAAS,WAAW,eAAe,oBAAoB;AACvD,YAAY,cAAc;AAC1B,SAAS,aAAa;AAqBtB,SAAS,KACP,SACAA,OACA,SACkB;AAlCpB;AAmCE,QAAM,UAAS,wCAAS,WAAT,YAAmB;AAElC,MAAI,eAAeA;AACnB,MAAIA,SAAQ,WAAW,OAAO;AAE5B,mBAAe,MAAMA,KAAI;AAAA,EAC3B;AAGA,QAAM,cAAc,WAAW,YAAY;AAE3C,MAAI,gBAAgB;AACpB,MAAI,QAAQ,SAAS,qBAAqB;AACxC,oBAAgB,QAAQ,OAAO;AAAA,EACjC,WAAW,QAAQ,SAAS,WAAW;AAGrC,oBAAgB;AAAA,MACL,eAAM,QAAQ,SAAS,WAA4B;AAAA,IAC9D;AAAA,EACF,OAAO;AAIL,oBAAgB;AAAA,MACL,eAAM,QAAQ,WAA4B;AAAA,IACrD;AAAA,EACF;AAEA,gBAAc,SAAS,YAAY,QAAQ,SAAU,SAAS;AAC5D,gBAAY,SAAS,YAAY,KAAK,QAAQ,CAAC,CAAC;AAAA,EAClD,CAAC;AAED,SAAO;AACT;AAEA,SAAS,QAAQ,IAA+C;AAO9D,QAAM,UACJ,GAAG,SAAS,WAAW,IACV;AAAA,IACP,GAAG,SAAS,CAAC,EAAE,SAAS;AAAA,IACxB,GAAG,SAAS,CAAC,EAAE,SAAS;AAAA,EAC1B,IACS,eAAM;AAAA,IACb;AAAA,IACA,GAAG,SAAS,IAAI,SAAU,GAAG;AAC3B,aAAO,EAAE,SAAS;AAAA,IACpB,CAAC;AAAA,EACH;AAEN,SAAO,oCAAoC,OAAO;AACpD;AAEA,SAAS,oCAAoC,SAAyB;AACpE,SAAO,aAAa,OAAO;AAC7B;AASA,SAAS,WAAWA,OAA8C;AAChE,QAAM,QAAQ;AAAA,IACZ;AAAA,MACE,CAAC,KAAK,EAAE;AAAA,MACR,CAAC,MAAM,EAAE;AAAA,MACT,CAAC,MAAM,GAAG;AAAA,MACV,CAAC,KAAK,GAAG;AAAA,MACT,CAAC,KAAK,EAAE;AAAA,IACV;AAAA,EACF;AACA,MAAI,cAAc;AAClB,MAAIA,OAAM;AACR,QAAIA,MAAK,SAAS,WAAW;AAE3B,oBAAcA,MAAK,SAAS;AAAA,IAC9B,OAAO;AAEL,oBAAcA,MAAK;AAAA,IACrB;AAAA,EACF;AACA,SAAO,cAAc,WAAW;AAClC;AAGA,IAAO,gBAAQ;","names":["mask"]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turf/mask",
3
- "version": "7.2.0",
4
- "description": "turf mask module",
3
+ "version": "7.3.0",
4
+ "description": "Takes polygons or multipolygons and an optional mask, and returns an exterior ring polygon with holes.",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
7
7
  "bugs": {
@@ -52,23 +52,23 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/benchmark": "^2.1.5",
55
- "@types/tape": "^4.13.4",
55
+ "@types/tape": "^5.8.1",
56
56
  "benchmark": "^2.1.4",
57
57
  "load-json-file": "^7.0.1",
58
58
  "mkdirp": "^3.0.1",
59
59
  "npm-run-all": "^4.1.5",
60
60
  "tape": "^5.9.0",
61
- "tsup": "^8.3.5",
62
- "tsx": "^4.19.2",
63
- "typescript": "^5.5.4",
64
- "write-json-file": "^5.0.0"
61
+ "tsup": "^8.4.0",
62
+ "tsx": "^4.19.4",
63
+ "typescript": "^5.8.3",
64
+ "write-json-file": "^6.0.0"
65
65
  },
66
66
  "dependencies": {
67
- "@turf/clone": "^7.2.0",
68
- "@turf/helpers": "^7.2.0",
67
+ "@turf/clone": "7.3.0",
68
+ "@turf/helpers": "7.3.0",
69
69
  "@types/geojson": "^7946.0.10",
70
70
  "polyclip-ts": "^0.16.8",
71
71
  "tslib": "^2.8.1"
72
72
  },
73
- "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
73
+ "gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
74
74
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turf/meta",
3
- "version": "7.2.0",
4
- "description": "turf meta module",
3
+ "version": "7.3.0",
4
+ "description": "Provides tools for iterating over and manipulating GeoJSON objects.",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
7
7
  "Tom MacWright <@tmcw>",
@@ -73,17 +73,17 @@
73
73
  "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"
74
74
  },
75
75
  "devDependencies": {
76
- "@turf/random": "^7.2.0",
76
+ "@turf/random": "7.3.0",
77
77
  "@types/benchmark": "^2.1.5",
78
78
  "benchmark": "^2.1.4",
79
79
  "npm-run-all": "^4.1.5",
80
80
  "tape": "^5.9.0",
81
- "tsup": "^8.3.5",
82
- "tsx": "^4.19.2"
81
+ "tsup": "^8.4.0",
82
+ "tsx": "^4.19.4"
83
83
  },
84
84
  "dependencies": {
85
- "@turf/helpers": "^7.2.0",
85
+ "@turf/helpers": "7.3.0",
86
86
  "@types/geojson": "^7946.0.10"
87
87
  },
88
- "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
88
+ "gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
89
89
  }
@@ -8,9 +8,9 @@ function midpoint(point1, point2) {
8
8
  const midpoint2 = _destination.destination.call(void 0, point1, dist / 2, heading);
9
9
  return midpoint2;
10
10
  }
11
- var turf_midpoint_default = midpoint;
11
+ var index_default = midpoint;
12
12
 
13
13
 
14
14
 
15
- exports.default = turf_midpoint_default; exports.midpoint = midpoint;
15
+ exports.default = index_default; exports.midpoint = midpoint;
16
16
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-midpoint/dist/cjs/index.cjs","../../index.ts"],"names":["midpoint"],"mappings":"AAAA;ACCA,wCAAwB;AACxB,gDAA4B;AAC5B,0CAAyB;AAsBzB,SAAS,QAAA,CAAS,MAAA,EAAe,MAAA,EAA+B;AAC9D,EAAA,MAAM,KAAA,EAAO,gCAAA,MAAS,EAAQ,MAAM,CAAA;AACpC,EAAA,MAAM,QAAA,EAAU,8BAAA,MAAQ,EAAQ,MAAM,CAAA;AACtC,EAAA,MAAMA,UAAAA,EAAW,sCAAA,MAAY,EAAQ,KAAA,EAAO,CAAA,EAAG,OAAO,CAAA;AAEtD,EAAA,OAAOA,SAAAA;AACT;AAGA,IAAO,sBAAA,EAAQ,QAAA;ADvBf;AACE;AACA;AACF,qEAAC","file":"/home/runner/work/turf/turf/packages/turf-midpoint/dist/cjs/index.cjs","sourcesContent":[null,"import { Feature, Point } from \"geojson\";\nimport { bearing } from \"@turf/bearing\";\nimport { destination } from \"@turf/destination\";\nimport { distance } from \"@turf/distance\";\nimport { Coord } from \"@turf/helpers\";\n\n/**\n * Takes two points and returns a point midway between them. The midpoint is\n * calculated geodesically, meaning the curvature of the earth is taken into\n * account.\n *\n * @function\n * @param {Coord} point1 first point\n * @param {Coord} point2 second point\n * @returns {Feature<Point>} a point midway between `pt1` and `pt2`\n * @example\n * const point1 = turf.point([144.834823, -37.771257]);\n * const point2 = turf.point([145.14244, -37.830937]);\n *\n * const midpoint = turf.midpoint(point1, point2);\n *\n * //addToMap\n * const addToMap = [point1, point2, midpoint];\n * midpoint.properties['marker-color'] = '#f00';\n */\nfunction midpoint(point1: Coord, point2: Coord): Feature<Point> {\n const dist = distance(point1, point2);\n const heading = bearing(point1, point2);\n const midpoint = destination(point1, dist / 2, heading);\n\n return midpoint;\n}\n\nexport { midpoint };\nexport default midpoint;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-midpoint/dist/cjs/index.cjs","../../index.ts"],"names":["midpoint"],"mappings":"AAAA;ACCA,wCAAwB;AACxB,gDAA4B;AAC5B,0CAAyB;AAsBzB,SAAS,QAAA,CAAS,MAAA,EAAe,MAAA,EAA+B;AAC9D,EAAA,MAAM,KAAA,EAAO,gCAAA,MAAS,EAAQ,MAAM,CAAA;AACpC,EAAA,MAAM,QAAA,EAAU,8BAAA,MAAQ,EAAQ,MAAM,CAAA;AACtC,EAAA,MAAMA,UAAAA,EAAW,sCAAA,MAAY,EAAQ,KAAA,EAAO,CAAA,EAAG,OAAO,CAAA;AAEtD,EAAA,OAAOA,SAAAA;AACT;AAGA,IAAO,cAAA,EAAQ,QAAA;ADvBf;AACE;AACA;AACF,6DAAC","file":"/home/runner/work/turf/turf/packages/turf-midpoint/dist/cjs/index.cjs","sourcesContent":[null,"import { Feature, Point } from \"geojson\";\nimport { bearing } from \"@turf/bearing\";\nimport { destination } from \"@turf/destination\";\nimport { distance } from \"@turf/distance\";\nimport { Coord } from \"@turf/helpers\";\n\n/**\n * Takes two points and returns a point midway between them. The midpoint is\n * calculated geodesically, meaning the curvature of the earth is taken into\n * account.\n *\n * @function\n * @param {Coord} point1 first point\n * @param {Coord} point2 second point\n * @returns {Feature<Point>} a point midway between `pt1` and `pt2`\n * @example\n * const point1 = turf.point([144.834823, -37.771257]);\n * const point2 = turf.point([145.14244, -37.830937]);\n *\n * const midpoint = turf.midpoint(point1, point2);\n *\n * //addToMap\n * const addToMap = [point1, point2, midpoint];\n * midpoint.properties['marker-color'] = '#f00';\n */\nfunction midpoint(point1: Coord, point2: Coord): Feature<Point> {\n const dist = distance(point1, point2);\n const heading = bearing(point1, point2);\n const midpoint = destination(point1, dist / 2, heading);\n\n return midpoint;\n}\n\nexport { midpoint };\nexport default midpoint;\n"]}
@@ -8,9 +8,9 @@ function midpoint(point1, point2) {
8
8
  const midpoint2 = destination(point1, dist / 2, heading);
9
9
  return midpoint2;
10
10
  }
11
- var turf_midpoint_default = midpoint;
11
+ var index_default = midpoint;
12
12
  export {
13
- turf_midpoint_default as default,
13
+ index_default as default,
14
14
  midpoint
15
15
  };
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, Point } from \"geojson\";\nimport { bearing } from \"@turf/bearing\";\nimport { destination } from \"@turf/destination\";\nimport { distance } from \"@turf/distance\";\nimport { Coord } from \"@turf/helpers\";\n\n/**\n * Takes two points and returns a point midway between them. The midpoint is\n * calculated geodesically, meaning the curvature of the earth is taken into\n * account.\n *\n * @function\n * @param {Coord} point1 first point\n * @param {Coord} point2 second point\n * @returns {Feature<Point>} a point midway between `pt1` and `pt2`\n * @example\n * const point1 = turf.point([144.834823, -37.771257]);\n * const point2 = turf.point([145.14244, -37.830937]);\n *\n * const midpoint = turf.midpoint(point1, point2);\n *\n * //addToMap\n * const addToMap = [point1, point2, midpoint];\n * midpoint.properties['marker-color'] = '#f00';\n */\nfunction midpoint(point1: Coord, point2: Coord): Feature<Point> {\n const dist = distance(point1, point2);\n const heading = bearing(point1, point2);\n const midpoint = destination(point1, dist / 2, heading);\n\n return midpoint;\n}\n\nexport { midpoint };\nexport default midpoint;\n"],"mappings":";AACA,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;AAsBzB,SAAS,SAAS,QAAe,QAA+B;AAC9D,QAAM,OAAO,SAAS,QAAQ,MAAM;AACpC,QAAM,UAAU,QAAQ,QAAQ,MAAM;AACtC,QAAMA,YAAW,YAAY,QAAQ,OAAO,GAAG,OAAO;AAEtD,SAAOA;AACT;AAGA,IAAO,wBAAQ;","names":["midpoint"]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, Point } from \"geojson\";\nimport { bearing } from \"@turf/bearing\";\nimport { destination } from \"@turf/destination\";\nimport { distance } from \"@turf/distance\";\nimport { Coord } from \"@turf/helpers\";\n\n/**\n * Takes two points and returns a point midway between them. The midpoint is\n * calculated geodesically, meaning the curvature of the earth is taken into\n * account.\n *\n * @function\n * @param {Coord} point1 first point\n * @param {Coord} point2 second point\n * @returns {Feature<Point>} a point midway between `pt1` and `pt2`\n * @example\n * const point1 = turf.point([144.834823, -37.771257]);\n * const point2 = turf.point([145.14244, -37.830937]);\n *\n * const midpoint = turf.midpoint(point1, point2);\n *\n * //addToMap\n * const addToMap = [point1, point2, midpoint];\n * midpoint.properties['marker-color'] = '#f00';\n */\nfunction midpoint(point1: Coord, point2: Coord): Feature<Point> {\n const dist = distance(point1, point2);\n const heading = bearing(point1, point2);\n const midpoint = destination(point1, dist / 2, heading);\n\n return midpoint;\n}\n\nexport { midpoint };\nexport default midpoint;\n"],"mappings":";AACA,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;AAsBzB,SAAS,SAAS,QAAe,QAA+B;AAC9D,QAAM,OAAO,SAAS,QAAQ,MAAM;AACpC,QAAM,UAAU,QAAQ,QAAQ,MAAM;AACtC,QAAMA,YAAW,YAAY,QAAQ,OAAO,GAAG,OAAO;AAEtD,SAAOA;AACT;AAGA,IAAO,gBAAQ;","names":["midpoint"]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turf/midpoint",
3
- "version": "7.2.0",
4
- "description": "turf midpoint module",
3
+ "version": "7.3.0",
4
+ "description": "Takes two points and calculates a point midway between them geodesically.",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
7
7
  "bugs": {
@@ -53,21 +53,21 @@
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/benchmark": "^2.1.5",
56
- "@types/tape": "^4.13.4",
56
+ "@types/tape": "^5.8.1",
57
57
  "benchmark": "^2.1.4",
58
58
  "npm-run-all": "^4.1.5",
59
59
  "tape": "^5.9.0",
60
- "tsup": "^8.3.5",
61
- "tsx": "^4.19.2",
62
- "typescript": "^5.5.4"
60
+ "tsup": "^8.4.0",
61
+ "tsx": "^4.19.4",
62
+ "typescript": "^5.8.3"
63
63
  },
64
64
  "dependencies": {
65
- "@turf/bearing": "^7.2.0",
66
- "@turf/destination": "^7.2.0",
67
- "@turf/distance": "^7.2.0",
68
- "@turf/helpers": "^7.2.0",
65
+ "@turf/bearing": "7.3.0",
66
+ "@turf/destination": "7.3.0",
67
+ "@turf/distance": "7.3.0",
68
+ "@turf/helpers": "7.3.0",
69
69
  "@types/geojson": "^7946.0.10",
70
70
  "tslib": "^2.8.1"
71
71
  },
72
- "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
72
+ "gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
73
73
  }
@@ -68,9 +68,9 @@ function variance(y) {
68
68
  }
69
69
  return sum / y.length;
70
70
  }
71
- var turf_moran_index_default = moranIndex;
71
+ var index_default = moranIndex;
72
72
 
73
73
 
74
74
 
75
- exports.default = turf_moran_index_default; exports.moranIndex = moranIndex;
75
+ exports.default = index_default; exports.moranIndex = moranIndex;
76
76
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-moran-index/dist/cjs/index.cjs","../../index.ts"],"names":["moranIndex"],"mappings":"AAAA;ACCA,uDAAgD;AAChD,kCAA4B;AA2D5B,SAAS,UAAA,CACP,EA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M,EAAA,EAAI,CAAA,EAAA,EAAA,CAAM,GAAA,EAAK,EAAA,CAAA;AACvC,EAAA,MAAM,MAAA,EAAQ,KAAA,EAAO,KAAA,EAAO,mBAAA,EAAqB,kBAAA;AACjD,EAAA,MAAM,QAAA,EAAU,IAAA,CAAK,IAAA,CAAK,KAAK,CAAA;AAC/B,EAAA,MAAM,MAAA,EAAA,CAASA,YAAAA,EAAa,kBAAA,EAAA,EAAsB,OAAA;AAElD,EAAA,OAAO;AAAA,IACL,kBAAA;AAAA,IACA,UAAA,EAAAA,WAAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,EACF,CAAA;AACF;AAUA,SAAS,IAAA,CAAK,CAAA,EAAqB;AACjC,EAAA,IAAI,IAAA,EAAM,CAAA;AACV,EAAA,IAAA,CAAA,MAAW,KAAA,GAAQ,CAAA,EAAG;AACpB,IAAA,IAAA,GAAO,IAAA;AAAA,EACT;AACA,EAAA,OAAO,IAAA,EAAM,CAAA,CAAE,MAAA;AACjB;AASA,SAAS,QAAA,CAAS,CAAA,EAAqB;AACrC,EAAA,MAAM,MAAA,EAAQ,IAAA,CAAK,CAAC,CAAA;AACpB,EAAA,IAAI,IAAA,EAAM,CAAA;AACV,EAAA,IAAA,CAAA,MAAW,KAAA,GAAQ,CAAA,EAAG;AACpB,IAAA,IAAA,GAAO,IAAA,CAAK,GAAA,CAAI,KAAA,EAAO,KAAA,EAAO,CAAC,CAAA;AAAA,EACjC;AACA,EAAA,OAAO,IAAA,EAAM,CAAA,CAAE,MAAA;AACjB;AAGA,IAAO,yBAAA,EAAQ,UAAA;AD5Ff;AACE;AACA;AACF,4EAAC","file":"/home/runner/work/turf/turf/packages/turf-moran-index/dist/cjs/index.cjs","sourcesContent":[null,"import { FeatureCollection } from \"geojson\";\nimport { distanceWeight as spatialWeight } from \"@turf/distance-weight\";\nimport { featureEach } from \"@turf/meta\";\n\n/**\n * @typedef {object} MoranIndex\n * @property {number} moranIndex the moran's Index of the observed feature set\n * @property {number} expectedMoranIndex the moran's Index of the random distribution\n * @property {number} stdNorm the standard devitaion of the random distribution\n * @property {number} zNorm the z-score of the observe samples with regard to the random distribution\n */\ntype MoranIndex = {\n moranIndex: number;\n expectedMoranIndex: number;\n stdNorm: number;\n zNorm: number;\n};\n\n/**\n * Moran's I measures patterns of attribute values associated with features.\n * The method reveal whether similar values tend to occur near each other,\n * or whether high or low values are interspersed.\n *\n * Moran's I > 0 means a clusterd pattern.\n * Moran's I < 0 means a dispersed pattern.\n * Moran's I = 0 means a random pattern.\n *\n * In order to test the significance of the result. The z score is calculated.\n * A positive enough z-score (ex. >1.96) indicates clustering,\n * while a negative enough z-score (ex. <-1.96) indicates a dispersed pattern.\n *\n * the z-score can be calculated based on a normal or random assumption.\n *\n * **Bibliography***\n *\n * 1. [Moran's I](https://en.wikipedia.org/wiki/Moran%27s_I)\n *\n * 2. [pysal](http://pysal.readthedocs.io/en/latest/index.html)\n *\n * 3. Andy Mitchell, The ESRI Guide to GIS Analysis Volume 2: Spatial Measurements & Statistics.\n *\n * @function\n * @param {FeatureCollection<any>} fc\n * @param {Object} options\n * @param {string} options.inputField the property name, must contain numeric values\n * @param {number} [options.threshold=100000] the distance threshold\n * @param {number} [options.p=2] the Minkowski p-norm distance parameter\n * @param {boolean} [options.binary=false] whether transfrom the distance to binary\n * @param {number} [options.alpha=-1] the distance decay parameter\n * @param {boolean} [options.standardization=true] wheter row standardization the distance\n * @returns {MoranIndex}\n * @example\n *\n * const bbox = [-65, 40, -63, 42];\n * const dataset = turf.randomPoint(100, { bbox: bbox });\n *\n * const result = turf.moranIndex(dataset, {\n * inputField: 'CRIME',\n * });\n */\n\nfunction moranIndex(\n fc: FeatureCollection<any>,\n options: {\n inputField: string;\n threshold?: number;\n p?: number;\n binary?: boolean;\n alpha?: number;\n standardization?: boolean;\n }\n): MoranIndex {\n const inputField = options.inputField;\n const threshold = options.threshold || 100000;\n const p = options.p || 2;\n const binary = options.binary ?? false;\n const alpha = options.alpha || -1;\n const standardization = options.standardization ?? true;\n\n const weight = spatialWeight(fc, {\n alpha,\n binary,\n p,\n standardization,\n threshold,\n });\n\n const y: number[] = [];\n featureEach(fc, (feature) => {\n const feaProperties = feature.properties || {};\n // validate inputField exists\n y.push(feaProperties[inputField]);\n });\n\n const yMean = mean(y);\n const yVar = variance(y);\n let weightSum = 0;\n let s0 = 0;\n let s1 = 0;\n let s2 = 0;\n const n = weight.length;\n // validate y.length is the same as weight.length\n for (let i = 0; i < n; i++) {\n let subS2 = 0;\n for (let j = 0; j < n; j++) {\n weightSum += weight[i][j] * (y[i] - yMean) * (y[j] - yMean);\n s0 += weight[i][j];\n s1 += Math.pow(weight[i][j] + weight[j][i], 2);\n subS2 += weight[i][j] + weight[j][i];\n }\n s2 += Math.pow(subS2, 2);\n }\n s1 = 0.5 * s1;\n\n const moranIndex = weightSum / s0 / yVar;\n const expectedMoranIndex = -1 / (n - 1);\n const vNum = n * n * s1 - n * s2 + 3 * (s0 * s0);\n const vDen = (n - 1) * (n + 1) * (s0 * s0);\n const vNorm = vNum / vDen - expectedMoranIndex * expectedMoranIndex;\n const stdNorm = Math.sqrt(vNorm);\n const zNorm = (moranIndex - expectedMoranIndex) / stdNorm;\n\n return {\n expectedMoranIndex,\n moranIndex,\n stdNorm,\n zNorm,\n };\n}\n\n/**\n * get mean of a list\n *\n * @private\n * @param {number[]} y\n * @returns {number}\n *\n */\nfunction mean(y: number[]): number {\n let sum = 0;\n for (const item of y) {\n sum += item;\n }\n return sum / y.length;\n}\n/**\n * get variance of a list\n *\n * @private\n * @param {number[]} y\n * @returns {number}\n *\n */\nfunction variance(y: number[]): number {\n const yMean = mean(y);\n let sum = 0;\n for (const item of y) {\n sum += Math.pow(item - yMean, 2);\n }\n return sum / y.length;\n}\n\nexport { moranIndex, MoranIndex };\nexport default moranIndex;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-moran-index/dist/cjs/index.cjs","../../index.ts"],"names":["moranIndex"],"mappings":"AAAA;ACCA,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AA,EAAA,CAAQ,EAAA,EAAI,CAAA,EAAA,EAAA,CAAM,EAAA,EAAI,CAAA,EAAA,EAAA,CAAM,GAAA,EAAK,EAAA,CAAA;AACvC,EAAA,MAAM,MAAA,EAAQ,KAAA,EAAO,KAAA,EAAO,mBAAA,EAAqB,kBAAA;AACjD,EAAA,MAAM,QAAA,EAAU,IAAA,CAAK,IAAA,CAAK,KAAK,CAAA;AAC/B,EAAA,MAAM,MAAA,EAAA,CAASA,YAAAA,EAAa,kBAAA,EAAA,EAAsB,OAAA;AAElD,EAAA,OAAO;AAAA,IACL,kBAAA;AAAA,IACA,UAAA,EAAAA,WAAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,EACF,CAAA;AACF;AAUA,SAAS,IAAA,CAAK,CAAA,EAAqB;AACjC,EAAA,IAAI,IAAA,EAAM,CAAA;AACV,EAAA,IAAA,CAAA,MAAW,KAAA,GAAQ,CAAA,EAAG;AACpB,IAAA,IAAA,GAAO,IAAA;AAAA,EACT;AACA,EAAA,OAAO,IAAA,EAAM,CAAA,CAAE,MAAA;AACjB;AASA,SAAS,QAAA,CAAS,CAAA,EAAqB;AACrC,EAAA,MAAM,MAAA,EAAQ,IAAA,CAAK,CAAC,CAAA;AACpB,EAAA,IAAI,IAAA,EAAM,CAAA;AACV,EAAA,IAAA,CAAA,MAAW,KAAA,GAAQ,CAAA,EAAG;AACpB,IAAA,IAAA,GAAO,IAAA,CAAK,GAAA,CAAI,KAAA,EAAO,KAAA,EAAO,CAAC,CAAA;AAAA,EACjC;AACA,EAAA,OAAO,IAAA,EAAM,CAAA,CAAE,MAAA;AACjB;AAGA,IAAO,cAAA,EAAQ,UAAA;AD5Ff;AACE;AACA;AACF,iEAAC","file":"/home/runner/work/turf/turf/packages/turf-moran-index/dist/cjs/index.cjs","sourcesContent":[null,"import { FeatureCollection } from \"geojson\";\nimport { distanceWeight as spatialWeight } from \"@turf/distance-weight\";\nimport { featureEach } from \"@turf/meta\";\n\n/**\n * @typedef {object} MoranIndex\n * @property {number} moranIndex the moran's Index of the observed feature set\n * @property {number} expectedMoranIndex the moran's Index of the random distribution\n * @property {number} stdNorm the standard devitaion of the random distribution\n * @property {number} zNorm the z-score of the observe samples with regard to the random distribution\n */\ntype MoranIndex = {\n moranIndex: number;\n expectedMoranIndex: number;\n stdNorm: number;\n zNorm: number;\n};\n\n/**\n * Moran's I measures patterns of attribute values associated with features.\n * The method reveal whether similar values tend to occur near each other,\n * or whether high or low values are interspersed.\n *\n * Moran's I > 0 means a clusterd pattern.\n * Moran's I < 0 means a dispersed pattern.\n * Moran's I = 0 means a random pattern.\n *\n * In order to test the significance of the result. The z score is calculated.\n * A positive enough z-score (ex. >1.96) indicates clustering,\n * while a negative enough z-score (ex. <-1.96) indicates a dispersed pattern.\n *\n * the z-score can be calculated based on a normal or random assumption.\n *\n * **Bibliography***\n *\n * 1. [Moran's I](https://en.wikipedia.org/wiki/Moran%27s_I)\n *\n * 2. [pysal](http://pysal.readthedocs.io/en/latest/index.html)\n *\n * 3. Andy Mitchell, The ESRI Guide to GIS Analysis Volume 2: Spatial Measurements & Statistics.\n *\n * @function\n * @param {FeatureCollection<any>} fc\n * @param {Object} options\n * @param {string} options.inputField the property name, must contain numeric values\n * @param {number} [options.threshold=100000] the distance threshold\n * @param {number} [options.p=2] the Minkowski p-norm distance parameter\n * @param {boolean} [options.binary=false] whether transfrom the distance to binary\n * @param {number} [options.alpha=-1] the distance decay parameter\n * @param {boolean} [options.standardization=true] wheter row standardization the distance\n * @returns {MoranIndex}\n * @example\n *\n * const bbox = [-65, 40, -63, 42];\n * const dataset = turf.randomPoint(100, { bbox: bbox });\n *\n * const result = turf.moranIndex(dataset, {\n * inputField: 'CRIME',\n * });\n */\n\nfunction moranIndex(\n fc: FeatureCollection<any>,\n options: {\n inputField: string;\n threshold?: number;\n p?: number;\n binary?: boolean;\n alpha?: number;\n standardization?: boolean;\n }\n): MoranIndex {\n const inputField = options.inputField;\n const threshold = options.threshold || 100000;\n const p = options.p || 2;\n const binary = options.binary ?? false;\n const alpha = options.alpha || -1;\n const standardization = options.standardization ?? true;\n\n const weight = spatialWeight(fc, {\n alpha,\n binary,\n p,\n standardization,\n threshold,\n });\n\n const y: number[] = [];\n featureEach(fc, (feature) => {\n const feaProperties = feature.properties || {};\n // validate inputField exists\n y.push(feaProperties[inputField]);\n });\n\n const yMean = mean(y);\n const yVar = variance(y);\n let weightSum = 0;\n let s0 = 0;\n let s1 = 0;\n let s2 = 0;\n const n = weight.length;\n // validate y.length is the same as weight.length\n for (let i = 0; i < n; i++) {\n let subS2 = 0;\n for (let j = 0; j < n; j++) {\n weightSum += weight[i][j] * (y[i] - yMean) * (y[j] - yMean);\n s0 += weight[i][j];\n s1 += Math.pow(weight[i][j] + weight[j][i], 2);\n subS2 += weight[i][j] + weight[j][i];\n }\n s2 += Math.pow(subS2, 2);\n }\n s1 = 0.5 * s1;\n\n const moranIndex = weightSum / s0 / yVar;\n const expectedMoranIndex = -1 / (n - 1);\n const vNum = n * n * s1 - n * s2 + 3 * (s0 * s0);\n const vDen = (n - 1) * (n + 1) * (s0 * s0);\n const vNorm = vNum / vDen - expectedMoranIndex * expectedMoranIndex;\n const stdNorm = Math.sqrt(vNorm);\n const zNorm = (moranIndex - expectedMoranIndex) / stdNorm;\n\n return {\n expectedMoranIndex,\n moranIndex,\n stdNorm,\n zNorm,\n };\n}\n\n/**\n * get mean of a list\n *\n * @private\n * @param {number[]} y\n * @returns {number}\n *\n */\nfunction mean(y: number[]): number {\n let sum = 0;\n for (const item of y) {\n sum += item;\n }\n return sum / y.length;\n}\n/**\n * get variance of a list\n *\n * @private\n * @param {number[]} y\n * @returns {number}\n *\n */\nfunction variance(y: number[]): number {\n const yMean = mean(y);\n let sum = 0;\n for (const item of y) {\n sum += Math.pow(item - yMean, 2);\n }\n return sum / y.length;\n}\n\nexport { moranIndex, MoranIndex };\nexport default moranIndex;\n"]}
@@ -68,9 +68,9 @@ function variance(y) {
68
68
  }
69
69
  return sum / y.length;
70
70
  }
71
- var turf_moran_index_default = moranIndex;
71
+ var index_default = moranIndex;
72
72
  export {
73
- turf_moran_index_default as default,
73
+ index_default as default,
74
74
  moranIndex
75
75
  };
76
76
  //# sourceMappingURL=index.js.map