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
@@ -101,9 +101,9 @@ function defineOrigin(geojson, origin) {
101
101
  throw new Error("invalid origin");
102
102
  }
103
103
  }
104
- var turf_transform_scale_default = transformScale;
104
+ var index_default = transformScale;
105
105
 
106
106
 
107
107
 
108
- exports.default = turf_transform_scale_default; exports.transformScale = transformScale;
108
+ exports.default = index_default; exports.transformScale = transformScale;
109
109
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-transform-scale/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACEA,oCAAsB;AACtB,sCAAuB;AACvB,0CAAyB;AACzB,kCAAiC;AACjC,mDAA6B;AAC7B,qDAA8B;AAC9B,2DAAiC;AACjC,kCAAuC;AACvC,wCAAgC;AAChC,4CAA6C;AAuB7C,SAAS,cAAA,CACP,OAAA,EACA,MAAA,EACA,OAAA,EAIG;AAEH,EAAA,QAAA,EAAU,QAAA,GAAW,CAAC,CAAA;AACtB,EAAA,GAAA,CAAI,CAAC,+BAAA,OAAgB,CAAA,EAAG,MAAM,IAAI,KAAA,CAAM,oBAAoB,CAAA;AAC5D,EAAA,MAAM,OAAA,EAAS,OAAA,CAAQ,OAAA,GAAU,UAAA;AACjC,EAAA,MAAM,OAAA,EAAS,OAAA,CAAQ,OAAA,GAAU,KAAA;AAGjC,EAAA,GAAA,CAAI,CAAC,OAAA,EAAS,MAAM,IAAI,KAAA,CAAM,kBAAkB,CAAA;AAChD,EAAA,GAAA,CAAI,OAAO,OAAA,IAAW,SAAA,GAAY,OAAA,GAAU,CAAA;AAC1C,IAAA,MAAM,IAAI,KAAA,CAAM,gBAAgB,CAAA;AAClC,EAAA,MAAM,cAAA,EAA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AAM,KAAK,CAAC,CAAA;AAAA,IAC5B,KAAK,IAAA;AAAA;AAAA,IAEL,KAAK,WAAA;AAAA;AAAA,IAEL,KAAK,WAAA;AAAA;AAAA,IAEL,KAAK,SAAA;AACH,MAAA,OAAO,4BAAA,CAAO,IAAA,EAAM,KAAK,CAAC,CAAA;AAAA,IAC5B,KAAK,IAAA;AAAA;AAAA,IAEL,KAAK,WAAA;AAAA;AAAA,IAEL,KAAK,WAAA;AAAA;AAAA,IAEL,KAAK,UAAA;AACH,MAAA,OAAO,4BAAA,CAAO,IAAA,EAAM,KAAK,CAAC,CAAA;AAAA,IAC5B,KAAK,QAAA;AACH,MAAA,OAAO,4BAAA,OAAc,CAAA;AAAA,IACvB,KAAK,KAAA,CAAA;AAAA,IACL,KAAK,IAAA;AAAA,IACL,KAAK,UAAA;AACH,MAAA,OAAO,gCAAA,OAAgB,CAAA;AAAA,IACzB,OAAA;AACE,MAAA,MAAM,IAAI,KAAA,CAAM,gBAAgB,CAAA;AAAA,EACpC;AAEF;AAGA,IAAO,6BAAA,EAAQ,cAAA;AD1Ff;AACE;AACA;AACF,wFAAC","file":"/home/runner/work/turf/turf/packages/turf-transform-scale/dist/cjs/index.cjs","sourcesContent":[null,"import { Corners, Coord } from \"@turf/helpers\";\nimport { FeatureCollection, GeoJSON, GeometryCollection } from \"geojson\";\nimport { clone } from \"@turf/clone\";\nimport { center } from \"@turf/center\";\nimport { centroid } from \"@turf/centroid\";\nimport { bbox as turfBBox } from \"@turf/bbox\";\nimport { rhumbBearing } from \"@turf/rhumb-bearing\";\nimport { rhumbDistance } from \"@turf/rhumb-distance\";\nimport { rhumbDestination } from \"@turf/rhumb-destination\";\nimport { coordEach, featureEach } from \"@turf/meta\";\nimport { point, isObject } from \"@turf/helpers\";\nimport { getCoord, getCoords, getType } from \"@turf/invariant\";\n\n/**\n * Scale GeoJSON objects from a given point by a scaling factor e.g. factor=2\n * would make each object 200% larger.\n * If a FeatureCollection is provided, the origin point will be calculated\n * based on each individual feature _unless_ an exact\n *\n * @function\n * @param {GeoJSON|GeometryCollection} geojson objects to be scaled\n * @param {number} factor of scaling, positive values greater than 0. Numbers between 0 and 1 will shrink the geojson, numbers greater than 1 will expand it, a factor of 1 will not change the geojson.\n * @param {Object} [options={}] Optional parameters\n * @param {Corners|Coord} [options.origin='centroid'] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance improvement if true)\n * @returns {GeoJSON|GeometryCollection} scaled GeoJSON\n * @example\n * const poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\n * const scaledPoly = turf.transformScale(poly, 3);\n *\n * //addToMap\n * const addToMap = [poly, scaledPoly];\n * scaledPoly.properties = {stroke: '#F00', 'stroke-width': 4};\n */\nfunction transformScale<T extends GeoJSON | GeometryCollection>(\n geojson: T,\n factor: number,\n options?: {\n origin?: Corners | Coord;\n mutate?: boolean;\n }\n): T {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const origin = options.origin || \"centroid\";\n const mutate = options.mutate || false;\n\n // Input validation\n if (!geojson) throw new Error(\"geojson required\");\n if (typeof factor !== \"number\" || factor <= 0)\n throw new Error(\"invalid factor\");\n const originIsPoint = Array.isArray(origin) || typeof origin === \"object\";\n\n // Clone geojson to avoid side effects\n if (mutate !== true) geojson = clone(geojson);\n\n // Scale each Feature separately if a feature collection AND the user didn't\n // pass a single explicit point to scale the whole collection from.\n if (geojson.type === \"FeatureCollection\" && !originIsPoint) {\n featureEach(geojson, function (feature, index) {\n // The type guard above is not recognised in the callback so we have to\n // cast to accept responsibility.\n (geojson as FeatureCollection).features[index] = scale(\n feature,\n factor,\n origin\n );\n });\n return geojson;\n }\n // Scale Feature/Geometry\n return scale(geojson, factor, origin);\n}\n\n/**\n * Scale Feature/Geometry\n *\n * @private\n * @param {GeoJSON|GeometryCollection} feature feature or geometry collection to scale\n * @param {number} factor of scaling, positive or negative values greater than 0\n * @param {Corners|Coord} [origin=\"centroid\"] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)\n * @returns {GeoJSON|GeometryCollection} scaled GeoJSON Feature/Geometry\n */\nfunction scale<T extends GeoJSON | GeometryCollection>(\n feature: T,\n factor: number,\n origin: Corners | Coord\n): T {\n // Default params\n const isPoint = getType(feature) === \"Point\";\n // Work with a Coord equivalent of the origin from here on.\n const originCoord: Coord = defineOrigin(feature, origin);\n\n // Shortcut no-scaling\n if (factor === 1 || isPoint) return feature;\n\n // Scale each coordinate\n coordEach(feature, function (coord) {\n const originalDistance = rhumbDistance(originCoord, coord);\n const bearing = rhumbBearing(originCoord, coord);\n const newDistance = originalDistance * factor;\n const newCoord = getCoords(\n rhumbDestination(originCoord, newDistance, bearing)\n );\n coord[0] = newCoord[0];\n coord[1] = newCoord[1];\n if (coord.length === 3) coord[2] *= factor;\n });\n\n delete feature.bbox;\n\n return feature;\n}\n\n/**\n * Define Origin\n *\n * @private\n * @param {GeoJSON|GeometryCollection} geojson GeoJSON\n * @param {Corners|Coord} origin sw/se/nw/ne/center/centroid\n * @returns {Feature<Point>} Point origin\n */\nfunction defineOrigin(\n geojson: GeoJSON | GeometryCollection,\n origin: Corners | Coord\n): Coord {\n // Default params\n if (origin === undefined || origin === null) origin = \"centroid\";\n\n // Input Coord\n if (Array.isArray(origin) || typeof origin === \"object\")\n return getCoord(origin);\n\n // Define BBox\n const bbox = geojson.bbox\n ? geojson.bbox\n : turfBBox(geojson, { recompute: true });\n const west = bbox[0];\n const south = bbox[1];\n const east = bbox[2];\n const north = bbox[3];\n\n // Having to disable eslint below for lines which fail the no-fallthrough\n // rule, though only because of the ts-expect-error rules. Once we remove\n // southeast, bottomright, rightbottom, etc we should be able to remove all\n // these supressions.\n /* eslint-disable no-fallthrough */\n switch (origin) {\n case \"sw\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"southwest\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"westsouth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"bottomleft\":\n return point([west, south]);\n case \"se\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"southeast\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"eastsouth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"bottomright\":\n return point([east, south]);\n case \"nw\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"northwest\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"westnorth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"topleft\":\n return point([west, north]);\n case \"ne\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"northeast\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"eastnorth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"topright\":\n return point([east, north]);\n case \"center\":\n return center(geojson);\n case undefined:\n case null:\n case \"centroid\":\n return centroid(geojson);\n default:\n throw new Error(\"invalid origin\");\n }\n /* eslint-enable no-fallthrough */\n}\n\nexport { transformScale };\nexport default transformScale;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-transform-scale/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACEA,oCAAsB;AACtB,sCAAuB;AACvB,0CAAyB;AACzB,kCAAiC;AACjC,mDAA6B;AAC7B,qDAA8B;AAC9B,2DAAiC;AACjC,kCAAuC;AACvC,wCAAgC;AAChC,4CAA6C;AAuB7C,SAAS,cAAA,CACP,OAAA,EACA,MAAA,EACA,OAAA,EAIG;AAEH,EAAA,QAAA,EAAU,QAAA,GAAW,CAAC,CAAA;AACtB,EAAA,GAAA,CAAI,CAAC,+BAAA,OAAgB,CAAA,EAAG,MAAM,IAAI,KAAA,CAAM,oBAAoB,CAAA;AAC5D,EAAA,MAAM,OAAA,EAAS,OAAA,CAAQ,OAAA,GAAU,UAAA;AACjC,EAAA,MAAM,OA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;AAAA;AAAA,IAEL,KAAK,WAAA;AAAA;AAAA,IAEL,KAAK,YAAA;AACH,MAAA,OAAO,4BAAA,CAAO,IAAA,EAAM,KAAK,CAAC,CAAA;AAAA,IAC5B,KAAK,IAAA;AAAA;AAAA,IAEL,KAAK,WAAA;AAAA;AAAA,IAEL,KAAK,WAAA;AAAA;AAAA,IAEL,KAAK,aAAA;AACH,MAAA,OAAO,4BAAA,CAAO,IAAA,EAAM,KAAK,CAAC,CAAA;AAAA,IAC5B,KAAK,IAAA;AAAA;AAAA,IAEL,KAAK,WAAA;AAAA;AAAA,IAEL,KAAK,WAAA;AAAA;AAAA,IAEL,KAAK,SAAA;AACH,MAAA,OAAO,4BAAA,CAAO,IAAA,EAAM,KAAK,CAAC,CAAA;AAAA,IAC5B,KAAK,IAAA;AAAA;AAAA,IAEL,KAAK,WAAA;AAAA;AAAA,IAEL,KAAK,WAAA;AAAA;AAAA,IAEL,KAAK,UAAA;AACH,MAAA,OAAO,4BAAA,CAAO,IAAA,EAAM,KAAK,CAAC,CAAA;AAAA,IAC5B,KAAK,QAAA;AACH,MAAA,OAAO,4BAAA,OAAc,CAAA;AAAA,IACvB,KAAK,KAAA,CAAA;AAAA,IACL,KAAK,IAAA;AAAA,IACL,KAAK,UAAA;AACH,MAAA,OAAO,gCAAA,OAAgB,CAAA;AAAA,IACzB,OAAA;AACE,MAAA,MAAM,IAAI,KAAA,CAAM,gBAAgB,CAAA;AAAA,EACpC;AAEF;AAGA,IAAO,cAAA,EAAQ,cAAA;AD1Ff;AACE;AACA;AACF,yEAAC","file":"/home/runner/work/turf/turf/packages/turf-transform-scale/dist/cjs/index.cjs","sourcesContent":[null,"import { Corners, Coord } from \"@turf/helpers\";\nimport { FeatureCollection, GeoJSON, GeometryCollection } from \"geojson\";\nimport { clone } from \"@turf/clone\";\nimport { center } from \"@turf/center\";\nimport { centroid } from \"@turf/centroid\";\nimport { bbox as turfBBox } from \"@turf/bbox\";\nimport { rhumbBearing } from \"@turf/rhumb-bearing\";\nimport { rhumbDistance } from \"@turf/rhumb-distance\";\nimport { rhumbDestination } from \"@turf/rhumb-destination\";\nimport { coordEach, featureEach } from \"@turf/meta\";\nimport { point, isObject } from \"@turf/helpers\";\nimport { getCoord, getCoords, getType } from \"@turf/invariant\";\n\n/**\n * Scale GeoJSON objects from a given point by a scaling factor e.g. factor=2\n * would make each object 200% larger.\n * If a FeatureCollection is provided, the origin point will be calculated\n * based on each individual feature _unless_ an exact\n *\n * @function\n * @param {GeoJSON|GeometryCollection} geojson objects to be scaled\n * @param {number} factor of scaling, positive values greater than 0. Numbers between 0 and 1 will shrink the geojson, numbers greater than 1 will expand it, a factor of 1 will not change the geojson.\n * @param {Object} [options={}] Optional parameters\n * @param {Corners|Coord} [options.origin='centroid'] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance improvement if true)\n * @returns {GeoJSON|GeometryCollection} scaled GeoJSON\n * @example\n * const poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\n * const scaledPoly = turf.transformScale(poly, 3);\n *\n * //addToMap\n * const addToMap = [poly, scaledPoly];\n * scaledPoly.properties = {stroke: '#F00', 'stroke-width': 4};\n */\nfunction transformScale<T extends GeoJSON | GeometryCollection>(\n geojson: T,\n factor: number,\n options?: {\n origin?: Corners | Coord;\n mutate?: boolean;\n }\n): T {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const origin = options.origin || \"centroid\";\n const mutate = options.mutate || false;\n\n // Input validation\n if (!geojson) throw new Error(\"geojson required\");\n if (typeof factor !== \"number\" || factor <= 0)\n throw new Error(\"invalid factor\");\n const originIsPoint = Array.isArray(origin) || typeof origin === \"object\";\n\n // Clone geojson to avoid side effects\n if (mutate !== true) geojson = clone(geojson);\n\n // Scale each Feature separately if a feature collection AND the user didn't\n // pass a single explicit point to scale the whole collection from.\n if (geojson.type === \"FeatureCollection\" && !originIsPoint) {\n featureEach(geojson, function (feature, index) {\n // The type guard above is not recognised in the callback so we have to\n // cast to accept responsibility.\n (geojson as FeatureCollection).features[index] = scale(\n feature,\n factor,\n origin\n );\n });\n return geojson;\n }\n // Scale Feature/Geometry\n return scale(geojson, factor, origin);\n}\n\n/**\n * Scale Feature/Geometry\n *\n * @private\n * @param {GeoJSON|GeometryCollection} feature feature or geometry collection to scale\n * @param {number} factor of scaling, positive or negative values greater than 0\n * @param {Corners|Coord} [origin=\"centroid\"] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)\n * @returns {GeoJSON|GeometryCollection} scaled GeoJSON Feature/Geometry\n */\nfunction scale<T extends GeoJSON | GeometryCollection>(\n feature: T,\n factor: number,\n origin: Corners | Coord\n): T {\n // Default params\n const isPoint = getType(feature) === \"Point\";\n // Work with a Coord equivalent of the origin from here on.\n const originCoord: Coord = defineOrigin(feature, origin);\n\n // Shortcut no-scaling\n if (factor === 1 || isPoint) return feature;\n\n // Scale each coordinate\n coordEach(feature, function (coord) {\n const originalDistance = rhumbDistance(originCoord, coord);\n const bearing = rhumbBearing(originCoord, coord);\n const newDistance = originalDistance * factor;\n const newCoord = getCoords(\n rhumbDestination(originCoord, newDistance, bearing)\n );\n coord[0] = newCoord[0];\n coord[1] = newCoord[1];\n if (coord.length === 3) coord[2] *= factor;\n });\n\n delete feature.bbox;\n\n return feature;\n}\n\n/**\n * Define Origin\n *\n * @private\n * @param {GeoJSON|GeometryCollection} geojson GeoJSON\n * @param {Corners|Coord} origin sw/se/nw/ne/center/centroid\n * @returns {Feature<Point>} Point origin\n */\nfunction defineOrigin(\n geojson: GeoJSON | GeometryCollection,\n origin: Corners | Coord\n): Coord {\n // Default params\n if (origin === undefined || origin === null) origin = \"centroid\";\n\n // Input Coord\n if (Array.isArray(origin) || typeof origin === \"object\")\n return getCoord(origin);\n\n // Define BBox\n const bbox = geojson.bbox\n ? geojson.bbox\n : turfBBox(geojson, { recompute: true });\n const west = bbox[0];\n const south = bbox[1];\n const east = bbox[2];\n const north = bbox[3];\n\n // Having to disable eslint below for lines which fail the no-fallthrough\n // rule, though only because of the ts-expect-error rules. Once we remove\n // southeast, bottomright, rightbottom, etc we should be able to remove all\n // these supressions.\n /* eslint-disable no-fallthrough */\n switch (origin) {\n case \"sw\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"southwest\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"westsouth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"bottomleft\":\n return point([west, south]);\n case \"se\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"southeast\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"eastsouth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"bottomright\":\n return point([east, south]);\n case \"nw\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"northwest\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"westnorth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"topleft\":\n return point([west, north]);\n case \"ne\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"northeast\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"eastnorth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"topright\":\n return point([east, north]);\n case \"center\":\n return center(geojson);\n case undefined:\n case null:\n case \"centroid\":\n return centroid(geojson);\n default:\n throw new Error(\"invalid origin\");\n }\n /* eslint-enable no-fallthrough */\n}\n\nexport { transformScale };\nexport default transformScale;\n"]}
@@ -101,9 +101,9 @@ function defineOrigin(geojson, origin) {
101
101
  throw new Error("invalid origin");
102
102
  }
103
103
  }
104
- var turf_transform_scale_default = transformScale;
104
+ var index_default = transformScale;
105
105
  export {
106
- turf_transform_scale_default as default,
106
+ index_default as default,
107
107
  transformScale
108
108
  };
109
109
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Corners, Coord } from \"@turf/helpers\";\nimport { FeatureCollection, GeoJSON, GeometryCollection } from \"geojson\";\nimport { clone } from \"@turf/clone\";\nimport { center } from \"@turf/center\";\nimport { centroid } from \"@turf/centroid\";\nimport { bbox as turfBBox } from \"@turf/bbox\";\nimport { rhumbBearing } from \"@turf/rhumb-bearing\";\nimport { rhumbDistance } from \"@turf/rhumb-distance\";\nimport { rhumbDestination } from \"@turf/rhumb-destination\";\nimport { coordEach, featureEach } from \"@turf/meta\";\nimport { point, isObject } from \"@turf/helpers\";\nimport { getCoord, getCoords, getType } from \"@turf/invariant\";\n\n/**\n * Scale GeoJSON objects from a given point by a scaling factor e.g. factor=2\n * would make each object 200% larger.\n * If a FeatureCollection is provided, the origin point will be calculated\n * based on each individual feature _unless_ an exact\n *\n * @function\n * @param {GeoJSON|GeometryCollection} geojson objects to be scaled\n * @param {number} factor of scaling, positive values greater than 0. Numbers between 0 and 1 will shrink the geojson, numbers greater than 1 will expand it, a factor of 1 will not change the geojson.\n * @param {Object} [options={}] Optional parameters\n * @param {Corners|Coord} [options.origin='centroid'] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance improvement if true)\n * @returns {GeoJSON|GeometryCollection} scaled GeoJSON\n * @example\n * const poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\n * const scaledPoly = turf.transformScale(poly, 3);\n *\n * //addToMap\n * const addToMap = [poly, scaledPoly];\n * scaledPoly.properties = {stroke: '#F00', 'stroke-width': 4};\n */\nfunction transformScale<T extends GeoJSON | GeometryCollection>(\n geojson: T,\n factor: number,\n options?: {\n origin?: Corners | Coord;\n mutate?: boolean;\n }\n): T {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const origin = options.origin || \"centroid\";\n const mutate = options.mutate || false;\n\n // Input validation\n if (!geojson) throw new Error(\"geojson required\");\n if (typeof factor !== \"number\" || factor <= 0)\n throw new Error(\"invalid factor\");\n const originIsPoint = Array.isArray(origin) || typeof origin === \"object\";\n\n // Clone geojson to avoid side effects\n if (mutate !== true) geojson = clone(geojson);\n\n // Scale each Feature separately if a feature collection AND the user didn't\n // pass a single explicit point to scale the whole collection from.\n if (geojson.type === \"FeatureCollection\" && !originIsPoint) {\n featureEach(geojson, function (feature, index) {\n // The type guard above is not recognised in the callback so we have to\n // cast to accept responsibility.\n (geojson as FeatureCollection).features[index] = scale(\n feature,\n factor,\n origin\n );\n });\n return geojson;\n }\n // Scale Feature/Geometry\n return scale(geojson, factor, origin);\n}\n\n/**\n * Scale Feature/Geometry\n *\n * @private\n * @param {GeoJSON|GeometryCollection} feature feature or geometry collection to scale\n * @param {number} factor of scaling, positive or negative values greater than 0\n * @param {Corners|Coord} [origin=\"centroid\"] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)\n * @returns {GeoJSON|GeometryCollection} scaled GeoJSON Feature/Geometry\n */\nfunction scale<T extends GeoJSON | GeometryCollection>(\n feature: T,\n factor: number,\n origin: Corners | Coord\n): T {\n // Default params\n const isPoint = getType(feature) === \"Point\";\n // Work with a Coord equivalent of the origin from here on.\n const originCoord: Coord = defineOrigin(feature, origin);\n\n // Shortcut no-scaling\n if (factor === 1 || isPoint) return feature;\n\n // Scale each coordinate\n coordEach(feature, function (coord) {\n const originalDistance = rhumbDistance(originCoord, coord);\n const bearing = rhumbBearing(originCoord, coord);\n const newDistance = originalDistance * factor;\n const newCoord = getCoords(\n rhumbDestination(originCoord, newDistance, bearing)\n );\n coord[0] = newCoord[0];\n coord[1] = newCoord[1];\n if (coord.length === 3) coord[2] *= factor;\n });\n\n delete feature.bbox;\n\n return feature;\n}\n\n/**\n * Define Origin\n *\n * @private\n * @param {GeoJSON|GeometryCollection} geojson GeoJSON\n * @param {Corners|Coord} origin sw/se/nw/ne/center/centroid\n * @returns {Feature<Point>} Point origin\n */\nfunction defineOrigin(\n geojson: GeoJSON | GeometryCollection,\n origin: Corners | Coord\n): Coord {\n // Default params\n if (origin === undefined || origin === null) origin = \"centroid\";\n\n // Input Coord\n if (Array.isArray(origin) || typeof origin === \"object\")\n return getCoord(origin);\n\n // Define BBox\n const bbox = geojson.bbox\n ? geojson.bbox\n : turfBBox(geojson, { recompute: true });\n const west = bbox[0];\n const south = bbox[1];\n const east = bbox[2];\n const north = bbox[3];\n\n // Having to disable eslint below for lines which fail the no-fallthrough\n // rule, though only because of the ts-expect-error rules. Once we remove\n // southeast, bottomright, rightbottom, etc we should be able to remove all\n // these supressions.\n /* eslint-disable no-fallthrough */\n switch (origin) {\n case \"sw\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"southwest\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"westsouth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"bottomleft\":\n return point([west, south]);\n case \"se\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"southeast\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"eastsouth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"bottomright\":\n return point([east, south]);\n case \"nw\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"northwest\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"westnorth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"topleft\":\n return point([west, north]);\n case \"ne\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"northeast\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"eastnorth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"topright\":\n return point([east, north]);\n case \"center\":\n return center(geojson);\n case undefined:\n case null:\n case \"centroid\":\n return centroid(geojson);\n default:\n throw new Error(\"invalid origin\");\n }\n /* eslint-enable no-fallthrough */\n}\n\nexport { transformScale };\nexport default transformScale;\n"],"mappings":";AAEA,SAAS,aAAa;AACtB,SAAS,cAAc;AAC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names":[]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Corners, Coord } from \"@turf/helpers\";\nimport { FeatureCollection, GeoJSON, GeometryCollection } from \"geojson\";\nimport { clone } from \"@turf/clone\";\nimport { center } from \"@turf/center\";\nimport { centroid } from \"@turf/centroid\";\nimport { bbox as turfBBox } from \"@turf/bbox\";\nimport { rhumbBearing } from \"@turf/rhumb-bearing\";\nimport { rhumbDistance } from \"@turf/rhumb-distance\";\nimport { rhumbDestination } from \"@turf/rhumb-destination\";\nimport { coordEach, featureEach } from \"@turf/meta\";\nimport { point, isObject } from \"@turf/helpers\";\nimport { getCoord, getCoords, getType } from \"@turf/invariant\";\n\n/**\n * Scale GeoJSON objects from a given point by a scaling factor e.g. factor=2\n * would make each object 200% larger.\n * If a FeatureCollection is provided, the origin point will be calculated\n * based on each individual feature _unless_ an exact\n *\n * @function\n * @param {GeoJSON|GeometryCollection} geojson objects to be scaled\n * @param {number} factor of scaling, positive values greater than 0. Numbers between 0 and 1 will shrink the geojson, numbers greater than 1 will expand it, a factor of 1 will not change the geojson.\n * @param {Object} [options={}] Optional parameters\n * @param {Corners|Coord} [options.origin='centroid'] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance improvement if true)\n * @returns {GeoJSON|GeometryCollection} scaled GeoJSON\n * @example\n * const poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\n * const scaledPoly = turf.transformScale(poly, 3);\n *\n * //addToMap\n * const addToMap = [poly, scaledPoly];\n * scaledPoly.properties = {stroke: '#F00', 'stroke-width': 4};\n */\nfunction transformScale<T extends GeoJSON | GeometryCollection>(\n geojson: T,\n factor: number,\n options?: {\n origin?: Corners | Coord;\n mutate?: boolean;\n }\n): T {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const origin = options.origin || \"centroid\";\n const mutate = options.mutate || false;\n\n // Input validation\n if (!geojson) throw new Error(\"geojson required\");\n if (typeof factor !== \"number\" || factor <= 0)\n throw new Error(\"invalid factor\");\n const originIsPoint = Array.isArray(origin) || typeof origin === \"object\";\n\n // Clone geojson to avoid side effects\n if (mutate !== true) geojson = clone(geojson);\n\n // Scale each Feature separately if a feature collection AND the user didn't\n // pass a single explicit point to scale the whole collection from.\n if (geojson.type === \"FeatureCollection\" && !originIsPoint) {\n featureEach(geojson, function (feature, index) {\n // The type guard above is not recognised in the callback so we have to\n // cast to accept responsibility.\n (geojson as FeatureCollection).features[index] = scale(\n feature,\n factor,\n origin\n );\n });\n return geojson;\n }\n // Scale Feature/Geometry\n return scale(geojson, factor, origin);\n}\n\n/**\n * Scale Feature/Geometry\n *\n * @private\n * @param {GeoJSON|GeometryCollection} feature feature or geometry collection to scale\n * @param {number} factor of scaling, positive or negative values greater than 0\n * @param {Corners|Coord} [origin=\"centroid\"] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)\n * @returns {GeoJSON|GeometryCollection} scaled GeoJSON Feature/Geometry\n */\nfunction scale<T extends GeoJSON | GeometryCollection>(\n feature: T,\n factor: number,\n origin: Corners | Coord\n): T {\n // Default params\n const isPoint = getType(feature) === \"Point\";\n // Work with a Coord equivalent of the origin from here on.\n const originCoord: Coord = defineOrigin(feature, origin);\n\n // Shortcut no-scaling\n if (factor === 1 || isPoint) return feature;\n\n // Scale each coordinate\n coordEach(feature, function (coord) {\n const originalDistance = rhumbDistance(originCoord, coord);\n const bearing = rhumbBearing(originCoord, coord);\n const newDistance = originalDistance * factor;\n const newCoord = getCoords(\n rhumbDestination(originCoord, newDistance, bearing)\n );\n coord[0] = newCoord[0];\n coord[1] = newCoord[1];\n if (coord.length === 3) coord[2] *= factor;\n });\n\n delete feature.bbox;\n\n return feature;\n}\n\n/**\n * Define Origin\n *\n * @private\n * @param {GeoJSON|GeometryCollection} geojson GeoJSON\n * @param {Corners|Coord} origin sw/se/nw/ne/center/centroid\n * @returns {Feature<Point>} Point origin\n */\nfunction defineOrigin(\n geojson: GeoJSON | GeometryCollection,\n origin: Corners | Coord\n): Coord {\n // Default params\n if (origin === undefined || origin === null) origin = \"centroid\";\n\n // Input Coord\n if (Array.isArray(origin) || typeof origin === \"object\")\n return getCoord(origin);\n\n // Define BBox\n const bbox = geojson.bbox\n ? geojson.bbox\n : turfBBox(geojson, { recompute: true });\n const west = bbox[0];\n const south = bbox[1];\n const east = bbox[2];\n const north = bbox[3];\n\n // Having to disable eslint below for lines which fail the no-fallthrough\n // rule, though only because of the ts-expect-error rules. Once we remove\n // southeast, bottomright, rightbottom, etc we should be able to remove all\n // these supressions.\n /* eslint-disable no-fallthrough */\n switch (origin) {\n case \"sw\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"southwest\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"westsouth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"bottomleft\":\n return point([west, south]);\n case \"se\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"southeast\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"eastsouth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"bottomright\":\n return point([east, south]);\n case \"nw\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"northwest\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"westnorth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"topleft\":\n return point([west, north]);\n case \"ne\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"northeast\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"eastnorth\":\n // @ts-expect-error undocumented, to be removed for v8 #techdebt\n case \"topright\":\n return point([east, north]);\n case \"center\":\n return center(geojson);\n case undefined:\n case null:\n case \"centroid\":\n return centroid(geojson);\n default:\n throw new Error(\"invalid origin\");\n }\n /* eslint-enable no-fallthrough */\n}\n\nexport { transformScale };\nexport default transformScale;\n"],"mappings":";AAE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,EACpC;AAEF;AAGA,IAAO,gBAAQ;","names":[]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turf/transform-scale",
3
- "version": "7.2.0",
4
- "description": "turf transform-scale module",
3
+ "version": "7.3.0",
4
+ "description": "Changes the size of a geometry by scaling it up or down.",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
7
7
  "Stefano Borghi <@stebogit>",
@@ -60,33 +60,33 @@
60
60
  "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"
61
61
  },
62
62
  "devDependencies": {
63
- "@turf/bbox-polygon": "^7.2.0",
64
- "@turf/hex-grid": "^7.2.0",
65
- "@turf/truncate": "^7.2.0",
63
+ "@turf/bbox-polygon": "7.3.0",
64
+ "@turf/hex-grid": "7.3.0",
65
+ "@turf/truncate": "7.3.0",
66
66
  "@types/benchmark": "^2.1.5",
67
- "@types/tape": "^4.13.4",
67
+ "@types/tape": "^5.8.1",
68
68
  "benchmark": "^2.1.4",
69
69
  "load-json-file": "^7.0.1",
70
70
  "npm-run-all": "^4.1.5",
71
71
  "tape": "^5.9.0",
72
- "tsup": "^8.3.5",
73
- "tsx": "^4.19.2",
74
- "typescript": "^5.5.4",
75
- "write-json-file": "^5.0.0"
72
+ "tsup": "^8.4.0",
73
+ "tsx": "^4.19.4",
74
+ "typescript": "^5.8.3",
75
+ "write-json-file": "^6.0.0"
76
76
  },
77
77
  "dependencies": {
78
- "@turf/bbox": "^7.2.0",
79
- "@turf/center": "^7.2.0",
80
- "@turf/centroid": "^7.2.0",
81
- "@turf/clone": "^7.2.0",
82
- "@turf/helpers": "^7.2.0",
83
- "@turf/invariant": "^7.2.0",
84
- "@turf/meta": "^7.2.0",
85
- "@turf/rhumb-bearing": "^7.2.0",
86
- "@turf/rhumb-destination": "^7.2.0",
87
- "@turf/rhumb-distance": "^7.2.0",
78
+ "@turf/bbox": "7.3.0",
79
+ "@turf/center": "7.3.0",
80
+ "@turf/centroid": "7.3.0",
81
+ "@turf/clone": "7.3.0",
82
+ "@turf/helpers": "7.3.0",
83
+ "@turf/invariant": "7.3.0",
84
+ "@turf/meta": "7.3.0",
85
+ "@turf/rhumb-bearing": "7.3.0",
86
+ "@turf/rhumb-destination": "7.3.0",
87
+ "@turf/rhumb-distance": "7.3.0",
88
88
  "@types/geojson": "^7946.0.10",
89
89
  "tslib": "^2.8.1"
90
90
  },
91
- "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
91
+ "gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
92
92
  }
@@ -7,6 +7,9 @@
7
7
  Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line
8
8
  on the provided direction angle.
9
9
 
10
+ Note that this moves the points of your shape individually and can therefore change
11
+ the overall shape. How noticable this is depends on the distance and the used projection.
12
+
10
13
  ### Parameters
11
14
 
12
15
  * `geojson` **([GeoJSON][1] | [GeometryCollection][2])** object to be translated
@@ -14,9 +17,9 @@ on the provided direction angle.
14
17
  * `direction` **[number][3]** of the motion; angle from North in decimal degrees, positive clockwise
15
18
  * `options` **[Object][4]** Optional parameters (optional, default `{}`)
16
19
 
17
- * `options.units` **Units** in which `distance` will be express; miles, kilometers, degrees, or radians (optional, default `'kilometers'`)
20
+ * `options.units` **Units** in which `distance` will be expressed; Supports all valid Turf [Units][5] (optional, default `'kilometers'`)
18
21
  * `options.zTranslation` **[number][3]** length of the vertical motion, same unit of distance (optional, default `0`)
19
- * `options.mutate` **[boolean][5]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
22
+ * `options.mutate` **[boolean][6]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
20
23
 
21
24
  ### Examples
22
25
 
@@ -39,7 +42,9 @@ Returns **([GeoJSON][1] | [GeometryCollection][2])** the translated GeoJSON obje
39
42
 
40
43
  [4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
41
44
 
42
- [5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
45
+ [5]: https://turfjs.org/docs/api/types/Units
46
+
47
+ [6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
43
48
 
44
49
  <!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->
45
50
 
@@ -35,9 +35,9 @@ function transformTranslate(geojson, distance, direction, options) {
35
35
  });
36
36
  return geojson;
37
37
  }
38
- var turf_transform_translate_default = transformTranslate;
38
+ var index_default = transformTranslate;
39
39
 
40
40
 
41
41
 
42
- exports.default = turf_transform_translate_default; exports.transformTranslate = transformTranslate;
42
+ exports.default = index_default; exports.transformTranslate = transformTranslate;
43
43
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-transform-translate/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACCA,kCAA0B;AAC1B,wCAAgC;AAChC,4CAA0B;AAC1B,oCAAsB;AACtB,2DAAiC;AAuBjC,SAAS,kBAAA,CACP,OAAA,EACA,QAAA,EACA,SAAA,EACA,OAAA,EAKG;AAEH,EAAA,QAAA,EAAU,QAAA,GAAW,CAAC,CAAA;AACtB,EAAA,GAAA,CAAI,CAAC,+BAAA,OAAgB,CAAA,EAAG,MAAM,IAAI,KAAA,CAAM,oBAAoB,CAAA;AAC5D,EAAA,IAAI,MAAA,EAAQ,OAAA,CAAQ,KAAA;AACpB,EAAA,IAAI,aAAA,EAAe,OAAA,CAAQ,YAAA;AAC3B,EAAA,IAAI,OAAA,EAAS,OAAA,CAAQ,MAAA;AAGrB,EAAA,GAAA,CAAI,CAAC,OAAA,EAAS,MAAM,IAAI,KAAA,CAAM,qBAAqB,CAAA;AACnD,EAAA,GAAA,CAAI,SAAA,IAAa,KAAA,EAAA,GAAa,SAAA,IAAa,KAAA,GAAQ,KAAA,CAAM,QAAQ,CAAA;AAC/D,IAAA,MAAM,IAAI,KAA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CAAA,EAAQ,kBAAA;AD5Cf;AACE;AACA;AACF,oGAAC","file":"/home/runner/work/turf/turf/packages/turf-transform-translate/dist/cjs/index.cjs","sourcesContent":[null,"import { GeoJSON, GeometryCollection } from \"geojson\";\nimport { coordEach } from \"@turf/meta\";\nimport { isObject, Units } from \"@turf/helpers\";\nimport { getCoords } from \"@turf/invariant\";\nimport { clone } from \"@turf/clone\";\nimport { rhumbDestination } from \"@turf/rhumb-destination\";\n\n/**\n * Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line\n * on the provided direction angle.\n *\n * @function\n * @param {GeoJSON|GeometryCollection} geojson object to be translated\n * @param {number} distance length of the motion; negative values determine motion in opposite direction\n * @param {number} direction of the motion; angle from North in decimal degrees, positive clockwise\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] in which `distance` will be express; miles, kilometers, degrees, or radians\n * @param {number} [options.zTranslation=0] length of the vertical motion, same unit of distance\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)\n * @returns {GeoJSON|GeometryCollection} the translated GeoJSON object\n * @example\n * var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\n * var translatedPoly = turf.transformTranslate(poly, 100, 35);\n *\n * //addToMap\n * var addToMap = [poly, translatedPoly];\n * translatedPoly.properties = {stroke: '#F00', 'stroke-width': 4};\n */\nfunction transformTranslate<T extends GeoJSON | GeometryCollection>(\n geojson: T,\n distance: number,\n direction: number,\n options?: {\n units?: Units;\n zTranslation?: number;\n mutate?: boolean;\n }\n): T {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var units = options.units;\n var zTranslation = options.zTranslation;\n var mutate = options.mutate;\n\n // Input validation\n if (!geojson) throw new Error(\"geojson is required\");\n if (distance === undefined || distance === null || isNaN(distance))\n throw new Error(\"distance is required\");\n if (zTranslation && typeof zTranslation !== \"number\" && isNaN(zTranslation))\n throw new Error(\"zTranslation is not a number\");\n\n // Shortcut no-motion\n zTranslation = zTranslation !== undefined ? zTranslation : 0;\n if (distance === 0 && zTranslation === 0) return geojson;\n\n if (direction === undefined || direction === null || isNaN(direction))\n throw new Error(\"direction is required\");\n\n // Invert with negative distances\n if (distance < 0) {\n distance = -distance;\n direction = direction + 180;\n }\n\n // Clone geojson to avoid side effects\n if (mutate === false || mutate === undefined) geojson = clone(geojson);\n\n // Translate each coordinate\n coordEach(geojson, function (pointCoords) {\n var newCoords = getCoords(\n rhumbDestination(pointCoords, distance, direction, { units: units })\n );\n pointCoords[0] = newCoords[0];\n pointCoords[1] = newCoords[1];\n if (zTranslation && pointCoords.length === 3)\n pointCoords[2] += zTranslation;\n });\n return geojson;\n}\n\nexport { transformTranslate };\nexport default transformTranslate;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-transform-translate/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACCA,kCAA0B;AAC1B,wCAAgC;AAChC,4CAA0B;AAC1B,oCAAsB;AACtB,2DAAiC;AA0BjC,SAAS,kBAAA,CACP,OAAA,EACA,QAAA,EACA,SAAA,EACA,OAAA,EAKG;AAEH,EAAA,QAAA,EAAU,QAAA,GAAW,CAAC,CAAA;AACtB,EAAA,GAAA,CAAI,CAAC,+BAAA,OAAgB,CAAA,EAAG,MAAM,IAAI,KAAA,CAAM,oBAAoB,CAAA;AAC5D,EAAA,IAAI,MAAA,EAAQ,OAAA,CAAQ,KAAA;AACpB,EAAA,IAAI,aAAA,EAAe,OAAA,CAAQ,YAAA;AAC3B,EAAA,IAAI,OAAA,EAAS,OAAA,CAAQ,MAAA;AAGrB,EAAA,GAAA,CAAI,CAAC,OAAA,EAAS,MAAM,IAAI,KAAA,CAAM,qBAAqB,CAAA;AACnD,EAAA,GAAA,CAAI,SAAA,IAAa,KAAA,EAAA,GAAa,SAAA,IAAa,KAAA,GAAQ,KAAA,CAAM,QAAQ,CAAA;AAC/D,IAAA,MAAM,IAAI,KAAA,CAAM,sBAA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BAAA;AD/Cf;AACE;AACA;AACF,iFAAC","file":"/home/runner/work/turf/turf/packages/turf-transform-translate/dist/cjs/index.cjs","sourcesContent":[null,"import { GeoJSON, GeometryCollection } from \"geojson\";\nimport { coordEach } from \"@turf/meta\";\nimport { isObject, Units } from \"@turf/helpers\";\nimport { getCoords } from \"@turf/invariant\";\nimport { clone } from \"@turf/clone\";\nimport { rhumbDestination } from \"@turf/rhumb-destination\";\n\n/**\n * Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line\n * on the provided direction angle.\n *\n * Note that this moves the points of your shape individually and can therefore change\n * the overall shape. How noticable this is depends on the distance and the used projection.\n *\n * @function\n * @param {GeoJSON|GeometryCollection} geojson object to be translated\n * @param {number} distance length of the motion; negative values determine motion in opposite direction\n * @param {number} direction of the motion; angle from North in decimal degrees, positive clockwise\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] in which `distance` will be expressed; Supports all valid Turf {@link https://turfjs.org/docs/api/types/Units Units}\n * @param {number} [options.zTranslation=0] length of the vertical motion, same unit of distance\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)\n * @returns {GeoJSON|GeometryCollection} the translated GeoJSON object\n * @example\n * var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\n * var translatedPoly = turf.transformTranslate(poly, 100, 35);\n *\n * //addToMap\n * var addToMap = [poly, translatedPoly];\n * translatedPoly.properties = {stroke: '#F00', 'stroke-width': 4};\n */\nfunction transformTranslate<T extends GeoJSON | GeometryCollection>(\n geojson: T,\n distance: number,\n direction: number,\n options?: {\n units?: Units;\n zTranslation?: number;\n mutate?: boolean;\n }\n): T {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var units = options.units;\n var zTranslation = options.zTranslation;\n var mutate = options.mutate;\n\n // Input validation\n if (!geojson) throw new Error(\"geojson is required\");\n if (distance === undefined || distance === null || isNaN(distance))\n throw new Error(\"distance is required\");\n if (zTranslation && typeof zTranslation !== \"number\" && isNaN(zTranslation))\n throw new Error(\"zTranslation is not a number\");\n\n // Shortcut no-motion\n zTranslation = zTranslation !== undefined ? zTranslation : 0;\n if (distance === 0 && zTranslation === 0) return geojson;\n\n if (direction === undefined || direction === null || isNaN(direction))\n throw new Error(\"direction is required\");\n\n // Invert with negative distances\n if (distance < 0) {\n distance = -distance;\n direction = direction + 180;\n }\n\n // Clone geojson to avoid side effects\n if (mutate === false || mutate === undefined) geojson = clone(geojson);\n\n // Translate each coordinate\n coordEach(geojson, function (pointCoords) {\n var newCoords = getCoords(\n rhumbDestination(pointCoords, distance, direction, { units: units })\n );\n pointCoords[0] = newCoords[0];\n pointCoords[1] = newCoords[1];\n if (zTranslation && pointCoords.length === 3)\n pointCoords[2] += zTranslation;\n });\n return geojson;\n}\n\nexport { transformTranslate };\nexport default transformTranslate;\n"]}
@@ -5,12 +5,15 @@ import { Units } from '@turf/helpers';
5
5
  * Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line
6
6
  * on the provided direction angle.
7
7
  *
8
+ * Note that this moves the points of your shape individually and can therefore change
9
+ * the overall shape. How noticable this is depends on the distance and the used projection.
10
+ *
8
11
  * @function
9
12
  * @param {GeoJSON|GeometryCollection} geojson object to be translated
10
13
  * @param {number} distance length of the motion; negative values determine motion in opposite direction
11
14
  * @param {number} direction of the motion; angle from North in decimal degrees, positive clockwise
12
15
  * @param {Object} [options={}] Optional parameters
13
- * @param {Units} [options.units='kilometers'] in which `distance` will be express; miles, kilometers, degrees, or radians
16
+ * @param {Units} [options.units='kilometers'] in which `distance` will be expressed; Supports all valid Turf {@link https://turfjs.org/docs/api/types/Units Units}
14
17
  * @param {number} [options.zTranslation=0] length of the vertical motion, same unit of distance
15
18
  * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
16
19
  * @returns {GeoJSON|GeometryCollection} the translated GeoJSON object
@@ -5,12 +5,15 @@ import { Units } from '@turf/helpers';
5
5
  * Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line
6
6
  * on the provided direction angle.
7
7
  *
8
+ * Note that this moves the points of your shape individually and can therefore change
9
+ * the overall shape. How noticable this is depends on the distance and the used projection.
10
+ *
8
11
  * @function
9
12
  * @param {GeoJSON|GeometryCollection} geojson object to be translated
10
13
  * @param {number} distance length of the motion; negative values determine motion in opposite direction
11
14
  * @param {number} direction of the motion; angle from North in decimal degrees, positive clockwise
12
15
  * @param {Object} [options={}] Optional parameters
13
- * @param {Units} [options.units='kilometers'] in which `distance` will be express; miles, kilometers, degrees, or radians
16
+ * @param {Units} [options.units='kilometers'] in which `distance` will be expressed; Supports all valid Turf {@link https://turfjs.org/docs/api/types/Units Units}
14
17
  * @param {number} [options.zTranslation=0] length of the vertical motion, same unit of distance
15
18
  * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
16
19
  * @returns {GeoJSON|GeometryCollection} the translated GeoJSON object
@@ -35,9 +35,9 @@ function transformTranslate(geojson, distance, direction, options) {
35
35
  });
36
36
  return geojson;
37
37
  }
38
- var turf_transform_translate_default = transformTranslate;
38
+ var index_default = transformTranslate;
39
39
  export {
40
- turf_transform_translate_default as default,
40
+ index_default as default,
41
41
  transformTranslate
42
42
  };
43
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { GeoJSON, GeometryCollection } from \"geojson\";\nimport { coordEach } from \"@turf/meta\";\nimport { isObject, Units } from \"@turf/helpers\";\nimport { getCoords } from \"@turf/invariant\";\nimport { clone } from \"@turf/clone\";\nimport { rhumbDestination } from \"@turf/rhumb-destination\";\n\n/**\n * Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line\n * on the provided direction angle.\n *\n * @function\n * @param {GeoJSON|GeometryCollection} geojson object to be translated\n * @param {number} distance length of the motion; negative values determine motion in opposite direction\n * @param {number} direction of the motion; angle from North in decimal degrees, positive clockwise\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] in which `distance` will be express; miles, kilometers, degrees, or radians\n * @param {number} [options.zTranslation=0] length of the vertical motion, same unit of distance\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)\n * @returns {GeoJSON|GeometryCollection} the translated GeoJSON object\n * @example\n * var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\n * var translatedPoly = turf.transformTranslate(poly, 100, 35);\n *\n * //addToMap\n * var addToMap = [poly, translatedPoly];\n * translatedPoly.properties = {stroke: '#F00', 'stroke-width': 4};\n */\nfunction transformTranslate<T extends GeoJSON | GeometryCollection>(\n geojson: T,\n distance: number,\n direction: number,\n options?: {\n units?: Units;\n zTranslation?: number;\n mutate?: boolean;\n }\n): T {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var units = options.units;\n var zTranslation = options.zTranslation;\n var mutate = options.mutate;\n\n // Input validation\n if (!geojson) throw new Error(\"geojson is required\");\n if (distance === undefined || distance === null || isNaN(distance))\n throw new Error(\"distance is required\");\n if (zTranslation && typeof zTranslation !== \"number\" && isNaN(zTranslation))\n throw new Error(\"zTranslation is not a number\");\n\n // Shortcut no-motion\n zTranslation = zTranslation !== undefined ? zTranslation : 0;\n if (distance === 0 && zTranslation === 0) return geojson;\n\n if (direction === undefined || direction === null || isNaN(direction))\n throw new Error(\"direction is required\");\n\n // Invert with negative distances\n if (distance < 0) {\n distance = -distance;\n direction = direction + 180;\n }\n\n // Clone geojson to avoid side effects\n if (mutate === false || mutate === undefined) geojson = clone(geojson);\n\n // Translate each coordinate\n coordEach(geojson, function (pointCoords) {\n var newCoords = getCoords(\n rhumbDestination(pointCoords, distance, direction, { units: units })\n );\n pointCoords[0] = newCoords[0];\n pointCoords[1] = newCoords[1];\n if (zTranslation && pointCoords.length === 3)\n pointCoords[2] += zTranslation;\n });\n return geojson;\n}\n\nexport { transformTranslate };\nexport default transformTranslate;\n"],"mappings":";AACA,SAAS,iBAAiB;AAC1B,SAAS,gBAAuB;AAChC,SAAS,iBAAiB;AAC1B,SAAS,aAAa;AACtB,SAAS,wBAAwB;AAuBjC,SAAS,mBACP,SACA,UACA,WACA,SAKG;AAEH,YAAU,WAAW,CAAC;AACtB,MAAI,CAAC,SAAS,OAAO,EAAG,OAAM,IAAI,MAAM,oBAAoB;AAC5D,MAAI,QAAQ,QAAQ;AACpB,MAAI,eAAe,QAAQ;AAC3B,MAAI,SAAS,QAAQ;AAGrB,MAAI,CAAC,QAAS,OAAM,IAAI,MAAM,qBAAqB;AACnD,MAAI,aAAa,UAAa,aAAa,QAAQ,MAAM,QAAQ;AAC/D,UAAM,IAAI,MAAM,sBAAsB;AACxC,MAAI,gBAAgB,OAAO,iBAAiB,YAAY,MAAM,YAAY;AACxE,UAAM,IAAI,MAAM,8BAA8B;AAGhD,iBAAe,iBAAiB,SAAY,eAAe;AAC3D,MAAI,aAAa,KAAK,iBAAiB,EAAG,QAAO;AAEjD,MAAI,cAAc,UAAa,cAAc,QAAQ,MAAM,SAAS;AAClE,UAAM,IAAI,MAAM,uBAAuB;AAGzC,MAAI,WAAW,GAAG;AAChB,eAAW,CAAC;AACZ,gBAAY,YAAY;AAAA,EAC1B;AAGA,MAAI,WAAW,SAAS,WAAW,OAAW,WAAU,MAAM,OAAO;AAGrE,YAAU,SAAS,SAAU,aAAa;AACxC,QAAI,YAAY;AAAA,MACd,iBAAiB,aAAa,UAAU,WAAW,EAAE,MAAa,CAAC;AAAA,IACrE;AACA,gBAAY,CAAC,IAAI,UAAU,CAAC;AAC5B,gBAAY,CAAC,IAAI,UAAU,CAAC;AAC5B,QAAI,gBAAgB,YAAY,WAAW;AACzC,kBAAY,CAAC,KAAK;AAAA,EACtB,CAAC;AACD,SAAO;AACT;AAGA,IAAO,mCAAQ;","names":[]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { GeoJSON, GeometryCollection } from \"geojson\";\nimport { coordEach } from \"@turf/meta\";\nimport { isObject, Units } from \"@turf/helpers\";\nimport { getCoords } from \"@turf/invariant\";\nimport { clone } from \"@turf/clone\";\nimport { rhumbDestination } from \"@turf/rhumb-destination\";\n\n/**\n * Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line\n * on the provided direction angle.\n *\n * Note that this moves the points of your shape individually and can therefore change\n * the overall shape. How noticable this is depends on the distance and the used projection.\n *\n * @function\n * @param {GeoJSON|GeometryCollection} geojson object to be translated\n * @param {number} distance length of the motion; negative values determine motion in opposite direction\n * @param {number} direction of the motion; angle from North in decimal degrees, positive clockwise\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] in which `distance` will be expressed; Supports all valid Turf {@link https://turfjs.org/docs/api/types/Units Units}\n * @param {number} [options.zTranslation=0] length of the vertical motion, same unit of distance\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)\n * @returns {GeoJSON|GeometryCollection} the translated GeoJSON object\n * @example\n * var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\n * var translatedPoly = turf.transformTranslate(poly, 100, 35);\n *\n * //addToMap\n * var addToMap = [poly, translatedPoly];\n * translatedPoly.properties = {stroke: '#F00', 'stroke-width': 4};\n */\nfunction transformTranslate<T extends GeoJSON | GeometryCollection>(\n geojson: T,\n distance: number,\n direction: number,\n options?: {\n units?: Units;\n zTranslation?: number;\n mutate?: boolean;\n }\n): T {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var units = options.units;\n var zTranslation = options.zTranslation;\n var mutate = options.mutate;\n\n // Input validation\n if (!geojson) throw new Error(\"geojson is required\");\n if (distance === undefined || distance === null || isNaN(distance))\n throw new Error(\"distance is required\");\n if (zTranslation && typeof zTranslation !== \"number\" && isNaN(zTranslation))\n throw new Error(\"zTranslation is not a number\");\n\n // Shortcut no-motion\n zTranslation = zTranslation !== undefined ? zTranslation : 0;\n if (distance === 0 && zTranslation === 0) return geojson;\n\n if (direction === undefined || direction === null || isNaN(direction))\n throw new Error(\"direction is required\");\n\n // Invert with negative distances\n if (distance < 0) {\n distance = -distance;\n direction = direction + 180;\n }\n\n // Clone geojson to avoid side effects\n if (mutate === false || mutate === undefined) geojson = clone(geojson);\n\n // Translate each coordinate\n coordEach(geojson, function (pointCoords) {\n var newCoords = getCoords(\n rhumbDestination(pointCoords, distance, direction, { units: units })\n );\n pointCoords[0] = newCoords[0];\n pointCoords[1] = newCoords[1];\n if (zTranslation && pointCoords.length === 3)\n pointCoords[2] += zTranslation;\n });\n return geojson;\n}\n\nexport { transformTranslate };\nexport default transformTranslate;\n"],"mappings":";AACA,SAAS,iBAAiB;AAC1B,SAAS,gBAAuB;AAChC,SAAS,iBAAiB;AAC1B,SAAS,aAAa;AACtB,SAAS,wBAAwB;AA0BjC,SAAS,mBACP,SACA,UACA,WACA,SAKG;AAEH,YAAU,WAAW,CAAC;AACtB,MAAI,CAAC,SAAS,OAAO,EAAG,OAAM,IAAI,MAAM,oBAAoB;AAC5D,MAAI,QAAQ,QAAQ;AACpB,MAAI,eAAe,QAAQ;AAC3B,MAAI,SAAS,QAAQ;AAGrB,MAAI,CAAC,QAAS,OAAM,IAAI,MAAM,qBAAqB;AACnD,MAAI,aAAa,UAAa,aAAa,QAAQ,MAAM,QAAQ;AAC/D,UAAM,IAAI,MAAM,sBAAsB;AACxC,MAAI,gBAAgB,OAAO,iBAAiB,YAAY,MAAM,YAAY;AACxE,UAAM,IAAI,MAAM,8BAA8B;AAGhD,iBAAe,iBAAiB,SAAY,eAAe;AAC3D,MAAI,aAAa,KAAK,iBAAiB,EAAG,QAAO;AAEjD,MAAI,cAAc,UAAa,cAAc,QAAQ,MAAM,SAAS;AAClE,UAAM,IAAI,MAAM,uBAAuB;AAGzC,MAAI,WAAW,GAAG;AAChB,eAAW,CAAC;AACZ,gBAAY,YAAY;AAAA,EAC1B;AAGA,MAAI,WAAW,SAAS,WAAW,OAAW,WAAU,MAAM,OAAO;AAGrE,YAAU,SAAS,SAAU,aAAa;AACxC,QAAI,YAAY;AAAA,MACd,iBAAiB,aAAa,UAAU,WAAW,EAAE,MAAa,CAAC;AAAA,IACrE;AACA,gBAAY,CAAC,IAAI,UAAU,CAAC;AAC5B,gBAAY,CAAC,IAAI,UAAU,CAAC;AAC5B,QAAI,gBAAgB,YAAY,WAAW;AACzC,kBAAY,CAAC,KAAK;AAAA,EACtB,CAAC;AACD,SAAO;AACT;AAGA,IAAO,gBAAQ;","names":[]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turf/transform-translate",
3
- "version": "7.2.0",
4
- "description": "turf transform-translate module",
3
+ "version": "7.3.0",
4
+ "description": "Moves a shape or location in a specific direction.",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
7
7
  "Stefano Borghi <@stebogit>",
@@ -58,26 +58,26 @@
58
58
  "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"
59
59
  },
60
60
  "devDependencies": {
61
- "@turf/truncate": "^7.2.0",
61
+ "@turf/truncate": "7.3.0",
62
62
  "@types/benchmark": "^2.1.5",
63
- "@types/tape": "^4.13.4",
63
+ "@types/tape": "^5.8.1",
64
64
  "benchmark": "^2.1.4",
65
65
  "load-json-file": "^7.0.1",
66
66
  "npm-run-all": "^4.1.5",
67
67
  "tape": "^5.9.0",
68
- "tsup": "^8.3.5",
69
- "tsx": "^4.19.2",
70
- "typescript": "^5.5.4",
71
- "write-json-file": "^5.0.0"
68
+ "tsup": "^8.4.0",
69
+ "tsx": "^4.19.4",
70
+ "typescript": "^5.8.3",
71
+ "write-json-file": "^6.0.0"
72
72
  },
73
73
  "dependencies": {
74
- "@turf/clone": "^7.2.0",
75
- "@turf/helpers": "^7.2.0",
76
- "@turf/invariant": "^7.2.0",
77
- "@turf/meta": "^7.2.0",
78
- "@turf/rhumb-destination": "^7.2.0",
74
+ "@turf/clone": "7.3.0",
75
+ "@turf/helpers": "7.3.0",
76
+ "@turf/invariant": "7.3.0",
77
+ "@turf/meta": "7.3.0",
78
+ "@turf/rhumb-destination": "7.3.0",
79
79
  "@types/geojson": "^7946.0.10",
80
80
  "tslib": "^2.8.1"
81
81
  },
82
- "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
82
+ "gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
83
83
  }
@@ -126,9 +126,9 @@ function triangleGrid(bbox, cellSide, options = {}) {
126
126
  }
127
127
  return _helpers.featureCollection.call(void 0, results);
128
128
  }
129
- var turf_triangle_grid_default = triangleGrid;
129
+ var index_default = triangleGrid;
130
130
 
131
131
 
132
132
 
133
- exports.default = turf_triangle_grid_default; exports.triangleGrid = triangleGrid;
133
+ exports.default = index_default; exports.triangleGrid = triangleGrid;
134
134
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-triangle-grid/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACOA,0CAAyB;AACzB,4CAA0B;AAC1B,wCAAkD;AAuBlD,SAAS,YAAA,CACP,IAAA,EACA,QAAA,EACA,QAAA,EAII,CAAC,CAAA,EAC0B;AAE/B,EAAA,IAAI,QAAA,EAAiC,CAAC,CAAA;AAYtC,EAAA,IAAI,UAAA,EACF,SAAA,EAAW,gCAAA,CAAU,IAAA,CAAK,CAAC,CAAA,EAAG,IAAA,CAAK,CAAC,CAAC,CAAA,EAAG,CAAC,IAAA,CAAK,CAAC,CAAA,EAAG,IAAA,CAAK,CAAC,CAAC,CAAA,EAAG,OAAO,CAAA;AACrE,EAAA,IAAI,UAAA,EAAY,UAAA,EAAA,CAAa,IAAA,CAAK,CAAC,EAAA,EAAI,IAAA,CAAK,CAAC,CAAA,CAAA;AAC7C,EAAA,IAAI,UAAA,EACF,SAAA,EAAW,gCAAA,CAAU,IAAA,CAAK,CAAC,CAAA,EAAG,IAAA,CAAK,CAAC,CAAC,CAAA,EAAG,CAAC,IAAA,CAAK,CAAC,CAAA,EAAG,IAAA,CAAK,CAAC,CAAC,CAAA,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AAC,CAAC,CAAA;AAC7D,UAAA,OAAA,CAAQ,IAAA,CAAK,aAAc,CAAA;AAC7B,QAAA,GAAA,CAAI,kCAAA,wCAAU,CAAmB,OAAA,CAAQ,IAAA,EAAM,aAAc,CAAC,CAAC,CAAA;AAC7D,UAAA,OAAA,CAAQ,IAAA,CAAK,aAAc,CAAA;AAAA,MAC/B,EAAA,KAAO;AACL,QAAA,OAAA,CAAQ,IAAA,CAAK,aAAc,CAAA;AAC3B,QAAA,OAAA,CAAQ,IAAA,CAAK,aAAc,CAAA;AAAA,MAC7B;AAEA,MAAA,SAAA,GAAY,UAAA;AACZ,MAAA,EAAA,EAAA;AAAA,IACF;AACA,IAAA,EAAA,EAAA;AACA,IAAA,SAAA,GAAY,SAAA;AAAA,EACd;AACA,EAAA,OAAO,wCAAA,OAAyB,CAAA;AAClC;AAGA,IAAO,2BAAA,EAAQ,YAAA;ADtDf;AACE;AACA;AACF,kFAAC","file":"/home/runner/work/turf/turf/packages/turf-triangle-grid/dist/cjs/index.cjs","sourcesContent":[null,"import {\n BBox,\n Feature,\n Polygon,\n FeatureCollection,\n GeoJsonProperties,\n} from \"geojson\";\nimport { distance } from \"@turf/distance\";\nimport { intersect } from \"@turf/intersect\";\nimport { polygon, featureCollection, Units } from \"@turf/helpers\";\n\n/**\n * Creates a grid of triangular polygons.\n *\n * @function\n * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order\n * @param {number} cellSide dimension of each grid cell. Two triangles are created in each cell.\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] used in calculating cellSide. Supports all valid Turf {@link https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md Units}\n * @param {Feature<Polygon>} [options.mask] if passed a Polygon or MultiPolygon, the grid Points will be created only inside it\n * @param {Object} [options.properties={}] passed to each point of the grid\n * @returns {FeatureCollection<Polygon>} grid of polygons\n * @example\n * var bbox = [-95, 30 ,-85, 40];\n * var cellSide = 50;\n * var options = {units: 'miles'};\n *\n * var triangleGrid = turf.triangleGrid(bbox, cellSide, options);\n *\n * //addToMap\n * var addToMap = [triangleGrid];\n */\nfunction triangleGrid<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon>;\n } = {}\n): FeatureCollection<Polygon, P> {\n // Containers\n var results: Feature<Polygon, P>[] = [];\n\n // Input Validation is being handled by Typescript\n\n // if (cellSide === null || cellSide === undefined) throw new Error('cellSide is required');\n // if (!isNumber(cellSide)) throw new Error('cellSide is invalid');\n // if (!bbox) throw new Error('bbox is required');\n // if (!Array.isArray(bbox)) throw new Error('bbox must be array');\n // if (bbox.length !== 4) throw new Error('bbox must contain 4 numbers');\n // if (mask && ['Polygon', 'MultiPolygon'].indexOf(getType(mask)) === -1) throw new Error('options.mask must be a (Multi)Polygon');\n\n // Main\n var xFraction =\n cellSide / distance([bbox[0], bbox[1]], [bbox[2], bbox[1]], options);\n var cellWidth = xFraction * (bbox[2] - bbox[0]);\n var yFraction =\n cellSide / distance([bbox[0], bbox[1]], [bbox[0], bbox[3]], options);\n var cellHeight = yFraction * (bbox[3] - bbox[1]);\n\n var xi = 0;\n var currentX = bbox[0];\n while (currentX <= bbox[2]) {\n var yi = 0;\n var currentY = bbox[1];\n while (currentY <= bbox[3]) {\n var cellTriangle1 = null;\n var cellTriangle2 = null;\n\n if (xi % 2 === 0 && yi % 2 === 0) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY + cellHeight],\n ],\n ],\n options.properties\n );\n } else if (xi % 2 === 0 && yi % 2 === 1) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n } else if (yi % 2 === 0 && xi % 2 === 1) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n } else if (yi % 2 === 1 && xi % 2 === 1) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY + cellHeight],\n ],\n ],\n options.properties\n );\n }\n if (options.mask) {\n if (intersect(featureCollection([options.mask, cellTriangle1!])))\n results.push(cellTriangle1!);\n if (intersect(featureCollection([options.mask, cellTriangle2!])))\n results.push(cellTriangle2!);\n } else {\n results.push(cellTriangle1!);\n results.push(cellTriangle2!);\n }\n\n currentY += cellHeight;\n yi++;\n }\n xi++;\n currentX += cellWidth;\n }\n return featureCollection(results);\n}\n\nexport { triangleGrid };\nexport default triangleGrid;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-triangle-grid/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACOA,0CAAyB;AACzB,4CAA0B;AAC1B,wCAAkD;AAuBlD,SAAS,YAAA,CACP,IAAA,EACA,QAAA,EACA,QAAA,EAII,CAAC,CAAA,EAC0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,\n GeoJsonProperties,\n} from \"geojson\";\nimport { distance } from \"@turf/distance\";\nimport { intersect } from \"@turf/intersect\";\nimport { polygon, featureCollection, Units } from \"@turf/helpers\";\n\n/**\n * Creates a grid of triangular polygons.\n *\n * @function\n * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order\n * @param {number} cellSide dimension of each grid cell. Two triangles are created in each cell.\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] used in calculating cellSide. Supports all valid Turf {@link https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md Units}\n * @param {Feature<Polygon>} [options.mask] if passed a Polygon or MultiPolygon, the grid Points will be created only inside it\n * @param {Object} [options.properties={}] passed to each point of the grid\n * @returns {FeatureCollection<Polygon>} grid of polygons\n * @example\n * var bbox = [-95, 30 ,-85, 40];\n * var cellSide = 50;\n * var options = {units: 'miles'};\n *\n * var triangleGrid = turf.triangleGrid(bbox, cellSide, options);\n *\n * //addToMap\n * var addToMap = [triangleGrid];\n */\nfunction triangleGrid<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon>;\n } = {}\n): FeatureCollection<Polygon, P> {\n // Containers\n var results: Feature<Polygon, P>[] = [];\n\n // Input Validation is being handled by Typescript\n\n // if (cellSide === null || cellSide === undefined) throw new Error('cellSide is required');\n // if (!isNumber(cellSide)) throw new Error('cellSide is invalid');\n // if (!bbox) throw new Error('bbox is required');\n // if (!Array.isArray(bbox)) throw new Error('bbox must be array');\n // if (bbox.length !== 4) throw new Error('bbox must contain 4 numbers');\n // if (mask && ['Polygon', 'MultiPolygon'].indexOf(getType(mask)) === -1) throw new Error('options.mask must be a (Multi)Polygon');\n\n // Main\n var xFraction =\n cellSide / distance([bbox[0], bbox[1]], [bbox[2], bbox[1]], options);\n var cellWidth = xFraction * (bbox[2] - bbox[0]);\n var yFraction =\n cellSide / distance([bbox[0], bbox[1]], [bbox[0], bbox[3]], options);\n var cellHeight = yFraction * (bbox[3] - bbox[1]);\n\n var xi = 0;\n var currentX = bbox[0];\n while (currentX <= bbox[2]) {\n var yi = 0;\n var currentY = bbox[1];\n while (currentY <= bbox[3]) {\n var cellTriangle1 = null;\n var cellTriangle2 = null;\n\n if (xi % 2 === 0 && yi % 2 === 0) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY + cellHeight],\n ],\n ],\n options.properties\n );\n } else if (xi % 2 === 0 && yi % 2 === 1) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n } else if (yi % 2 === 0 && xi % 2 === 1) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n } else if (yi % 2 === 1 && xi % 2 === 1) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY + cellHeight],\n ],\n ],\n options.properties\n );\n }\n if (options.mask) {\n if (intersect(featureCollection([options.mask, cellTriangle1!])))\n results.push(cellTriangle1!);\n if (intersect(featureCollection([options.mask, cellTriangle2!])))\n results.push(cellTriangle2!);\n } else {\n results.push(cellTriangle1!);\n results.push(cellTriangle2!);\n }\n\n currentY += cellHeight;\n yi++;\n }\n xi++;\n currentX += cellWidth;\n }\n return featureCollection(results);\n}\n\nexport { triangleGrid };\nexport default triangleGrid;\n"]}
@@ -126,9 +126,9 @@ function triangleGrid(bbox, cellSide, options = {}) {
126
126
  }
127
127
  return featureCollection(results);
128
128
  }
129
- var turf_triangle_grid_default = triangleGrid;
129
+ var index_default = triangleGrid;
130
130
  export {
131
- turf_triangle_grid_default as default,
131
+ index_default as default,
132
132
  triangleGrid
133
133
  };
134
134
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n BBox,\n Feature,\n Polygon,\n FeatureCollection,\n GeoJsonProperties,\n} from \"geojson\";\nimport { distance } from \"@turf/distance\";\nimport { intersect } from \"@turf/intersect\";\nimport { polygon, featureCollection, Units } from \"@turf/helpers\";\n\n/**\n * Creates a grid of triangular polygons.\n *\n * @function\n * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order\n * @param {number} cellSide dimension of each grid cell. Two triangles are created in each cell.\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] used in calculating cellSide. Supports all valid Turf {@link https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md Units}\n * @param {Feature<Polygon>} [options.mask] if passed a Polygon or MultiPolygon, the grid Points will be created only inside it\n * @param {Object} [options.properties={}] passed to each point of the grid\n * @returns {FeatureCollection<Polygon>} grid of polygons\n * @example\n * var bbox = [-95, 30 ,-85, 40];\n * var cellSide = 50;\n * var options = {units: 'miles'};\n *\n * var triangleGrid = turf.triangleGrid(bbox, cellSide, options);\n *\n * //addToMap\n * var addToMap = [triangleGrid];\n */\nfunction triangleGrid<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon>;\n } = {}\n): FeatureCollection<Polygon, P> {\n // Containers\n var results: Feature<Polygon, P>[] = [];\n\n // Input Validation is being handled by Typescript\n\n // if (cellSide === null || cellSide === undefined) throw new Error('cellSide is required');\n // if (!isNumber(cellSide)) throw new Error('cellSide is invalid');\n // if (!bbox) throw new Error('bbox is required');\n // if (!Array.isArray(bbox)) throw new Error('bbox must be array');\n // if (bbox.length !== 4) throw new Error('bbox must contain 4 numbers');\n // if (mask && ['Polygon', 'MultiPolygon'].indexOf(getType(mask)) === -1) throw new Error('options.mask must be a (Multi)Polygon');\n\n // Main\n var xFraction =\n cellSide / distance([bbox[0], bbox[1]], [bbox[2], bbox[1]], options);\n var cellWidth = xFraction * (bbox[2] - bbox[0]);\n var yFraction =\n cellSide / distance([bbox[0], bbox[1]], [bbox[0], bbox[3]], options);\n var cellHeight = yFraction * (bbox[3] - bbox[1]);\n\n var xi = 0;\n var currentX = bbox[0];\n while (currentX <= bbox[2]) {\n var yi = 0;\n var currentY = bbox[1];\n while (currentY <= bbox[3]) {\n var cellTriangle1 = null;\n var cellTriangle2 = null;\n\n if (xi % 2 === 0 && yi % 2 === 0) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY + cellHeight],\n ],\n ],\n options.properties\n );\n } else if (xi % 2 === 0 && yi % 2 === 1) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n } else if (yi % 2 === 0 && xi % 2 === 1) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n } else if (yi % 2 === 1 && xi % 2 === 1) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY + cellHeight],\n ],\n ],\n options.properties\n );\n }\n if (options.mask) {\n if (intersect(featureCollection([options.mask, cellTriangle1!])))\n results.push(cellTriangle1!);\n if (intersect(featureCollection([options.mask, cellTriangle2!])))\n results.push(cellTriangle2!);\n } else {\n results.push(cellTriangle1!);\n results.push(cellTriangle2!);\n }\n\n currentY += cellHeight;\n yi++;\n }\n xi++;\n currentX += cellWidth;\n }\n return featureCollection(results);\n}\n\nexport { triangleGrid };\nexport default triangleGrid;\n"],"mappings":";AAOA,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAC1B,SAAS,SAAS,yBAAgC;AAuBlD,SAAS,aACP,MACA,UACA,UAII,CAAC,GAC0B;AAE/B,MAAI,UAAiC,CAAC;AAYtC,MAAI,YACF,WAAW,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,KA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U,WAAW,UAAU;AAAA,YAClC;AAAA,UACF;AAAA,UACA,QAAQ;AAAA,QACV;AAAA,MACF;AACA,UAAI,QAAQ,MAAM;AAChB,YAAI,UAAU,kBAAkB,CAAC,QAAQ,MAAM,aAAc,CAAC,CAAC;AAC7D,kBAAQ,KAAK,aAAc;AAC7B,YAAI,UAAU,kBAAkB,CAAC,QAAQ,MAAM,aAAc,CAAC,CAAC;AAC7D,kBAAQ,KAAK,aAAc;AAAA,MAC/B,OAAO;AACL,gBAAQ,KAAK,aAAc;AAC3B,gBAAQ,KAAK,aAAc;AAAA,MAC7B;AAEA,kBAAY;AACZ;AAAA,IACF;AACA;AACA,gBAAY;AAAA,EACd;AACA,SAAO,kBAAkB,OAAO;AAClC;AAGA,IAAO,6BAAQ;","names":[]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n BBox,\n Feature,\n Polygon,\n FeatureCollection,\n GeoJsonProperties,\n} from \"geojson\";\nimport { distance } from \"@turf/distance\";\nimport { intersect } from \"@turf/intersect\";\nimport { polygon, featureCollection, Units } from \"@turf/helpers\";\n\n/**\n * Creates a grid of triangular polygons.\n *\n * @function\n * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order\n * @param {number} cellSide dimension of each grid cell. Two triangles are created in each cell.\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] used in calculating cellSide. Supports all valid Turf {@link https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md Units}\n * @param {Feature<Polygon>} [options.mask] if passed a Polygon or MultiPolygon, the grid Points will be created only inside it\n * @param {Object} [options.properties={}] passed to each point of the grid\n * @returns {FeatureCollection<Polygon>} grid of polygons\n * @example\n * var bbox = [-95, 30 ,-85, 40];\n * var cellSide = 50;\n * var options = {units: 'miles'};\n *\n * var triangleGrid = turf.triangleGrid(bbox, cellSide, options);\n *\n * //addToMap\n * var addToMap = [triangleGrid];\n */\nfunction triangleGrid<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon>;\n } = {}\n): FeatureCollection<Polygon, P> {\n // Containers\n var results: Feature<Polygon, P>[] = [];\n\n // Input Validation is being handled by Typescript\n\n // if (cellSide === null || cellSide === undefined) throw new Error('cellSide is required');\n // if (!isNumber(cellSide)) throw new Error('cellSide is invalid');\n // if (!bbox) throw new Error('bbox is required');\n // if (!Array.isArray(bbox)) throw new Error('bbox must be array');\n // if (bbox.length !== 4) throw new Error('bbox must contain 4 numbers');\n // if (mask && ['Polygon', 'MultiPolygon'].indexOf(getType(mask)) === -1) throw new Error('options.mask must be a (Multi)Polygon');\n\n // Main\n var xFraction =\n cellSide / distance([bbox[0], bbox[1]], [bbox[2], bbox[1]], options);\n var cellWidth = xFraction * (bbox[2] - bbox[0]);\n var yFraction =\n cellSide / distance([bbox[0], bbox[1]], [bbox[0], bbox[3]], options);\n var cellHeight = yFraction * (bbox[3] - bbox[1]);\n\n var xi = 0;\n var currentX = bbox[0];\n while (currentX <= bbox[2]) {\n var yi = 0;\n var currentY = bbox[1];\n while (currentY <= bbox[3]) {\n var cellTriangle1 = null;\n var cellTriangle2 = null;\n\n if (xi % 2 === 0 && yi % 2 === 0) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY + cellHeight],\n ],\n ],\n options.properties\n );\n } else if (xi % 2 === 0 && yi % 2 === 1) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n } else if (yi % 2 === 0 && xi % 2 === 1) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n } else if (yi % 2 === 1 && xi % 2 === 1) {\n cellTriangle1 = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n cellTriangle2 = polygon(\n [\n [\n [currentX, currentY + cellHeight],\n [currentX + cellWidth, currentY + cellHeight],\n [currentX + cellWidth, currentY],\n [currentX, currentY + cellHeight],\n ],\n ],\n options.properties\n );\n }\n if (options.mask) {\n if (intersect(featureCollection([options.mask, cellTriangle1!])))\n results.push(cellTriangle1!);\n if (intersect(featureCollection([options.mask, cellTriangle2!])))\n results.push(cellTriangle2!);\n } else {\n results.push(cellTriangle1!);\n results.push(cellTriangle2!);\n }\n\n currentY += cellHeight;\n yi++;\n }\n xi++;\n currentX += cellWidth;\n }\n return featureCollection(results);\n}\n\nexport { triangleGrid };\nexport default triangleGrid;\n"],"mappings":";AAOA,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAC1B,SAAS,SAAS,yBAAgC;AAuBlD,SAAS,aACP,MACA,UACA,UAII,CAAC,GAC0B;AAE/B,MAAI,UAAiC,CAAC;AAYtC,MAAI,YACF,WAAW,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,OAAO;AACrE,MAAI,YAAY,aAAa,KAAK,CAAC,IAAI,KAAK,CAAC;AA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AI,QAAQ,MAAM;AAChB,YAAI,UAAU,kBAAkB,CAAC,QAAQ,MAAM,aAAc,CAAC,CAAC;AAC7D,kBAAQ,KAAK,aAAc;AAC7B,YAAI,UAAU,kBAAkB,CAAC,QAAQ,MAAM,aAAc,CAAC,CAAC;AAC7D,kBAAQ,KAAK,aAAc;AAAA,MAC/B,OAAO;AACL,gBAAQ,KAAK,aAAc;AAC3B,gBAAQ,KAAK,aAAc;AAAA,MAC7B;AAEA,kBAAY;AACZ;AAAA,IACF;AACA;AACA,gBAAY;AAAA,EACd;AACA,SAAO,kBAAkB,OAAO;AAClC;AAGA,IAAO,gBAAQ;","names":[]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turf/triangle-grid",
3
- "version": "7.2.0",
4
- "description": "turf triangle-grid module",
3
+ "version": "7.3.0",
4
+ "description": "Creates a triangular grid within a bounding box.",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
7
7
  "bugs": {
@@ -54,25 +54,25 @@
54
54
  "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"
55
55
  },
56
56
  "devDependencies": {
57
- "@turf/bbox-polygon": "^7.2.0",
58
- "@turf/truncate": "^7.2.0",
57
+ "@turf/bbox-polygon": "7.3.0",
58
+ "@turf/truncate": "7.3.0",
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/distance": "^7.2.0",
72
- "@turf/helpers": "^7.2.0",
73
- "@turf/intersect": "^7.2.0",
71
+ "@turf/distance": "7.3.0",
72
+ "@turf/helpers": "7.3.0",
73
+ "@turf/intersect": "7.3.0",
74
74
  "@types/geojson": "^7946.0.10",
75
75
  "tslib": "^2.8.1"
76
76
  },
77
- "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
77
+ "gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
78
78
  }
@@ -29,9 +29,9 @@ function truncateCoords(coords, factor, coordinates) {
29
29
  }
30
30
  return coords;
31
31
  }
32
- var turf_truncate_default = truncate;
32
+ var index_default = truncate;
33
33
 
34
34
 
35
35
 
36
- exports.default = turf_truncate_default; exports.truncate = truncate;
36
+ exports.default = index_default; exports.truncate = truncate;
37
37
  //# sourceMappingURL=index.cjs.map