@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.28 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import{_ as r}from"../../../chunks/tslib.es6.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{enumeration as e}from"../../../core/accessorSupport/decorators/enumeration.js";import{subclass as t}from"../../../core/accessorSupport/decorators/subclass.js";import s from"./BaseRasterTransform.js";var a;let n=a=class extends s{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(r){return"point"===(r=r.clone()).type?(r.x>180+this.tolerance&&(r.x-=360),r):(r.xmin>=180-this.tolerance?(r.xmax-=360,r.xmin-=360):r.xmax>180+this.tolerance&&(r.xmin=-180,r.xmax=180),r)}inverseTransform(r){return"point"===(r=r.clone()).type?(r.x<-this.tolerance&&(r.x+=360),r):(r.xmin<-this.tolerance&&(r.xmin+=360,r.xmax+=360),r)}clone(){return new a({tolerance:this.tolerance})}};r([e({GCSShiftXform:"gcs-shift"})],n.prototype,"type",void 0),r([o()],n.prototype,"tolerance",void 0),n=a=r([t("esri.layers.support.rasterTransforms.GCSShiftTransform")],n);export{n as default};