UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 4.01 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/JSONSupport.js";import{clone as r}from"../../core/lang.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{writer as s}from"../../core/accessorSupport/decorators/writer.js";import n from"../../geometry/Point.js";import{getJsonType as l}from"../../geometry/support/jsonUtils.js";import{geometryTypes as u}from"../../geometry/support/typeUtils.js";import p from"../../layers/support/MosaicRule.js";import a from"../../layers/support/RasterFunction.js";import{T as m}from"../../chunks/TimeExtent.js";var c;let y=c=class extends e{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(t,e,r){null!=t&&(e.geometryType=l(t),e[r]=JSON.stringify(t.toJSON()))}set mosaicRule(t){let e=t;e?.mosaicMethod&&(e=p.fromJSON({...e.toJSON(),mosaicMethod:e.mosaicMethod,mosaicOperation:e.mosaicOperation})),this._set("mosaicRule",e)}writeMosaicRule(t,e,r){null!=t&&(e[r]=JSON.stringify(t.toJSON()))}set rasterFunction(t){let e=t;e?.rasterFunction&&(e=a.fromJSON({...e.toJSON(),rasterFunction:e.rasterFunction,rasterFunctionArguments:e.rasterFunctionArguments})),this._set("rasterFunction",e)}writeRasterFunction(t,e,r){null!=t&&(e[r]=JSON.stringify(t.toJSON())),t.rasterFunctionDefinition&&(e[r]=JSON.stringify(t.rasterFunctionDefinition))}writeRasterFunctions(t,e,r){null!=t&&(e[r]=JSON.stringify(t.map((t=>t.rasterFunctionDefinition||t.toJSON()))))}writePixelSize(t,e,r){null!=t&&(e[r]=JSON.stringify(t))}writeTimeExtent(t,e,r){if(null!=t){const o=null!=t.start?t.start.getTime():null,i=null!=t.end?t.end.getTime():null;e[r]=null!=o?null!=i?`${o},${i}`:`${o}`:null}}clone(){return new c(r({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};t([o({types:u,json:{write:!0}})],y.prototype,"geometry",void 0),t([s("geometry")],y.prototype,"writeGeometry",null),t([o({type:p,json:{write:!0}})],y.prototype,"mosaicRule",null),t([s("mosaicRule")],y.prototype,"writeMosaicRule",null),t([o({type:a,json:{write:!0,name:"renderingRule"}})],y.prototype,"rasterFunction",null),t([s("rasterFunction")],y.prototype,"writeRasterFunction",null),t([o({type:[a],json:{write:!0,name:"renderingRules"}})],y.prototype,"rasterFunctions",void 0),t([s("rasterFunctions")],y.prototype,"writeRasterFunctions",null),t([o({type:n,json:{write:!0}})],y.prototype,"pixelSize",void 0),t([s("pixelSize")],y.prototype,"writePixelSize",null),t([o({type:Boolean,json:{write:!0}})],y.prototype,"returnGeometry",void 0),t([o({type:Boolean,json:{write:!0}})],y.prototype,"returnCatalogItems",void 0),t([o({type:Boolean,json:{write:!0}})],y.prototype,"returnPixelValues",void 0),t([o({type:Number,json:{write:!0}})],y.prototype,"maxItemCount",void 0),t([o({type:m,json:{write:{target:"time"}}})],y.prototype,"timeExtent",void 0),t([s("timeExtent")],y.prototype,"writeTimeExtent",null),t([o({json:{write:!0}})],y.prototype,"raster",void 0),t([o({json:{write:!0}})],y.prototype,"viewId",void 0),t([o({type:Boolean,json:{write:!0}})],y.prototype,"processAsMultidimensional",void 0),y=c=t([i("esri.rest.support.ImageIdentifyParameters")],y);export{y as default};