@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 875 B
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import{JSONMap as t}from"../../../../core/jsonMap.js";import{statisticsTypeMap as s}from"../focalStatUtils.js";import{createRasterFunction as i}from"./utils.js";function a(t){const{rows:a,cols:e,fillNoDataOnly:o=!1,raster:r,outputPixelType:n}=t,l=s.toJSON(t.statisticsType);return i("Statistics",{rows:a,cols:e,fillNoDataOnly:o,statisticsType:l,raster:r},n)}const e=new t({0:"max",1:"min",2:"median",3:"duration"},{useNumericKeys:!0});function o(t){const{rasters:s,outputPixelType:a}=t,o={argStatisticsType:e.toJSON(t.statisticsType),rasters:s};return"duration"===t.statisticsType?(o.minValue=t.minValue,o.maxValue=t.maxValue):o.undefinedClass=t.undefinedClass,i("ArgStatistics",o,a)}export{o as argStatistics,a as statistics};