/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{getMetersPerVerticalUnitForSR as e}from"../../core/units.js";import{isSphericalPCPF as n}from"../ellipsoidUtils.js";import{equals as o}from"./spatialReferenceUtils.js";function t(t,f,u){if(null==f||null==u||u.vcsWkid||o(f,u)||n(f)||n(u))return;const a=e(f)/e(u);if(1!==a)switch(t){case"point":case"esriGeometryPoint":return e=>i(e,a);case"polyline":case"esriGeometryPolyline":return e=>s(e,a);case"polygon":case"esriGeometryPolygon":return e=>r(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>l(e,a);case"extent":case"esriGeometryEnvelope":return e=>c(e,a);default:return}}function i(e,n){null!=e?.z&&(e.z*=n)}function r(e,n){if(e)for(const o of e.rings)for(const e of o)e.length>2&&(e[2]*=n)}function s(e,n){if(e)for(const o of e.paths)for(const e of o)e.length>2&&(e[2]*=n)}function l(e,n){if(e)for(const o of e.points)o.length>2&&(o[2]*=n)}function c(e,n){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=n,e.zmax*=n)}export{t as getGeometryZScaler};
