UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 1.69 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{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import r from"./AspectFunctionArguments.js";import o from"./BaseRasterFunction.js";import{aspect as i}from"./surfaceUtils.js";let n=class extends o{constructor(){super(...arguments),this.functionName="Aspect",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){const t=this.sourceRasterInfos[0];this.isGCS=t.spatialReference?.isGeographic??!1,this.outputPixelType=this._getOutputPixelType("f32");const s=t.clone();return s.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(s),s.statistics=[{min:-1,max:360,avg:180,stddev:30}],s.bandCount=1,this.rasterInfo=s,{success:!0,supportsGPU:!0}}_processPixels(t){const s=t.pixelBlocks?.[0];if(null==s)return null;const{extent:e,primaryPixelSizes:r}=t,o=r?.[0],n=o??(e?{x:e.width/s.width,y:e.height/s.height}:{x:1,y:1});return i(s,{resolution:n})}};t([s({json:{write:!0,name:"rasterFunction"}})],n.prototype,"functionName",void 0),t([s({type:r,json:{write:!0,name:"rasterFunctionArguments"}})],n.prototype,"functionArguments",void 0),t([s()],n.prototype,"rasterArgumentNames",void 0),t([s({json:{write:!0}})],n.prototype,"isGCS",void 0),n=t([e("esri.layers.support.rasterFunctions.AspectFunction")],n);const p=n;export{p as default};