/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{__decorate as r}from"tslib";import{property as e,subclass as t}from"../../../core/accessorSupport/decorators.js";import o from"./BaseRasterTransform.js";import{enumeration as s}from"../../../core/accessorSupport/decorators/enumeration.js";var n;let a=n=class extends o{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 n({tolerance:this.tolerance})}};r([s({GCSShiftXform:"gcs-shift"})],a.prototype,"type",void 0),r([e()],a.prototype,"tolerance",void 0),a=n=r([t("esri.layers.raster.transforms.GCSShiftTransform")],a);export{a as default};
