@arcgis/core 5.0.0-next.43 → 5.0.0-next.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/applications/Components/imageryUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{f97a7cb367634353177d.js → 001a7a4cf6fe74432ed6.js} +1 -1
- package/assets/esri/core/workers/chunks/{324d66962aeec17d3e28.js → 1e0e7cef7ef947894bbe.js} +1 -1
- package/assets/esri/core/workers/chunks/20ad34f9d45c64392022.js +1 -0
- package/assets/esri/core/workers/chunks/23396a6318edf9264c1f.js +1 -0
- package/assets/esri/core/workers/chunks/{ad891ac388fa6c1c9b94.js → 2b34a010f76e5f289868.js} +1 -1
- package/assets/esri/core/workers/chunks/2ef4c0092c59a98a5532.js +1 -0
- package/assets/esri/core/workers/chunks/35272810c2ed04eb403d.js +1 -0
- package/assets/esri/core/workers/chunks/{d1f4152b2b8d47cbf586.js → 72fbee59d5d909615408.js} +1 -1
- package/assets/esri/core/workers/chunks/75c66e38bdc1c786c599.js +1 -0
- package/assets/esri/core/workers/chunks/7d3c2a063598bdd015e2.js +1 -0
- package/assets/esri/core/workers/chunks/897ce6fc9cefb1e14a64.js +1 -0
- package/assets/esri/core/workers/chunks/992e9bbdf9d3787ddb0e.js +1 -0
- package/assets/esri/core/workers/chunks/a2442549c5daf3653eb4.js +1 -0
- package/assets/esri/core/workers/chunks/a7cd795042ebb8585906.js +1 -0
- package/assets/esri/core/workers/chunks/bf5f9da0837ed09729c6.js +316 -0
- package/assets/esri/core/workers/chunks/{385cfd3087f00dbd1146.js → ca1c65eb7f5900c60170.js} +1 -1
- package/assets/esri/core/workers/chunks/cddce67919e13e2f365e.js +1 -0
- package/assets/esri/core/workers/chunks/{7c08c0824ad354177787.js → d7878fba02814adaf19f.js} +1 -1
- package/assets/esri/core/workers/chunks/e6784251bbb8b71ead93.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/chunks/GaussianSplat.glsl.js +2 -2
- package/config.js +1 -1
- package/core/urlUtils.d.ts +1 -0
- package/core/workers/workerFactory.js +1 -1
- package/interfaces.d.ts +104 -9
- package/kernel.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/WCSLayer.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/mixins/RasterJobHandlerMixin.js +1 -1
- package/layers/ogc/wcsUtils.js +1 -1
- package/layers/raster/datasets/BaseRaster.js +5 -0
- package/layers/raster/datasets/CovJSONRaster.js +5 -0
- package/layers/raster/datasets/FunctionRaster.js +5 -0
- package/layers/raster/datasets/ImageAuxRaster.js +5 -0
- package/layers/raster/datasets/ImageServerRaster.js +5 -0
- package/layers/raster/datasets/InMemoryRaster.js +5 -0
- package/layers/raster/datasets/MRFRaster.js +5 -0
- package/layers/raster/datasets/RawBlockCache.js +5 -0
- package/layers/raster/datasets/TIFFRaster.js +5 -0
- package/layers/raster/datasets/WCSRaster.js +5 -0
- package/layers/raster/datasets/covJSONParser.js +5 -0
- package/layers/raster/datasets/multidimensionalUtils.js +5 -0
- package/layers/raster/datasets/pamParser.js +5 -0
- package/layers/raster/datasets/pixelReader.js +5 -0
- package/layers/raster/datasets/wcsCoverageParser.js +5 -0
- package/layers/raster/formats/Lerc.js +5 -0
- package/layers/raster/formats/Qb3.js +5 -0
- package/layers/raster/formats/RasterCodec.js +5 -0
- package/layers/raster/formats/TiffDecoder.js +5 -0
- package/layers/raster/functions/ArithmeticFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ArithmeticFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/AspectFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/AspectFunctionArguments.js +1 -1
- package/layers/raster/functions/BandArithmeticFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/BandArithmeticFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/BaseFunctionArguments.js +1 -1
- package/layers/raster/functions/BaseRasterFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ClipFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/ClipFunctionArguments.js +1 -1
- package/layers/raster/functions/ColormapFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ColormapFunctionArguments.js +1 -1
- package/layers/raster/functions/ColormapToRGBFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ColormapToRGBFunctionArguments.js +1 -1
- package/layers/raster/functions/CompositeBandFunction.js +5 -0
- package/layers/raster/functions/CompositeBandFunctionArguments.js +5 -0
- package/layers/raster/functions/ComputeChangeFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ComputeChangeFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/ContrastBrightnessFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/ContrastBrightnessFunctionArguments.js +1 -1
- package/layers/raster/functions/ConvolutionFunction.js +5 -0
- package/layers/raster/functions/ConvolutionFunctionArguments.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/CurvatureFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/CurvatureFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/ExtractBandFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/ExtractBandFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/GrayscaleFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/GrayscaleFunctionArguments.js +1 -1
- package/layers/raster/functions/HillshadeFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/HillshadeFunctionArguments.js +1 -1
- package/layers/raster/functions/LocalFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/LocalFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/MaskFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/MaskFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/NDVIFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/NDVIFunctionArguments.js +1 -1
- package/layers/raster/functions/RemapFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/RemapFunctionArguments.js +1 -1
- package/layers/raster/functions/ShadedReliefFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ShadedReliefFunctionArguments.js +1 -1
- package/layers/raster/functions/SlopeFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/SlopeFunctionArguments.js +1 -1
- package/layers/raster/functions/StatisticsFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/StatisticsFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/StatisticsHistogramFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/StatisticsHistogramFunctionArguments.js +1 -1
- package/layers/raster/functions/StretchFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/StretchFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/TableFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/TableFunctionArguments.js +1 -1
- package/layers/raster/functions/bandIndexUtils.js +5 -0
- package/layers/raster/functions/changeDetectionUtils.js +5 -0
- package/layers/raster/functions/clipUtils.js +5 -0
- package/layers/raster/functions/conversionUtils.js +5 -0
- package/layers/raster/functions/convolutionUtils.js +5 -0
- package/layers/raster/functions/creators/createDataManagementFunctions.js +5 -0
- package/layers/raster/functions/creators/utils.js +5 -0
- package/layers/raster/functions/focalStatUtils.js +5 -0
- package/layers/raster/functions/localUtils.js +5 -0
- package/layers/raster/functions/pixelTransformUtils.js +5 -0
- package/layers/raster/functions/pixelUtils.js +5 -0
- package/layers/raster/functions/stretchUtils.js +5 -0
- package/layers/raster/functions/surfaceUtils.js +5 -0
- package/layers/raster/functions/vectorFieldUtils.js +5 -0
- package/layers/raster/transforms/BaseRasterTransform.js +5 -0
- package/layers/{support/rasterTransforms → raster/transforms}/GCSShiftTransform.js +1 -1
- package/layers/{support/rasterTransforms → raster/transforms}/IdentityTransform.js +1 -1
- package/layers/{support/rasterTransforms → raster/transforms}/PolynomialTransform.js +1 -1
- package/layers/save/imageryUtils.js +1 -1
- package/layers/support/PixelBlock.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/imageryRendererUtils.js +1 -1
- package/layers/support/rasterFunctionUtils.js +1 -1
- package/package.json +2 -2
- package/renderers/VectorFieldRenderer.js +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/rasterRendererHelper.js +1 -1
- package/rest/locator/addressToLocations.js +1 -1
- package/rest/locator/addressesToLocations.js +1 -1
- package/rest/locator/suggestLocations.js +1 -1
- package/rest/networks/support/Association.js +1 -1
- package/rest/print.js +1 -1
- package/rest/support/LegendLayer.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterRangeHighlightShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MaskShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/RemapShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/RenderCommandContext.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBufferView.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DrawParameters.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/Instance.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerOriginData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatColorTechnique.js +5 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +5 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/DOMContainer.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/layers/ImageryLayerViewMixin.js +1 -1
- package/views/layers/ImageryTileLayerViewMixin.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/BuildingExplorer/BuildingExplorerViewModel.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/DirectLineMeasurement3D.js +1 -1
- package/widgets/DistanceMeasurement2D.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/AttachmentsColumn.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/EditorColumn.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable/support/GroupColumnTemplate.js +1 -1
- package/widgets/FeatureTable/support/TableTemplate.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend.js +1 -1
- package/widgets/LineOfSight.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
- package/widgets/PanoramicViewer/support/importUtils.js +1 -1
- package/widgets/Print/CustomTemplate.js +1 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/Print/TemplateOptions.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ScaleBar.js +1 -1
- package/widgets/ScaleRangeSlider.js +1 -1
- package/widgets/Search/SearchResultRenderer.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/types.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/ShadowCast.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/assets/esri/core/workers/chunks/1f6ead46b723630db897.js +0 -1
- package/assets/esri/core/workers/chunks/3a16347e17312556e02c.js +0 -1
- package/assets/esri/core/workers/chunks/478def691ae6763686f3.js +0 -1
- package/assets/esri/core/workers/chunks/4c4a55be41ba105c091c.js +0 -1
- package/assets/esri/core/workers/chunks/4cbf5a97b2b3c6553f6f.js +0 -1
- package/assets/esri/core/workers/chunks/646f58b69d2354f1ef27.js +0 -1
- package/assets/esri/core/workers/chunks/93d11075f65a5b6625ea.js +0 -1
- package/assets/esri/core/workers/chunks/96f798ee286b59396131.js +0 -316
- package/assets/esri/core/workers/chunks/9f2a8445a5848502c7e7.js +0 -1
- package/assets/esri/core/workers/chunks/a1b08aab73747f4e7e25.js +0 -1
- package/assets/esri/core/workers/chunks/ba59568e748f0ba53b78.js +0 -1
- package/assets/esri/core/workers/chunks/f21cb5b34d4d1e3af1a9.js +0 -1
- package/assets/esri/core/workers/chunks/f93f0586ce10cb5d98b3.js +0 -1
- package/layers/support/rasterDatasets/BaseRaster.js +0 -5
- package/layers/support/rasterDatasets/CovJSONRaster.js +0 -5
- package/layers/support/rasterDatasets/FunctionRaster.js +0 -5
- package/layers/support/rasterDatasets/ImageAuxRaster.js +0 -5
- package/layers/support/rasterDatasets/ImageServerRaster.js +0 -5
- package/layers/support/rasterDatasets/InMemoryRaster.js +0 -5
- package/layers/support/rasterDatasets/MRFRaster.js +0 -5
- package/layers/support/rasterDatasets/RawBlockCache.js +0 -5
- package/layers/support/rasterDatasets/TIFFRaster.js +0 -5
- package/layers/support/rasterDatasets/WCSRaster.js +0 -5
- package/layers/support/rasterDatasets/covJSONParser.js +0 -5
- package/layers/support/rasterDatasets/multidimensionalUtils.js +0 -5
- package/layers/support/rasterDatasets/pamParser.js +0 -5
- package/layers/support/rasterDatasets/pixelReader.js +0 -5
- package/layers/support/rasterDatasets/wcsCoverageParser.js +0 -5
- package/layers/support/rasterFormats/Lerc.js +0 -5
- package/layers/support/rasterFormats/Qb3.js +0 -5
- package/layers/support/rasterFormats/RasterCodec.js +0 -5
- package/layers/support/rasterFormats/TiffDecoder.js +0 -5
- package/layers/support/rasterFunctions/ArithmeticFunction.js +0 -5
- package/layers/support/rasterFunctions/BandArithmeticFunction.js +0 -5
- package/layers/support/rasterFunctions/BaseRasterFunction.js +0 -5
- package/layers/support/rasterFunctions/ColormapFunction.js +0 -5
- package/layers/support/rasterFunctions/ColormapToRGBFunction.js +0 -5
- package/layers/support/rasterFunctions/CompositeBandFunction.js +0 -5
- package/layers/support/rasterFunctions/CompositeBandFunctionArguments.js +0 -5
- package/layers/support/rasterFunctions/ComputeChangeFunction.js +0 -5
- package/layers/support/rasterFunctions/ConvolutionFunction.js +0 -5
- package/layers/support/rasterFunctions/ConvolutionFunctionArguments.js +0 -5
- package/layers/support/rasterFunctions/HillshadeFunction.js +0 -5
- package/layers/support/rasterFunctions/LocalFunction.js +0 -5
- package/layers/support/rasterFunctions/RemapFunction.js +0 -5
- package/layers/support/rasterFunctions/ShadedReliefFunction.js +0 -5
- package/layers/support/rasterFunctions/SlopeFunction.js +0 -5
- package/layers/support/rasterFunctions/StatisticsFunction.js +0 -5
- package/layers/support/rasterFunctions/StretchFunction.js +0 -5
- package/layers/support/rasterFunctions/bandIndexUtils.js +0 -5
- package/layers/support/rasterFunctions/changeDetectionUtils.js +0 -5
- package/layers/support/rasterFunctions/clipUtils.js +0 -5
- package/layers/support/rasterFunctions/conversionUtils.js +0 -5
- package/layers/support/rasterFunctions/convolutionUtils.js +0 -5
- package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +0 -5
- package/layers/support/rasterFunctions/creators/utils.js +0 -5
- package/layers/support/rasterFunctions/focalStatUtils.js +0 -5
- package/layers/support/rasterFunctions/localUtils.js +0 -5
- package/layers/support/rasterFunctions/pixelTransformUtils.js +0 -5
- package/layers/support/rasterFunctions/pixelUtils.js +0 -5
- package/layers/support/rasterFunctions/stretchUtils.js +0 -5
- package/layers/support/rasterFunctions/surfaceUtils.js +0 -5
- package/layers/support/rasterFunctions/vectorFieldUtils.js +0 -5
- package/layers/support/rasterTransforms/BaseRasterTransform.js +0 -5
- /package/assets/esri/layers/{support/rasterFormats → raster/formats}/lerc-wasm.wasm +0 -0
- /package/assets/esri/layers/{support/rasterFormats → raster/formats}/qb3-wasm.wasm +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/DBFParser.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/EphemeralBlockCache.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/RasterFactory.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/byteStreamUtils.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/datasetUtils.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/multipartParser.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/wcsCapabilitiesParser.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/xmlUtilities.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/ImageCanvasDecoder.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/JpgPlus.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/Lzw.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/Raw.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/pixelRangeUtils.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/tiffTag.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/utils.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/colormaps.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createAppearenceFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createBandIndexFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createChangeFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createConversionFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createLocalFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createMultiRasterAnalysisFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createStatisticsFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createSurfaceFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/customBandIndexUtils.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/mirror.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/rasterFunctionHelper.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/rasterFunctionSchema.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/rasterProjectionHelper.js +0 -0
- /package/layers/{support/rasterTransforms → raster/transforms}/utils.js +0 -0
package/layers/{support/rasterFunctions → raster/functions}/ComputeChangeFunctionArguments.js
RENAMED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as e,subclass as r}from"../../../core/accessorSupport/decorators.js";import o from"./BaseFunctionArguments.js";import{changeMethodMap as s,keepMethodMap as i}from"./changeDetectionUtils.js";import{enumeration as a}from"../../../core/accessorSupport/decorators/enumeration.js";var
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as e,subclass as r}from"../../../core/accessorSupport/decorators.js";import o from"./BaseFunctionArguments.js";import{changeMethodMap as s,keepMethodMap as i}from"./changeDetectionUtils.js";import{enumeration as a}from"../../../core/accessorSupport/decorators/enumeration.js";var n;let p=n=class extends o{constructor(){super(...arguments),this.method="difference",this.keepMethod="all",this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new n({raster:this.raster,raster2:this.raster2,method:this.method,keepMethod:this.keepMethod})}};t([a(s)],p.prototype,"method",void 0),t([a(i)],p.prototype,"keepMethod",void 0),t([e({json:{write:!0}})],p.prototype,"raster2",void 0),t([e({readOnly:!0})],p.prototype,"rasters",null),p=n=t([r("esri.layers.raster.functions.ComputeChangeFunctionArguments")],p);const c=p;export{c as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as s,subclass as r}from"../../../core/accessorSupport/decorators.js";import e from"./BaseRasterFunction.js";import o from"./ContrastBrightnessFunctionArguments.js";import{lookupPixels as n}from"./pixelUtils.js";import{createContrastBrightnessLUT as i}from"./stretchUtils.js";let u=class extends e{constructor(){super(...arguments),this.functionName="ContrastBrightness",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){const{sourceRasterInfos:t}=this,s=t[0];if("u8"!==s.pixelType)return{success:!1,supportsGPU:!1,error:"Only unsigned 8 bit raster is supported by ContrastBrightness function."};this.outputPixelType=this._getOutputPixelType("u8");const r=s.clone();this._removeStatsHistColormapVAT(r),this.rasterInfo=r;const{contrastOffset:e,brightnessOffset:o}=this.functionArguments;return this.lookup=i(e,o),{success:!0,supportsGPU:!0}}_processPixels(t){const s=t.pixelBlocks?.[0];return null==s?null:n(s,{lut:s.pixels.map(()=>this.lookup),offset:0,outputPixelType:"u8"})}_getWebGLParameters(){const{contrastOffset:t,brightnessOffset:s}=this.functionArguments;return{contrastOffset:t,brightnessOffset:s}}};t([s({json:{write:!0,name:"rasterFunction"}})],u.prototype,"functionName",void 0),t([s({type:o,json:{write:!0,name:"rasterFunctionArguments"}})],u.prototype,"functionArguments",void 0),t([s()],u.prototype,"rasterArgumentNames",void 0),t([s({json:{write:!0}})],u.prototype,"lookup",void 0),u=t([r("esri.layers.
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as s,subclass as r}from"../../../core/accessorSupport/decorators.js";import e from"./BaseRasterFunction.js";import o from"./ContrastBrightnessFunctionArguments.js";import{lookupPixels as n}from"./pixelUtils.js";import{createContrastBrightnessLUT as i}from"./stretchUtils.js";let u=class extends e{constructor(){super(...arguments),this.functionName="ContrastBrightness",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){const{sourceRasterInfos:t}=this,s=t[0];if("u8"!==s.pixelType)return{success:!1,supportsGPU:!1,error:"Only unsigned 8 bit raster is supported by ContrastBrightness function."};this.outputPixelType=this._getOutputPixelType("u8");const r=s.clone();this._removeStatsHistColormapVAT(r),this.rasterInfo=r;const{contrastOffset:e,brightnessOffset:o}=this.functionArguments;return this.lookup=i(e,o),{success:!0,supportsGPU:!0}}_processPixels(t){const s=t.pixelBlocks?.[0];return null==s?null:n(s,{lut:s.pixels.map(()=>this.lookup),offset:0,outputPixelType:"u8"})}_getWebGLParameters(){const{contrastOffset:t,brightnessOffset:s}=this.functionArguments;return{contrastOffset:t,brightnessOffset:s}}};t([s({json:{write:!0,name:"rasterFunction"}})],u.prototype,"functionName",void 0),t([s({type:o,json:{write:!0,name:"rasterFunctionArguments"}})],u.prototype,"functionArguments",void 0),t([s()],u.prototype,"rasterArgumentNames",void 0),t([s({json:{write:!0}})],u.prototype,"lookup",void 0),u=t([r("esri.layers.raster.functions.ContrastBrightnessFunction")],u);const p=u;export{p as default};
|
package/layers/{support/rasterFunctions → raster/functions}/ContrastBrightnessFunctionArguments.js
RENAMED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as s,subclass as r}from"../../../core/accessorSupport/decorators.js";import e from"./BaseFunctionArguments.js";var o;let n=o=class extends e{constructor(){super(...arguments),this.contrastOffset=0,this.brightnessOffset=0}clone(){return new o({contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset,raster:this.raster})}};t([s({json:{write:!0}})],n.prototype,"contrastOffset",void 0),t([s({json:{write:!0}})],n.prototype,"brightnessOffset",void 0),n=o=t([r("esri.layers.
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as s,subclass as r}from"../../../core/accessorSupport/decorators.js";import e from"./BaseFunctionArguments.js";var o;let n=o=class extends e{constructor(){super(...arguments),this.contrastOffset=0,this.brightnessOffset=0}clone(){return new o({contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset,raster:this.raster})}};t([s({json:{write:!0}})],n.prototype,"contrastOffset",void 0),t([s({json:{write:!0}})],n.prototype,"brightnessOffset",void 0),n=o=t([r("esri.layers.raster.functions.ContrastBrightnessFunctionArguments")],n);const i=n;export{i as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as e,subclass as o}from"../../../core/accessorSupport/decorators.js";import{getPixelValueRange as n}from"../formats/pixelRangeUtils.js";import s from"./BaseRasterFunction.js";import r from"./ConvolutionFunctionArguments.js";import{convolute as i}from"./convolutionUtils.js";import{convolutionKernel as u}from"../../support/rasterFunctionConstants.js";const l=25;let c=class extends s{constructor(){super(...arguments),this.functionName="Convolution",this.rasterArgumentNames=["raster"]}get _normalizedKernel(){const{kernel:t,convolutionType:e}=this.functionArguments,o=t.reduce((t,e)=>t+e);return-1===e||0===o||1===o?t:t.map(t=>t/o)}_bindSourceRasters(){const{convolutionType:t,rows:e,cols:o,kernel:n}=this.functionArguments;if(!Object.values(u).includes(t))return{success:!1,supportsGPU:!1,error:`convolution-function: the specified kernel type is not supported ${t}`};if(t!==u.none&&e*o!==n.length)return{success:!1,supportsGPU:!1,error:"convolution-function: the specified rows and cols do not match the length of the kernel"};const s=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(s.pixelType);const r=s.clone();r.pixelType=this.outputPixelType;const i=[u.none,u.sharpen,u.sharpen2,u.sharpening3x3,u.sharpening5x5];(-1===t||"u8"!==this.outputPixelType&&!i.includes(t))&&(r.statistics=null,r.histograms=null),r.colormap=null,r.attributeTable=null,this.rasterInfo=r;return{success:!0,supportsGPU:n.length<=l}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e||this.functionArguments.convolutionType===u.none)return e;const{rows:o,cols:n}=this.functionArguments,{_normalizedKernel:s}=this;return i(e,{kernel:s,rows:o,cols:n,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const t=new Float32Array(l),{rows:e,cols:o}=this.functionArguments,{_normalizedKernel:s}=this;for(let n=0;n<e;n++)for(let e=0;e<o;e++)t[5*n+e]=s[n*o+e];return{kernelRows:e,kernelCols:o,kernel:t,clampRange:n(this.outputPixelType)}}};t([e({json:{write:!0,name:"rasterFunction"}})],c.prototype,"functionName",void 0),t([e({type:r,json:{write:!0,name:"rasterFunctionArguments"}})],c.prototype,"functionArguments",void 0),t([e()],c.prototype,"rasterArgumentNames",void 0),t([e()],c.prototype,"_normalizedKernel",null),c=t([o("esri.layers.raster.functions.ConvolutionFunction")],c);const p=c;export{p as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as t}from"tslib";import{clone as o}from"../../../core/lang.js";import{property as e,subclass as s}from"../../../core/accessorSupport/decorators.js";import r from"./BaseFunctionArguments.js";import{convolutionKernels as n}from"./convolutionUtils.js";import{convolutionKernel as i}from"../../support/rasterFunctionConstants.js";var p;let l=p=class extends r{constructor(){super(...arguments),this.rows=3,this.cols=3,this.kernel=[0,0,0,0,1,0,0,0,0]}set convolutionType(t){this._set("convolutionType",t);const o=n.get(t);if(!o||t===i.userDefined||t===i.none)return;const e=Math.sqrt(o.length);this._set("kernel",o),this._set("cols",e),this._set("rows",e)}clone(){return new p({cols:this.cols,rows:this.rows,kernel:[...this.kernel],convolutionType:this.convolutionType,raster:o(this.raster)})}};t([e({json:{type:Number,write:!0}})],l.prototype,"rows",void 0),t([e({json:{type:Number,write:!0}})],l.prototype,"cols",void 0),t([e({json:{name:"type",type:Number,write:!0}})],l.prototype,"convolutionType",null),t([e({json:{type:[Number],write:!0}})],l.prototype,"kernel",void 0),l=p=t([s("esri.layers.raster.functions.ConvolutionFunctionArguments")],l);const c=l;export{c as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as e,subclass as r}from"../../../core/accessorSupport/decorators.js";import s from"./BaseRasterFunction.js";import o from"./CurvatureFunctionArguments.js";import{gcsFactor as i,curvature as n}from"./surfaceUtils.js";let u=class extends s{constructor(){super(...arguments),this.functionName="Curvature",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,t.bandCount=1,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{zFactor:r,curvatureType:s}=this.functionArguments,{extent:o,primaryPixelSizes:u}=t,a=u?.[0],c=a??(o?{x:o.width/e.width,y:o.height/e.height}:{x:1,y:1}),p=this.isGCS&&r>=1?r*i:r;return n(e,{zFactor:p,curvatureType:s,resolution:c})}_getWebGLParameters(){const{zFactor:t,curvatureType:e}=this.functionArguments;return{curvatureType:e,zFactor:this.isGCS&&t>=1?t*i:t}}};t([e({json:{write:!0,name:"rasterFunction"}})],u.prototype,"functionName",void 0),t([e({type:o,json:{write:!0,name:"rasterFunctionArguments"}})],u.prototype,"functionArguments",void 0),t([e()],u.prototype,"rasterArgumentNames",void 0),t([e({json:{write:!0}})],u.prototype,"isGCS",void 0),u=t([r("esri.layers.
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as e,subclass as r}from"../../../core/accessorSupport/decorators.js";import s from"./BaseRasterFunction.js";import o from"./CurvatureFunctionArguments.js";import{gcsFactor as i,curvature as n}from"./surfaceUtils.js";let u=class extends s{constructor(){super(...arguments),this.functionName="Curvature",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,t.bandCount=1,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{zFactor:r,curvatureType:s}=this.functionArguments,{extent:o,primaryPixelSizes:u}=t,a=u?.[0],c=a??(o?{x:o.width/e.width,y:o.height/e.height}:{x:1,y:1}),p=this.isGCS&&r>=1?r*i:r;return n(e,{zFactor:p,curvatureType:s,resolution:c})}_getWebGLParameters(){const{zFactor:t,curvatureType:e}=this.functionArguments;return{curvatureType:e,zFactor:this.isGCS&&t>=1?t*i:t}}};t([e({json:{write:!0,name:"rasterFunction"}})],u.prototype,"functionName",void 0),t([e({type:o,json:{write:!0,name:"rasterFunctionArguments"}})],u.prototype,"functionArguments",void 0),t([e()],u.prototype,"rasterArgumentNames",void 0),t([e({json:{write:!0}})],u.prototype,"isGCS",void 0),u=t([r("esri.layers.raster.functions.CurvatureFunction")],u);const a=u;export{a as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as r}from"tslib";import{JSONMap as e}from"../../../core/jsonMap.js";import{property as t,subclass as o}from"../../../core/accessorSupport/decorators.js";import s from"./BaseFunctionArguments.js";import{enumeration as a}from"../../../core/accessorSupport/decorators/enumeration.js";import{reader as u}from"../../../core/accessorSupport/decorators/reader.js";var p;const c=new e({0:"standard",1:"planform",2:"profile"},{useNumericKeys:!0});let n=p=class extends s{constructor(){super(...arguments),this.curvatureType="standard",this.zFactor=1}readCurvatureType(r,e){return c.fromJSON(e.type??e.curvatureType??0)}clone(){return new p({curvatureType:this.curvatureType,zFactor:this.zFactor,raster:this.raster})}};r([t({json:{write:{target:"type"}}}),a(c)],n.prototype,"curvatureType",void 0),r([u("curvatureType",["type","curvatureType"])],n.prototype,"readCurvatureType",null),r([t({type:Number,json:{write:!0}})],n.prototype,"zFactor",void 0),n=p=r([o("esri.layers.
|
|
5
|
+
import{__decorate as r}from"tslib";import{JSONMap as e}from"../../../core/jsonMap.js";import{property as t,subclass as o}from"../../../core/accessorSupport/decorators.js";import s from"./BaseFunctionArguments.js";import{enumeration as a}from"../../../core/accessorSupport/decorators/enumeration.js";import{reader as u}from"../../../core/accessorSupport/decorators/reader.js";var p;const c=new e({0:"standard",1:"planform",2:"profile"},{useNumericKeys:!0});let n=p=class extends s{constructor(){super(...arguments),this.curvatureType="standard",this.zFactor=1}readCurvatureType(r,e){return c.fromJSON(e.type??e.curvatureType??0)}clone(){return new p({curvatureType:this.curvatureType,zFactor:this.zFactor,raster:this.raster})}};r([t({json:{write:{target:"type"}}}),a(c)],n.prototype,"curvatureType",void 0),r([u("curvatureType",["type","curvatureType"])],n.prototype,"readCurvatureType",null),r([t({type:Number,json:{write:!0}})],n.prototype,"zFactor",void 0),n=p=r([o("esri.layers.raster.functions.CurvatureFunctionArguments")],n);const i=n;export{i as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as n,subclass as e}from"../../../core/accessorSupport/decorators.js";import{getBandMatrix3 as s}from"./bandIndexUtils.js";import r from"./BaseRasterFunction.js";import i from"./ExtractBandFunctionArguments.js";let a=class extends r{constructor(){super(...arguments),this.functionName="ExtractBand",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{functionArguments:t,sourceRasterInfos:n}=this,e=n[0],{method:s,bandNames:r,bandWavelengths:i,bandIds:a,missingBandAction:o}=t,h=r?.length&&("name"===s||"id"!==s&&!a?.length),c=i?.length&&("wavelength"===s||"id"!==s&&!a?.length),m=1===o,g=h?l(e,r):c?d(e,i,this.functionArguments,m):u(e,a,m);if(null==g){return{success:!1,supportsGPU:!1,error:`extract-band-function: Invalid ${h?"band names":c?"band wavelengths":"band ids"} for the imagery data source`}}this.functionArguments.bandIds=g,this.functionArguments.method="id",this.outputPixelType=this._getOutputPixelType("f32");const
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as n,subclass as e}from"../../../core/accessorSupport/decorators.js";import{getBandMatrix3 as s}from"./bandIndexUtils.js";import r from"./BaseRasterFunction.js";import i from"./ExtractBandFunctionArguments.js";let a=class extends r{constructor(){super(...arguments),this.functionName="ExtractBand",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{functionArguments:t,sourceRasterInfos:n}=this,e=n[0],{method:s,bandNames:r,bandWavelengths:i,bandIds:a,missingBandAction:o}=t,h=r?.length&&("name"===s||"id"!==s&&!a?.length),c=i?.length&&("wavelength"===s||"id"!==s&&!a?.length),m=1===o,g=h?l(e,r):c?d(e,i,this.functionArguments,m):u(e,a,m);if(null==g){return{success:!1,supportsGPU:!1,error:`extract-band-function: Invalid ${h?"band names":c?"band wavelengths":"band ids"} for the imagery data source`}}this.functionArguments.bandIds=g,this.functionArguments.method="id",this.outputPixelType=this._getOutputPixelType("f32");const f=e.clone();f.pixelType=this.outputPixelType,f.bandCount=g.length;const{statistics:p,histograms:I}=f;null!=p&&p.length&&(f.statistics=g.map(t=>p[t]||p[p.length-1])),null!=I&&I.length&&(f.histograms=g.map(t=>I[t]||I[I.length-1])),f.multidimensionalInfo&&f.multidimensionalInfo.variables.forEach(t=>{const{statistics:n,histograms:e}=t;null!=n&&n.length&&(t.statistics=g.map(t=>n[t]||n[n.length-1])),null!=e&&e.length&&(t.histograms=g.map(t=>e[t]||e[e.length-1]))});let b=f.keyProperties?.BandProperties;b?.length&&(b=g.map(t=>t>=b.length?b[b.length-1]:b[t]),f.keyProperties={...f.keyProperties,BandProperties:b}),this.rasterInfo=f;return{success:!0,supportsGPU:f.bandCount<=3}}_processPixels(t){const n=t.pixelBlocks?.[0];if(null==n)return null;let{bandIds:e}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){const{rawInputBandIds:t}=this;e=e.map(n=>t.indexOf(n))}else{const t=n.pixels.length;e=e.map(n=>n>=t?t-1:n)}return n.extractBands(e)}_getWebGLParameters(){let t;if(this.isInputBandIdsSwizzled)t=this.swizzledBandSelection.length?this.swizzledBandSelection:[0,1,2];else{t=[...this.functionArguments.bandIds],0===t.length?t=[0,1,2]:t.length<3&&(t[1]=t[1]??t[0],t[2]=t[2]??t[1]);for(let n=0;n<3;n++)t[n]=Math.min(t[n],2)}return{bandIndexMat3:s(t)}}_getInputBandIds(t){const n=t.length;return this.functionArguments.bandIds.map(t=>t>=n?n-1:t).map(n=>t[n])}_swizzleBandIds(t){const n=this.functionArguments.bandIds.map(n=>t.indexOf(n));return this.isInputBandIdsSwizzled=!0,n[1]??=n[0],n[2]??=n[1],this.swizzledBandSelection=n,!1}};t([n({json:{write:!0,name:"rasterFunction"}})],a.prototype,"functionName",void 0),t([n({type:i,json:{write:!0,name:"rasterFunctionArguments"}})],a.prototype,"functionArguments",void 0),t([n()],a.prototype,"rasterArgumentNames",void 0),a=t([e("esri.layers.raster.functions.ExtractBandFunction")],a);const o=a;function l(t,n){const e=t.bandInfos.map(({name:t})=>t.toLowerCase()),s=[];for(let r=0;r<n.length;r++){const t=n[r].toLowerCase();let i=e.indexOf(t);if(-1===i&&"nearinfrared"===t&&(i=e.findIndex(t=>t.startsWith("nearinfrared_1")),-1===i&&(i=e.findIndex(t=>t.startsWith("nearinfrared")))),-1===i)return null;s.push(i)}return s}function u(t,n,e){const{bandCount:s}=t;return!n?.length||e&&n.some(t=>t<0||t>=s)?null:n}function d(t,n,{wavelengthMatchTolerance:e},s){const{bandInfos:r}=t,i=[];for(let o=0;o<r.length;o++){const{minWavelength:t,maxWavelength:n}=r[o];if(!t||!n)return null;i.push({minWavelength:t,maxWavelength:n})}const a=[];for(let o=0;o<n.length;o++){const t=n[o];let r=!1,l=-1,u=Number.MAX_VALUE;for(let n=0;n<i.length;n++){const e=i[n],s=t>=e.minWavelength&&t<=e.maxWavelength,a=Math.abs(t-(e.minWavelength+e.maxWavelength)/2);s?a<u&&(r=!0,l=n,u=a):!r&&a<u&&(l=n,u=a)}if(!r&&e&&u<e&&(r=!0),!r&&s)return null;a.push(l)}return a}export{o as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as e,subclass as s}from"../../../core/accessorSupport/decorators.js";import o from"./BaseFunctionArguments.js";import{enumeration as n}from"../../../core/accessorSupport/decorators/enumeration.js";var a;let
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as e,subclass as s}from"../../../core/accessorSupport/decorators.js";import o from"./BaseFunctionArguments.js";import{enumeration as n}from"../../../core/accessorSupport/decorators/enumeration.js";var a;let i=a=class extends o{constructor(){super(...arguments),this.bandIds=[],this.bandNames=[],this.bandWavelengths=[],this.missingBandAction=0}clone(){return new a({bandIds:this.bandIds?.slice(),bandNames:this.bandNames?.slice(),bandWavelengths:this.bandWavelengths?.slice(),missingBandAction:this.missingBandAction,method:this.method,wavelengthMatchTolerance:this.wavelengthMatchTolerance})}};t([e({json:{write:!0}})],i.prototype,"bandIds",void 0),t([e({json:{write:!0}})],i.prototype,"bandNames",void 0),t([e({json:{write:!0}})],i.prototype,"bandWavelengths",void 0),t([n({0:"name",1:"wavelength",2:"id"})],i.prototype,"method",void 0),t([e({json:{write:!0}})],i.prototype,"missingBandAction",void 0),t([e({json:{write:!0}})],i.prototype,"wavelengthMatchTolerance",void 0),i=a=t([s("esri.layers.raster.functions.ExtractBandFunctionArguments")],i);const r=i;export{r as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as e,subclass as s}from"../../../core/accessorSupport/decorators.js";import r from"./BaseRasterFunction.js";import{grayscale as o}from"./conversionUtils.js";import n from"./GrayscaleFunctionArguments.js";let i=class extends r{constructor(){super(...arguments),this.functionName="Grayscale",this.functionArguments=null,this.rasterArgumentNames=["raster"]}get _normalizedWeights(){const{conversionParameters:t}=this.functionArguments,e=t.reduce((t,e)=>t+e);return t.map(t=>t/e)}_bindSourceRasters(){const{conversionParameters:t}=this.functionArguments;if(!t?.length)return{success:!1,supportsGPU:!1,error:"missing valid conversion parameters."};const e=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType;const s=3===t.length||3===e.bandCount&&t.length>3;return e.bandCount=1,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:s}}_processPixels(t){const e=t.pixelBlocks?.[0];return null==e?null:o(e,this._normalizedWeights,this.outputPixelType)}_getWebGLParameters(){return{weights:this._normalizedWeights}}};t([e({json:{write:!0,name:"rasterFunction"}})],i.prototype,"functionName",void 0),t([e({type:n,json:{write:!0,name:"rasterFunctionArguments"}})],i.prototype,"functionArguments",void 0),t([e()],i.prototype,"rasterArgumentNames",void 0),t([e()],i.prototype,"_normalizedWeights",null),i=t([s("esri.layers.
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as e,subclass as s}from"../../../core/accessorSupport/decorators.js";import r from"./BaseRasterFunction.js";import{grayscale as o}from"./conversionUtils.js";import n from"./GrayscaleFunctionArguments.js";let i=class extends r{constructor(){super(...arguments),this.functionName="Grayscale",this.functionArguments=null,this.rasterArgumentNames=["raster"]}get _normalizedWeights(){const{conversionParameters:t}=this.functionArguments,e=t.reduce((t,e)=>t+e);return t.map(t=>t/e)}_bindSourceRasters(){const{conversionParameters:t}=this.functionArguments;if(!t?.length)return{success:!1,supportsGPU:!1,error:"missing valid conversion parameters."};const e=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType;const s=3===t.length||3===e.bandCount&&t.length>3;return e.bandCount=1,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:s}}_processPixels(t){const e=t.pixelBlocks?.[0];return null==e?null:o(e,this._normalizedWeights,this.outputPixelType)}_getWebGLParameters(){return{weights:this._normalizedWeights}}};t([e({json:{write:!0,name:"rasterFunction"}})],i.prototype,"functionName",void 0),t([e({type:n,json:{write:!0,name:"rasterFunctionArguments"}})],i.prototype,"functionArguments",void 0),t([e()],i.prototype,"rasterArgumentNames",void 0),t([e()],i.prototype,"_normalizedWeights",null),i=t([s("esri.layers.raster.functions.GrayscaleFunction")],i);const u=i;export{u as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as r}from"tslib";import{property as e,subclass as s}from"../../../core/accessorSupport/decorators.js";import t from"./BaseFunctionArguments.js";var o;let n=o=class extends t{clone(){return new o({conversionParameters:[...this.conversionParameters],raster:this.raster})}};r([e({type:[Number],json:{write:!0}})],n.prototype,"conversionParameters",void 0),n=o=r([s("esri.layers.
|
|
5
|
+
import{__decorate as r}from"tslib";import{property as e,subclass as s}from"../../../core/accessorSupport/decorators.js";import t from"./BaseFunctionArguments.js";var o;let n=o=class extends t{clone(){return new o({conversionParameters:[...this.conversionParameters],raster:this.raster})}};r([e({type:[Number],json:{write:!0}})],n.prototype,"conversionParameters",void 0),n=o=r([s("esri.layers.raster.functions.GrayscaleFunctionArguments")],n);const a=n;export{a as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as e,subclass as s}from"../../../core/accessorSupport/decorators.js";import{isIntegerPixelType as i}from"../formats/pixelRangeUtils.js";import r from"./BaseRasterFunction.js";import o from"./HillshadeFunctionArguments.js";import{getHillshadeOptions as n,hillshade as u,calculateHillshadeParams as a,gcsFactor as p}from"./surfaceUtils.js";let c=class extends r{constructor(){super(...arguments),this.functionName="Hillshade",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"hillshade-function: source data must be single band"};this.outputPixelType=this._getOutputPixelType("u8");const e=t.clone();return this._removeStatsHistColormapVAT(e),e.pixelType=this.outputPixelType,e.bandCount=1,e.statistics=[{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=e,this.isGCS=e.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(!e)return null;const{extent:s,primaryPixelSizes:i}=t,r=i?.[0],o=r??(s?{x:s.width/e.width,y:s.height/e.height}:{x:1,y:1}),a=n(this.functionArguments,o,this.isGCS),p=u(e,a);return p.pixelType=this.outputPixelType,p}_getWebGLParameters(){const t=n(this.functionArguments,{x:1,y:1},this.isGCS),e=a(t),{slopeType:s,zFactor:r,pixelSizeFactor:o,pixelSizePower:u}=this.functionArguments,c="scaled"===s,l=i(this.outputPixelType);return{...e,zFactor:r,gcsFactor:this.isGCS?p:1,pixelSizeFactor:c?o:0,pixelSizePower:c?u:0,isOutputRounded:l}}};t([e({json:{write:!0,name:"rasterFunction"}})],c.prototype,"functionName",void 0),t([e({type:o,json:{write:!0,name:"rasterFunctionArguments"}})],c.prototype,"functionArguments",void 0),t([e()],c.prototype,"rasterArgumentNames",void 0),t([e({json:{write:!0}})],c.prototype,"isGCS",void 0),c=t([s("esri.layers.raster.functions.HillshadeFunction")],c);const l=c;export{l as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{JSONMap as t}from"../../../core/jsonMap.js";import{property as o,subclass as r}from"../../../core/accessorSupport/decorators.js";import i from"./BaseFunctionArguments.js";import{enumeration as s}from"../../../core/accessorSupport/decorators/enumeration.js";var p;const a=new t({0:"traditional",1:"multi-directional"},{useNumericKeys:!0}),l=new t({1:"degree",2:"percent-rise",3:"scaled"},{useNumericKeys:!0});let c=p=class extends i{constructor(){super(...arguments),this.altitude=45,this.azimuth=315,this.hillshadeType="traditional",this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.slopeType="degree",this.zFactor=1,this.removeEdgeEffect=!1}clone(){return new p({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};e([o({type:Number,json:{write:!0}})],c.prototype,"altitude",void 0),e([o({type:Number,json:{write:!0}})],c.prototype,"azimuth",void 0),e([o(),s(a)],c.prototype,"hillshadeType",void 0),e([o({type:Number,json:{write:!0,name:"psPower"}})],c.prototype,"pixelSizePower",void 0),e([o({type:Number,json:{write:!0,name:"psZFactor"}})],c.prototype,"pixelSizeFactor",void 0),e([o(),s(l)],c.prototype,"slopeType",void 0),e([o({type:Number,json:{write:!0}})],c.prototype,"zFactor",void 0),e([o({type:Boolean,json:{write:!0}})],c.prototype,"removeEdgeEffect",void 0),c=p=e([r("esri.layers.
|
|
5
|
+
import{__decorate as e}from"tslib";import{JSONMap as t}from"../../../core/jsonMap.js";import{property as o,subclass as r}from"../../../core/accessorSupport/decorators.js";import i from"./BaseFunctionArguments.js";import{enumeration as s}from"../../../core/accessorSupport/decorators/enumeration.js";var p;const a=new t({0:"traditional",1:"multi-directional"},{useNumericKeys:!0}),l=new t({1:"degree",2:"percent-rise",3:"scaled"},{useNumericKeys:!0});let c=p=class extends i{constructor(){super(...arguments),this.altitude=45,this.azimuth=315,this.hillshadeType="traditional",this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.slopeType="degree",this.zFactor=1,this.removeEdgeEffect=!1}clone(){return new p({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};e([o({type:Number,json:{write:!0}})],c.prototype,"altitude",void 0),e([o({type:Number,json:{write:!0}})],c.prototype,"azimuth",void 0),e([o(),s(a)],c.prototype,"hillshadeType",void 0),e([o({type:Number,json:{write:!0,name:"psPower"}})],c.prototype,"pixelSizePower",void 0),e([o({type:Number,json:{write:!0,name:"psZFactor"}})],c.prototype,"pixelSizeFactor",void 0),e([o(),s(l)],c.prototype,"slopeType",void 0),e([o({type:Number,json:{write:!0}})],c.prototype,"zFactor",void 0),e([o({type:Boolean,json:{write:!0}})],c.prototype,"removeEdgeEffect",void 0),c=p=e([r("esri.layers.raster.functions.HillshadeFunctionArguments")],c);const n=c;export{n as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as s,subclass as e}from"../../../core/accessorSupport/decorators.js";import{getPixelValueRange as n,isIntegerPixelType as o,getIntegerPixelType as i}from"../formats/pixelRangeUtils.js";import r from"./BaseRasterFunction.js";import u from"./LocalFunctionArguments.js";import{operandsCount as a,local as c,getOutputDomain as l}from"./localUtils.js";import{localOperators as p}from"../../support/rasterFunctionConstants.js";let m=class extends r{constructor(){super(...arguments),this.functionName="Local",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){const{sourceRasterInfos:t}=this,s=t[0],{bandCount:e}=s,{processAsMultiband:n}=this.functionArguments;if(t.some(t=>t.bandCount!==e))return{success:!1,supportsGPU:!1,error:"local-function: input rasters do not have same band count"};const{operation:o,rasters:i}=this.functionArguments,r=a[o];if(!(999===r||i.length===r||i.length<=1&&1===r))return{success:!1,supportsGPU:!1,error:`local-function: the length of functionArguments.rasters does not match operation's requirement: ${r}`};const u=s.clone();u.bandCount=999!==r||n?e:1,this._removeStatsHistColormapVAT(u),this._updateStatistics(u),this._updatePixelType(u),this.rasterInfo=u;return{success:!0,supportsGPU:1===u.bandCount&&r<=3}}_processPixels(t){const{pixelBlocks:s}=t;return null==s||s.some(t=>null==t)?null:c(s,this.functionArguments.operation,{processAsMultiband:this.functionArguments.processAsMultiband,outputPixelType:this.outputPixelType??void 0})}_getWebGLParameters(){const{operation:t}=this.functionArguments,s=a[t],e=Object.keys(p).find(s=>p[s]===t)?.toLowerCase()??"undefined",i=this.outputPixelType??"f32";let[r,u]=n(i);const c=o(i);return c&&(r-=1e-4,u+=1e-4),{imageCount:s,operationName:e,domainRange:[r,u],isOutputRounded:c}}_updateStatistics(t){const s=this.sourceRasterInfos[0],{operation:e}=this.functionArguments,n=l(e)?.domain;if(n){t.statistics=[];for(let s=0;s<t.bandCount;s++)t.statistics[s]={min:n[0],max:n[1],avg:(n[0]+n[1])/2,stddev:(n[0]+n[1])/10}}else 45===e&&s.statistics?.length&&(t.statistics=s.statistics.map(t=>({min:-t.max,max:-t.min,avg:null!=t.avg?-t.avg:void 0,stddev:null!=t.stddev?-t.stddev:void 0})))}_updatePixelType(t){const{statistics:s,pixelType:e}=this.sourceRasterInfos[0],{operation:n}=this.functionArguments,{domain:r,isInteger:u}=l(n)??{domain:null,isInteger:!1};let a="f32";if(r&&u)a=i(r[0],r[1]);else if(30===n){const t=s?.[0];a=t?i(t.min,t.max):o(e)?e:"s32"}else if(45===n&&o(e)){const t=s?.map(({max:t})=>-t),n=s?.map(({min:t})=>-t),o=t?.length?Math.min(...t):null,r=n?.length?Math.min(...n):null;a=null!=o&&null!=r?i(o,r):e.startsWith("s")?e.replace("s","u"):"u1"===e||"u2"===e||"u4"===e?"s8":"u8"===e?"s16":"s32"}t.pixelType=this.outputPixelType=this._getOutputPixelType(a)}};t([s({json:{write:!0,name:"rasterFunction"}})],m.prototype,"functionName",void 0),t([s({type:u,json:{write:!0,name:"rasterFunctionArguments"}})],m.prototype,"functionArguments",void 0),t([s()],m.prototype,"rasterArgumentNames",void 0),m=t([e("esri.layers.raster.functions.LocalFunction")],m);const d=m;export{d as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as r}from"tslib";import{clone as s}from"../../../core/lang.js";import{property as t,subclass as o}from"../../../core/accessorSupport/decorators.js";import e from"./BaseFunctionArguments.js";import{writer as i}from"../../../core/accessorSupport/decorators/writer.js";var
|
|
5
|
+
import{__decorate as r}from"tslib";import{clone as s}from"../../../core/lang.js";import{property as t,subclass as o}from"../../../core/accessorSupport/decorators.js";import e from"./BaseFunctionArguments.js";import{writer as i}from"../../../core/accessorSupport/decorators/writer.js";var a;let p=a=class extends e{constructor(){super(...arguments),this.rasters=[],this.processAsMultiband=!0}writeRasters(r,s){s.rasters=r.map(r=>"number"==typeof r||"string"==typeof r?r:r.toJSON())}clone(){return new a({operation:this.operation,processAsMultiband:this.processAsMultiband,rasters:s(this.rasters)})}};r([t({json:{write:!0}})],p.prototype,"operation",void 0),r([t({json:{write:!0}})],p.prototype,"rasters",void 0),r([i("rasters")],p.prototype,"writeRasters",null),r([t({json:{write:!0}})],p.prototype,"processAsMultiband",void 0),p=a=r([o("esri.layers.raster.functions.LocalFunctionArguments")],p);const n=p;export{n as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{numberMaxFloat32 as e}from"../../../core/mathUtils.js";import{property as s,subclass as n}from"../../../core/accessorSupport/decorators.js";import o from"./BaseRasterFunction.js";import r from"./MaskFunctionArguments.js";import{createMaskLUT as u,maxMapSizeGpu as i,mask as a}from"./pixelUtils.js";let l=class extends o{constructor(){super(...arguments),this.functionName="Mask",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;this.outputPixelType=this._getOutputPixelType(e),t.pixelType=this.outputPixelType,this.rasterInfo=t;const{includedRanges:s,normalizedNoDataValues:n}=this.functionArguments;if(!s?.length&&!n?.length)return{success:!1,supportsGPU:!1,error:"missing includedRanges or noDataValues argument"};let o=[];for(let i=0;i<t.bandCount;i++){const t=u(e,s?.slice(2*i,2*i+2),n?.[i]);if(null==t){o=null;break}o.push(t)}this.lookups=o;const r=null!=n&&n.every(t=>t?.length===n[0]?.length);return{success:!0,supportsGPU:(!s||s.length<=2*i)&&(!n||r&&n[0].length<=i)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{outputPixelType:s,lookups:n}=this,{includedRanges:o,noDataInterpretation:r,normalizedNoDataValues:u}=this.functionArguments;return a(e,{includedRanges:o,noDataValues:u,outputPixelType:s,matchAll:1===r,lookups:n})}_getWebGLParameters(){const{includedRanges:t,normalizedNoDataValues:s}=this.functionArguments,n=new Float32Array(i);n.fill(e),s?.[0]?.length&&n.set(s[0]);const o=new Float32Array(6);for(let r=0;r<o.length;r+=2)o[r]=t?.[r]??-e,o[r+1]=t?.[r+1]??e;return t?.length&&o.set(t),{bandCount:this.sourceRasterInfos[0].bandCount,noDataValues:n,includedRanges:o}}};t([s({json:{write:!0,name:"rasterFunction"}})],l.prototype,"functionName",void 0),t([s({type:r,json:{write:!0,name:"rasterFunctionArguments"}})],l.prototype,"functionArguments",void 0),t([s()],l.prototype,"rasterArgumentNames",void 0),t([s({json:{write:!0}})],l.prototype,"lookups",void 0),l=t([n("esri.layers.
|
|
5
|
+
import{__decorate as t}from"tslib";import{numberMaxFloat32 as e}from"../../../core/mathUtils.js";import{property as s,subclass as n}from"../../../core/accessorSupport/decorators.js";import o from"./BaseRasterFunction.js";import r from"./MaskFunctionArguments.js";import{createMaskLUT as u,maxMapSizeGpu as i,mask as a}from"./pixelUtils.js";let l=class extends o{constructor(){super(...arguments),this.functionName="Mask",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;this.outputPixelType=this._getOutputPixelType(e),t.pixelType=this.outputPixelType,this.rasterInfo=t;const{includedRanges:s,normalizedNoDataValues:n}=this.functionArguments;if(!s?.length&&!n?.length)return{success:!1,supportsGPU:!1,error:"missing includedRanges or noDataValues argument"};let o=[];for(let i=0;i<t.bandCount;i++){const t=u(e,s?.slice(2*i,2*i+2),n?.[i]);if(null==t){o=null;break}o.push(t)}this.lookups=o;const r=null!=n&&n.every(t=>t?.length===n[0]?.length);return{success:!0,supportsGPU:(!s||s.length<=2*i)&&(!n||r&&n[0].length<=i)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{outputPixelType:s,lookups:n}=this,{includedRanges:o,noDataInterpretation:r,normalizedNoDataValues:u}=this.functionArguments;return a(e,{includedRanges:o,noDataValues:u,outputPixelType:s,matchAll:1===r,lookups:n})}_getWebGLParameters(){const{includedRanges:t,normalizedNoDataValues:s}=this.functionArguments,n=new Float32Array(i);n.fill(e),s?.[0]?.length&&n.set(s[0]);const o=new Float32Array(6);for(let r=0;r<o.length;r+=2)o[r]=t?.[r]??-e,o[r+1]=t?.[r+1]??e;return t?.length&&o.set(t),{bandCount:this.sourceRasterInfos[0].bandCount,noDataValues:n,includedRanges:o}}};t([s({json:{write:!0,name:"rasterFunction"}})],l.prototype,"functionName",void 0),t([s({type:r,json:{write:!0,name:"rasterFunctionArguments"}})],l.prototype,"functionArguments",void 0),t([s()],l.prototype,"rasterArgumentNames",void 0),t([s({json:{write:!0}})],l.prototype,"lookups",void 0),l=t([n("esri.layers.raster.functions.MaskFunction")],l);const c=l;export{c as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as e,subclass as n}from"../../../core/accessorSupport/decorators.js";import r from"./BaseFunctionArguments.js";var o;let a=o=class extends r{constructor(){super(...arguments),this.includedRanges=null,this.noDataValues=null,this.noDataInterpretation=0}get normalizedNoDataValues(){const{noDataValues:t}=this;if(!t?.length)return null;let e=!1;const n=t.map(t=>{if("number"==typeof t)return e=!0,[t];if("string"==typeof t){const n=t.trim().split(" ").filter(t=>""!==t.trim()).map(t=>Number(t));return e=e||n.length>0,0===n.length?null:n}return null});return e?n:null}clone(){return new o({includedRanges:this.includedRanges?.slice()??[],noDataValues:this.noDataValues?.slice()??[],noDataInterpretation:this.noDataInterpretation})}};t([e({json:{write:!0}})],a.prototype,"includedRanges",void 0),t([e({json:{write:!0}})],a.prototype,"noDataValues",void 0),t([e()],a.prototype,"normalizedNoDataValues",null),t([e({json:{write:!0}})],a.prototype,"noDataInterpretation",void 0),a=o=t([n("esri.layers.
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as e,subclass as n}from"../../../core/accessorSupport/decorators.js";import r from"./BaseFunctionArguments.js";var o;let a=o=class extends r{constructor(){super(...arguments),this.includedRanges=null,this.noDataValues=null,this.noDataInterpretation=0}get normalizedNoDataValues(){const{noDataValues:t}=this;if(!t?.length)return null;let e=!1;const n=t.map(t=>{if("number"==typeof t)return e=!0,[t];if("string"==typeof t){const n=t.trim().split(" ").filter(t=>""!==t.trim()).map(t=>Number(t));return e=e||n.length>0,0===n.length?null:n}return null});return e?n:null}clone(){return new o({includedRanges:this.includedRanges?.slice()??[],noDataValues:this.noDataValues?.slice()??[],noDataInterpretation:this.noDataInterpretation})}};t([e({json:{write:!0}})],a.prototype,"includedRanges",void 0),t([e({json:{write:!0}})],a.prototype,"noDataValues",void 0),t([e()],a.prototype,"normalizedNoDataValues",null),t([e({json:{write:!0}})],a.prototype,"noDataInterpretation",void 0),a=o=t([n("esri.layers.raster.functions.MaskFunctionArguments")],a);const s=a;export{s as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as s,subclass as n}from"../../../core/accessorSupport/decorators.js";import{calculateNDVI as e,getBandMatrix3 as i}from"./bandIndexUtils.js";import r from"./BaseRasterFunction.js";import o from"./NDVIFunctionArguments.js";let
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as s,subclass as n}from"../../../core/accessorSupport/decorators.js";import{calculateNDVI as e,getBandMatrix3 as i}from"./bandIndexUtils.js";import r from"./BaseRasterFunction.js";import o from"./NDVIFunctionArguments.js";let a=class extends r{constructor(){super(...arguments),this.functionName="NDVI",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{scientificOutput:t,visibleBandID:s,infraredBandID:n}=this.functionArguments;this.outputPixelType=this._getOutputPixelType(t?"f32":"u8");const e=this.sourceRasterInfos[0],i=Math.max(s,n);if(e.bandCount<2||i>=e.bandCount)return{success:!1,supportsGPU:!1,error:"ndvi-function: source raster has insufficient amount of raster bands"};if(s<0||n<0)return{success:!1,supportsGPU:!1,error:"ndvi-function: invalid visible or infrared band id"};const r=e.clone();r.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(r),r.bandCount=1,r.keyProperties={...r.keyProperties,BandProperties:void 0};const[o,a,u,d]=t?[-1,1,0,.1]:[0,200,100,10];return r.statistics=[{min:o,max:a,avg:u,stddev:d}],this.rasterInfo=r,{success:!0,supportsGPU:!0}}_processPixels(t){const s=t.pixelBlocks?.[0];if(null==s)return null;let{visibleBandID:n,infraredBandID:i,scientificOutput:r}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){const{rawInputBandIds:t}=this;i=t.indexOf(i),n=t.indexOf(n)}return e(s,n,i,!r)}_getWebGLParameters(){const{visibleBandID:t,infraredBandID:s,scientificOutput:n}=this.functionArguments,e=this.isInputBandIdsSwizzled?[0,1,2]:[s,t,0];return{bandIndexMat3:i(e),scaled:!n}}_getInputBandIds(t){const{visibleBandID:s,infraredBandID:n}=this.functionArguments;return[n,s,0].map(s=>t[s])}_swizzleBandIds(t){const{visibleBandID:s,infraredBandID:n}=this.functionArguments,e=[s,n].map(s=>t.indexOf(s));return e[2]=e[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=e,!1}};t([s({json:{write:!0,name:"rasterFunction"}})],a.prototype,"functionName",void 0),t([s({type:o,json:{write:!0,name:"rasterFunctionArguments"}})],a.prototype,"functionArguments",void 0),t([s()],a.prototype,"rasterArgumentNames",void 0),a=t([n("esri.layers.raster.functions.NDVIFunction")],a);const u=a;export{u as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as i,subclass as r}from"../../../core/accessorSupport/decorators.js";import
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as i,subclass as r}from"../../../core/accessorSupport/decorators.js";import e from"./BaseFunctionArguments.js";var s;let n=s=class extends e{constructor(){super(...arguments),this.visibleBandID=0,this.infraredBandID=1,this.scientificOutput=!1}clone(){const{visibleBandID:t,infraredBandID:i,scientificOutput:r}=this;return new s({visibleBandID:t,infraredBandID:i,scientificOutput:r})}};t([i({json:{write:!0}})],n.prototype,"visibleBandID",void 0),t([i({json:{write:!0}})],n.prototype,"infraredBandID",void 0),t([i({json:{write:!0}})],n.prototype,"scientificOutput",void 0),n=s=t([r("esri.layers.raster.functions.NDVIFunctionArguments")],n);const o=n;export{o as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as t}from"tslib";import{numberMaxFloat32 as e}from"../../../core/mathUtils.js";import{property as s,subclass as n}from"../../../core/accessorSupport/decorators.js";import{getPixelValueRange as u}from"../formats/pixelRangeUtils.js";import a from"./BaseRasterFunction.js";import{createRemapLUT as o,maxMapSizeGpu as i,lookupPixels as l,lookupBandValues as r,remap as p,createRangeMaps as m}from"./pixelUtils.js";import c from"./RemapFunctionArguments.js";let f=class extends a{constructor(){super(...arguments),this.functionName="Remap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;t.bandCount=1;const{statistics:s}=t;this._removeStatsHistColormapVAT(t);const{allowUnmatched:n,replacementValue:a,outputValues:l,inputRanges:r,noDataRanges:p,isLastInputRangeInclusive:m}=this.functionArguments,c="unknown"===this.outputPixelType||null==this.outputPixelType;if(this.outputPixelType=this._getOutputPixelType(e),l?.length){const o=s?.[0];if(n&&null==a){let e=o?.min??l[0],s=o?.max??l[0];e=Math.min.apply(null,[...l,e]),s=Math.max.apply(null,[...l,s]),t.statistics=[{min:e,max:s,avg:o?.avg??0,stddev:o?.stddev??-1}]}else{let e=l[0],s=e;for(let t=0;t<l.length;t++)e=e>l[t]?l[t]:e,s=s>l[t]?s:l[t];n&&null!=a&&(e=Math.min(e,a),s=Math.max(s,a)),t.statistics=[{min:e,max:s,avg:o?.avg??0,stddev:o?.stddev??-1}]}if(c){const{min:s,max:o}=t.statistics[0],i=["u8","s8","u16","s16","u32","s32","f32"],r=i.find(t=>{const[e,n]=u(t);return s>=e&&o<=n})??"f64";l.some(t=>Math.floor(t)!==t)?this.outputPixelType="f64"===r?"f64":"f32":this.outputPixelType=n&&null==a&&i.indexOf(e)>i.indexOf(r)?e:r}}t.pixelType=this.outputPixelType,this.rasterInfo=t,this.lookup=n?null:o({srcPixelType:e,inputRanges:r,outputValues:l,noDataRanges:p,allowUnmatched:n,isLastInputRangeInclusive:m,outputPixelType:this.outputPixelType});return{success:!0,supportsGPU:(!l||l.length<=i)&&(!p||p.length<=i)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{lookup:s,outputPixelType:n}=this;if(s){const t=l(e,{lut:[s.lut],offset:s.offset,outputPixelType:n});return null!=t&&s.mask&&(t.mask=r(e.pixels[0],e.mask,s.mask,s.offset,"u8")),t}const{inputRanges:u,outputValues:a,noDataRanges:o,allowUnmatched:i,isLastInputRangeInclusive:m,replacementValue:c}=this.functionArguments;return p(e,{inputRanges:u,outputValues:a,noDataRanges:o,outputPixelType:n,allowUnmatched:i,isLastInputRangeInclusive:m,replacementValue:c})}_getWebGLParameters(){const{allowUnmatched:t,noDataRanges:s,isLastInputRangeInclusive:n}=this.functionArguments,a=this.functionArguments.inputRanges??[],o=this.functionArguments.outputValues??[],l=m(a,o,n),r=new Float32Array(2*i);r.fill(e),s?.length&&r.set(s);return{allowUnmatched:t,rangeMaps:l,noDataRanges:r,clampRange:u(this.outputPixelType),replacementValue:this.functionArguments.replacementValue}}};t([s({json:{write:!0,name:"rasterFunction"}})],f.prototype,"functionName",void 0),t([s({type:c,json:{write:!0,name:"rasterFunctionArguments"}})],f.prototype,"functionArguments",void 0),t([s()],f.prototype,"rasterArgumentNames",void 0),t([s({json:{write:!0}})],f.prototype,"lookup",void 0),f=t([n("esri.layers.raster.functions.RemapFunction")],f);const g=f;export{g as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as s,subclass as e}from"../../../core/accessorSupport/decorators.js";import n from"./BaseFunctionArguments.js";var o;let a=o=class extends n{constructor(){super(...arguments),this.inputRanges=null,this.outputValues=null,this.noDataRanges=null,this.allowUnmatched=!1,this.isLastInputRangeInclusive=!1}clone(){return new o({inputRanges:[...this.inputRanges],outputValues:[...this.outputValues],noDataRanges:[...this.noDataRanges],allowUnmatched:this.allowUnmatched,isLastInputRangeInclusive:this.isLastInputRangeInclusive})}};t([s({json:{write:!0}})],a.prototype,"inputRanges",void 0),t([s({json:{write:!0}})],a.prototype,"outputValues",void 0),t([s({json:{write:!0}})],a.prototype,"noDataRanges",void 0),t([s({json:{write:!0}})],a.prototype,"allowUnmatched",void 0),t([s({json:{write:!0}})],a.prototype,"replacementValue",void 0),t([s({json:{write:!0}})],a.prototype,"isLastInputRangeInclusive",void 0),a=o=t([e("esri.layers.
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as s,subclass as e}from"../../../core/accessorSupport/decorators.js";import n from"./BaseFunctionArguments.js";var o;let a=o=class extends n{constructor(){super(...arguments),this.inputRanges=null,this.outputValues=null,this.noDataRanges=null,this.allowUnmatched=!1,this.isLastInputRangeInclusive=!1}clone(){return new o({inputRanges:[...this.inputRanges],outputValues:[...this.outputValues],noDataRanges:[...this.noDataRanges],allowUnmatched:this.allowUnmatched,isLastInputRangeInclusive:this.isLastInputRangeInclusive})}};t([s({json:{write:!0}})],a.prototype,"inputRanges",void 0),t([s({json:{write:!0}})],a.prototype,"outputValues",void 0),t([s({json:{write:!0}})],a.prototype,"noDataRanges",void 0),t([s({json:{write:!0}})],a.prototype,"allowUnmatched",void 0),t([s({json:{write:!0}})],a.prototype,"replacementValue",void 0),t([s({json:{write:!0}})],a.prototype,"isLastInputRangeInclusive",void 0),a=o=t([e("esri.layers.raster.functions.RemapFunctionArguments")],a);const i=a;export{i as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as s}from"../../../core/accessorSupport/decorators.js";import{isIntegerPixelType as r}from"../formats/pixelRangeUtils.js";import o from"./BaseRasterFunction.js";import{createColormapLUT as i}from"./pixelUtils.js";import n from"./ShadedReliefFunctionArguments.js";import{getHillshadeOptions as a,hillshade as p,tintHillshade as u,calculateHillshadeParams as c,gcsFactor as l}from"./surfaceUtils.js";import{convertColorRampToColormap as m,createHsvMap as d}from"../../../renderers/support/colorRampUtils.js";import{isColormapSupportedByWebGL as f}from"../../../renderers/support/rasterRendererChecks.js";let h=class extends o{constructor(){super(...arguments),this.functionName="ShadedRelief",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){const e=this.sourceRasterInfos[0];if(e.bandCount>1)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: source data must be single band"};let{colorRamp:t,colormap:s}=this.functionArguments;if(!t&&!s?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a color ramp argument must be specified"};this.outputPixelType=this._getOutputPixelType("u8");const r=e.clone();this._removeStatsHistColormapVAT(r),r.pixelType=this.outputPixelType,r.bandCount=3,r.statistics=[{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=r,this.isGCS=r.spatialReference?.isGeographic??!1,s?.length||(s=m(t,{interpolateAlpha:!0}));const{indexedColormap:o,offset:n}=i({colormap:s});if(!o?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a valid colorramp is required"};const a=d(o);return this.lookup={indexedColormap:o,offset:n,hsvMap:a},{success:!0,supportsGPU:f(o)}}_processPixels(e){const t=e.pixelBlocks?.[0];if(!t||!this.lookup)return null;let s=e.primaryPixelSizes?.[0];if(null==s){const{extent:r}=e;s=r?{x:r.width/t.width,y:r.height/t.height}:{x:1,y:1}}const r=a(this.functionArguments,s,this.isGCS),o=p(t,r),i=this.sourceRasterInfos[0].statistics?.[0]??{min:0,max:8e3};return u(o,t,this.lookup.hsvMap,i),o.pixelType=this.outputPixelType,o}_getWebGLParameters(){const e=a(this.functionArguments,{x:1,y:1},this.isGCS),t=c(e),{slopeType:s,zFactor:o,pixelSizeFactor:i,pixelSizePower:n}=this.functionArguments,p="scaled"===s,{indexedColormap:u,offset:m}=this.lookup,d=this.sourceRasterInfos[0].statistics?.[0],f=r(this.outputPixelType);return{...t,indexedColormap:u,offset:m,zFactor:o,gcsFactor:this.isGCS?l:1,pixelSizeFactor:p?i:0,pixelSizePower:p?n:0,minValue:d?.min??0,maxValue:d?.max??8e3,isOutputRounded:f}}};e([t({json:{write:!0,name:"rasterFunction"}})],h.prototype,"functionName",void 0),e([t({type:n,json:{write:!0,name:"rasterFunctionArguments"}})],h.prototype,"functionArguments",void 0),e([t()],h.prototype,"rasterArgumentNames",void 0),e([t({json:{write:!0}})],h.prototype,"isGCS",void 0),e([t({json:{write:!0}})],h.prototype,"lookup",void 0),h=e([s("esri.layers.raster.functions.ShadedReliefFunction")],h);const x=h;export{x as default};
|
package/layers/{support/rasterFunctions → raster/functions}/ShadedReliefFunctionArguments.js
RENAMED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as o}from"tslib";import{property as e,subclass as r}from"../../../core/accessorSupport/decorators.js";import t from"./HillshadeFunctionArguments.js";import{colorRampDict as s,getColorRampJSON as i}from"../../../renderers/support/colorRampUtils.js";import{reader as
|
|
5
|
+
import{__decorate as o}from"tslib";import{property as e,subclass as r}from"../../../core/accessorSupport/decorators.js";import t from"./HillshadeFunctionArguments.js";import{colorRampDict as s,getColorRampJSON as i}from"../../../renderers/support/colorRampUtils.js";import{reader as a}from"../../../core/accessorSupport/decorators/reader.js";var p;let l=p=class extends t{readColorRamp(o){if("string"==typeof o){const e=s.jsonValues.find(e=>e.toLowerCase()===o.toLowerCase());return e?i(s.fromJSON(e)):null}return"toJSON"in o?o.toJSON():o}clone(){return new p({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,colorRamp:this.colorRamp,colormap:this.colormap,raster:this.raster})}};o([e({json:{write:!0}})],l.prototype,"colorRamp",void 0),o([a("colorRamp")],l.prototype,"readColorRamp",null),o([e({type:[[Number]],json:{write:!0}})],l.prototype,"colormap",void 0),l=p=o([r("esri.layers.raster.functions.ShadedReliefFunctionArguments")],l);const c=l;export{c as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as e,subclass as s}from"../../../core/accessorSupport/decorators.js";import{isIntegerPixelType as i}from"../formats/pixelRangeUtils.js";import o from"./BaseRasterFunction.js";import r from"./SlopeFunctionArguments.js";import{slope as n,gcsFactor as p}from"./surfaceUtils.js";let u=class extends o{constructor(){super(...arguments),this.functionName="Slope",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),t.statistics="percent-rise"!==this.functionArguments.slopeType?[{min:0,max:90,avg:1,stddev:1}]:null,t.bandCount=1,this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{zFactor:s,slopeType:i,pixelSizePower:o,pixelSizeFactor:r}=this.functionArguments,{isGCS:p}=this,{extent:u,primaryPixelSizes:a}=t,c=a?.[0],l=c??(u?{x:u.width/e.width,y:u.height/e.height}:{x:1,y:1});return n(e,{zFactor:s,slopeType:i,pixelSizePower:o,pixelSizeFactor:r,isGCS:p,resolution:l})}_getWebGLParameters(){const{zFactor:t,slopeType:e,pixelSizeFactor:s,pixelSizePower:o}=this.functionArguments;return{zFactor:this.isGCS&&t>=1?t*p:t,slopeType:e,pixelSizeFactor:s??0,pixelSizePower:o??0,isOutputRounded:i(this.outputPixelType)}}};t([e({json:{write:!0,name:"rasterFunction"}})],u.prototype,"functionName",void 0),t([e({type:r,json:{write:!0,name:"rasterFunctionArguments"}})],u.prototype,"functionArguments",void 0),t([e()],u.prototype,"rasterArgumentNames",void 0),t([e({json:{write:!0}})],u.prototype,"isGCS",void 0),u=t([s("esri.layers.raster.functions.SlopeFunction")],u);const a=u;export{a as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{JSONMap as o}from"../../../core/jsonMap.js";import{property as r,subclass as t}from"../../../core/accessorSupport/decorators.js";import s from"./BaseFunctionArguments.js";import{enumeration as i}from"../../../core/accessorSupport/decorators/enumeration.js";var p;const c=new o({1:"degree",2:"percent-rise",3:"adjusted"},{useNumericKeys:!0});let a=p=class extends s{constructor(){super(...arguments),this.slopeType="degree",this.zFactor=1,this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.removeEdgeEffect=!1}clone(){return new p({slopeType:this.slopeType,zFactor:this.zFactor,pixelSizePower:this.pixelSizePower,pixelSizeFactor:this.pixelSizeFactor,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};e([i(c)],a.prototype,"slopeType",void 0),e([r({type:Number,json:{write:!0}})],a.prototype,"zFactor",void 0),e([r({type:Number,json:{name:"psPower",write:!0}})],a.prototype,"pixelSizePower",void 0),e([r({type:Number,json:{name:"psZFactor",write:!0}})],a.prototype,"pixelSizeFactor",void 0),e([r({type:Boolean,json:{write:!0}})],a.prototype,"removeEdgeEffect",void 0),a=p=e([t("esri.layers.
|
|
5
|
+
import{__decorate as e}from"tslib";import{JSONMap as o}from"../../../core/jsonMap.js";import{property as r,subclass as t}from"../../../core/accessorSupport/decorators.js";import s from"./BaseFunctionArguments.js";import{enumeration as i}from"../../../core/accessorSupport/decorators/enumeration.js";var p;const c=new o({1:"degree",2:"percent-rise",3:"adjusted"},{useNumericKeys:!0});let a=p=class extends s{constructor(){super(...arguments),this.slopeType="degree",this.zFactor=1,this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.removeEdgeEffect=!1}clone(){return new p({slopeType:this.slopeType,zFactor:this.zFactor,pixelSizePower:this.pixelSizePower,pixelSizeFactor:this.pixelSizeFactor,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};e([i(c)],a.prototype,"slopeType",void 0),e([r({type:Number,json:{write:!0}})],a.prototype,"zFactor",void 0),e([r({type:Number,json:{name:"psPower",write:!0}})],a.prototype,"pixelSizePower",void 0),e([r({type:Number,json:{name:"psZFactor",write:!0}})],a.prototype,"pixelSizeFactor",void 0),e([r({type:Boolean,json:{write:!0}})],a.prototype,"removeEdgeEffect",void 0),a=p=e([t("esri.layers.raster.functions.SlopeFunctionArguments")],a);const n=a;export{n as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as s,subclass as e}from"../../../core/accessorSupport/decorators.js";import{getPixelValueRange as o}from"../formats/pixelRangeUtils.js";import r from"./BaseRasterFunction.js";import{computeFocalStatistics as i}from"./focalStatUtils.js";import n from"./StatisticsFunctionArguments.js";let u=class extends r{constructor(){super(...arguments),this.functionName="Statistics",this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{type:t}=this.functionArguments.toJSON();if(t<1||t>7)return{success:!1,supportsGPU:!1,error:`statistics-function: the given statistics type is not supported ${t}`};const s=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(s.pixelType);const e=s.clone();e.pixelType=this.outputPixelType;const{statisticsType:o}=this.functionArguments;"stddev"===o&&this._removeStatsHistColormapVAT(e),this.rasterInfo=e;return{success:!0,supportsGPU:e.bandCount<=3&&t<5}}_processPixels(t){const s=t.pixelBlocks?.[0];if(null==s)return s;const{statisticsType:e,rows:o,cols:r,fillNoDataOnly:n}=this.functionArguments;return i(s,{kernelRows:o,kernelCols:r,fillNoDataOnly:n,outputPixelType:this.outputPixelType,statisticsType:e,mirrorEdges:!0})}_getWebGLParameters(){const{rows:t,cols:s,statisticsType:e,fillNoDataOnly:r}=this.functionArguments;return{fillNoDataOnly:r,kernelRows:t,kernelCols:s,statisticsType:e,clampRange:o(this.outputPixelType)}}};t([s({json:{write:!0,name:"rasterFunction"}})],u.prototype,"functionName",void 0),t([s({type:n,json:{write:!0,name:"rasterFunctionArguments"}})],u.prototype,"functionArguments",void 0),t([s()],u.prototype,"rasterArgumentNames",void 0),u=t([e("esri.layers.raster.functions.StatisticsFunction")],u);const a=u;export{a as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{clone as s}from"../../../core/lang.js";import{property as r,subclass as o}from"../../../core/accessorSupport/decorators.js";import e from"./BaseFunctionArguments.js";import{statisticsTypeMap as i}from"./focalStatUtils.js";import{enumeration as a}from"../../../core/accessorSupport/decorators/enumeration.js";var c;let l=c=class extends e{constructor(){super(...arguments),this.rows=3,this.cols=3,this.fillNoDataOnly=!1,this.statisticsType="min"}clone(){return new c({rows:this.rows,cols:this.cols,fillNoDataOnly:this.fillNoDataOnly,statisticsType:this.statisticsType,raster:s(this.raster)})}};t([r({json:{write:!0,read:{source:["kernelRows","rows"],reader:(t,s)=>Number(t??s?.kernelRows??3)}}})],l.prototype,"rows",void 0),t([r({json:{write:!0,read:{source:["kernelCols","cols"],reader:(t,s)=>Number(t??s?.kernelCols??3)}}})],l.prototype,"cols",void 0),t([r({json:{write:!0}})],l.prototype,"fillNoDataOnly",void 0),t([r({json:{read:{source:["statisticsType","type"],reader:(t,s)=>i.fromJSON(s?.statisticsType??s?.type)??"min"},write:{target:"type"}}}),a(i)],l.prototype,"statisticsType",void 0),l=c=t([o("esri.layers.
|
|
5
|
+
import{__decorate as t}from"tslib";import{clone as s}from"../../../core/lang.js";import{property as r,subclass as o}from"../../../core/accessorSupport/decorators.js";import e from"./BaseFunctionArguments.js";import{statisticsTypeMap as i}from"./focalStatUtils.js";import{enumeration as a}from"../../../core/accessorSupport/decorators/enumeration.js";var c;let l=c=class extends e{constructor(){super(...arguments),this.rows=3,this.cols=3,this.fillNoDataOnly=!1,this.statisticsType="min"}clone(){return new c({rows:this.rows,cols:this.cols,fillNoDataOnly:this.fillNoDataOnly,statisticsType:this.statisticsType,raster:s(this.raster)})}};t([r({json:{write:!0,read:{source:["kernelRows","rows"],reader:(t,s)=>Number(t??s?.kernelRows??3)}}})],l.prototype,"rows",void 0),t([r({json:{write:!0,read:{source:["kernelCols","cols"],reader:(t,s)=>Number(t??s?.kernelCols??3)}}})],l.prototype,"cols",void 0),t([r({json:{write:!0}})],l.prototype,"fillNoDataOnly",void 0),t([r({json:{read:{source:["statisticsType","type"],reader:(t,s)=>i.fromJSON(s?.statisticsType??s?.type)??"min"},write:{target:"type"}}}),a(i)],l.prototype,"statisticsType",void 0),l=c=t([o("esri.layers.raster.functions.StatisticsFunctionArguments")],l);const n=l;export{n as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as s,subclass as o}from"../../../core/accessorSupport/decorators.js";import r from"./BaseRasterFunction.js";import e from"./StatisticsHistogramFunctionArguments.js";let i=class extends r{constructor(){super(...arguments),this.functionName="StatisticsHistogram",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType("u8");const s=t.clone(),{statistics:o,histograms:r}=this.functionArguments;return r&&(s.histograms=r),o&&(s.statistics=o),this.rasterInfo=s,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};t([s({json:{write:!0,name:"rasterFunction"}})],i.prototype,"functionName",void 0),t([s({type:e,json:{write:!0,name:"rasterFunctionArguments"}})],i.prototype,"functionArguments",void 0),t([s()],i.prototype,"rasterArgumentNames",void 0),t([s({json:{write:!0}})],i.prototype,"indexedColormap",void 0),t([s()],i.prototype,"isNoopProcess",void 0),i=t([o("esri.layers.
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as s,subclass as o}from"../../../core/accessorSupport/decorators.js";import r from"./BaseRasterFunction.js";import e from"./StatisticsHistogramFunctionArguments.js";let i=class extends r{constructor(){super(...arguments),this.functionName="StatisticsHistogram",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType("u8");const s=t.clone(),{statistics:o,histograms:r}=this.functionArguments;return r&&(s.histograms=r),o&&(s.statistics=o),this.rasterInfo=s,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};t([s({json:{write:!0,name:"rasterFunction"}})],i.prototype,"functionName",void 0),t([s({type:e,json:{write:!0,name:"rasterFunctionArguments"}})],i.prototype,"functionArguments",void 0),t([s()],i.prototype,"rasterArgumentNames",void 0),t([s({json:{write:!0}})],i.prototype,"indexedColormap",void 0),t([s()],i.prototype,"isNoopProcess",void 0),i=t([o("esri.layers.raster.functions.StatisticsHistogramFunction")],i);const n=i;export{n as default};
|
package/layers/{support/rasterFunctions → raster/functions}/StatisticsHistogramFunctionArguments.js
RENAMED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{clone as s}from"../../../core/lang.js";import{property as r,subclass as o}from"../../../core/accessorSupport/decorators.js";import e from"./BaseFunctionArguments.js";import{reader as i}from"../../../core/accessorSupport/decorators/reader.js";import{writer as a}from"../../../core/accessorSupport/decorators/writer.js";var n;let c=n=class extends e{constructor(){super(...arguments),this.statistics=null,this.histograms=null}readStatistics(t,s){if(!t?.length)return null;const r=[];return t.forEach(t=>{const s={min:t.min,max:t.max,avg:t.avg??t.mean,stddev:t.stddev??t.standardDeviation};r.push(s)}),r}writeStatistics(t,s,r){if(!t?.length)return;const o=[];t.forEach(t=>{const s={...t,mean:t.avg,standardDeviation:t.stddev};delete s.avg,delete s.stddev,o.push(s)}),s[r]=o}clone(){return new n({statistics:s(this.statistics),histograms:s(this.histograms)})}};t([r({json:{write:!0}})],c.prototype,"statistics",void 0),t([i("statistics")],c.prototype,"readStatistics",null),t([a("statistics")],c.prototype,"writeStatistics",null),t([r({json:{write:!0}})],c.prototype,"histograms",void 0),c=n=t([o("esri.layers.
|
|
5
|
+
import{__decorate as t}from"tslib";import{clone as s}from"../../../core/lang.js";import{property as r,subclass as o}from"../../../core/accessorSupport/decorators.js";import e from"./BaseFunctionArguments.js";import{reader as i}from"../../../core/accessorSupport/decorators/reader.js";import{writer as a}from"../../../core/accessorSupport/decorators/writer.js";var n;let c=n=class extends e{constructor(){super(...arguments),this.statistics=null,this.histograms=null}readStatistics(t,s){if(!t?.length)return null;const r=[];return t.forEach(t=>{const s={min:t.min,max:t.max,avg:t.avg??t.mean,stddev:t.stddev??t.standardDeviation};r.push(s)}),r}writeStatistics(t,s,r){if(!t?.length)return;const o=[];t.forEach(t=>{const s={...t,mean:t.avg,standardDeviation:t.stddev};delete s.avg,delete s.stddev,o.push(s)}),s[r]=o}clone(){return new n({statistics:s(this.statistics),histograms:s(this.histograms)})}};t([r({json:{write:!0}})],c.prototype,"statistics",void 0),t([i("statistics")],c.prototype,"readStatistics",null),t([a("statistics")],c.prototype,"writeStatistics",null),t([r({json:{write:!0}})],c.prototype,"histograms",void 0),c=n=t([o("esri.layers.raster.functions.StatisticsHistogramFunctionArguments")],c);const m=c;export{m as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as s,subclass as e}from"../../../core/accessorSupport/decorators.js";import{isIntegerPixelType as o}from"../formats/pixelRangeUtils.js";import u from"./BaseRasterFunction.js";import{lookupPixels as r}from"./pixelUtils.js";import i from"./StretchFunctionArguments.js";import{getStretchCutoff as n,createStretchLUT as a,stretch as p,computeGammaCorrection as m}from"./stretchUtils.js";let c=class extends u{constructor(){super(...arguments),this.functionName="Stretch",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null,this.cutOffs=null}_bindSourceRasters(){this.lookup=null,this.cutOffs=null;const t=this.sourceRasterInfos[0],{pixelType:s}=t,{functionArguments:e}=this,{dynamicRangeAdjustment:u,gamma:r,useGamma:i}=e;if(!u&&["u8","u16","s8","s16"].includes(s)){const u=n(e.toJSON(),{rasterInfo:t}),p=o(this.outputPixelType)?"round":"float";this.lookup=a({pixelType:s,...u,gamma:i?r:null,rounding:p}),this.cutOffs=u}else u||(this.cutOffs=n(e.toJSON(),{rasterInfo:t}));this.outputPixelType=this._getOutputPixelType(s);const p=t.clone();p.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(p),"u8"===this.outputPixelType&&(p.keyProperties.DataType="processed");const{outputMin:m=0,outputMax:c=255}=this.functionArguments;p.statistics=[];for(let o=0;o<p.bandCount;o++)p.statistics[o]={min:m,max:c};this.rasterInfo=p;return{success:!0,supportsGPU:!u}}_processPixels(t){const s=t.pixelBlocks?.[0];if(null==s)return s;const{lookup:e}=this;if(e)return r(s,{...e,outputPixelType:this.rasterInfo.pixelType});const{functionArguments:o}=this,u=this.cutOffs||n(o.toJSON(),{rasterInfo:this.sourceRasterInfos[0],pixelBlock:s}),i=o.useGamma?o.gamma:null;return p(s,{...u,gamma:i,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const{outputMin:t=0,outputMax:s=255,gamma:e,useGamma:u}=this.functionArguments,r=this.rasterInfo.bandCount>=2?3:1,i=u&&e?.length?m(r,e):[1,1,1],{minCutOff:n,maxCutOff:a}=this.cutOffs??{minCutOff:[0,0,0],maxCutOff:[255,255,255]};1===n.length&&(n[1]=n[2]=n[0],a[1]=a[2]=a[0]);const p=a.map((e,o)=>(s-t)/(a[o]-n[o])),c=o(this.outputPixelType),f=u&&e?[e[0],e[1]??e[0],e[2]??e[0]]:[1,1,1],l=u?[i[0],i[1]??i[0],i[2]??i[0]]:[1,1,1];return{bandCount:r,minOutput:t,maxOutput:s,minCutOff:n,maxCutOff:a,factor:p,useGamma:u,gamma:f,gammaCorrection:l,stretchType:this.functionArguments.stretchType,isOutputRounded:c,type:"stretch"}}};t([s({json:{write:!0,name:"rasterFunction"}})],c.prototype,"functionName",void 0),t([s({type:i,json:{write:!0,name:"rasterFunctionArguments"}})],c.prototype,"functionArguments",void 0),t([s()],c.prototype,"rasterArgumentNames",void 0),t([s({json:{write:!0}})],c.prototype,"lookup",void 0),t([s({json:{write:!0}})],c.prototype,"cutOffs",void 0),c=t([e("esri.layers.raster.functions.StretchFunction")],c);const f=c;export{f as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{JSONMap as e}from"../../../core/jsonMap.js";import{clone as o}from"../../../core/lang.js";import{property as r,subclass as s}from"../../../core/accessorSupport/decorators.js";import i from"./BaseFunctionArguments.js";import{writer as a}from"../../../core/accessorSupport/decorators/writer.js";import{enumeration as m}from"../../../core/accessorSupport/decorators/enumeration.js";var n;const p=new e({0:"none",3:"standard-deviation",4:"histogram-equalization",5:"min-max",6:"percent-clip",9:"sigmoid"},{useNumericKeys:!0});let u=n=class extends i{constructor(){super(...arguments),this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.histograms=null,this.statistics=null,this.stretchType="none",this.useGamma=!1}writeStatistics(t,e,o){t?.length&&(Array.isArray(t[0])||(t=t.map(t=>[t.min,t.max,t.avg,t.stddev])),e[o]=t)}clone(){return new n({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,statistics:o(this.statistics),gamma:o(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,histograms:o(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment,raster:this.raster})}};t([r({type:Boolean,json:{write:!0}})],u.prototype,"computeGamma",void 0),t([r({type:Boolean,json:{name:"dra",write:!0}})],u.prototype,"dynamicRangeAdjustment",void 0),t([r({type:[Number],json:{write:!0}})],u.prototype,"gamma",void 0),t([r()],u.prototype,"histograms",void 0),t([r({type:Number,json:{write:!0}})],u.prototype,"maxPercent",void 0),t([r({type:Number,json:{write:!0}})],u.prototype,"minPercent",void 0),t([r({type:Number,json:{write:!0}})],u.prototype,"numberOfStandardDeviations",void 0),t([r({type:Number,json:{name:"max",write:!0}})],u.prototype,"outputMax",void 0),t([r({type:Number,json:{name:"min",write:!0}})],u.prototype,"outputMin",void 0),t([r({type:Number,json:{write:!0}})],u.prototype,"sigmoidStrengthLevel",void 0),t([r({json:{type:[[Number]],write:!0}})],u.prototype,"statistics",void 0),t([a("statistics")],u.prototype,"writeStatistics",null),t([m(p)],u.prototype,"stretchType",void 0),t([r({type:Boolean,json:{write:!0}})],u.prototype,"useGamma",void 0),u=n=t([s("esri.layers.
|
|
5
|
+
import{__decorate as t}from"tslib";import{JSONMap as e}from"../../../core/jsonMap.js";import{clone as o}from"../../../core/lang.js";import{property as r,subclass as s}from"../../../core/accessorSupport/decorators.js";import i from"./BaseFunctionArguments.js";import{writer as a}from"../../../core/accessorSupport/decorators/writer.js";import{enumeration as m}from"../../../core/accessorSupport/decorators/enumeration.js";var n;const p=new e({0:"none",3:"standard-deviation",4:"histogram-equalization",5:"min-max",6:"percent-clip",9:"sigmoid"},{useNumericKeys:!0});let u=n=class extends i{constructor(){super(...arguments),this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.histograms=null,this.statistics=null,this.stretchType="none",this.useGamma=!1}writeStatistics(t,e,o){t?.length&&(Array.isArray(t[0])||(t=t.map(t=>[t.min,t.max,t.avg,t.stddev])),e[o]=t)}clone(){return new n({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,statistics:o(this.statistics),gamma:o(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,histograms:o(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment,raster:this.raster})}};t([r({type:Boolean,json:{write:!0}})],u.prototype,"computeGamma",void 0),t([r({type:Boolean,json:{name:"dra",write:!0}})],u.prototype,"dynamicRangeAdjustment",void 0),t([r({type:[Number],json:{write:!0}})],u.prototype,"gamma",void 0),t([r()],u.prototype,"histograms",void 0),t([r({type:Number,json:{write:!0}})],u.prototype,"maxPercent",void 0),t([r({type:Number,json:{write:!0}})],u.prototype,"minPercent",void 0),t([r({type:Number,json:{write:!0}})],u.prototype,"numberOfStandardDeviations",void 0),t([r({type:Number,json:{name:"max",write:!0}})],u.prototype,"outputMax",void 0),t([r({type:Number,json:{name:"min",write:!0}})],u.prototype,"outputMin",void 0),t([r({type:Number,json:{write:!0}})],u.prototype,"sigmoidStrengthLevel",void 0),t([r({json:{type:[[Number]],write:!0}})],u.prototype,"statistics",void 0),t([a("statistics")],u.prototype,"writeStatistics",null),t([m(p)],u.prototype,"stretchType",void 0),t([r({type:Boolean,json:{write:!0}})],u.prototype,"useGamma",void 0),u=n=t([s("esri.layers.raster.functions.StretchFunctionArguments")],u);const c=u;export{c as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as e,subclass as s}from"../../../core/accessorSupport/decorators.js";import r from"./BaseRasterFunction.js";import o from"./TableFunctionArguments.js";let i=class extends r{constructor(){super(...arguments),this.functionName="Table",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1||t.pixelType.startsWith("f"))return{success:!1,supportsGPU:!1,error:"table-function: Source data must be single band and integer pixel type."};const{attributeTableAsRecordSet:e}=this.functionArguments;if(!e)return{success:!1,supportsGPU:!1,error:"table-function: Missing attributeTableAsRecordSet argument."};this.outputPixelType=this._getOutputPixelType(t.pixelType);const s=t.clone();return s.pixelType=this.outputPixelType,s.bandCount=1,"thematic"!==s.dataType&&(s.keyProperties=s.keyProperties?{...s.keyProperties,DataType:"thematic"}:{DataType:"thematic"}),this.rasterInfo=s,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};t([e({json:{write:!0,name:"rasterFunction"}})],i.prototype,"functionName",void 0),t([e({type:o,json:{write:!0,name:"rasterFunctionArguments"}})],i.prototype,"functionArguments",void 0),t([e()],i.prototype,"rasterArgumentNames",void 0),t([e()],i.prototype,"isNoopProcess",void 0),i=t([s("esri.layers.
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as e,subclass as s}from"../../../core/accessorSupport/decorators.js";import r from"./BaseRasterFunction.js";import o from"./TableFunctionArguments.js";let i=class extends r{constructor(){super(...arguments),this.functionName="Table",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1||t.pixelType.startsWith("f"))return{success:!1,supportsGPU:!1,error:"table-function: Source data must be single band and integer pixel type."};const{attributeTableAsRecordSet:e}=this.functionArguments;if(!e)return{success:!1,supportsGPU:!1,error:"table-function: Missing attributeTableAsRecordSet argument."};this.outputPixelType=this._getOutputPixelType(t.pixelType);const s=t.clone();return s.pixelType=this.outputPixelType,s.bandCount=1,"thematic"!==s.dataType&&(s.keyProperties=s.keyProperties?{...s.keyProperties,DataType:"thematic"}:{DataType:"thematic"}),this.rasterInfo=s,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};t([e({json:{write:!0,name:"rasterFunction"}})],i.prototype,"functionName",void 0),t([e({type:o,json:{write:!0,name:"rasterFunctionArguments"}})],i.prototype,"functionArguments",void 0),t([e()],i.prototype,"rasterArgumentNames",void 0),t([e()],i.prototype,"isNoopProcess",void 0),i=t([s("esri.layers.raster.functions.TableFunction")],i);const n=i;export{n as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{clone as e}from"../../../core/lang.js";import{property as r,subclass as o}from"../../../core/accessorSupport/decorators.js";import s from"./BaseFunctionArguments.js";var a;let c=a=class extends s{constructor(){super(...arguments),this.attributeTableAsRecordSet=null}clone(){return new a({attributeTableAsRecordSet:e(this.attributeTableAsRecordSet)})}};t([r({json:{write:!0}})],c.prototype,"attributeTableAsRecordSet",void 0),c=a=t([o("esri.layers.
|
|
5
|
+
import{__decorate as t}from"tslib";import{clone as e}from"../../../core/lang.js";import{property as r,subclass as o}from"../../../core/accessorSupport/decorators.js";import s from"./BaseFunctionArguments.js";var a;let c=a=class extends s{constructor(){super(...arguments),this.attributeTableAsRecordSet=null}clone(){return new a({attributeTableAsRecordSet:e(this.attributeTableAsRecordSet)})}};t([r({json:{write:!0}})],c.prototype,"attributeTableAsRecordSet",void 0),c=a=t([o("esri.layers.raster.functions.TableFunctionArguments")],c);const i=c;export{i as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{JSONMap as t}from"../../../core/jsonMap.js";import{isIntegerPixelType as n,clipBandToPixelTypeRange as e}from"../formats/pixelRangeUtils.js";import{calculateCustomBandIndex as r}from"./customBandIndexUtils.js";import{isValidPixelBlock as o}from"./pixelUtils.js";import a from"../../support/PixelBlock.js";const i=new t({0:"custom",1:"ndvi",2:"savi",3:"tsavi",4:"msavi",5:"gemi",6:"pvi",7:"gvitm",8:"sultan",9:"vari",10:"gndvi",11:"sr",12:"ndvi-re",13:"sr-re",14:"mtvi2",15:"rtvi-core",16:"ci-re",17:"ci-g",18:"ndwi",19:"evi",20:"iron-oxide",21:"ferrous-minerals",22:"clay-minerals",23:"wndwi",24:"bai",25:"nbr",26:"ndbi",27:"ndmi",28:"ndsi",29:"mndwi"},{useNumericKeys:!0});function s(t,i){if(!o(t))return t;const{equation:s,method:l}=i,c=i.bandIndexes.map(t=>t-1),{pixels:U,mask:q}=t;let M;switch(l){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":M=u(q,U[c[0]],U[c[1]]);break;case"ndwi":M=u(q,U[c[1]],U[c[0]]);break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":M=f(q,U[c[0]],U[c[1]]);break;case"ci-g":case"ci-re":M=h(q,U[c[0]],U[c[1]]);break;case"savi":M=w(q,U[c[0]],U[c[1]],c[2]+1);break;case"tsavi":M=m(q,U[c[0]],U[c[1]],c[2]+1,c[3]+1,c[4]+1);break;case"msavi":M=d(q,U[c[0]],U[c[1]]);break;case"gemi":M=g(q,U[c[0]],U[c[1]]);break;case"pvi":M=y(q,U[c[0]],U[c[1]],c[2]+1,c[3]+1);break;case"gvitm":M=p(q,[U[c[0]],U[c[1]],U[c[2]],U[c[3]],U[c[4]],U[c[5]]]);break;case"sultan":M=b(q,[U[c[0]],U[c[1]],U[c[2]],U[c[3]],U[c[4]]]);break;case"vari":M=v(q,[U[c[0]],U[c[1]],U[c[2]]]);break;case"mtvi2":M=k(q,[U[c[0]],U[c[1]],U[c[2]]]);break;case"rtvi-core":M=A(q,[U[c[0]],U[c[1]],U[c[2]]]);break;case"evi":M=F(q,[U[c[0]],U[c[1]],U[c[2]]]);break;case"wndwi":M=x(q,[U[c[0]],U[c[1]],U[c[2]]],c[3]?c[3]+1:.5);break;case"bai":M=j(q,U[c[0]],U[c[1]]);break;case"custom":M=r(q,U,s);break;default:return t}const{outputPixelType:B="f32"}=i,T=null!=B&&n(B);let I;q?(I=new Uint8Array(t.width*t.height),I.set(q)):T&&(I=new Uint8Array(t.width*t.height).fill(255)),T&&(M=M.map(t=>{const n=a.createEmptyBand(B,t.length);return e(t,I,B,n),n}));const P=new a({width:t.width,height:t.height,pixelType:B,pixels:M,mask:I});return P.updateStatistics(),P}function l(t,n,e,r){const{mask:o,pixels:i,width:s,height:l}=t,c=i[e],u=i[n],f=u.length,h=r?new Uint8Array(f):new Float32Array(f),w=r?100:1,m=r?100.5:0;for(let a=0;a<f;a++)if(null==o||o[a]){const t=c[a],n=u[a],e=t+n;e&&(h[a]=(t-n)/e*w+m)}const d=new a({width:s,height:l,mask:o,pixelType:r?"u8":"f32",pixels:[h]});return d.updateStatistics(),d}function c(t){const n=new Float32Array(9);return n[3*t[0]]=1,n[3*t[1]+1]=1,n[3*t[2]+2]=1,n}function u(t,n,e){const r=e.length,o=new Float32Array(r);for(let a=0;a<r;a++)if(null==t||t[a]){const t=n[a],r=e[a],i=t+r;i&&(o[a]=(t-r)/i)}return[o]}function f(t,n,e){const r=e.length,o=new Float32Array(r);for(let a=0;a<r;a++)if(null==t||t[a]){const t=n[a],r=e[a];r&&(o[a]=t/r)}return[o]}function h(t,n,e){const r=n.length,o=new Float32Array(r);for(let a=0;a<r;a++)if(null==t||t[a]){const t=n[a],r=e[a];r&&(o[a]=t/r-1)}return[o]}function w(t,n,e,r){const o=e.length,a=new Float32Array(o);for(let i=0;i<o;i++)if(null==t||t[i]){const t=e[i],o=n[i],s=o+t+r;s&&(a[i]=(o-t)/s*(1+r))}return[a]}function m(t,n,e,r,o,a){const i=e.length,s=new Float32Array(i),l=-o*r+a*(1+r*r);for(let c=0;c<i;c++)if(null==t||t[c]){const t=e[c],a=n[c],i=o*a+t+l;i&&(s[c]=r*(a-r*t-o)/i)}return[s]}function d(t,n,e){const r=e.length,o=new Float32Array(r);for(let a=0;a<r;a++)if(null==t||t[a]){const t=e[a],r=n[a],i=2*r+1;o[a]=.5*(i-Math.sqrt(i*i-8*(r-t)))}return[o]}function g(t,n,e){const r=e.length,o=new Float32Array(r);for(let a=0;a<r;a++)if(null==t||t[a]){const t=e[a],r=n[a];if(1!==t&&r+t+.5!==0){const n=(2*(r*r-t*t)+1.5*r+.5*t)/(r+t+.5);o[a]=n*(1-.25*n)-(t-.125)/(1-t)}}return[o]}function y(t,n,e,r,o){const a=e.length,i=new Float32Array(a),s=1/Math.sqrt(1+r*r);for(let l=0;l<a;l++)if(null==t||t[l]){const t=e[l],a=n[l];i[l]=(a-r*t-o)*s}return[i]}function p(t,n){const[e,r,o,a,i,s]=n,l=e.length,c=new Float32Array(l);for(let u=0;u<l;u++)(null==t||t[u])&&(c[u]=-.2848*e[u]-.2435*r[u]-.5436*o[u]+.7243*a[u]+.084*i[u]-.18*s[u]);return[c]}function b(t,n){const[e,r,o,a,i]=n,s=e.length,l=new Float32Array(s),c=new Float32Array(s),u=new Float32Array(s);for(let f=0;f<s;f++)(null==t||t[f])&&(l[f]=i[f]?a[f]/i[f]*100:0,c[f]=e[f]?a[f]/e[f]*100:0,u[f]=o[f]?r[f]/o[f]*(a[f]/o[f])*100:0);return[l,c,u]}function v(t,n){const[e,r,o]=n,a=e.length,i=new Float32Array(a);for(let s=0;s<a;s++)if(null==t||t[s])for(s=0;s<a;s++){const t=e[s],n=r[s],a=n+t-o[s];a&&(i[s]=(n-t)/a)}return[i]}function k(t,n){const[e,r,o]=n,a=e.length,i=new Float32Array(a);for(let s=0;s<a;s++)if(null==t||t[s])for(s=0;s<a;s++){const t=e[s],n=r[s],a=o[s],l=Math.sqrt((2*t+1)**2-(6*t-5*Math.sqrt(n))-.5);if(l){const e=1.5*(1.2*(t-a)-2.5*(n-a));i[s]=e/l}}return[i]}function A(t,n){const[e,r,o]=n,a=e.length,i=new Float32Array(a);for(let s=0;s<a;s++)if(null==t||t[s])for(s=0;s<a;s++){const t=e[s],n=r[s],a=o[s];i[s]=100*(t-n)-10*(t-a)}return[i]}function F(t,n){const[e,r,o]=n,a=e.length,i=new Float32Array(a);for(let s=0;s<a;s++)if(null==t||t[s])for(s=0;s<a;s++){const t=e[s],n=r[s],a=t+6*n-7.5*o[s]+1;a&&(i[s]=2.5*(t-n)/a)}return[i]}function x(t,n,e=.5){const[r,o,a]=n,i=o.length,s=new Float32Array(i);for(let l=0;l<i;l++)if(null==t||t[l])for(l=0;l<i;l++){const t=r[l],n=o[l],i=a[l],c=t+e*n+(1-e)*i;c&&(s[l]=(t-e*n-(1-e)*i)/c)}return[s]}function j(t,n,e){const r=e.length,o=new Float32Array(r);for(let a=0;a<r;a++)if(null==t||t[a])for(a=0;a<r;a++){const t=(.1-n[a])**2+(.06-e[a])**2;t&&(o[a]=1/t)}return[o]}export{i as bandIndexMethodMap,s as calculateBandIndex,l as calculateNDVI,c as getBandMatrix3};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import"../../../core/has.js";import{JSONMap as e}from"../../../core/jsonMap.js";import{isIntegerPixelType as t}from"../formats/pixelRangeUtils.js";import a from"../../support/PixelBlock.js";const n=new e({0:"difference",1:"relative-difference",2:"categorical",3:"euclidean-distance",4:"angle-difference",5:"band-with-most-change"},{useNumericKeys:!0}),s=new e({0:"all",1:"changed",2:"unchanged"},{useNumericKeys:!0});function i(e,n,s,i){const[f,h]=e,p=t(s)&&!t(f.pixelType)&&!t(h.pixelType),m=[f.mask,h.mask].filter(e=>e),u=a.combineBandMasks(m),g=e.map(e=>e.pixels[0]),{width:k,height:x}=f,b=a.createEmptyBand(s,k*x);switch(n){case"difference":case"relative-difference":o({bands:g,mask:u,outBand:b,isRoundingNeeded:p,isRelative:"relative-difference"===n});break;case"categorical":c({bands:g,mask:u,outBand:b,...i});break;case"euclidean-distance":l({pixels:e.map(e=>e.pixels),mask:u,outBand:b});break;case"angle-difference":r({pixels:e.map(e=>e.pixels),mask:u,outBand:b});break;case"band-with-most-change":d({pixels:e.map(e=>e.pixels),mask:u,outBand:b})}const B=new a({width:k,height:x,pixels:[b],pixelType:s,mask:u});return B.updateStatistics(),B}function o(e){const{bands:[t,a],mask:n,isRelative:s,isRoundingNeeded:i,outBand:o}=e,c=t.length;for(let l=0;l<c;l++)if(!n||n[l]){let e=t[l]-a[l];if(s){const n=Math.max(Math.abs(t[l])-Math.abs(a[l]));e=n>0?e/n:0}o[l]=i?Math.round(e):e}}function c(e){const{bands:[t,a],categoryIndexLookups:[n,s],classNames:[i,o],mask:c,keepMethod:l,outBand:r}=e,d=t.length,f=i.length,h=o.length,p=f*h,m=p+1,u=p+2;for(let g=0;g<d;g++)if(!c||c[g]){const e=t[g],c=a[g],d=n[e],f=s[c],k=i[d],x=o[f];r[g]=null==d||null==f?p:"changed"===l&&k===x?m:"unchanged"===l&&k!==x?u:d*h+f}}function l(e){const{pixels:[t,a],mask:n,outBand:s}=e,i=t[0].length,o=t.length;for(let c=0;c<i;c++)if(!n||n[c]){let e=0;for(let n=0;n<o;n++){const s=t[n][c]-a[n][c];e+=s*s}s[c]=Math.sqrt(e)}}function r(e){const{pixels:[t,a],mask:n,outBand:s}=e,i=t[0].length,o=t.length;for(let c=0;c<i;c++)if(!n||n[c]){let e=0,n=0,i=0;for(let s=0;s<o;s++){const o=t[s][c],l=a[s][c];e+=o*l,n+=o*o,i+=l*l}const l=Math.sqrt(n*i);s[c]=l?Math.acos(e/l):1.5707963267948966}}function d(e){const{pixels:[t,a],mask:n,outBand:s}=e,i=t[0].length,o=t.length;for(let c=0;c<i;c++)if(!n||n[c]){let e=0,n=0;for(let s=0;s<o;s++){const i=Math.abs(t[s][c]-a[s][c]);i>e&&(e=i,n=s)}s[c]=n}}export{n as changeMethodMap,i as computeChange,s as keepMethodMap};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{getMetersPerUnitForSR as t}from"../../../core/units.js";import e from"../../../geometry/Extent.js";import n from"../../../geometry/Point.js";import i from"../../support/PixelBlock.js";function a(e,n){if(e.spatialReference.equals(n))return e;const i=t(e.spatialReference),a=t(n);if(i===a)return e;const r=i/a;return{x:e.x*r,y:e.y*r}}async function r(t,e,n){if("extent"===n.type)return m(t,e,n);const{width:a,height:r}=t,h=new Uint8Array(a*r);if(!(await import("../../../geometry/operators/intersectsOperator.js")).execute(e,n))return new i({pixelType:t.pixelType,width:a,height:r,mask:h,maskIsAlpha:!1,pixels:[...t.pixels]});if("polyline"===n.type)return s(t,e,n);return(await import("../../../geometry/operators/containsOperator.js")).execute(n,e)?t:o(t,e,n)}function o(t,e,n){if(!t)return t;const{width:a,height:r}=t,o=h({geometry:n,size:[a,r],srcExtent:e,srcMask:t.mask});return new i({pixelType:t.pixelType,width:a,height:r,mask:o,maskIsAlpha:!1,pixels:[...t.pixels]})}function h(t){const{geometry:e,size:n,srcExtent:i,srcMask:a}=t,[r,o]=n;let h;const m=i.width/r,s=i.height/o,{xmin:l,ymax:p}=i;if("extent"===e.type){const t=(e.xmin-l)/m,n=(e.xmax-l)/m,i=(p-e.ymax)/s,a=(p-e.ymin)/s;h=[[[t,i],[t,a],[n,a],[n,i],[t,i]]]}else h=e.rings.map(t=>t.map(([t,e])=>[(t-l)/m,(p-e)/s]));return x(h,n,a)}function x(t,e,n){const[i,a]=e,r=new OffscreenCanvas(i,a).getContext("2d");r.fillStyle="#f00",r.beginPath(),t.forEach(t=>{r.moveTo(t[0][0],t[0][1]);for(let e=0;e<t.length;e++)r.lineTo(t[e][0],t[e][1]);r.closePath()}),r.fill();const o=r.getImageData(0,0,i,a).data,h=i*a,x=new Uint8Array(h);let m=!1;for(let s=0;s<h;s++)n&&!n[s]||(o[4*s+3]>127?x[s]=255:m=!0);return m||n?x:void 0}function m(t,e,n){const{width:a,height:r}=t,o=new Uint8Array(a*r),h=e.width/a,x=e.height/r;if(n.width/h<.5||n.height/x<.5)return new i({pixelType:t.pixelType,width:a,height:r,mask:o,pixels:[...t.pixels]});const{xmin:m,xmax:s,ymin:l,ymax:p}=e,{xmin:f,xmax:c,ymin:y,ymax:u}=n,M=Math.max(m,f),w=Math.min(s,c),d=Math.max(l,y),g=Math.min(p,u),T=.5*h,k=.5*x;if(w-M<T||g-d<k||w<m+T||M>s-T||d>p-k||g<l+k)return new i({pixelType:t.pixelType,width:a,height:r,mask:o,pixels:[...t.pixels]});const R=Math.max(0,(M-m)/h),j=Math.min(a,Math.max(0,(w-m)/h)),A=Math.max(0,(p-g)/x),z=Math.min(r,Math.max(0,(p-d)/x)),E=Math.round(R),P=Math.round(j)-1,S=Math.round(A),U=Math.round(z)-1;if(E===P&&R%1>.5&&j%1<.5||S===U&&A%1>.5&&z%1<.5)return new i({pixelType:t.pixelType,width:a,height:r,mask:o,pixels:[...t.pixels]});if(0===E&&0===S&&P===a&&U===r)return t;const v=t.mask;for(let i=S;i<=U;i++)for(let t=E;t<=P;t++){const e=i*a+t;o[e]=v?v[e]:255}return new i({pixelType:t.pixelType,width:a,height:r,mask:o,pixels:[...t.pixels]})}function s(t,e,n){const{width:a,height:r}=t,o=new Uint8Array(a*r),h=e.width/a,x=e.height/r,{xmin:m,ymax:s}=e,{paths:l}=n,p=t.mask;for(let i=0;i<l.length;i++){const t=l[i];for(let e=0;e<t.length-1;e++){const[n,i]=t[e],[l,f]=t[e+1],c=Math.min(i,f),y=Math.max(i,f),u=Math.max(0,Math.floor((s-y)/x)),M=Math.min(r-1,Math.floor((s-c)/x));if(!(M<u))if(u===M){const t=Math.min(n,l),e=Math.max(n,l),i=Math.max(0,Math.floor((t-m)/h)),r=Math.min(a-1,Math.floor((e-m)/h));if(r<i)continue;const x=u*a;for(let n=x+i;n<=x+r;n++)o[n]=p?p[n]:255}else{const t=(n-m)/h,e=(l-n)/(f-i)/h,r=x*e;for(let n=u;n<=M;n++){const h=e*(s-n*x-i)+t,m=Math.max(0,Math.floor(r>0?h-r:h)),l=Math.min(a-1,Math.floor(r>0?h:h-r));if(l<m)continue;const f=n*a;for(let t=f+m;t<=f+l;t++)o[t]=p?p[t]:255}}}}return new i({pixelType:t.pixelType,width:a,height:r,mask:o,pixels:[...t.pixels]})}function l(t,e){const{extent:i}=p(t,e,new n({x:t.pixelSize.x,y:t.pixelSize.y,spatialReference:t.spatialReference})),{extent:a}=t.extent;if(i.xmax=Math.min(i.xmax,a.xmax),i.ymax=Math.min(i.ymax,a.ymax),i.xmin<i.xmax&&i.ymin<i.ymax){const{x:e,y:n}=t.pixelSize,a=Math.round(i.width/e),r=Math.round(i.height/n);t.extent=i,t.width=a,t.height=r}}function p(t,n,i,r=!0){const{spatialReference:o}=t,{x:h,y:x}=a(i,o);let m,s,l;const p="extent"===n.type?n:n.extent;let{xmin:f,xmax:c,ymax:y,ymin:u}=p;const{xmin:M,ymax:w}=t.extent;return r?(f=M+(f>M?h*Math.round((f-M)/h):0),y=w-(y<w?x*Math.round((w-y)/x):0),c=M+(c>M?h*Math.round((c-M)/h):0),u=w-(u<w?x*Math.round((w-u)/x):0),m=new e({xmin:f,ymax:y,xmax:c,ymin:u,spatialReference:o}),s=Math.round(m.width/h),l=Math.round(m.height/x)):(s=Math.floor((c-f)/h+.8),l=Math.floor((y-u)/x+.8),f=M+(f>M?h*Math.floor((f-M)/h+.1):0),y=w-(y<w?x*Math.floor((w-y)/x+.1):0),c=f+s*h,u=y-l*x,m=new e({xmin:f,ymax:y,xmax:c,ymin:u,spatialReference:o})),{extent:m,width:s,height:l}}export{r as clip,l as clipRasterInfo,h as convertGeometryToMask,p as snapToRaster};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{getPixelValueRange as t}from"../formats/pixelRangeUtils.js";import e from"../../support/PixelBlock.js";function i(i,s,l){const{pixels:n,width:o,height:a,mask:r,bandMasks:p}=i,h=o*a,m=p?.length?e.combineBandMasks(p):r,f=Math.min(s.length,n.length),c=l.startsWith("f"),d=!c&&l!==i.pixelType,[x,g]=t(l),k=e.createEmptyBand(l,h);for(let t=0;t<a;t++){let e=t*o;for(let t=0;t<o;t++,e++)if(!m||m[e]){let t=0;for(let i=0;i<f;i++)t+=s[i]*n[i][e];c||(t=Math.round(t),d&&(t=t>g?g:t<x?x:t)),k[e]=t}}const u=new e({width:o,height:a,pixels:[k],pixelType:l,mask:m});return u.updateStatistics(),u}export{i as grayscale};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{mirror as e}from"./mirror.js";import t from"../../support/PixelBlock.js";import{convolutionKernel as n}from"../../support/rasterFunctionConstants.js";const o=new Map;function l(e){const t=Math.sqrt(e.length),n=e.slice(0,t),o=[1];for(let l=1;l<t;l++){let n=null;for(let o=0;o<t;o++){const r=e[o+l*t],s=e[o];if(null==n)if(0===s){if(r)return{separable:!1,row:null,col:null}}else n=r/s;else if(r/s!==n)return{separable:!1,row:null,col:null}}if(null==n)return{separable:!1,row:null,col:null};o.push(n)}return{separable:!0,row:n,col:o}}function r(e,t,n,o,l,r,s){const i=new Float32Array(t*n),a=r.length,p=s?0:o,h=s?o:0,c=s?1:t;for(let u=p;u<n-p;u++){const n=u*t;for(let s=h;s<t-h;s++){if(l&&!l[n+s])continue;let t=0;for(let l=0;l<a;l++)t+=e[n+s+(l-o)*c]*r[l];i[n+s]=t}}return i}function s(e,t,n,o,l,r,s){const i=new Float32Array(t*n),a=Math.floor(o/2),p=Math.floor(l/2);for(let h=a;h<n-a;h++){const n=h*t;for(let h=p;h<t-p;h++){if(r&&!r[n+h])continue;let c=0;for(let r=0;r<o;r++)for(let o=0;o<l;o++)c+=e[n+h+(r-a)*t+o-p]*s[r*l+o];i[n+h]=c}}return i}function i(n,o,l=!0){const{pixels:r,width:i,height:a,pixelType:p,mask:h}=n,c=r.length,u=[],{kernel:f,rows:g,cols:m}=o;for(let t=0;t<c;t++){const n=s(r[t],i,a,g,m,h,f);l&&e(n,i,a,g,m),u.push(n)}return new t({width:i,height:a,pixelType:p,pixels:u,mask:h})}function a(n,o,l,s=!0){const{pixels:i,width:a,height:p,pixelType:h,mask:c}=n,u=i.length,f=[],g=o.length,m=l.length,x=Math.floor(g/2),w=Math.floor(m/2);for(let t=0;t<u;t++){let n=r(i[t],a,p,x,c,o,!0);n=r(n,a,p,w,c,l,!1),s&&e(n,a,p,g,m),f.push(n)}return new t({width:a,height:p,pixelType:h,pixels:f,mask:c})}function p(e,t){const n=l(t.kernel),o=!1!==t.mirrorEdges,r=n.separable?a(e,n.row,n.col,o):i(e,t,o),{outputPixelType:s}=t;return s&&r.clamp(s),r}o.set(n.none,[0,0,0,0,1,0,0,0,0]),o.set(n.lineDetectionHorizontal,[-1,-1,-1,2,2,2,-1,-1,-1]),o.set(n.lineDetectionVertical,[-1,2,-1,-1,2,-1,-1,2,-1]),o.set(n.lineDetectionLeftDiagonal,[2,-1,-1,-1,2,-1,-1,-1,2]),o.set(n.lineDetectionRightDiagonal,[-1,-1,2,-1,2,-1,2,-1,-1]),o.set(n.gradientNorth,[-1,-2,-1,0,0,0,1,2,1]),o.set(n.gradientWest,[-1,0,1,-2,0,2,-1,0,1]),o.set(n.gradientEast,[1,0,-1,2,0,-2,1,0,-1]),o.set(n.gradientSouth,[1,2,1,0,0,0,-1,-2,-1]),o.set(n.gradientNorthEast,[0,-1,-2,1,0,-1,2,1,0]),o.set(n.gradientNorthWest,[-2,-1,0,-1,0,1,0,1,2]),o.set(n.smoothArithmeticMean,[.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111]),o.set(n.smoothing3x3,[.0625,.125,.0625,.125,.25,.125,.0625,.125,.0625]),o.set(n.smoothing5x5,[1,1,1,1,1,1,4,4,4,1,1,4,12,4,1,1,4,4,4,1,1,1,1,1,1]),o.set(n.sharpening3x3,[-1,-1,-1,-1,9,-1,-1,-1,-1]),o.set(n.sharpening5x5,[-1,-3,-4,-3,-1,-3,0,6,0,-3,-4,6,21,6,-4,-3,0,6,0,-3,-1,-3,-4,-3,-1]),o.set(n.laplacian3x3,[0,-1,0,-1,4,-1,0,-1,0]),o.set(n.laplacian5x5,[0,0,-1,0,0,0,-1,-2,-1,0,-1,-2,17,-2,-1,0,-1,-2,-1,0,0,0,-1,0,0]),o.set(n.sobelHorizontal,[-1,-2,-1,0,0,0,1,2,1]),o.set(n.sobelVertical,[-1,0,1,-2,0,2,-1,0,1]),o.set(n.sharpen,[0,-.25,0,-.25,2,-.25,0,-.25,0]),o.set(n.sharpen2,[-.25,-.25,-.25,-.25,3,-.25,-.25,-.25,-.25]),o.set(n.pointSpread,[-.627,.352,-.627,.352,2.923,.352,-.627,.352,-.627]);export{p as convolute,a as convoluteSeparable,o as convolutionKernels,l as separateKernels};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{getNamedColor as t,hexToRgba as e}from"../../../../colorUtils.js";import{createRasterFunction as n}from"./utils.js";import{colormapName as o}from"../../../support/rasterFunctionConstants.js";import{colorRampDict as r}from"../../../../renderers/support/colorRampUtils.js";function a(t){return"colormap"in t?s(t):"colorRamp"in t?i(t):u(t)}function s(o){const r=o.colormap.map(n=>{if("value"in n){const o="string"==typeof n.color?t(n.color)??e(n.color):n.color;(n=[n.value,...o])[4]&&n[4]<=1&&(n[4]=Math.round(255*n[4]))}return n}),{raster:a,outputPixelType:s}=o;return n("Colormap",{colormap:r,raster:a},s)}function i(t){const{raster:e,colorRamp:o,outputPixelType:r}=t,a={colorRamp:"toJSON"in o?o.toJSON():o,raster:e};return n("Colormap",a,r)}function u(t){const{colorRampName:e}=t,a=Object.values(o).find(t=>t.toLowerCase()===e?.toLowerCase()),s=r.toJSON(e),{raster:i,outputPixelType:u="unknown"}=t;return n("Colormap",a?{colormapName:a,raster:i}:{colorRampName:s,raster:i},u)}function l(t){const{raster:e,outputPixelType:o="u8"}=t;return n("ColormapToRGB",{raster:e},o)}function p(t){const{raster:e,histograms:o,outputPixelType:r}=t,a=t.statistics?.map(t=>({min:t.min,max:t.max,mean:t.avg,standardDeviation:t.stddev}));return n("StatisticsHistograms",{raster:e,statistics:a,histograms:o},r)}function c(t){const{raster:e,attributeTable:o,outputPixelType:r="unknown"}=t,a="toJSON"in o?o.toJSON():o;return n("Table",{raster:e,attributeTableAsRecordSet:a},r)}function m(t){const{raster:e,outputPixelType:o="unknown"}=t,r={raster:e,missingBandAction:"fail"===t.missingBandAction?1:0};return"bandIds"in t?r.bandIds=t.bandIds:"bandNames"in t?r.bandNames=t.bandNames:"bandWavelengths"in t&&(r.bandWavelengths=t.bandWavelengths),n("ExtractBand",r,o)}function d(t){const{redBand:e,greenBand:o,blueBand:r,raster:a,outputPixelType:s}=t,i="name"===t.method?0:2;return n("CreateColorComposite",{raster:a,method:i,bandIndexesR:e,bandIndexesG:o,bandIndexesB:r},s)}function f(t){const{rasters:e,outputPixelType:o}=t;return n("CompositeBand",{rasters:e},o)}function g(t){const{allowUnmatched:e,raster:o,rangeMaps:r,outputPixelType:a,replacementValue:s}=t,i=r?.filter(({output:t})=>null!=t),u=i?.flatMap(({range:t})=>t),l=i?.map(({output:t})=>t),p=r?.filter(t=>null==t.output)?.flatMap(({range:t})=>t);return n("Remap",{allowUnmatched:e,raster:o,inputRanges:u,outputValues:l,noDataRanges:p,replacementValue:s},a)}function b(t){const{inputBitPositions:e,raster:o,fillRaster:r,outputBitPositions:a,outputPixelType:s}=t,i={inputBitPositions:e,outputBitPositions:a,raster:o};return null!=r&&("number"==typeof r?(i.constantFillCheck=!0,i.constantFillValue=r):i.fillRaster=r),n("TransposeBits",i,s)}function x(t){const{raster:e,outputPixelType:o="unknown"}=t,r=t.includedRanges?.flat(),a=t.noDataValues?.map(t=>t.join(" ")),s="match-all"===t.noDataInterpretation?1:0;return n("Mask",{raster:e,includedRanges:r,noDataInterpretation:s,noDataValues:a},o)}function T(t){const{geometry:e,keepOutside:o,outputPixelType:r="unknown",raster:a}=t,s="declaredClass"in e?e.toJSON():e;return n("Clip",{clippingGeometry:s,clippingType:o?2:1,raster:a},r)}export{T as clip,a as colormap,l as colormapToRGB,f as compositeBand,d as createColorComposite,m as extractBand,x as mask,g as remap,p as statisticsHistogram,c as table,b as transposeBits};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import n from"../../../support/RasterFunction.js";function t(t,e,o){return Object.keys(e).forEach(n=>{null==e[n]&&delete e[n]}),o||(o="unknown"),new n({functionName:t,functionArguments:e,outputPixelType:o})}export{t as createRasterFunction};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import"../../../core/has.js";import{JSONMap as t}from"../../../core/jsonMap.js";import{mirror as e}from"./mirror.js";import o from"../../support/PixelBlock.js";const n=new t({1:"min",2:"max",3:"mean",4:"stddev",5:"median",6:"majority",7:"minority"},{useNumericKeys:!0});function s(t,e){const{fillNoDataOnly:o}=e,{band:n,width:s,height:r,mask:i,outBand:l}=t;if(o&&!i)return void l.set(n);const{statisticsType:a,kernelRows:c,kernelCols:f}=e,h="stddev"===a,u=s*r,m=new Float64Array(u),d=new Float64Array(u),y=new Uint32Array(u);for(let A=0;A<r;A++){const t=A*s;let e=0,o=0,r=0;for(let s=0;s<f;s++)i&&!i[t+s]||(e+=n[t+s],h&&(o+=n[t+s]**2),r++);m[t]=e,d[t]=o,y[t]=r;for(let l=1;l<=s-f;l++){const s=t+l-1,a=s+f;i?(i[s]&&(r--,e-=n[s],h&&(o-=n[s]**2)),i[a]&&(r++,e+=n[a],h&&(o+=n[a]**2))):(e-=n[s],e+=n[a],h&&(o-=n[s]**2,o+=n[a]**2)),m[t+l]=e,y[t+l]=r,h&&(d[t+l]=o)}}const p=new Float64Array(u),k=new Float64Array(u),w=new Uint32Array(u),M=c*s;for(let A=0;A<=s-f;A++){let t=0,e=0,o=0;for(let n=0;n<c;n++){const r=n*s+A;t+=m[r],o+=y[r],h&&(e+=d[r])}p[A]=t,k[A]=e,w[A]=o;for(let n=1;n<=r-c;n++){const r=(n-1)*s+A,i=r+M;t-=m[r],t+=m[i],o-=y[r],o+=y[i],h&&(e-=d[r],e+=d[i]),p[n*s+A]=t,k[n*s+A]=e,w[n*s+A]=o}}const g=Math.floor(c/2),b=Math.floor(f/2);for(let A=g;A<r-g;A++){const t=A*s;for(let e=b;e<s-b;e++){const n=(A-g)*s+e-b,r=w[n];if(0===r||o&&(!i||i[t+e]))continue;const a=p[n]/r,c=h?Math.sqrt((k[n]-p[n]*a)/r):a;l[t+e]=c,i&&(i[t+e]=255)}}}function r(t,e){const{fillNoDataOnly:o}=e,{band:n,width:s,height:r,mask:i,outBand:l}=t;if(o&&!i)return void l.set(n);const{kernelRows:a,kernelCols:c,statisticsType:f}=e,h=Math.floor(a/2),u=Math.floor(c/2),m="min"===f,d=l.slice(),y=new Uint32Array(s*r);for(let p=h;p<r-h;p++){const t=p*s;for(let e=u;e<s-u;e++){let o=m?Number.MAX_VALUE:-Number.MAX_VALUE,r=0;for(let l=0;l<a;l++)for(let a=0;a<c;a++){const c=t+e+(l-h)*s+a-u;i&&!i[c]||(o=m?Math.min(o,n[c]):Math.max(o,n[c]),r++)}i?(d[t+e]=0===r?0:o,y[t+e]=r):l[t+e]=0===r?0:o}}if(i)for(let p=h;p<r-h;p++){const t=p*s;for(let e=u;e<s-u;e++)if(y[t+e]){if(o&&i[t+e])continue;l[t+e]=d[t+e],i[t+e]=255}}}function i(t,e){const{fillNoDataOnly:o}=e,{band:n,width:s,height:r,mask:i,outBand:l}=t;if(o&&!i)return void l.set(n);const{kernelRows:a,kernelCols:c}=e,f=Math.floor(a/2),h=Math.floor(c/2),u=l.slice(),m=new Uint32Array(s*r);for(let d=f;d<r-f;d++){const t=d*s;for(let e=h;e<s-h;e++){if(o&&i?.[t+e])continue;const r=[];for(let o=0;o<a;o++)for(let l=0;l<c;l++){const a=t+e+(o-f)*s+l-h;i&&!i[a]||r.push(n[a])}r.length&&(r.sort((t,e)=>t-e),i?(u[t+e]=r[Math.floor((r.length-1)/2)],m[t+e]=r.length):l[t+e]=r[Math.floor((r.length-1)/2)])}}if(i)for(let d=f;d<r-f;d++){const t=d*s;for(let e=h;e<s-h;e++)if(m[t+e]){if(o&&i[t+e])continue;l[t+e]=u[t+e],i[t+e]=255}}}function l(t,e){const{fillNoDataOnly:o}=e,{band:n,width:s,height:r,mask:i,outBand:l}=t;if(o&&!i)return void l.set(n);const{kernelRows:a,kernelCols:c}=e,f=Math.floor(a/2),h=Math.floor(c/2),u="majority"===e.statisticsType,m=a*c,d=l.slice(),y=new Uint32Array(s*r);for(let p=f;p<r-f;p++){const t=p*s;for(let e=h;e<s-h;e++){if(o&&i?.[t+e])continue;const r=new Map;for(let o=0;o<a;o++)for(let l=0;l<c;l++){const a=t+e+(o-f)*s+l-h;if(i&&!i[a])continue;const c=n[a];r.set(c,r.has(c)?r.get(c)+1:1)}if(0===r.size)continue;let p=0,k=0,w=u?0:m+1;for(const t of r.keys())k=r.get(t),u===k>w&&(w=k,p=t);i?(d[t+e]=p,y[t+e]=r.size):l[t+e]=p}}if(i)for(let p=f;p<r-f;p++){const t=p*s;for(let e=h;e<s-h;e++)if(y[t+e]){if(o&&i[t+e])continue;l[t+e]=d[t+e],i[t+e]=255}}}function a(t,n){const{mask:a}=t,{fillNoDataOnly:c}=n;if(c&&!a)return t;const{pixels:f,width:h,height:u,bandMasks:m,pixelType:d}=t,y=f.length,p=h*u,k=[],{kernelRows:w,kernelCols:M,statisticsType:g,mirrorEdges:b}=n;if(c&&!a)return t;const A=n.outputPixelType??d,x=[];for(let N=0;N<y;N++){const t=f[N],d=o.createEmptyBand(A,p);c&&d.set(t);const y=m?.[N]??a,j=y?.slice()??null,B={band:t,width:h,height:u,mask:j,outBand:d};switch(g){case"min":case"max":r(B,n);break;case"mean":case"stddev":s(B,n);break;case"median":i(B,n);break;case"majority":case"minority":l(B,n)}b&&!c&&e(d,h,u,w,M),k.push(d),j&&x.push(j)}let j=x[0]??a;x.length!==y&&(x.length=0),y>1&&m?.length&&(j=o.combineBandMasks(m));const B=new o({pixelType:A,width:h,height:u,pixels:k,bandMasks:m&&x.length?x:null,mask:j});return B.updateStatistics(),B}export{a as computeFocalStatistics,n as statisticsTypeMap};
|