chunk-TNLRDNTC.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import {
  2. W
  3. } from "./chunk-O4FY3ITT.js";
  4. import {
  5. E
  6. } from "./chunk-MRJEICT6.js";
  7. import {
  8. t
  9. } from "./chunk-GZT4BVFP.js";
  10. // node_modules/@arcgis/core/geometry/support/zscale.js
  11. function o(o2, f, u) {
  12. if (t(f) || t(u) || u.vcsWkid || E(f, u))
  13. return null;
  14. const a = W(f) / W(u);
  15. if (a === 1)
  16. return null;
  17. switch (o2) {
  18. case "point":
  19. case "esriGeometryPoint":
  20. return (n) => r(n, a);
  21. case "polyline":
  22. case "esriGeometryPolyline":
  23. return (n) => s(n, a);
  24. case "polygon":
  25. case "esriGeometryPolygon":
  26. return (n) => i(n, a);
  27. case "multipoint":
  28. case "esriGeometryMultipoint":
  29. return (n) => c(n, a);
  30. case "extent":
  31. case "esriGeometryExtent":
  32. return (n) => l(n, a);
  33. default:
  34. return null;
  35. }
  36. }
  37. function r(n, e) {
  38. n && n.z != null && (n.z *= e);
  39. }
  40. function i(n, e) {
  41. if (n)
  42. for (const t2 of n.rings)
  43. for (const n2 of t2)
  44. n2.length > 2 && (n2[2] *= e);
  45. }
  46. function s(n, e) {
  47. if (n)
  48. for (const t2 of n.paths)
  49. for (const n2 of t2)
  50. n2.length > 2 && (n2[2] *= e);
  51. }
  52. function c(n, e) {
  53. if (n)
  54. for (const t2 of n.points)
  55. t2.length > 2 && (t2[2] *= e);
  56. }
  57. function l(n, e) {
  58. n && n.zmin != null && n.zmax != null && (n.zmin *= e, n.zmax *= e);
  59. }
  60. export {
  61. o
  62. };
  63. //# sourceMappingURL=chunk-TNLRDNTC.js.map