@arcgis/core 4.34.0-next.56 → 4.34.0-next.57
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/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.d.ts +4 -0
- package/analysis/VolumeMeasurement/{CutFillOptions.js → VolumeMeasurementCutFillOptions.js} +1 -1
- package/analysis/VolumeMeasurementAnalysis.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02902303e5585a16ebea.js +1 -0
- package/assets/esri/core/workers/chunks/02a31483e09652a1a1a2.js +1 -0
- package/assets/esri/core/workers/chunks/0390f3aa624e3f380ce2.js +1 -0
- package/assets/esri/core/workers/chunks/047d6f7b1677cc7ab271.js +1 -0
- package/assets/esri/core/workers/chunks/04e652df94790f5ca08a.js +1 -0
- package/assets/esri/core/workers/chunks/{9f178cf73c63caaea190.js → 06d2251d6f6b3e44800a.js} +1 -1
- package/assets/esri/core/workers/chunks/07d5e0633cc2f765037f.js +1 -0
- package/assets/esri/core/workers/chunks/{8fa50cac57b6e1ecec76.js → 08393d9cc2ed846dd5b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{18ceea59e469a0f2721b.js → 094c741fa8139c3f40cf.js} +1 -1
- package/assets/esri/core/workers/chunks/0d946a226b846b3c0849.js +1 -0
- package/assets/esri/core/workers/chunks/0f51e51db83f303ce5a6.js +1 -0
- package/assets/esri/core/workers/chunks/{6530449cd1975deb61f1.js → 184d3c88ac2fc1d7e2c3.js} +1 -1
- package/assets/esri/core/workers/chunks/1cbd59918c60a1a21494.js +1 -0
- package/assets/esri/core/workers/chunks/2ded2446700f89155ccd.js +1 -0
- package/assets/esri/core/workers/chunks/{19391d60c76a1dc7c262.js → 2f7e192ee2066f863e1d.js} +1 -1
- package/assets/esri/core/workers/chunks/{6b11476b2004b4db576e.js → 3445ffd752262673fb13.js} +1 -1
- package/assets/esri/core/workers/chunks/38f09e36e174792646bd.js +1 -0
- package/assets/esri/core/workers/chunks/{adf11d31f95481f89a55.js → 3b51b61a7b8a1ef87c9b.js} +1 -1
- package/assets/esri/core/workers/chunks/3c57b2e13628b5c1f6de.js +1 -0
- package/assets/esri/core/workers/chunks/{65e1f5b20a585e04655a.js → 44dc7ec52c4abb700783.js} +1 -1
- package/assets/esri/core/workers/chunks/{c91217d977a6baaee74a.js → 4558f2e3e77831758fdc.js} +1 -1
- package/assets/esri/core/workers/chunks/4753793daf0b7ff8b5ff.js +1 -0
- package/assets/esri/core/workers/chunks/{853b9f29b4d62fa621b9.js → 4d2473e680324dc17cfa.js} +1 -1
- package/assets/esri/core/workers/chunks/52917b753c5ceab0c1f7.js +353 -0
- package/assets/esri/core/workers/chunks/{6940bb6524938894a246.js → 53873f26a2c24cd75e4a.js} +1 -1
- package/assets/esri/core/workers/chunks/561a2078458bc0339f83.js +1 -0
- package/assets/esri/core/workers/chunks/{6dc0009889f2b7cc8cff.js → 5691d504ffe5592bc40f.js} +1 -1
- package/assets/esri/core/workers/chunks/56b4dcd04c844eaacd60.js +1 -0
- package/assets/esri/core/workers/chunks/5f079be7f322768aef21.js +1 -0
- package/assets/esri/core/workers/chunks/61a294f9411bf884f2ab.js +1 -0
- package/assets/esri/core/workers/chunks/{ad93a2621f75270f06cb.js → 69fbe363bb130fdd8146.js} +1 -1
- package/assets/esri/core/workers/chunks/{722931d1a60be461e521.js → 70cf81ec5a901782d2db.js} +1 -1
- package/assets/esri/core/workers/chunks/{24ac204d8a045aa821be.js → 7388e8c905d93dea1c05.js} +1 -1
- package/assets/esri/core/workers/chunks/749c7159e0902388e828.js +1 -0
- package/assets/esri/core/workers/chunks/76ff7ccfe583927918f3.js +969 -0
- package/assets/esri/core/workers/chunks/{ae73ac81bd10614c2b53.js → 7714228825fb44d506df.js} +1 -1
- package/assets/esri/core/workers/chunks/{6130bc641aa7c1bcaaa8.js → 7c23be93d394f1bee941.js} +1 -1
- package/assets/esri/core/workers/chunks/7c86af4f60cea383ed96.js +1 -0
- package/assets/esri/core/workers/chunks/7eda1c400658b6a99be8.js +1 -0
- package/assets/esri/core/workers/chunks/{97ae2fdb6cb98249f5fa.js → 7f80bbbd0897082c1af3.js} +1 -1
- package/assets/esri/core/workers/chunks/80a69897fa3ce1eaa6e7.js +1 -0
- package/assets/esri/core/workers/chunks/80bd5988180f4618fd61.js +1 -0
- package/assets/esri/core/workers/chunks/{b47688e3263099540873.js → 81e518dd62bd95611d00.js} +1 -1
- package/assets/esri/core/workers/chunks/{10b46438885916d18425.js → 8257352421f453a669e9.js} +1 -1
- package/assets/esri/core/workers/chunks/8762928d10c3821738ad.js +1 -0
- package/assets/esri/core/workers/chunks/88a5e7415f8858c454f7.js +1 -0
- package/assets/esri/core/workers/chunks/893e5eb5c028c4704317.js +1 -0
- package/assets/esri/core/workers/chunks/8ead467a5af0d9bba804.js +1 -0
- package/assets/esri/core/workers/chunks/91e04d03b0013bcaad82.js +1 -0
- package/assets/esri/core/workers/chunks/{c7d4c296011c5393bcaa.js → 9275313e0f1f521b2658.js} +1 -1
- package/assets/esri/core/workers/chunks/{e666ca4d14b6490485d6.js → 92b60d4fb09711919601.js} +1 -1
- package/assets/esri/core/workers/chunks/977582cb3c8f17a2cb4c.js +1 -0
- package/assets/esri/core/workers/chunks/{5c556468e2a598ab793a.js → 9940e59033a8a1eff2a9.js} +1 -1
- package/assets/esri/core/workers/chunks/998c38974372720b1c52.js +1 -0
- package/assets/esri/core/workers/chunks/{9928e432b884c75c3436.js → 9d920f3488d59e7f276c.js} +1 -1
- package/assets/esri/core/workers/chunks/{d0124b0dd62b331afe58.js → 9fef330b241f958b55df.js} +1 -1
- package/assets/esri/core/workers/chunks/{a778a72456fefdf40115.js → a249e56a0be8cef33ba8.js} +1 -1
- package/assets/esri/core/workers/chunks/a3ee76b7e46d3fba7cf7.js +1 -0
- package/assets/esri/core/workers/chunks/a7530dcb08b43e37bbb2.js +1 -0
- package/assets/esri/core/workers/chunks/{2cda605c302176905e84.js → a96ac5c68d84122e7751.js} +1 -1
- package/assets/esri/core/workers/chunks/{e6bf4f3f6868dc9028e3.js → aab349d4624b78ef429f.js} +1 -1
- package/assets/esri/core/workers/chunks/acf13a64df2991a4cb6b.js +1 -0
- package/assets/esri/core/workers/chunks/b5640f9623a9c9ded92a.js +1 -0
- package/assets/esri/core/workers/chunks/{d42fd0effc560eefb14b.js → b6a201e86f9caef45ff0.js} +1 -1
- package/assets/esri/core/workers/chunks/bb67d491f62a5cce96cd.js +1 -0
- package/assets/esri/core/workers/chunks/{862fe2f96d4b777ff5b8.js → bbdbb618a18542f7a4a2.js} +1 -1
- package/assets/esri/core/workers/chunks/bc9f54a6b577c43189fd.js +1 -0
- package/assets/esri/core/workers/chunks/{6fe738748ce837811ff4.js → bd4125d163f372a7e978.js} +1 -1
- package/assets/esri/core/workers/chunks/bead38898c3f4d4d3569.js +1 -0
- package/assets/esri/core/workers/chunks/c51e2a048df152abd901.js +1 -0
- package/assets/esri/core/workers/chunks/{22334a464f798b5279b2.js → c80c032c5b7a11db177a.js} +1 -1
- package/assets/esri/core/workers/chunks/{3490d47cac7c8dec70cd.js → c9c109d43a1e5160955d.js} +2 -2
- package/assets/esri/core/workers/chunks/{4d5abcf57a6ded4750ba.js → cac060a187f3a27a19ba.js} +1 -1
- package/assets/esri/core/workers/chunks/cc748d4f4adb9c584aa4.js +1 -0
- package/assets/esri/core/workers/chunks/cf699b9bb530b87be14c.js +1 -0
- package/assets/esri/core/workers/chunks/d578c3880eaf2dd62324.js +1 -0
- package/assets/esri/core/workers/chunks/{5d331f7628514a572f82.js → d6ab4d55f1023ee6ec6a.js} +1 -1
- package/assets/esri/core/workers/chunks/d71836cf70b9604832f1.js +1 -0
- package/assets/esri/core/workers/chunks/{4874aabdb5c60ca66216.js → db2b8d8cf7131554cf7e.js} +1 -1
- package/assets/esri/core/workers/chunks/de4da985c398c8bcf2e7.js +1 -0
- package/assets/esri/core/workers/chunks/{cb57cdff976d2d4b0b41.js → e1b25b1ce3bd4f0f2cda.js} +1 -1
- package/assets/esri/core/workers/chunks/ef85cd0e82d59db8a26f.js +33 -0
- package/assets/esri/core/workers/chunks/{faf4002f9547a0cc4e33.js → fae6030a81cb91a91b69.js} +1 -1
- package/assets/esri/core/workers/chunks/fd1fdb97a294a1b7041d.js +1 -0
- package/assets/esri/core/workers/chunks/{ff42b24b48019a03d841.js → fe55833c80cf59df9c2b.js} +1 -1
- package/assets/esri/core/workers/chunks/{ff8a4bf1bceb362d67ab.js → ff7962063d132c1ec814.js} +1 -1
- package/config.js +1 -1
- package/geometry/Multipoint.js +1 -1
- package/geometry/support/boundsUtils.js +1 -1
- package/geometry/support/contains.js +1 -1
- package/geometry/support/curves/circleUtils.js +1 -1
- package/geometry/support/curves/circularArcUtils.js +1 -1
- package/geometry/support/curves/curveUtils.js +1 -1
- package/geometry/support/curves/ellipticArc7Utils.js +1 -1
- package/geometry/support/curves/rotate.js +5 -0
- package/geometry/support/extentUtils.js +1 -1
- package/geometry/support/rotate.js +1 -1
- package/graphic/ImageryGraphicOrigin.js +5 -0
- package/graphic/ImageryTileGraphicOrigin.js +5 -0
- package/graphic/WCSGraphicOrigin.js +5 -0
- package/graphic/isImageryGraphicOrigin.js +5 -0
- package/graphic/isImageryTileGraphicOrigin.js +5 -0
- package/graphic/isWCSGraphicOrigin.js +5 -0
- package/interfaces.d.ts +12 -15
- package/kernel.js +1 -1
- package/layers/CatalogLayer.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/GroundLayer.js +5 -0
- package/layers/ImageryLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/WCSLayer.js +1 -1
- package/layers/catalog/CatalogFootprintLayer.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/{CutFillVolumeMeasurementComputation.js → VolumeMeasurementCutFillComputation.js} +1 -1
- package/views/3d/analysis/VolumeMeasurement/{CutFillVolumeMeasurementController.js → VolumeMeasurementCutFillController.js} +1 -1
- package/views/3d/analysis/VolumeMeasurement/{CutFillVolumeMeasurementVisualization.js → VolumeMeasurementCutFillVisualization.js} +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/layers/CatalogFootprintLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/drawUtils.js +1 -1
- package/views/interactive/editGeometry/operations/RotateVertex.js +1 -1
- package/views/interactive/editGeometry/operations/curveOperationUtils.js +1 -1
- package/views/layers/ImageryLayerView.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/analysis/VolumeMeasurement/CutFillOptions.d.ts +0 -4
- package/assets/esri/core/workers/chunks/01e8b9dc77a57d1c2a52.js +0 -1
- package/assets/esri/core/workers/chunks/027cfcde29fe87aa2ffe.js +0 -1
- package/assets/esri/core/workers/chunks/03ee4d63aa8de44958ab.js +0 -1
- package/assets/esri/core/workers/chunks/0a4586e596413ef7a4b5.js +0 -1
- package/assets/esri/core/workers/chunks/0a6d33d013628f671aea.js +0 -1
- package/assets/esri/core/workers/chunks/1166ed298cf5ca7ad444.js +0 -1
- package/assets/esri/core/workers/chunks/13797036850dcc3671c3.js +0 -1
- package/assets/esri/core/workers/chunks/1a2278b9fe9666342728.js +0 -1
- package/assets/esri/core/workers/chunks/1e01aaebdeffdfc0c6bd.js +0 -1
- package/assets/esri/core/workers/chunks/222f981e876f60ae282f.js +0 -1
- package/assets/esri/core/workers/chunks/277941bec15525dbd3a0.js +0 -1
- package/assets/esri/core/workers/chunks/2cb14d040e67a261b31c.js +0 -1
- package/assets/esri/core/workers/chunks/31c088966ccfff2ea1db.js +0 -1
- package/assets/esri/core/workers/chunks/3245d20ea4bb779f87ef.js +0 -1
- package/assets/esri/core/workers/chunks/46a470bea2a3601182dc.js +0 -1
- package/assets/esri/core/workers/chunks/4b58da6cb91f7bf6af8b.js +0 -1
- package/assets/esri/core/workers/chunks/5900dde7a201a7d47469.js +0 -1
- package/assets/esri/core/workers/chunks/5b2ff220aebe464dac23.js +0 -1
- package/assets/esri/core/workers/chunks/5f518931a660b3c4f519.js +0 -1
- package/assets/esri/core/workers/chunks/66f3659ba18f92cd623e.js +0 -1
- package/assets/esri/core/workers/chunks/67355372ac5fd8a15d18.js +0 -1
- package/assets/esri/core/workers/chunks/6801b92bce7a918fda6f.js +0 -1
- package/assets/esri/core/workers/chunks/7b560ac0be93c6aa9940.js +0 -1
- package/assets/esri/core/workers/chunks/7bdfc7c7ce1d94c00745.js +0 -353
- package/assets/esri/core/workers/chunks/83737d86584bf1b32368.js +0 -1
- package/assets/esri/core/workers/chunks/854bfda25bb406814929.js +0 -1
- package/assets/esri/core/workers/chunks/855f25ce748aaef44b1a.js +0 -1
- package/assets/esri/core/workers/chunks/87f68c2b9361bd3f8cac.js +0 -1
- package/assets/esri/core/workers/chunks/9307108821d82c131654.js +0 -1
- package/assets/esri/core/workers/chunks/97a38d700f2cb8807d51.js +0 -1
- package/assets/esri/core/workers/chunks/9e9be7f6ea32957f1088.js +0 -33
- package/assets/esri/core/workers/chunks/af4412e79275c5a87539.js +0 -1
- package/assets/esri/core/workers/chunks/cbec768cd98caff212f2.js +0 -1
- package/assets/esri/core/workers/chunks/d3a7747f23e91d1f1b5e.js +0 -1
- package/assets/esri/core/workers/chunks/d3ae88fcde2d7fb3e2e2.js +0 -1
- package/assets/esri/core/workers/chunks/d81c4afad4abe2d1d0b9.js +0 -1
- package/assets/esri/core/workers/chunks/d87fdc64a5cc6be4bd69.js +0 -1
- package/assets/esri/core/workers/chunks/db5d3feeb61ccb5ede98.js +0 -1
- package/assets/esri/core/workers/chunks/dfb12f42b8d319ffa5fc.js +0 -1
- package/assets/esri/core/workers/chunks/ead1acf95c3385630da8.js +0 -1001
- package/assets/esri/core/workers/chunks/f3e3c2340452c1d60c95.js +0 -1
- package/assets/esri/core/workers/chunks/f4d7cbd33ef8710d7316.js +0 -1
- package/assets/esri/core/workers/chunks/f74b0cdc1c2b56bac5f0.js +0 -1
- package/assets/esri/core/workers/chunks/f807e7fc90e0e7ce6b67.js +0 -1
- package/assets/esri/core/workers/chunks/ff4e15a872de94d2b438.js +0 -1
- /package/assets/esri/core/workers/chunks/{3490d47cac7c8dec70cd.js.LICENSE.txt → c9c109d43a1e5160955d.js.LICENSE.txt} +0 -0
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../Graphic.js";import i from"../../request.js";import{deprecatedFunction as r}from"../../core/deprecate.js";import s from"../../core/Error.js";import{clone as n}from"../../core/lang.js";import a from"../../core/Logger.js";import{watch as o}from"../../core/reactiveUtils.js";import{urlToObject as l}from"../../core/urlUtils.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import{Integer as p,ensureRange as m,ensureClass as c,ensureNumber as h}from"../../core/accessorSupport/ensureType.js";import{reader as d}from"../../core/accessorSupport/decorators/reader.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{writer as g}from"../../core/accessorSupport/decorators/writer.js";import y from"../../geometry/Extent.js";import R from"../../geometry/Polygon.js";import I from"../../geometry/SpatialReference.js";import{srToRESTValue as v}from"../../geometry/support/spatialReferenceUtils.js";import{opacity as w,url as b}from"../support/commonProperties.js";import S from"../support/DimensionalDefinition.js";import{ExportImageServiceParameters as x}from"../support/ExportImageServiceParameters.js";import _ from"../support/Field.js";import F from"../support/FieldsIndex.js";import{createBitmap as D}from"../support/imageBitmapUtils.js";import{isSupportedRendererType as O}from"../support/imageryRendererUtils.js";import T from"../support/MosaicRule.js";import C from"../support/MultidimensionalSubset.js";import M from"../support/PixelBlock.js";import{interpolationKebab as P,noDataInterpretationKebab as N,pixelTypeKebabDict as q}from"../support/rasterEnums.js";import{getServicePixelValueField as j,getItemPixelValueField as A,getRawServicePixelValueField as E,getProcessedServicePixelValueField as V,getMagnitudeField as Q,getDirectionField as J,getMultidimensionalFields as U,getRasterAttributeTableFields as B,commonRasterFieldNames as L,addMultidimensionalFieldValues as z,rasterFieldPrefix as H}from"../support/rasterFieldUtils.js";import G from"../support/RasterFunction.js";import k from"../support/RasterInfo.js";import{intersectMultimensionalSubset as W,getEffectiveMultidimensionalDefinition as $,getSubsetVariablesFromMdInfo as X,getDefaultMultidimensionalDefinition as K}from"../support/rasterDatasets/multidimensionalUtils.js";import{decode as Y,getFormat as Z}from"../support/rasterFormats/RasterCodec.js";import{highlightPixels as ee}from"../support/rasterFunctions/pixelUtils.js";import{uvComponentToVector as te}from"../support/rasterFunctions/vectorFieldUtils.js";import{createDefaultRenderer as ie,getSupportedRendererTypes as re,matchPresetRenderer as se,getDefaultBandCombination as ne,normalizeRendererJSON as ae}from"../../renderers/support/rasterRendererHelper.js";import oe from"../../renderers/support/RasterSymbolizer.js";import{websceneRasterRendererTypes as le,rasterRendererTypes as ue,read as pe}from"../../renderers/support/rasterTypeUtils.js";import{calculateVolume as me,computeAngles as ce,computePixelSpaceLocations as he,computeHistograms as de,computeStatisticsHistograms as fe,measureHeight as ge,measureAreaAndPerimeter as ye,measureDistanceAndAngle as Re,measurePointOrCentroid as Ie,measureLengthFromImage as ve,measureAreaFromImage as we,getImageSpatialReferenceQueryParameter as be,getSamples as Se,identify as xe,imageToMap as _e,imageToMapMultiray as Fe,mapToImage as De,findImages as Oe,getImageUrl as Te,queryBoundary as Ce,queryGPSInfo as Me}from"../../rest/imageService.js";import{fetchServiceRasterInfo as Pe,generateRasterInfo as Ne,patchServiceInfo as qe}from"../../rest/imageService/fetchRasterInfo.js";import{getCatalogItemRasterInfo as je}from"../../rest/imageService/getCatalogItemRasterInfo.js";import{executeForCount as Ae}from"../../rest/query/executeForCount.js";import{executeForIds as Ee}from"../../rest/query/executeForIds.js";import{executeQueryJSON as Ve}from"../../rest/query/executeQueryJSON.js";import Qe from"../../rest/support/FeatureSet.js";import Je from"../../rest/support/ImageIdentifyParameters.js";import Ue from"../../rest/support/Query.js";const Be=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Le=m(h,{min:0,max:255});function ze(e){const t=JSON.stringify(e),i=t.includes('"rasterFunctionDefinition":{'),r=i?t.match(/"type":"(.*?FunctionArguments")/gi):t.match(/"rasterFunction":"(.*?")/gi),s=r?.map(e=>i?e.slice(8,-18):e.slice(18,-1));return s?s.join("/"):null}const He=m=>{const h=m;let He=class extends h{constructor(){super(...arguments),this._functionRasterInfos={},this._serviceSupportsMosaicRule=null,this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new x({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach(t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)}),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every(e=>"number"==typeof e))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?T.fromJSON(t):null}get fieldsIndex(){return this.fields?new F(this.fields):null}set format(e){e&&Be.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=T.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?T.fromJSON(i):this._isMosaicRuleSupported(t)?T.fromJSON(t):null}writeMosaicRule(e,t,i){const{mosaicRule:r}=this;this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=Le(e))}readObjectIdField(e,t){if(!e){const i=t.fields.find(e=>"esriFieldTypeOID"===e.type||"oid"===e.type);e=i?.name}return e}get parsedUrl(){return l(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}get renderer(){const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find(({name:t})=>t===e);return i?.renderer.clone()}return this.internalRenderer}set renderer(e){this.activePresetRendererName=null,this.internalRenderer=e}set internalRenderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("internalRenderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=pe(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),O(s)||a.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this.fields?.map(e=>e.clone())??[];e.push(j()),"mosaic-dataset"===this.sourceType&&this.fields?.length&&e.push(A()),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some(({name:e})=>"none"===e.toLowerCase())&&e.push(E()),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter(({name:e})=>"none"!==e.toLowerCase()).forEach(({name:t})=>e.push(V(t)));const{rasterInfo:t}=this;if(this._isVectorDataSet()){const i=t?.multidimensionalInfo?.variables[0].unit?.trim(),r=Q(i),s=J();e.push(r,s)}if(t?.multidimensionalInfo&&"raster-dataset"===this.sourceType){const i=U(t.multidimensionalInfo);e.push(...i)}const i=t?.attributeTable;if(null!=i){const t=B(i);e.push(...t)}return e}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=G.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?G.fromJSON({rasterFunctionDefinition:t.renderingRule}):G.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?I.fromJSON(i):null}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=q.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e,{renderer:r,symbolizer:s,pixelFilter:n}=this;const{isRawData:a}=e;if(a&&"lerc"!==this.format&&(r??=ie(this.rasterInfo,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}),s||(this.symbolizer=new oe({rendererJSON:r.toJSON(),rasterInfo:this.rasterInfo}),s=this.symbolizer)),(a||!this._isPicture())&&r&&s&&!n){await this._updateSymbolizer(s,r);const{bandIds:n}=this;i=await this._symbolize({pixelData:e,bandIds:n,symbolizer:s},t)}return i}async highlightPixels(e,t){const i=e.highlightOptions.map(e=>{const t={...e},{bandId:i}=t;if(null==i)t.bandId=0;else{const e=this.bandIds?.length?this.bandIds.indexOf(i):i;if(e<0||e>2)return;t.bandId=e}return t}).filter(e=>null!=e),r=this._rasterJobHandler;r?await r.highlightPixels({...e,highlightOptions:i},t):ee(e.pixelBlock,e.renderedPixelBlock,i)}destroy(){this._shutdownJobHandler()}async calculateVolume(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsCalculateVolume)throw new s("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=n(e),this.mosaicRule&&null==e.mosaicRule&&(e.mosaicRule=this.mosaicRule),me(this.url,e,this._getRequestOptions(t))}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new s("imagery-layer:compute-angles","this operation is not supported on the input image service");return ce(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new s("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return he(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new s("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=n(e),this._applyMosaicAndRenderingRules(e),de(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new s("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=n(e),this._applyMosaicAndRenderingRules(e),fe(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new s("imagery-layer:measure-height","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),ge(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!(i.mensuration.supportsAreaAndPerimeter&&(!e.is3D||i.mensuration.supports3D)))throw new s("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),ye(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!(i.mensuration.supportsDistanceAndAngle&&(!e.is3D||i.mensuration.supports3D)))throw new s("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),Re(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!(i.mensuration.supportsPointOrCentroid&&(!e.is3D||i.mensuration.supports3D)))throw new s("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),Ie(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new s("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new s("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return ve(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new s("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new s("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return we(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}fetchImage(e,t,i,n={}){if(r(a.getLogger(this),"`ImageryLayer.fetchImage` is deprecated in favor of 'ImageryLayer.fetchPixels'.",{replacement:"ImageryLayer.fetchPixels",version:"4.33",warnOnce:!0}),null==e||null==t||null==i)throw new s("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");return this.internalFetchImage(e,t,i,n)}async internalFetchImage(e,t,i,r={}){await this._updateCurrentRasterInfo();const{exportImageServiceParameters:s}=this;let n=!1;r.requestRawData&&(await this._initJobHandler(),s.requestRawData||"lerc"===this.format||(n=!0,s.requestRawData=!0));const a=this.getExportImageServiceParameters(e,t,i,r.timeExtent);if(n&&(s.requestRawData=!1),null==a){if(r.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");if(e.width=t,e.height=i,r.returnImageBitmap){return{imageBitmap:await D(e,`${Ge(this.parsedUrl)}/exportImage`,r.signal)}}return{imageOrCanvasElement:e}}const{bandIds:s,rasterInfo:n}=this,a=(s?.length||n.bandCount)??0,o=t*i,l=n.pixelType,u=[];for(let e=0;e<a;e++)u.push(M.createEmptyBand(l,o));return{pixelData:{pixelBlock:new M({width:t,height:i,pixels:u,mask:new Uint8Array(o),pixelType:l}),extent:e}}}const o=!!r.requestAsImageElement&&!this.pixelFilter,l=o&&!!r.returnImageBitmap,u={imageServiceParameters:a,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:o,returnImageBitmap:l,signal:r.signal};return this._requestArrayBuffer(u)}async fetchPixels(e,t,i,r={}){await this._initJobHandler(),r.applyRendering&&this._updateCurrentRasterInfo();const s=r.applyRendering?void 0:new x({layer:this,requestRawData:!0,interpolation:r.interpolation??"nearest",bandIds:r.bandIds??[]}),n=this.getExportImageServiceParameters(e,t,i,r.timeExtent,s);if(null==n)return{extent:e,pixelBlock:null};delete n.pixelType,delete n.bandIds,delete n.compressionQuality;const a={imageServiceParameters:n,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:!1,returnImageBitmap:!1,signal:r.signal},{pixelData:o}=await this._requestArrayBuffer(a);return o??{extent:e,pixelBlock:null}}fetchKeyProperties(e){return i(Ge(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>e.data)}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new s("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):i(Ge(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>Qe.fromJSON(e.data))}getCatalogItemRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return je(Ge(this.parsedUrl),e,i)}async getCatalogItemICSInfo(e,t){const{data:r}=await i(Ge(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r?.ics;if(!s)return;let n=null;try{n=(await i(Ge(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n?.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const a=this.version>=10.7?i(Ge(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then(e=>e.data).catch(()=>({})):{},o=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:v(o),outSR:"0:"+e},u=i(Ge(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then(e=>e.data).catch(()=>({})),p=5,m=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/(p+1),h=n.ymin+c,d=[];for(let i=0;i<p;i++)d.push({x:m,y:h+c*i});const f={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:v(o),outSR:"0:"+e},g=i(Ge(this.parsedUrl)+"/project",{query:this._getQueryParams(f),...t}).then(e=>e.data).catch(()=>({})),R=await Promise.all([a,u,g]);let w=R[0].ipxf;if(null==w){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(w={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const b=y.fromJSON(R[1]?.geometries?.[0]);b&&(b.spatialReference=new I({wkid:0,imageCoordinateSystem:s}));const S=R[2].geometries?R[2].geometries.filter(e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y):[],x=S.length;if(x<3)return{ics:s,icsToPixelTransform:w,icsExtent:b,northDirection:null};let _=0,F=0,D=0,O=0;for(let i=0;i<x;i++)_+=S[i].x,F+=S[i].y,D+=S[i].x*S[i].x,O+=S[i].x*S[i].y;const T=(x*O-_*F)/(x*D-_*_);let C=0;const M=S[p-1].x>S[0].x,P=S[p-1].y>S[0].y;return T===1/0?C=P?90:270:0===T?C=M?0:180:T>0?C=M?180*Math.atan(T)/Math.PI:180*Math.atan(T)/Math.PI+180:T<0&&(C=P?180+180*Math.atan(T)/Math.PI:360+180*Math.atan(T)/Math.PI),{ics:s,icsToPixelTransform:w,icsExtent:b,northDirection:C}}async generateRasterInfo(e,t){e=c(G,e);const i={...t,query:this._getQueryParams()};if(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e))return this.serviceRasterInfo??Pe(Ge(this.parsedUrl),this.sourceJSON,i);const r=ze(e);if(!r)throw new s("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[r])return this._functionRasterInfos[r];const n=Ne(Ge(this.parsedUrl),e,i);this._functionRasterInfos[r]=n;try{return await n}catch(a){throw this._functionRasterInfos[r]=null,a}}getExportImageServiceParameters(e,t,i,r,s){e=e.clone().shiftCentralMeridian();const n=be(e.spatialReference,Ge(this.parsedUrl));s??=this.exportImageServiceParameters;const a=s.toJSON(),{bandIds:o,noData:l}=a;let{renderingRule:u}=a;const p=this.rasterFunction?.rasterFunctionDefinition,m=this.renderer?.type,c=!m||"raster-stretch"===m||"raster-colormap"===m||"unique-value"===m||"class-breaks"===m||"raster-shaded-relief"===m;if(o?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:o}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;a.bandIds=void 0}else a.bandIds=o?.join(",");Array.isArray(l)&&l.length>0&&(a.noData=l.join(","));const h=this._processMultidimensionalIntersection(null,r,s.mosaicRule);if(h.isOutSide)return null;a.mosaicRule=null!=h.mosaicRule?JSON.stringify(h.mosaicRule):null,r=h.timeExtent,a.renderingRule=this._getRenderingRuleString(G.fromJSON(u));const d={};if(null!=r){const{start:e,end:t}=r.toJSON();e&&t&&e===t?d.time=""+e:null==e&&null==t||(d.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:t+","+i,...a,...d}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new s("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=n(e);const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),Se(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new s("imagery-layer:identify","identify operation is not supported on the input image service");e=n(e),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=R.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new s("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,rasterFunction:a}=this;return a&&null==e.rasterFunction&&(e.rasterFunction=a),r&&null==e.raster&&(e.raster=r),xe(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new s("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return _e(Ge(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new s("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return Fe(Ge(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new s("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return De(Ge(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new s("imagery-layer:find-images","findImages operation is not supported on the input image service");return Oe(Ge(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new s("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return Te(Ge(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new Ue({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new s("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},Ce(Ge(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),Ve(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),Ee(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new s("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},Me(Ge(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),Ae(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new s("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:n,showNoDataRecords:a}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,l=null,u=null;const p=L.servicePixelValue.toLowerCase(),m=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(o=e.outFields.some(e=>!e.toLowerCase().startsWith(p)),this.version>=10.4)){const t=e.outFields.filter(e=>e.toLowerCase().startsWith(p)&&e.length>p.length).map(e=>{const t=e.slice(p.length+1);return[this._updateRenderingRulesFunctionName(t,m),t]});l=t.map(e=>new G({functionName:e[0]})),u=t.map(e=>e[1]);const{rasterFunction:i}=this;0===l.length?i?.functionName?(l.push(i),u.push(i.functionName)):l=null:i?.functionName&&!l.some(e=>e.functionName===i.functionName)&&(l.push(i),u.push(i.functionName))}const c=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:h}=this;let d=e.timeExtent||this.timeExtent;if(h){const{isOutside:t,intersection:i}=W(h,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new s("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(d=i.timeExtent)}const f=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,d);let g=e.geometry;this.version<10.91&&"extent"===g?.type&&(g=R.fromExtent(g));const y=this._getQueryParams({geometry:g,timeExtent:d,mosaicRule:f,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:i,returnCatalogItems:o,returnGeometry:c,raster:this.raster,maxItemCount:n?1:null});delete y.f;const I=new Je(y);try{await this._generateRasterInfo(this.rasterFunction);const i=await xe(this.url,I,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,n=null!=i.value&&i.value.toLowerCase().includes("nodata"),l=o&&!c&&i?.catalogItems?.features.length&&(a||!n),p=this.multidimensionalInfo&&"raster-dataset"===this.sourceType?$({rasterInfo:this.rasterInfo,multidimensionalDefinition:f?.multidimensionalDefinition,timeExtent:d,multidimensionalSubset:this.multidimensionalSubset}):null;if(!l)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:a,templateFields:s,effectiveMultidimensionalDefinition:p});const m=this.objectIdField||"ObjectId",h=i.catalogItems?.features??[],g=h.map(e=>e.attributes?.[m]),y=new Ue({objectIds:g,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[m]}),R=await this.queryRasters(y);return R?.features?.length&&R.features.forEach(t=>{h.forEach(i=>{i.attributes[m]===t.attributes[m]&&t.geometry&&(i.geometry=t.geometry.clone(),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))})}),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:a,templateFields:s,effectiveMultidimensionalDefinition:p})}catch{throw new s("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=i(Ge(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.statistics),s=i(Ge(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.histograms),n=await Promise.all([r,s]);return n[0]&&n[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:n[0]||null,histograms:n[1]||null}}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return X(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,i=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):Pe(Ge(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then(e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),qe(e,t),e)),r=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,s=this._getRasterFunctionInfos();return Promise.all([i,r,s]).then(e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.internalRenderer&&!this._isSupportedRenderer(this.internalRenderer)&&(this._set("internalRenderer",null),a.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("internalRenderer",this._configRenderer(this.renderer)),this.addHandles([o(()=>this.rasterFunction,e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then(e=>{e&&(this.rasterInfo=e)})})]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)})}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:s}=i,n=r.variables.some(e=>e.dimensions.some(e=>e.name===s))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter(e=>e.dimensionName!==n),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const a=e.multidimensionalDefinition.filter(e=>e.dimensionName===n),o=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==o||null==l||o===l,p=u?[o||l]:[[o,l]],m=this.version>=10.8;if(a.length)a.forEach(e=>{e.dimensionName===n&&(m?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))});else if(!m){const t=e.multidimensionalDefinition.filter(e=>null!=e.variableName&&null==e.dimensionName);t.length?t.forEach(e=>{e.dimensionName=n,e.isSlice=u,e.values=p}):e.multidimensionalDefinition.push(new S({variableName:"",dimensionName:n,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter(e=>!(!e.variableName&&!e.dimensionName)),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new s("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?c(Ue,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:i}=this;return"unique-value"===e.type&&this._hasRasterFunction(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&re(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:r,ssl:s}=await i(Ge(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map(e=>e.trim()).indexOf("tilesonly")>-1)throw new s("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),s=i?.ResampleType||i?.resampleType;return r&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){const t=this.mosaicRule?.multidimensionalDefinition?.[0].variableName,r=se({variableName:t,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&i.bandCount>=3){const e=r?.bandIds??ne(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=r?.renderer??ie(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:t}));const s=ae(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=i):this.symbolizer=new oe({rendererJSON:s,rasterInfo:i}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler?this._rasterJobHandler.decode({data:e,options:t}):Y(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const r=await i(Ge(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return r.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:r,returnImageBitmap:n,signal:a}=e;if(r&&this._canRequestImageElement(t.format)){const r=`${Ge(this.parsedUrl)}/exportImage`,{data:s}=await i(r,{responseType:n?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:a});if(s instanceof Blob){return{imageBitmap:await D(s,r,a),params:t}}return{imageOrCanvasElement:s,params:t}}const o=this._initJobHandler(),l=i(Ge(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:a}),u=(await Promise.all([l,o]))[0].data,p=t.format||"jpgpng";let m=p;if("bsq"!==m&&"bip"!==m&&(m=Z(u)),!m)throw new s("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const c={signal:a},h="gif"===p||"bmp"===p||p.includes("png")&&("png"===m||"jpg"===m)?Y(u,{useCanvas:!0,...t},c):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},c);return{pixelData:{pixelBlock:await h,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch(()=>null)}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=K(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new T;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach(e=>e.variableName=""),t=t.filter(({variableName:e,dimensionName:t})=>e&&"*"!==e||t),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,i){i=i||{};const r=e.value,{templateRRFunctionNames:s,showNoDataRecords:n,returnDomainValues:a,templateFields:o}=i,l=e.processedValues;let u=e.catalogItems?.features,p=e.properties?.Values?.map(e=>e.replaceAll(/ /gi,", "))||[];const m=this.objectIdField||"ObjectId",c="string"==typeof r&&r.toLowerCase().includes("nodata"),h=[];if(r&&!u&&(!c||n)){const e={};e[m]=0;p=[r],u=[new t({geometry:this.fullExtent,attributes:e})],this.multidimensionalInfo&&"raster-dataset"===this.sourceType&&z(this.rasterFields,e,i.effectiveMultidimensionalDefinition)}if(!u)return[];this._updateResponseFieldNames(u,o),c&&!n&&(u=[]);const{itemPixelValue:d,servicePixelValue:f}=L,g=this.rasterFields.some(e=>e.name===d);for(let t=0;t<u.length;t++){const e=u[t];if(null!=r){const i=p[t],a=this.rasterFunction&&l&&l.length>0&&s&&s.length>0&&s.includes(this.rasterFunction.functionName)?l[s.indexOf(this.rasterFunction.functionName)]:r;if("nodata"===i.toLowerCase()&&!n)continue;g&&(e.attributes[d]=i),e.attributes[f]=a,this._updateFeatureWithMagDirValues(e,i);const o=this.fields&&this.fields.length>0;let u=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?o?i:r:a;this.rasterFunction||(u=o?i:r),this._updateFeatureWithRasterAttributeTableValues(e,u)}if(e.sourceLayer=e.layer=this,a&&this._updateFeatureWithDomainValues(e),s&&l&&s.length===l.length)for(let t=0;t<s.length;t++){const i=`${L.servicePixelValue}.${s[t]}`;e.attributes[i]=l[t]}h.push(u[t])}return h}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:s}=W(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),i?.multidimensionalDefinition){const{isOutside:e}=W(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:s}=i,n=s.map(e=>e.name).find(e=>"value"===e.toLowerCase());if(!n)return;const a=r.filter(e=>e.attributes[n]===(null!=t?parseInt(t,10):null));a&&a[0]&&s.forEach(t=>{const i=H+t.name;e.attributes[i]=a[0].attributes[t.name]})}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map(e=>parseFloat(e)),r=i.map(e=>[e]),s=i.map(e=>({minValue:e,maxValue:e,noDataValue:null})),n=new M({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new y(0,0,0,0,this.spatialReference)});const a="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:te([n.pixels[0][0],n.pixels[1][0]]);e.attributes[L.magnitude]=a[0],e.attributes[L.direction]=a[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter(e=>e.domain&&"coded-value"===e.domain.type);null!=t&&t.forEach(t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find(e=>e.code===i);r&&(e.attributes[t.name]=r.name)}})}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach(e=>{if(e?.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}})}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}async _updateCurrentRasterInfo(e){if(this.renderer||this.symbolizer){const t=await this._generateRasterInfo(this.rasterFunction,{signal:e});t&&(this.rasterInfo=t)}}_applyMosaicRule(e){const{raster:t,mosaicRule:i}=this;i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map(e=>e.trim()):["image","catalog"],{currentVersion:i,maxRecordCount:r}=e,s=t.includes("image"),n="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),o=t.includes("edit"),l=t.includes("mensuration")&&a,u=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map(e=>e.trim()),p=l&&u.includes("basic"),m=this._isMosaicDataset(e)&&t.includes("catalog"),c=t.includes("download"),h=i>=10.7&&n||i>=11.4&&(n||l&&u.includes("3d")),d=m&&e.fields&&e.fields.length>0,f=d&&e.supportsAdvancedQueries?e.advancedQueryCapabilities:void 0;return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsImageToMap:i>=11.2&&m,supportsImageToMapMultiray:i>=11.2&&m,supportsMapToImage:i>=11.2&&m,supportsFindImages:i>=11.2&&m,supportsGetImageUrl:i>=11.3&&c,supportsMeasure:l,supportsMeasureFromImage:i>=11.2,supportsDownload:c,supportsQuery:d,supportsGetSamples:i>=10.2&&s,supportsProject:i>=10.3&&s,supportsComputeStatisticsHistograms:i>=10.4&&s,supportsQueryBoundary:i>=10.6&&s,supportsCalculateVolume:h,supportsComputePixelLocation:i>=10.7&&m,supportsComputeAngles:i>=10.91,supportsQueryGPSInfo:i>=11.2&&m,supportsAdd:o,supportsDelete:o,supportsEditing:o,supportsUpdate:o,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:r,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,supportsStatistics:!!f?.supportsStatistics,supportsOrderBy:!!f?.supportsOrderBy,supportsDistinct:!!f?.supportsDistinct,supportsPagination:!!f?.supportsPagination,supportsPaginationOnAggregatedQueries:!!f?.supportsPaginationOnAggregatedQueries,supportsStandardizedQueriesOnly:!!f?.useStandardizedQueries,supportsPercentileStatistics:!!f?.supportsPercentileStatistics,supportsCentroid:!!f?.supportsReturningGeometryCentroid,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!!f?.supportsQueryWithDistance,supportsExtent:!!f?.supportsReturningQueryExtent,supportsGeometryProperties:!!f?.supportsReturningGeometryProperties,supportsHavingClause:!!f?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:f?.supportsSqlExpression??!!f,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!f?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},mensuration:{supportsDistanceAndAngle:p,supportsAreaAndPerimeter:p,supportsPointOrCentroid:p,supportsHeightFromBaseAndTop:l&&u.includes("base-top height"),supportsHeightFromBaseAndTopShadow:l&&u.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:l&&u.includes("top-top shadow height"),supports3D:l&&u.includes("3d")}}}};function Ge(e){return e?.path??""}return e([u({clonable:!1})],He.prototype,"_functionRasterInfos",void 0),e([u({readOnly:!0})],He.prototype,"_serviceSupportsMosaicRule",void 0),e([d("_serviceSupportsMosaicRule",["currentVersion","fields"])],He.prototype,"readServiceSupportsMosaicRule",null),e([u({readOnly:!0})],He.prototype,"_rasterFunctionNamesIndex",null),e([u()],He.prototype,"adjustAspectRatio",void 0),e([u({type:[p],json:{write:!0}})],He.prototype,"bandIds",void 0),e([d("bandIds")],He.prototype,"readBandIds",null),e([u({readOnly:!0,json:{read:!1}})],He.prototype,"capabilities",void 0),e([d("service","capabilities",["capabilities","currentVersion","serviceDataType"])],He.prototype,"readCapabilities",null),e([u({type:Number})],He.prototype,"compressionQuality",void 0),e([g("compressionQuality")],He.prototype,"writeCompressionQuality",null),e([u({type:Number})],He.prototype,"compressionTolerance",void 0),e([g("compressionTolerance")],He.prototype,"writeCompressionTolerance",null),e([u({json:{read:{source:"copyrightText"}}})],He.prototype,"copyright",void 0),e([u({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],He.prototype,"defaultMosaicRule",void 0),e([d("defaultMosaicRule",["defaultMosaicMethod"])],He.prototype,"readDefaultMosaicRule",null),e([u({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],He.prototype,"definitionExpression",void 0),e([u({readOnly:!0,constructOnly:!0})],He.prototype,"exportImageServiceParameters",void 0),e([u()],He.prototype,"rasterInfo",void 0),e([u({readOnly:!0,type:[_]})],He.prototype,"fields",void 0),e([u({readOnly:!0})],He.prototype,"fieldsIndex",null),e([u({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],He.prototype,"format",null),e([d("service","format",["serviceDataType"])],He.prototype,"readFormat",null),e([u({type:y})],He.prototype,"fullExtent",void 0),e([u({readOnly:!0})],He.prototype,"hasMultidimensions",void 0),e([u({json:{read:{source:"maxImageHeight"}}})],He.prototype,"imageMaxHeight",void 0),e([u({json:{read:{source:"maxImageWidth"}}})],He.prototype,"imageMaxWidth",void 0),e([u({type:String,json:{type:P.jsonValues,read:P.read,write:P.write}})],He.prototype,"interpolation",void 0),e([u()],He.prototype,"minScale",void 0),e([d("service","minScale")],He.prototype,"readMinScale",null),e([u()],He.prototype,"maxScale",void 0),e([d("service","maxScale")],He.prototype,"readMaxScale",null),e([u({type:T})],He.prototype,"mosaicRule",null),e([d("mosaicRule",["mosaicRule","defaultMosaicMethod"])],He.prototype,"readMosaicRule",null),e([g("mosaicRule")],He.prototype,"writeMosaicRule",null),e([u()],He.prototype,"multidimensionalInfo",void 0),e([u({type:C,json:{write:!0}})],He.prototype,"multidimensionalSubset",void 0),e([u({json:{type:p}})],He.prototype,"noData",void 0),e([g("noData")],He.prototype,"writeNoData",null),e([u({type:String,json:{type:N.jsonValues,read:N.read,write:N.write}})],He.prototype,"noDataInterpretation",void 0),e([u({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],He.prototype,"objectIdField",void 0),e([d("objectIdField")],He.prototype,"readObjectIdField",null),e([u({readOnly:!0})],He.prototype,"geometryType",void 0),e([u({})],He.prototype,"typeIdField",void 0),e([u({})],He.prototype,"types",void 0),e([u({readOnly:!0})],He.prototype,"parsedUrl",null),e([u({type:Function})],He.prototype,"pixelFilter",void 0),e([u()],He.prototype,"raster",void 0),e([u({readOnly:!0})],He.prototype,"sourceType",void 0),e([d("sourceType",["serviceSourceType","fields"])],He.prototype,"readSourceType",null),e([u()],He.prototype,"viewId",void 0),e([u()],He.prototype,"renderer",null),e([u({types:ue,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:le,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],He.prototype,"internalRenderer",null),e([d("internalRenderer")],He.prototype,"readRenderer",null),e([g("internalRenderer")],He.prototype,"writeRenderer",null),e([u({clonable:!1})],He.prototype,"symbolizer",void 0),e([u(w)],He.prototype,"opacity",void 0),e([u({readOnly:!0})],He.prototype,"rasterFields",null),e([u({constructOnly:!0})],He.prototype,"rasterFunctionInfos",void 0),e([u({type:G,json:{name:"renderingRule"}})],He.prototype,"rasterFunction",null),e([d("rasterFunction",["renderingRule","rasterFunctionInfos"])],He.prototype,"readRasterFunction",null),e([u({readOnly:!0})],He.prototype,"serviceDataType",void 0),e([u({readOnly:!0,type:I})],He.prototype,"spatialReference",void 0),e([d("spatialReference",["spatialReference","extent"])],He.prototype,"readSpatialReference",null),e([u({type:q.apiValues,json:{read:q.read,type:q.jsonValues}})],He.prototype,"pixelType",void 0),e([g("pixelType")],He.prototype,"writePixelType",null),e([u({constructOnly:!0,type:k})],He.prototype,"serviceRasterInfo",void 0),e([u()],He.prototype,"sourceJSON",void 0),e([u(b)],He.prototype,"url",void 0),e([u({readOnly:!0})],He.prototype,"version",void 0),e([d("version",["currentVersion","fields","timeInfo"])],He.prototype,"readVersion",null),He=e([f("esri.layers.mixins.ArcGISImageService")],He),He};export{He as ArcGISImageService};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../Graphic.js";import i from"../../request.js";import{deprecatedFunction as r}from"../../core/deprecate.js";import s from"../../core/Error.js";import{clone as n}from"../../core/lang.js";import a from"../../core/Logger.js";import{watch as o}from"../../core/reactiveUtils.js";import{urlToObject as l}from"../../core/urlUtils.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import{Integer as p,ensureRange as m,ensureClass as c,ensureNumber as h}from"../../core/accessorSupport/ensureType.js";import{reader as d}from"../../core/accessorSupport/decorators/reader.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{writer as g}from"../../core/accessorSupport/decorators/writer.js";import y from"../../geometry/Extent.js";import R from"../../geometry/Polygon.js";import I from"../../geometry/SpatialReference.js";import{srToRESTValue as v}from"../../geometry/support/spatialReferenceUtils.js";import{opacity as w,url as b}from"../support/commonProperties.js";import S from"../support/DimensionalDefinition.js";import{ExportImageServiceParameters as x}from"../support/ExportImageServiceParameters.js";import _ from"../support/Field.js";import F from"../support/FieldsIndex.js";import{createBitmap as D}from"../support/imageBitmapUtils.js";import{isSupportedRendererType as O}from"../support/imageryRendererUtils.js";import T from"../support/MosaicRule.js";import C from"../support/MultidimensionalSubset.js";import M from"../support/PixelBlock.js";import{interpolationKebab as P,noDataInterpretationKebab as N,pixelTypeKebabDict as q}from"../support/rasterEnums.js";import{getServicePixelValueField as j,getItemPixelValueField as A,getRawServicePixelValueField as E,getProcessedServicePixelValueField as V,getMagnitudeField as Q,getDirectionField as J,getMultidimensionalFields as U,getRasterAttributeTableFields as B,commonRasterFieldNames as L,addMultidimensionalFieldValues as z,rasterFieldPrefix as H}from"../support/rasterFieldUtils.js";import G from"../support/RasterFunction.js";import k from"../support/RasterInfo.js";import{intersectMultimensionalSubset as W,getEffectiveMultidimensionalDefinition as $,getSubsetVariablesFromMdInfo as X,getDefaultMultidimensionalDefinition as K}from"../support/rasterDatasets/multidimensionalUtils.js";import{decode as Y,getFormat as Z}from"../support/rasterFormats/RasterCodec.js";import{highlightPixels as ee}from"../support/rasterFunctions/pixelUtils.js";import{uvComponentToVector as te}from"../support/rasterFunctions/vectorFieldUtils.js";import{createDefaultRenderer as ie,getSupportedRendererTypes as re,matchPresetRenderer as se,getDefaultBandCombination as ne,normalizeRendererJSON as ae}from"../../renderers/support/rasterRendererHelper.js";import oe from"../../renderers/support/RasterSymbolizer.js";import{websceneRasterRendererTypes as le,rasterRendererTypes as ue,read as pe}from"../../renderers/support/rasterTypeUtils.js";import{calculateVolume as me,computeAngles as ce,computePixelSpaceLocations as he,computeHistograms as de,computeStatisticsHistograms as fe,measureHeight as ge,measureAreaAndPerimeter as ye,measureDistanceAndAngle as Re,measurePointOrCentroid as Ie,measureLengthFromImage as ve,measureAreaFromImage as we,getImageSpatialReferenceQueryParameter as be,getSamples as Se,identify as xe,imageToMap as _e,imageToMapMultiray as Fe,mapToImage as De,findImages as Oe,getImageUrl as Te,queryBoundary as Ce,queryGPSInfo as Me}from"../../rest/imageService.js";import{fetchServiceRasterInfo as Pe,generateRasterInfo as Ne,patchServiceInfo as qe}from"../../rest/imageService/fetchRasterInfo.js";import{getCatalogItemRasterInfo as je}from"../../rest/imageService/getCatalogItemRasterInfo.js";import{executeForCount as Ae}from"../../rest/query/executeForCount.js";import{executeForIds as Ee}from"../../rest/query/executeForIds.js";import{executeQueryJSON as Ve}from"../../rest/query/executeQueryJSON.js";import Qe from"../../rest/support/FeatureSet.js";import Je from"../../rest/support/ImageIdentifyParameters.js";import Ue from"../../rest/support/Query.js";const Be=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Le=m(h,{min:0,max:255});function ze(e){const t=JSON.stringify(e),i=t.includes('"rasterFunctionDefinition":{'),r=i?t.match(/"type":"(.*?FunctionArguments")/gi):t.match(/"rasterFunction":"(.*?")/gi),s=r?.map(e=>i?e.slice(8,-18):e.slice(18,-1));return s?s.join("/"):null}const He=m=>{const h=m;let He=class extends h{constructor(){super(...arguments),this._functionRasterInfos={},this._serviceSupportsMosaicRule=null,this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new x({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach(t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)}),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every(e=>"number"==typeof e))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?T.fromJSON(t):null}get fieldsIndex(){return this.fields?new F(this.fields):null}set format(e){e&&Be.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=T.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?T.fromJSON(i):this._isMosaicRuleSupported(t)?T.fromJSON(t):null}writeMosaicRule(e,t,i){const{mosaicRule:r}=this;this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=Le(e))}readObjectIdField(e,t){if(!e){const i=t.fields.find(e=>"esriFieldTypeOID"===e.type||"oid"===e.type);e=i?.name}return e}get parsedUrl(){return l(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}get renderer(){const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find(({name:t})=>t===e);return i?.renderer.clone()}return this.internalRenderer}set renderer(e){this.activePresetRendererName=null,this.internalRenderer=e}set internalRenderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("internalRenderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=pe(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),O(s)||a.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this.fields?.map(e=>e.clone())??[];e.push(j()),"mosaic-dataset"===this.sourceType&&this.fields?.length&&e.push(A()),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some(({name:e})=>"none"===e.toLowerCase())&&e.push(E()),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter(({name:e})=>"none"!==e.toLowerCase()).forEach(({name:t})=>e.push(V(t)));const{rasterInfo:t}=this;if(this._isVectorDataSet()){const i=t?.multidimensionalInfo?.variables[0].unit?.trim(),r=Q(i),s=J();e.push(r,s)}if(t?.multidimensionalInfo&&"raster-dataset"===this.sourceType){const i=U(t.multidimensionalInfo);e.push(...i)}const i=t?.attributeTable;if(null!=i){const t=B(i);e.push(...t)}return e}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=G.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?G.fromJSON({rasterFunctionDefinition:t.renderingRule}):G.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?I.fromJSON(i):null}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=q.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e,{renderer:r,symbolizer:s,pixelFilter:n}=this;const{isRawData:a}=e;if(a&&"lerc"!==this.format&&(r??=ie(this.rasterInfo,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}),s||(this.symbolizer=new oe({rendererJSON:r.toJSON(),rasterInfo:this.rasterInfo}),s=this.symbolizer)),(a||!this._isPicture())&&r&&s&&!n){await this._updateSymbolizer(s,r);const{bandIds:n}=this;i=await this._symbolize({pixelData:e,bandIds:n,symbolizer:s},t)}return i}async highlightPixels(e,t){const i=e.highlightOptions.map(e=>{const t={...e},{bandId:i}=t;if(null==i)t.bandId=0;else{const e=this.bandIds?.length?this.bandIds.indexOf(i):i;if(e<0||e>2)return;t.bandId=e}return t}).filter(e=>null!=e),r=this._rasterJobHandler;r?await r.highlightPixels({...e,highlightOptions:i},t):ee(e.pixelBlock,e.renderedPixelBlock,i)}destroy(){this._shutdownJobHandler()}async calculateVolume(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsCalculateVolume)throw new s("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=n(e),this.mosaicRule&&null==e.mosaicRule&&(e.mosaicRule=this.mosaicRule),me(this.url,e,this._getRequestOptions(t))}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new s("imagery-layer:compute-angles","this operation is not supported on the input image service");return ce(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new s("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return he(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new s("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=n(e),this._applyMosaicAndRenderingRules(e),de(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new s("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=n(e),this._applyMosaicAndRenderingRules(e),fe(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new s("imagery-layer:measure-height","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),ge(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!(i.mensuration.supportsAreaAndPerimeter&&(!e.is3D||i.mensuration.supports3D)))throw new s("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),ye(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!(i.mensuration.supportsDistanceAndAngle&&(!e.is3D||i.mensuration.supports3D)))throw new s("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),Re(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!(i.mensuration.supportsPointOrCentroid&&(!e.is3D||i.mensuration.supports3D)))throw new s("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),Ie(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new s("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new s("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return ve(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new s("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new s("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return we(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}fetchImage(e,t,i,n={}){if(r(a.getLogger(this),"`ImageryLayer.fetchImage` is deprecated in favor of 'ImageryLayer.fetchPixels'.",{replacement:"ImageryLayer.fetchPixels",version:"4.33",warnOnce:!0}),null==e||null==t||null==i)throw new s("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");return this.internalFetchImage(e,t,i,n)}async internalFetchImage(e,t,i,r={}){await this._updateCurrentRasterInfo();const{exportImageServiceParameters:s}=this;let n=!1;r.requestRawData&&(await this._initJobHandler(),s.requestRawData||"lerc"===this.format||(n=!0,s.requestRawData=!0));const a=this.getExportImageServiceParameters(e,t,i,r.timeExtent);if(n&&(s.requestRawData=!1),null==a){if(r.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");if(e.width=t,e.height=i,r.returnImageBitmap){return{imageBitmap:await D(e,`${Ge(this.parsedUrl)}/exportImage`,r.signal)}}return{imageOrCanvasElement:e}}const{bandIds:s,rasterInfo:n}=this,a=(s?.length||n.bandCount)??0,o=t*i,l=n.pixelType,u=[];for(let e=0;e<a;e++)u.push(M.createEmptyBand(l,o));return{pixelData:{pixelBlock:new M({width:t,height:i,pixels:u,mask:new Uint8Array(o),pixelType:l}),extent:e}}}const o=!!r.requestAsImageElement&&!this.pixelFilter,l=o&&!!r.returnImageBitmap,u={imageServiceParameters:a,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:o,returnImageBitmap:l,signal:r.signal};return this._requestArrayBuffer(u)}async fetchPixels(e,t,i,r={}){await this._initJobHandler(),r.applyRendering&&this._updateCurrentRasterInfo();const s=r.applyRendering?void 0:new x({layer:this,requestRawData:!0,interpolation:r.interpolation??"nearest",bandIds:r.bandIds??[]}),n=this.getExportImageServiceParameters(e,t,i,r.timeExtent,s);if(null==n)return{extent:e,pixelBlock:null};delete n.pixelType,delete n.bandIds,delete n.compressionQuality;const a={imageServiceParameters:n,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:!1,returnImageBitmap:!1,signal:r.signal},{pixelData:o}=await this._requestArrayBuffer(a);return o??{extent:e,pixelBlock:null}}fetchKeyProperties(e){return i(Ge(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>e.data)}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new s("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):i(Ge(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>Qe.fromJSON(e.data))}getCatalogItemRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return je(Ge(this.parsedUrl),e,i)}async getCatalogItemICSInfo(e,t){const{data:r}=await i(Ge(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r?.ics;if(!s)return;let n=null;try{n=(await i(Ge(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n?.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const a=this.version>=10.7?i(Ge(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then(e=>e.data).catch(()=>({})):{},o=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:v(o),outSR:"0:"+e},u=i(Ge(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then(e=>e.data).catch(()=>({})),p=5,m=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/(p+1),h=n.ymin+c,d=[];for(let i=0;i<p;i++)d.push({x:m,y:h+c*i});const f={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:v(o),outSR:"0:"+e},g=i(Ge(this.parsedUrl)+"/project",{query:this._getQueryParams(f),...t}).then(e=>e.data).catch(()=>({})),R=await Promise.all([a,u,g]);let w=R[0].ipxf;if(null==w){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(w={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const b=y.fromJSON(R[1]?.geometries?.[0]);b&&(b.spatialReference=new I({wkid:0,imageCoordinateSystem:s}));const S=R[2].geometries?R[2].geometries.filter(e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y):[],x=S.length;if(x<3)return{ics:s,icsToPixelTransform:w,icsExtent:b,northDirection:null};let _=0,F=0,D=0,O=0;for(let i=0;i<x;i++)_+=S[i].x,F+=S[i].y,D+=S[i].x*S[i].x,O+=S[i].x*S[i].y;const T=(x*O-_*F)/(x*D-_*_);let C=0;const M=S[p-1].x>S[0].x,P=S[p-1].y>S[0].y;return T===1/0?C=P?90:270:0===T?C=M?0:180:T>0?C=M?180*Math.atan(T)/Math.PI:180*Math.atan(T)/Math.PI+180:T<0&&(C=P?180+180*Math.atan(T)/Math.PI:360+180*Math.atan(T)/Math.PI),{ics:s,icsToPixelTransform:w,icsExtent:b,northDirection:C}}async generateRasterInfo(e,t){e=c(G,e);const i={...t,query:this._getQueryParams()};if(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e))return this.serviceRasterInfo??Pe(Ge(this.parsedUrl),this.sourceJSON,i);const r=ze(e);if(!r)throw new s("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[r])return this._functionRasterInfos[r];const n=Ne(Ge(this.parsedUrl),e,i);this._functionRasterInfos[r]=n;try{return await n}catch(a){throw this._functionRasterInfos[r]=null,a}}getExportImageServiceParameters(e,t,i,r,s){e=e.clone().shiftCentralMeridian();const n=be(e.spatialReference,Ge(this.parsedUrl));s??=this.exportImageServiceParameters;const a=s.toJSON(),{bandIds:o,noData:l}=a;let{renderingRule:u}=a;const p=this.rasterFunction?.rasterFunctionDefinition,m=this.renderer?.type,c=!m||"raster-stretch"===m||"raster-colormap"===m||"unique-value"===m||"class-breaks"===m||"raster-shaded-relief"===m;if(o?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:o}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;a.bandIds=void 0}else a.bandIds=o?.join(",");Array.isArray(l)&&l.length>0&&(a.noData=l.join(","));const h=this._processMultidimensionalIntersection(null,r,s.mosaicRule);if(h.isOutSide)return null;a.mosaicRule=null!=h.mosaicRule?JSON.stringify(h.mosaicRule):null,r=h.timeExtent,a.renderingRule=this._getRenderingRuleString(G.fromJSON(u));const d={};if(null!=r){const{start:e,end:t}=r.toJSON();e&&t&&e===t?d.time=""+e:null==e&&null==t||(d.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:t+","+i,...a,...d}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new s("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=n(e);const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),Se(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new s("imagery-layer:identify","identify operation is not supported on the input image service");e=n(e),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=R.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new s("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,rasterFunction:a}=this;return a&&null==e.rasterFunction&&(e.rasterFunction=a),r&&null==e.raster&&(e.raster=r),xe(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new s("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return _e(Ge(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new s("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return Fe(Ge(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new s("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return De(Ge(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new s("imagery-layer:find-images","findImages operation is not supported on the input image service");return Oe(Ge(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new s("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return Te(Ge(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new Ue({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new s("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},Ce(Ge(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),Ve(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),Ee(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new s("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},Me(Ge(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),Ae(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new s("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:n,showNoDataRecords:a}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,l=null,u=null;const p=L.servicePixelValue.toLowerCase(),m=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(o=e.outFields.some(e=>!e.toLowerCase().startsWith(p)),this.version>=10.4)){const t=e.outFields.filter(e=>e.toLowerCase().startsWith(p)&&e.length>p.length).map(e=>{const t=e.slice(p.length+1);return[this._updateRenderingRulesFunctionName(t,m),t]});l=t.map(e=>new G({functionName:e[0]})),u=t.map(e=>e[1]);const{rasterFunction:i}=this;0===l.length?i?.functionName?(l.push(i),u.push(i.functionName)):l=null:i?.functionName&&!l.some(e=>e.functionName===i.functionName)&&(l.push(i),u.push(i.functionName))}const c=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:h}=this;let d=e.timeExtent||this.timeExtent;if(h){const{isOutside:t,intersection:i}=W(h,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new s("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(d=i.timeExtent)}const f=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,d);let g=e.geometry;this.version<10.91&&"extent"===g?.type&&(g=R.fromExtent(g));const y=this._getQueryParams({geometry:g,timeExtent:d,mosaicRule:f,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:i,returnCatalogItems:o,returnGeometry:c,raster:this.raster,maxItemCount:n?1:null});delete y.f;const I=new Je(y);try{await this._generateRasterInfo(this.rasterFunction);const i=await xe(this.url,I,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,n=null!=i.value&&i.value.toLowerCase().includes("nodata"),l=o&&!c&&i?.catalogItems?.features.length&&(a||!n),p=this.multidimensionalInfo&&"raster-dataset"===this.sourceType?$({rasterInfo:this.rasterInfo,multidimensionalDefinition:f?.multidimensionalDefinition,timeExtent:d,multidimensionalSubset:this.multidimensionalSubset}):null;if(!l)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:a,templateFields:s,effectiveMultidimensionalDefinition:p});const m=this.objectIdField||"ObjectId",h=i.catalogItems?.features??[],g=h.map(e=>e.attributes?.[m]),y=new Ue({objectIds:g,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[m]}),R=await this.queryRasters(y);return R?.features?.length&&R.features.forEach(t=>{h.forEach(i=>{i.attributes[m]===t.attributes[m]&&t.geometry&&(i.geometry=t.geometry.clone(),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))})}),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:a,templateFields:s,effectiveMultidimensionalDefinition:p})}catch{throw new s("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=i(Ge(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.statistics),s=i(Ge(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.histograms),n=await Promise.all([r,s]);return n[0]&&n[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:n[0]||null,histograms:n[1]||null}}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return X(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,i=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):Pe(Ge(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then(e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),qe(e,t),e)),r=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,s=this._getRasterFunctionInfos();return Promise.all([i,r,s]).then(e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.internalRenderer&&!this._isSupportedRenderer(this.internalRenderer)&&(this._set("internalRenderer",null),a.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("internalRenderer",this._configRenderer(this.renderer)),this.addHandles([o(()=>this.rasterFunction,e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then(e=>{e&&(this.rasterInfo=e)})})]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)})}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:s}=i,n=r.variables.some(e=>e.dimensions.some(e=>e.name===s))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter(e=>e.dimensionName!==n),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const a=e.multidimensionalDefinition.filter(e=>e.dimensionName===n),o=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==o||null==l||o===l,p=u?[o||l]:[[o,l]],m=this.version>=10.8;if(a.length)a.forEach(e=>{e.dimensionName===n&&(m?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))});else if(!m){const t=e.multidimensionalDefinition.filter(e=>null!=e.variableName&&null==e.dimensionName);t.length?t.forEach(e=>{e.dimensionName=n,e.isSlice=u,e.values=p}):e.multidimensionalDefinition.push(new S({variableName:"",dimensionName:n,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter(e=>!(!e.variableName&&!e.dimensionName)),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new s("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?c(Ue,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:i}=this;return"unique-value"===e.type&&this._hasRasterFunction(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&re(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:r,ssl:s}=await i(Ge(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map(e=>e.trim()).indexOf("tilesonly")>-1)throw new s("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),s=i?.ResampleType||i?.resampleType;return r&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){const t=this.mosaicRule?.multidimensionalDefinition?.[0].variableName,r=se({variableName:t,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&i.bandCount>=3){const e=r?.bandIds??ne(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=r?.renderer??ie(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:t}));const s=ae(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=i):this.symbolizer=new oe({rendererJSON:s,rasterInfo:i}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler?this._rasterJobHandler.decode({data:e,options:t}):Y(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const r=await i(Ge(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return r.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:r,returnImageBitmap:n,signal:a}=e;if(r&&this._canRequestImageElement(t.format)){const r=`${Ge(this.parsedUrl)}/exportImage`,{data:s}=await i(r,{responseType:n?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:a});if(s instanceof Blob){return{imageBitmap:await D(s,r,a),params:t}}return{imageOrCanvasElement:s,params:t}}const o=this._initJobHandler(),l=i(Ge(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:a}),u=(await Promise.all([l,o]))[0].data,p=t.format||"jpgpng";let m=p;if("bsq"!==m&&"bip"!==m&&(m=Z(u)),!m)throw new s("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const c={signal:a},h="gif"===p||"bmp"===p||p.includes("png")&&("png"===m||"jpg"===m)?Y(u,{useCanvas:!0,...t},c):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},c);return{pixelData:{pixelBlock:await h,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch(()=>null)}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=K(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new T;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach(e=>e.variableName=""),t=t.filter(({variableName:e,dimensionName:t})=>e&&"*"!==e||t),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,i){i=i||{};const r=e.value,{templateRRFunctionNames:s,showNoDataRecords:n,returnDomainValues:a,templateFields:o}=i,l=e.processedValues;let u=e.catalogItems?.features,p=e.properties?.Values?.map(e=>e.replaceAll(/ /gi,", "))||[];const m=this.objectIdField||"ObjectId",c="string"==typeof r&&r.toLowerCase().includes("nodata"),h=[];if(r&&!u&&(!c||n)){const e={};e[m]=0;p=[r],u=[new t({geometry:this.fullExtent,attributes:e})],this.multidimensionalInfo&&"raster-dataset"===this.sourceType&&z(this.rasterFields,e,i.effectiveMultidimensionalDefinition)}if(!u)return[];this._updateResponseFieldNames(u,o),c&&!n&&(u=[]);const{itemPixelValue:d,servicePixelValue:f}=L,g=this.rasterFields.some(e=>e.name===d),y=this.graphicOrigin;for(let t=0;t<u.length;t++){const e=u[t];if(null!=r){const i=p[t],a=this.rasterFunction&&l&&l.length>0&&s&&s.length>0&&s.includes(this.rasterFunction.functionName)?l[s.indexOf(this.rasterFunction.functionName)]:r;if("nodata"===i.toLowerCase()&&!n)continue;g&&(e.attributes[d]=i),e.attributes[f]=a,this._updateFeatureWithMagDirValues(e,i);const o=this.fields&&this.fields.length>0;let u=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?o?i:r:a;this.rasterFunction||(u=o?i:r),this._updateFeatureWithRasterAttributeTableValues(e,u)}if(e.sourceLayer=e.layer=this,e.origin=y,a&&this._updateFeatureWithDomainValues(e),s&&l&&s.length===l.length)for(let t=0;t<s.length;t++){const i=`${L.servicePixelValue}.${s[t]}`;e.attributes[i]=l[t]}h.push(u[t])}return h}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:s}=W(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),i?.multidimensionalDefinition){const{isOutside:e}=W(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:s}=i,n=s.map(e=>e.name).find(e=>"value"===e.toLowerCase());if(!n)return;const a=r.filter(e=>e.attributes[n]===(null!=t?parseInt(t,10):null));a&&a[0]&&s.forEach(t=>{const i=H+t.name;e.attributes[i]=a[0].attributes[t.name]})}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map(e=>parseFloat(e)),r=i.map(e=>[e]),s=i.map(e=>({minValue:e,maxValue:e,noDataValue:null})),n=new M({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new y(0,0,0,0,this.spatialReference)});const a="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:te([n.pixels[0][0],n.pixels[1][0]]);e.attributes[L.magnitude]=a[0],e.attributes[L.direction]=a[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter(e=>e.domain&&"coded-value"===e.domain.type);null!=t&&t.forEach(t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find(e=>e.code===i);r&&(e.attributes[t.name]=r.name)}})}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach(e=>{if(e?.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}})}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}async _updateCurrentRasterInfo(e){if(this.renderer||this.symbolizer){const t=await this._generateRasterInfo(this.rasterFunction,{signal:e});t&&(this.rasterInfo=t)}}_applyMosaicRule(e){const{raster:t,mosaicRule:i}=this;i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map(e=>e.trim()):["image","catalog"],{currentVersion:i,maxRecordCount:r}=e,s=t.includes("image"),n="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),o=t.includes("edit"),l=t.includes("mensuration")&&a,u=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map(e=>e.trim()),p=l&&u.includes("basic"),m=this._isMosaicDataset(e)&&t.includes("catalog"),c=t.includes("download"),h=i>=10.7&&n||i>=11.4&&(n||l&&u.includes("3d")),d=m&&e.fields&&e.fields.length>0,f=d&&e.supportsAdvancedQueries?e.advancedQueryCapabilities:void 0;return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsImageToMap:i>=11.2&&m,supportsImageToMapMultiray:i>=11.2&&m,supportsMapToImage:i>=11.2&&m,supportsFindImages:i>=11.2&&m,supportsGetImageUrl:i>=11.3&&c,supportsMeasure:l,supportsMeasureFromImage:i>=11.2,supportsDownload:c,supportsQuery:d,supportsGetSamples:i>=10.2&&s,supportsProject:i>=10.3&&s,supportsComputeStatisticsHistograms:i>=10.4&&s,supportsQueryBoundary:i>=10.6&&s,supportsCalculateVolume:h,supportsComputePixelLocation:i>=10.7&&m,supportsComputeAngles:i>=10.91,supportsQueryGPSInfo:i>=11.2&&m,supportsAdd:o,supportsDelete:o,supportsEditing:o,supportsUpdate:o,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:r,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,supportsStatistics:!!f?.supportsStatistics,supportsOrderBy:!!f?.supportsOrderBy,supportsDistinct:!!f?.supportsDistinct,supportsPagination:!!f?.supportsPagination,supportsPaginationOnAggregatedQueries:!!f?.supportsPaginationOnAggregatedQueries,supportsStandardizedQueriesOnly:!!f?.useStandardizedQueries,supportsPercentileStatistics:!!f?.supportsPercentileStatistics,supportsCentroid:!!f?.supportsReturningGeometryCentroid,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!!f?.supportsQueryWithDistance,supportsExtent:!!f?.supportsReturningQueryExtent,supportsGeometryProperties:!!f?.supportsReturningGeometryProperties,supportsHavingClause:!!f?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:f?.supportsSqlExpression??!!f,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!f?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},mensuration:{supportsDistanceAndAngle:p,supportsAreaAndPerimeter:p,supportsPointOrCentroid:p,supportsHeightFromBaseAndTop:l&&u.includes("base-top height"),supportsHeightFromBaseAndTopShadow:l&&u.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:l&&u.includes("top-top shadow height"),supports3D:l&&u.includes("3d")}}}};function Ge(e){return e?.path??""}return e([u({clonable:!1})],He.prototype,"_functionRasterInfos",void 0),e([u({readOnly:!0})],He.prototype,"_serviceSupportsMosaicRule",void 0),e([d("_serviceSupportsMosaicRule",["currentVersion","fields"])],He.prototype,"readServiceSupportsMosaicRule",null),e([u({readOnly:!0})],He.prototype,"_rasterFunctionNamesIndex",null),e([u()],He.prototype,"adjustAspectRatio",void 0),e([u({type:[p],json:{write:!0}})],He.prototype,"bandIds",void 0),e([d("bandIds")],He.prototype,"readBandIds",null),e([u({readOnly:!0,json:{read:!1}})],He.prototype,"capabilities",void 0),e([d("service","capabilities",["capabilities","currentVersion","serviceDataType"])],He.prototype,"readCapabilities",null),e([u({type:Number})],He.prototype,"compressionQuality",void 0),e([g("compressionQuality")],He.prototype,"writeCompressionQuality",null),e([u({type:Number})],He.prototype,"compressionTolerance",void 0),e([g("compressionTolerance")],He.prototype,"writeCompressionTolerance",null),e([u({json:{read:{source:"copyrightText"}}})],He.prototype,"copyright",void 0),e([u({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],He.prototype,"defaultMosaicRule",void 0),e([d("defaultMosaicRule",["defaultMosaicMethod"])],He.prototype,"readDefaultMosaicRule",null),e([u({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],He.prototype,"definitionExpression",void 0),e([u({readOnly:!0,constructOnly:!0})],He.prototype,"exportImageServiceParameters",void 0),e([u()],He.prototype,"rasterInfo",void 0),e([u({readOnly:!0,type:[_]})],He.prototype,"fields",void 0),e([u({readOnly:!0})],He.prototype,"fieldsIndex",null),e([u({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],He.prototype,"format",null),e([d("service","format",["serviceDataType"])],He.prototype,"readFormat",null),e([u({type:y})],He.prototype,"fullExtent",void 0),e([u({readOnly:!0})],He.prototype,"hasMultidimensions",void 0),e([u({json:{read:{source:"maxImageHeight"}}})],He.prototype,"imageMaxHeight",void 0),e([u({json:{read:{source:"maxImageWidth"}}})],He.prototype,"imageMaxWidth",void 0),e([u({type:String,json:{type:P.jsonValues,read:P.read,write:P.write}})],He.prototype,"interpolation",void 0),e([u()],He.prototype,"minScale",void 0),e([d("service","minScale")],He.prototype,"readMinScale",null),e([u()],He.prototype,"maxScale",void 0),e([d("service","maxScale")],He.prototype,"readMaxScale",null),e([u({type:T})],He.prototype,"mosaicRule",null),e([d("mosaicRule",["mosaicRule","defaultMosaicMethod"])],He.prototype,"readMosaicRule",null),e([g("mosaicRule")],He.prototype,"writeMosaicRule",null),e([u()],He.prototype,"multidimensionalInfo",void 0),e([u({type:C,json:{write:!0}})],He.prototype,"multidimensionalSubset",void 0),e([u({json:{type:p}})],He.prototype,"noData",void 0),e([g("noData")],He.prototype,"writeNoData",null),e([u({type:String,json:{type:N.jsonValues,read:N.read,write:N.write}})],He.prototype,"noDataInterpretation",void 0),e([u({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],He.prototype,"objectIdField",void 0),e([d("objectIdField")],He.prototype,"readObjectIdField",null),e([u({readOnly:!0})],He.prototype,"geometryType",void 0),e([u({})],He.prototype,"typeIdField",void 0),e([u({})],He.prototype,"types",void 0),e([u({readOnly:!0})],He.prototype,"parsedUrl",null),e([u({type:Function})],He.prototype,"pixelFilter",void 0),e([u()],He.prototype,"raster",void 0),e([u({readOnly:!0})],He.prototype,"sourceType",void 0),e([d("sourceType",["serviceSourceType","fields"])],He.prototype,"readSourceType",null),e([u()],He.prototype,"viewId",void 0),e([u()],He.prototype,"renderer",null),e([u({types:ue,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:le,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],He.prototype,"internalRenderer",null),e([d("internalRenderer")],He.prototype,"readRenderer",null),e([g("internalRenderer")],He.prototype,"writeRenderer",null),e([u({clonable:!1})],He.prototype,"symbolizer",void 0),e([u(w)],He.prototype,"opacity",void 0),e([u({readOnly:!0})],He.prototype,"rasterFields",null),e([u({constructOnly:!0})],He.prototype,"rasterFunctionInfos",void 0),e([u({type:G,json:{name:"renderingRule"}})],He.prototype,"rasterFunction",null),e([d("rasterFunction",["renderingRule","rasterFunctionInfos"])],He.prototype,"readRasterFunction",null),e([u({readOnly:!0})],He.prototype,"serviceDataType",void 0),e([u({readOnly:!0,type:I})],He.prototype,"spatialReference",void 0),e([d("spatialReference",["spatialReference","extent"])],He.prototype,"readSpatialReference",null),e([u({type:q.apiValues,json:{read:q.read,type:q.jsonValues}})],He.prototype,"pixelType",void 0),e([g("pixelType")],He.prototype,"writePixelType",null),e([u({constructOnly:!0,type:k})],He.prototype,"serviceRasterInfo",void 0),e([u()],He.prototype,"sourceJSON",void 0),e([u(b)],He.prototype,"url",void 0),e([u({readOnly:!0})],He.prototype,"version",void 0),e([d("version",["currentVersion","fields","timeInfo"])],He.prototype,"readVersion",null),He=e([f("esri.layers.mixins.ArcGISImageService")],He),He};export{He as ArcGISImageService};
|
package/package.json
CHANGED
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const c="20250809",e="c1714d8c08c66e85352c9a99864f65ccff60351e";export{c as buildDate,e as commitHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as i}from"tslib";import t from"../../../Graphic.js";import{isSome as e}from"../../../core/arrayUtils.js";import s from"../../../core/Collection.js";import{makeHandle as r}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{watch as h,sync as a}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{GraphicsCollection as n}from"../../../support/GraphicsCollection.js";import g from"../engine/flow/FlowView2D.js";import{LayerView2DMixin as p}from"./LayerView2D.js";import c from"./graphics/GraphicsView2D.js";import d from"./graphics/HighlightGraphicContainer.js";import u from"./imagery/ImageryView2D.js";import w from"./imagery/VectorFieldView2D.js";import m from"../../layers/ImageryLayerView.js";import v from"../../layers/LayerView.js";import{RefreshableLayerView as y}from"../../layers/RefreshableLayerView.js";import{defaultColor as f}from"../../support/HighlightDefaults.js";import{getHighlightName as b}from"../../support/highlightOptionsUtils.js";let _=class extends(m(y(p(v)))){constructor(){super(...arguments),this._exportImageVersion=-1,this._highlightGraphics=new n,this._highlightView=void 0,this._pixelHighlights=[],this.layer=null,this.subview=null}get pixelData(){const{subview:i}=this;return this.updating||!i?null:"getPixelData"in i?i.getPixelData():null}update(i){this.subview?.update(i)}attach(){this.layer.increaseRasterJobHandlerUsage(),this._setSubView(),this.view&&(this._highlightView=new c({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new d(this.view.featuresTilingScheme)}),this.container.addChild(this._highlightView.container)),this.addAttachHandles([h(()=>this.layer.exportImageServiceParameters.version,i=>{i&&this._exportImageVersion!==i&&(this._exportImageVersion=i,this.requestUpdate())},a),h(()=>this.timeExtent,i=>{const{subview:t}=this;t&&(t.timeExtent=i,"redraw"in t?this.requestUpdate():t.redrawOrRefetch())},a),this.layer.on("redraw",()=>{const{subview:i}=this;i&&("redraw"in i?i.redraw():i.redrawOrRefetch())}),h(()=>this.layer.renderer,()=>this._setSubView()),h(()=>this.view.highlights.items.map(({name:i,color:t})=>({name:i,color:t})),()=>this._updateHighlightOptions(this.subview))])}detach(){this.layer.decreaseRasterJobHandlerUsage(),this.container.removeAllChildren(),this._detachSubview(this.subview),this.subview?.destroy(),this.subview=null,this._highlightView?.destroy(),this._exportImageVersion=-1}viewChange(){}moveEnd(){this.requestUpdate()}highlight(i,h){if(i&&"
|
|
5
|
+
import{__decorate as i}from"tslib";import t from"../../../Graphic.js";import{isSome as e}from"../../../core/arrayUtils.js";import s from"../../../core/Collection.js";import{makeHandle as r}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{watch as h,sync as a}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{GraphicsCollection as n}from"../../../support/GraphicsCollection.js";import g from"../engine/flow/FlowView2D.js";import{LayerView2DMixin as p}from"./LayerView2D.js";import c from"./graphics/GraphicsView2D.js";import d from"./graphics/HighlightGraphicContainer.js";import u from"./imagery/ImageryView2D.js";import w from"./imagery/VectorFieldView2D.js";import m from"../../layers/ImageryLayerView.js";import v from"../../layers/LayerView.js";import{RefreshableLayerView as y}from"../../layers/RefreshableLayerView.js";import{defaultColor as f}from"../../support/HighlightDefaults.js";import{getHighlightName as b}from"../../support/highlightOptionsUtils.js";let _=class extends(m(y(p(v)))){constructor(){super(...arguments),this._exportImageVersion=-1,this._highlightGraphics=new n,this._highlightView=void 0,this._pixelHighlights=[],this.layer=null,this.subview=null}get pixelData(){const{subview:i}=this;return this.updating||!i?null:"getPixelData"in i?i.getPixelData():null}update(i){this.subview?.update(i)}attach(){this.layer.increaseRasterJobHandlerUsage(),this._setSubView(),this.view&&(this._highlightView=new c({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new d(this.view.featuresTilingScheme)}),this.container.addChild(this._highlightView.container)),this.addAttachHandles([h(()=>this.layer.exportImageServiceParameters.version,i=>{i&&this._exportImageVersion!==i&&(this._exportImageVersion=i,this.requestUpdate())},a),h(()=>this.timeExtent,i=>{const{subview:t}=this;t&&(t.timeExtent=i,"redraw"in t?this.requestUpdate():t.redrawOrRefetch())},a),this.layer.on("redraw",()=>{const{subview:i}=this;i&&("redraw"in i?i.redraw():i.redrawOrRefetch())}),h(()=>this.layer.renderer,()=>this._setSubView()),h(()=>this.view.highlights.items.map(({name:i,color:t})=>({name:i,color:t})),()=>this._updateHighlightOptions(this.subview))])}detach(){this.layer.decreaseRasterJobHandlerUsage(),this.container.removeAllChildren(),this._detachSubview(this.subview),this.subview?.destroy(),this.subview=null,this._highlightView?.destroy(),this._exportImageVersion=-1}viewChange(){}moveEnd(){this.requestUpdate()}highlight(i,h){if(i&&"pixelRanges"in i&&i.pixelRanges.length)return this._highlightPixels(i,h);if(!((Array.isArray(i)?i[0]:s.isCollection(i)?i.at(0):i)instanceof t))return r();let a=[];Array.isArray(i)||s.isCollection(i)?a=i.map(i=>i.clone()):i instanceof t&&(a=[i.clone()]);const o=a?.filter(e);if(!o?.length)return r();const l=b(h);return this._addHighlightGraphics(a,l),r(()=>!this.destroyed&&this._removeHighlightGraphics(a,l))}_highlightPixels(i,t){const e={target:i,options:t};return this._pixelHighlights.push(e),this._updateHighlightOptions(this.subview),r(()=>{const i=this._pixelHighlights.indexOf(e);i>-1&&(this._pixelHighlights.splice(i,1),this._updateHighlightOptions(this.subview))})}_addHighlightGraphics(i,t){this._highlightGraphics.addMany(i),this._addHighlights(i.map(i=>i.uid),t)}_removeHighlightGraphics(i,t){this._highlightGraphics.removeMany(i),this._removeHighlights(i.map(i=>i.uid),t)}async doRefresh(){this.requestUpdate()}isUpdating(){const i=!this.subview||this.subview.updating||!!this._highlightView?.updating;return has("esri-2d-log-updating")&&console.log(`Updating ImageryLayerView2D (${this.layer.id}): ${i}\n-> subview ${!this.subview||this.subview.updating}\n-> higlightView ${this._highlightView?.updating}\n`),i}_processHighlight(){const i=this._getHighlights();this._highlightView?.setHighlight(i)}_setSubView(){if(!this.view)return;const i=this.layer.renderer?.type;let t="imagery";if("vector-field"===i?t="imageryVF":"flow"===i&&(t="flow"),this.subview){const{type:i}=this.subview;if(i===t)return this._attachSubview(this.subview),void("flow"===i?this.subview.redrawOrRefetch():"imagery"===i&&"lerc"===this.layer.format?this.subview.redraw():this.requestUpdate());this._detachSubview(this.subview),this.subview?.destroy()}"imagery"===t?(this.subview=new u({layer:this.layer,view:this.view,timeExtent:this.timeExtent}),this._updateHighlightOptions(this.subview)):this.subview="imageryVF"===t?new w({layer:this.layer,view:this.view,timeExtent:this.timeExtent}):new g({layer:this.layer,layerView:this}),this._attachSubview(this.subview),this.requestUpdate()}_attachSubview(i){i&&!i.attached&&(i.attach(),i.attached=!0,this.container.addChildAt(i.container,0))}_detachSubview(i){i?.attached&&(this.container.removeChild(i.container),i.detach(),i.attached=!1)}_updateHighlightOptions(i){const t=this.view.highlights;this._pixelHighlights.sort((i,e)=>t.findIndex(({name:i})=>i===b(e.options))-t.findIndex(({name:t})=>t===b(i.options)));const e=this._pixelHighlights.map(({target:i,options:e})=>{const s=b(e),r=t.find(i=>i.name===s)?.color??f,{pixelRanges:h,bandId:a}=i;return{ranges:h,bandId:a??0,color:r.toArray()}});"imagery"===i?.type&&(i.pixelHighlights=e,i.attached&&("lerc"===this.layer.format?i.redraw():this.requestUpdate()))}};i([o()],_.prototype,"pixelData",null),i([o()],_.prototype,"subview",void 0),_=i([l("esri.views.2d.layers.ImageryLayerView2D")],_);const x=_;export{x 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/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{makeHandle as i}from"../../../core/handleUtils.js";import s from"../../../core/Logger.js";import{isAbortError as t}from"../../../core/promiseUtils.js";import{watch as r,sync as o,initial as a}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{hasExcludedVariableOrDimension as u}from"../../../layers/support/rasterDatasets/multidimensionalUtils.js";import l from"../engine/flow/FlowView2D.js";import{LayerView2DMixin as p}from"./LayerView2D.js";import d from"./imagery/ImageryTileView2D.js";import c from"./imagery/VectorFieldTileView2D.js";import{canUseMajorityInterpolationOnDataSource as g}from"./support/util.js";import m from"../../layers/ImageryTileLayerView.js";import v from"../../layers/LayerView.js";import{RefreshableLayerView as w}from"../../layers/RefreshableLayerView.js";let b=class extends(m(w(p(v)))){constructor(){super(...arguments),this._useWebGLForProcessing=!0,this._useProgressiveUpdate=!0,this._pixelHighlights=[],this.subview=null}get useWebGLForProcessing(){return this._useWebGLForProcessing}set useWebGLForProcessing(e){this._useWebGLForProcessing=e,this.subview&&"useWebGLForProcessing"in this.subview&&(this.subview.useWebGLForProcessing=e)}get useProgressiveUpdate(){return this._useWebGLForProcessing}set useProgressiveUpdate(e){this._useProgressiveUpdate=e,this.subview&&"useProgressiveUpdate"in this.subview&&(this.subview.useProgressiveUpdate=e)}get displayParameters(){const{layer:e}=this,i=this._get("displayParameters");return e.renderer&&e.visible?{bandIds:e.bandIds,renderer:e.renderer,interpolation:e.interpolation,multidimensionalDefinition:e.multidimensionalDefinition,rasterFunction:"imagery-tile"===e.type?e.rasterFunction:null}:i}update(e){this.subview?.update(e),this.notifyChange("updating")}isUpdating(){return!this.subview||this.subview.updating}attach(){this.layer.increaseRasterJobHandlerUsage(),this._updateSubview(),this.addAttachHandles([r(()=>this.displayParameters,(e,i)=>{const r=e.interpolation!==i?.interpolation&&("majority"===e.interpolation||"majority"===i?.interpolation)&&g(this.layer),o=!!this.layer.serviceRasterInfo?.storageInfo?.isBsqTile&&e.bandIds?.join()!==i?.bandIds?.join(),a=e.renderer!==i?.renderer&&this._getSubviewType(i?.renderer)!==this._getSubviewType(e.renderer);a&&this._updateSubview();const n=e.multidimensionalDefinition!==i?.multidimensionalDefinition,h=e.rasterFunction!==i?.rasterFunction,u=h&&!this._useWebGLForProcessing,l=n||r||a||u||o;this.subview.redrawOrRefetch({refetch:l,reprocess:h}).catch(e=>{t(e)||s.getLogger(this).error(e)}),this.notifyChange("updating")}),r(()=>this.layer.multidimensionalSubset??null,(e,i)=>{const{multidimensionalDefinition:r}=this.layer;null!=r&&u(r,e)!==u(r,i)&&(this.subview.redrawOrRefetch({refetch:!0}).catch(e=>{t(e)||s.getLogger(this).error(e)}),this.notifyChange("updating"))},o),r(()=>this.timeExtent,()=>{this.subview.timeExtent=this.timeExtent,this.subview.redrawOrRefetch({refetch:!0}).catch(e=>{t(e)||s.getLogger(this).error(e)})},a),r(()=>this.view.highlights.items.map(({name:e,color:i})=>({name:e,color:i})),()=>this._updateHighlightOptions(this.subview),a)])}detach(){this.layer.decreaseRasterJobHandlerUsage(),this._detachSubview(this.subview),this.subview?.destroy(),this.subview=null}viewChange(){this.requestUpdate()}moveEnd(){this.subview.moveEnd()}highlight(e,s){if(!e.
|
|
5
|
+
import{__decorate as e}from"tslib";import{makeHandle as i}from"../../../core/handleUtils.js";import s from"../../../core/Logger.js";import{isAbortError as t}from"../../../core/promiseUtils.js";import{watch as r,sync as o,initial as a}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{hasExcludedVariableOrDimension as u}from"../../../layers/support/rasterDatasets/multidimensionalUtils.js";import l from"../engine/flow/FlowView2D.js";import{LayerView2DMixin as p}from"./LayerView2D.js";import d from"./imagery/ImageryTileView2D.js";import c from"./imagery/VectorFieldTileView2D.js";import{canUseMajorityInterpolationOnDataSource as g}from"./support/util.js";import m from"../../layers/ImageryTileLayerView.js";import v from"../../layers/LayerView.js";import{RefreshableLayerView as w}from"../../layers/RefreshableLayerView.js";let b=class extends(m(w(p(v)))){constructor(){super(...arguments),this._useWebGLForProcessing=!0,this._useProgressiveUpdate=!0,this._pixelHighlights=[],this.subview=null}get useWebGLForProcessing(){return this._useWebGLForProcessing}set useWebGLForProcessing(e){this._useWebGLForProcessing=e,this.subview&&"useWebGLForProcessing"in this.subview&&(this.subview.useWebGLForProcessing=e)}get useProgressiveUpdate(){return this._useWebGLForProcessing}set useProgressiveUpdate(e){this._useProgressiveUpdate=e,this.subview&&"useProgressiveUpdate"in this.subview&&(this.subview.useProgressiveUpdate=e)}get displayParameters(){const{layer:e}=this,i=this._get("displayParameters");return e.renderer&&e.visible?{bandIds:e.bandIds,renderer:e.renderer,interpolation:e.interpolation,multidimensionalDefinition:e.multidimensionalDefinition,rasterFunction:"imagery-tile"===e.type?e.rasterFunction:null}:i}update(e){this.subview?.update(e),this.notifyChange("updating")}isUpdating(){return!this.subview||this.subview.updating}attach(){this.layer.increaseRasterJobHandlerUsage(),this._updateSubview(),this.addAttachHandles([r(()=>this.displayParameters,(e,i)=>{const r=e.interpolation!==i?.interpolation&&("majority"===e.interpolation||"majority"===i?.interpolation)&&g(this.layer),o=!!this.layer.serviceRasterInfo?.storageInfo?.isBsqTile&&e.bandIds?.join()!==i?.bandIds?.join(),a=e.renderer!==i?.renderer&&this._getSubviewType(i?.renderer)!==this._getSubviewType(e.renderer);a&&this._updateSubview();const n=e.multidimensionalDefinition!==i?.multidimensionalDefinition,h=e.rasterFunction!==i?.rasterFunction,u=h&&!this._useWebGLForProcessing,l=n||r||a||u||o;this.subview.redrawOrRefetch({refetch:l,reprocess:h}).catch(e=>{t(e)||s.getLogger(this).error(e)}),this.notifyChange("updating")}),r(()=>this.layer.multidimensionalSubset??null,(e,i)=>{const{multidimensionalDefinition:r}=this.layer;null!=r&&u(r,e)!==u(r,i)&&(this.subview.redrawOrRefetch({refetch:!0}).catch(e=>{t(e)||s.getLogger(this).error(e)}),this.notifyChange("updating"))},o),r(()=>this.timeExtent,()=>{this.subview.timeExtent=this.timeExtent,this.subview.redrawOrRefetch({refetch:!0}).catch(e=>{t(e)||s.getLogger(this).error(e)})},a),r(()=>this.view.highlights.items.map(({name:e,color:i})=>({name:e,color:i})),()=>this._updateHighlightOptions(this.subview),a)])}detach(){this.layer.decreaseRasterJobHandlerUsage(),this._detachSubview(this.subview),this.subview?.destroy(),this.subview=null}viewChange(){this.requestUpdate()}moveEnd(){this.subview.moveEnd()}highlight(e,s){if(!e.pixelRanges?.length)return i();const t={target:{...e},options:{...s}};return this._pixelHighlights.push(t),this._updateHighlightOptions(this.subview),i(()=>{const e=this._pixelHighlights.indexOf(t);-1!==e&&(this._pixelHighlights.splice(e,1),this._updateHighlightOptions(this.subview))})}doRefresh(){return this.subview?this.subview.doRefresh():Promise.resolve()}_updateSubview(){const{renderer:e}=this.layer;if(!e)return;const i=this._getSubviewType(e);if(this.subview){if(this.subview.type===i)return void this._attachSubview(this.subview);this._detachSubview(this.subview),this.subview?.destroy(),this.subview=null}const{layer:s}=this;let t;if(t="rasterVF"===i?new c({layer:s,layerView:this,scheduler:this.scheduler}):"flow"===i?new l({layer:s,layerView:this,scheduler:this.scheduler}):new d({layer:s,layerView:this,scheduler:this.scheduler}),"useWebGLForProcessing"in t&&(t.useWebGLForProcessing=this._useWebGLForProcessing),"useProgressiveUpdate"in t&&(t.useProgressiveUpdate=this._useProgressiveUpdate),"previousLOD"in t){const{subview:e}=this;t.previousLOD=e&&"previousLOD"in e?e.previousLOD:null}this._attachSubview(t),this._updateHighlightOptions(t),this.subview=t,this.requestUpdate()}_attachSubview(e){e&&!e.attached&&(e.attach(),e.attached=!0,this.container.addChildAt(e.container,0))}_detachSubview(e){e?.attached&&(this.container.removeChild(e.container),e.detach(),e.attached=!1)}_getSubviewType(e){const i=e?.type;return"vector-field"===i?"rasterVF":"flow"===i?"flow":"raster"}_updateHighlightOptions(e){"raster"===e?.type&&e.updateHighlightOptions(this._pixelHighlights)}};e([n()],b.prototype,"subview",void 0),e([n()],b.prototype,"useWebGLForProcessing",null),e([n()],b.prototype,"useProgressiveUpdate",null),e([n({readOnly:!0})],b.prototype,"displayParameters",null),b=e([h("esri.views.2d.layers.ImageryTileLayerView2D")],b);const y=b;export{y 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/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{clone as e}from"../../../../../core/lang.js";import
|
|
5
|
+
import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as t}from"../../../../../layers/support/arcgisLayerUrl.js";import{getServiceGeometryType as r}from"./geometryUtils.js";import{getLayerDeconflictionEnabled as o,createLabelVVEvaluator as i}from"./labelingUtils.js";import{createFeatureSourceSchema as s}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as a}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as n}from"../support/rendererUtils.js";class l{constructor(e){this.layer=e}getLabelingDeconflictionInfo(e){const t=this.layer,r=o(t);return[{vvEvaluators:{0:i(t.renderer)},deconflictionEnabled:r}]}async createServiceOptions(o){const i=this.layer,{capabilities:s,editingInfo:a,objectIdField:n,globalIdField:l,datesInUnknownTimezone:p,dateFieldsTimeZone:d,orderBy:u,parsedUrl:c}=i,y=i.fieldsIndex.toJSON(),m=r(i),f=i.timeInfo?.toJSON(),h=i.spatialReference.toJSON(),g=e(c);let b=n;if(u?.length){const e=!u[0].valueExpression&&u[0].field;e&&(b=e)}const I=t(g.path),S=o.spatialReference.toJSON();return{type:"feature-service",source:g,isSourceHosted:I,orderByFields:b,outSpatialReference:S,metadata:{timeReferenceUnknownClient:p,dateFieldsTimeZone:d,globalIdField:l,fieldsIndex:y,geometryType:m,featureIdInfo:{type:"object-id",fieldName:n},timeInfo:f,spatialReference:h,outSpatialReference:S,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:s.query.maxRecordCount,supportsCompactGeometry:s.query.supportsCompactGeometry,supportsDefaultSpatialReference:s.query.supportsDefaultSpatialReference,supportsFormatPBF:s.query.supportsFormatPBF,supportsMaxRecordCountFactor:s.query.supportsMaxRecordCountFactor,supportsQuantization:s.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:s.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:s.query.supportsDegeneratedQuantizedGeometry,lastEditDate:a?.lastEditDate?.getTime(),snapshotInfo:null}}}createSourceSchema(e,t){const{definitionExpression:r,displayFilterInfo:o,customParameters:i,timeExtent:a,apiKey:n}=this.layer;return s({definitionExpression:r,displayFilterInfo:o,customParameters:i,timeExtent:a},e,t,n)}createProcessorSchema(e,t,r){const{fields:o,geometryType:i,orderBy:s,objectIdField:n,renderer:l,labelingInfo:p,labelsVisible:d}=this.layer,u={featureReduction:null,labelingInfoSource:this.layer.id,fields:o.map(e=>e.toJSON()),geometryType:i,labelingInfo:p,labelsVisible:d,objectIdField:n,orderBy:s??"default",renderer:l?.clone()};return a(e,t,u,r)}get hasRequiredSupport(){return n(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>this.layer.outFields,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}}export{l as CatalogFootprintLayerAdapter};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../../../Color.js";import has from"../../../../core/has.js";import{numberMaxFloat32 as r}from"../../../../core/mathUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{isFunctionRaster as o}from"../../../../layers/support/rasterDatasets/datasetUtils.js";import{getBytesPerPixel as n}from"../../../../layers/support/rasterFormats/pixelRangeUtils.js";import{convertGeometryToMask as a}from"../../../../layers/support/rasterFunctions/clipUtils.js";import{maxMapSizeGpu as l}from"../../../../layers/support/rasterFunctions/pixelUtils.js";import{RasterTileContainer as c}from"../../engine/imagery/RasterTileContainer.js";import{BaseImageryTileSubView2D as p}from"./BaseImageryTileSubView2D.js";import{canUseMajorityInterpolationOnDataSource as u}from"../support/util.js";import{defaultColor as h}from"../../../support/HighlightDefaults.js";import{getHighlightName as d}from"../../../support/highlightOptionsUtils.js";let m=class extends p{constructor(){super(...arguments),this.type="raster"}get canUseWebGLForProcessing(){const{loaded:e,symbolizer:t}=this.layer;if(!e||!t)return!1;const r=t.lookup.colormapLut?.indexedColormap,i=r&&r.length>this._maxIndexedColormapSize,s=n(this.layer.serviceRasterInfo);return!(has("ios")&&s>4)&&this.useWebGLForProcessing&&t.canRenderInWebGL&&!i&&!("majority"===this.layer.interpolation&&u(this.layer))}attach(){super.attach(),this.container=new c(this._tileInfoView),this.container.isCustomTilingScheme=this._isCustomTilingScheme,this.updateRasterFunctionParameters()}detach(){super.detach(),this.container.removeAllChildren(),this.container=null}fetchTile(e,t){return this.layer.fetchTile(e.level,e.row,e.col,t)}updateRasterFunctionParameters(){const{raster:e,type:t}=this.layer,{container:r}=this;if("Function"!==e.datasetFormat||"wcs"===t)return r.rasterFunctionChain=null,r.children.forEach(e=>{const{bitmap:t}=e;t&&(t.suspended=!0,t.processed=!1,t.projected&&(t.invalidateTexture(),t.rasterTexture=null))}),void(this._rasterFunctionState="na");const i=this._rasterFunctionState,{rasterFunction:s,primaryRasters:o}=e,n=s.supportsGPU&&(!o||o.rasters.length<=1),a=n?s.flatWebGLFunctionChain:null,{renderer:l}=this.layer,c=!n||!a?.functions.length||"raster-stretch"===l?.type&&l.dynamicRangeAdjustment||!this.canUseWebGLForProcessing;r.rasterFunctionChain=c?null:this._addProjection(a);const p=null==s?"na":r.rasterFunctionChain?"gpu":"cpu",u=i===p||"na"===i&&"cpu"===p&&0===a?.functions?.length;r.children.forEach(e=>{const{bitmap:t}=e;t&&(t.suspended=!u,t.processed=!1,t.processedTexture=null)}),this._rasterFunctionState=p}async updateTileSource(e,t){const r=this._getBandIds(),i=this._getLayerInterpolation(),{canUseWebGLForProcessing:s}=this,{source:n,globalSymbolizerParams:l,suspended:c,coords:p,resolution:u}=t,h=this.layerView.hasTilingEffects?l:t.symbolizerParams,{bitmap:d}=e;if([d.x,d.y]=p,d.resolution=u,null!=n?.pixelBlock){const e={extent:n.extent,pixelBlock:n.pixelBlock,srcPixelSize:n.srcTilePixelSize};if(d.rawPixelData=e,s)d.source=n.pixelBlock,d.isRendereredSource=!1;else{const t=await this.layer.applyRenderer(e,"stretch"===l?.type?l:void 0);d.source=t,d.isRendereredSource=!0}d.symbolizerParameters=s?h:null,d.transformGrid=s?n.transformGrid:null}else{const e=this.createEmptyTilePixelBlock();d.source=e,d.symbolizerParameters=s?h:null,d.transformGrid=null}d.bandIds=s?r:null,d.width=this._tileInfoView.tileInfo.size[0],d.height=this._tileInfoView.tileInfo.size[1],d.interpolation=i,d.suspended=c;const{raster:m}=this.layer;if(o(m)){const t=m.getClippingGeometry(this.layerView.view.spatialReference);if(t){const r=m.getTileExtentFromTileInfo(e.key.level,e.key.row,e.key.col,this._tileInfoView.tileInfo);d.mask=a({srcExtent:r,geometry:t,size:[d.width,d.height]})}}d.invalidateTexture()}async updateTileSymbolizerParameters(e,t){const{local:r,global:i}=t,s=this._getBandIds(),o=this._getLayerInterpolation(),{canUseWebGLForProcessing:n}=this,{bitmap:a}=e,{rawPixelData:l}=a;n||null==l?(a.isRendereredSource&&null!=l&&(a.source=l.pixelBlock),a.isRendereredSource=!1):(a.source=await this.layer.applyRenderer(l,"stretch"===i?.type?i:void 0),a.isRendereredSource=!0),a.symbolizerParameters=n?this.layerView.hasTilingEffects?i:r:null,a.bandIds=n?s:null,a.interpolation=o,a.suspended=!1}updateHighlightOptions(e){if(!e.length)return void(this.container.pixelHighlights=void 0);const i=[],{highlights:s}=this.layerView.view;e.sort((e,t)=>s.findIndex(({name:e})=>e===d(t.options))-s.findIndex(({name:t})=>t===d(e.options)));for(const{target:o,options:n}of e){const{
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../../Color.js";import has from"../../../../core/has.js";import{numberMaxFloat32 as r}from"../../../../core/mathUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{isFunctionRaster as o}from"../../../../layers/support/rasterDatasets/datasetUtils.js";import{getBytesPerPixel as n}from"../../../../layers/support/rasterFormats/pixelRangeUtils.js";import{convertGeometryToMask as a}from"../../../../layers/support/rasterFunctions/clipUtils.js";import{maxMapSizeGpu as l}from"../../../../layers/support/rasterFunctions/pixelUtils.js";import{RasterTileContainer as c}from"../../engine/imagery/RasterTileContainer.js";import{BaseImageryTileSubView2D as p}from"./BaseImageryTileSubView2D.js";import{canUseMajorityInterpolationOnDataSource as u}from"../support/util.js";import{defaultColor as h}from"../../../support/HighlightDefaults.js";import{getHighlightName as d}from"../../../support/highlightOptionsUtils.js";let m=class extends p{constructor(){super(...arguments),this.type="raster"}get canUseWebGLForProcessing(){const{loaded:e,symbolizer:t}=this.layer;if(!e||!t)return!1;const r=t.lookup.colormapLut?.indexedColormap,i=r&&r.length>this._maxIndexedColormapSize,s=n(this.layer.serviceRasterInfo);return!(has("ios")&&s>4)&&this.useWebGLForProcessing&&t.canRenderInWebGL&&!i&&!("majority"===this.layer.interpolation&&u(this.layer))}attach(){super.attach(),this.container=new c(this._tileInfoView),this.container.isCustomTilingScheme=this._isCustomTilingScheme,this.updateRasterFunctionParameters()}detach(){super.detach(),this.container.removeAllChildren(),this.container=null}fetchTile(e,t){return this.layer.fetchTile(e.level,e.row,e.col,t)}updateRasterFunctionParameters(){const{raster:e,type:t}=this.layer,{container:r}=this;if("Function"!==e.datasetFormat||"wcs"===t)return r.rasterFunctionChain=null,r.children.forEach(e=>{const{bitmap:t}=e;t&&(t.suspended=!0,t.processed=!1,t.projected&&(t.invalidateTexture(),t.rasterTexture=null))}),void(this._rasterFunctionState="na");const i=this._rasterFunctionState,{rasterFunction:s,primaryRasters:o}=e,n=s.supportsGPU&&(!o||o.rasters.length<=1),a=n?s.flatWebGLFunctionChain:null,{renderer:l}=this.layer,c=!n||!a?.functions.length||"raster-stretch"===l?.type&&l.dynamicRangeAdjustment||!this.canUseWebGLForProcessing;r.rasterFunctionChain=c?null:this._addProjection(a);const p=null==s?"na":r.rasterFunctionChain?"gpu":"cpu",u=i===p||"na"===i&&"cpu"===p&&0===a?.functions?.length;r.children.forEach(e=>{const{bitmap:t}=e;t&&(t.suspended=!u,t.processed=!1,t.processedTexture=null)}),this._rasterFunctionState=p}async updateTileSource(e,t){const r=this._getBandIds(),i=this._getLayerInterpolation(),{canUseWebGLForProcessing:s}=this,{source:n,globalSymbolizerParams:l,suspended:c,coords:p,resolution:u}=t,h=this.layerView.hasTilingEffects?l:t.symbolizerParams,{bitmap:d}=e;if([d.x,d.y]=p,d.resolution=u,null!=n?.pixelBlock){const e={extent:n.extent,pixelBlock:n.pixelBlock,srcPixelSize:n.srcTilePixelSize};if(d.rawPixelData=e,s)d.source=n.pixelBlock,d.isRendereredSource=!1;else{const t=await this.layer.applyRenderer(e,"stretch"===l?.type?l:void 0);d.source=t,d.isRendereredSource=!0}d.symbolizerParameters=s?h:null,d.transformGrid=s?n.transformGrid:null}else{const e=this.createEmptyTilePixelBlock();d.source=e,d.symbolizerParameters=s?h:null,d.transformGrid=null}d.bandIds=s?r:null,d.width=this._tileInfoView.tileInfo.size[0],d.height=this._tileInfoView.tileInfo.size[1],d.interpolation=i,d.suspended=c;const{raster:m}=this.layer;if(o(m)){const t=m.getClippingGeometry(this.layerView.view.spatialReference);if(t){const r=m.getTileExtentFromTileInfo(e.key.level,e.key.row,e.key.col,this._tileInfoView.tileInfo);d.mask=a({srcExtent:r,geometry:t,size:[d.width,d.height]})}}d.invalidateTexture()}async updateTileSymbolizerParameters(e,t){const{local:r,global:i}=t,s=this._getBandIds(),o=this._getLayerInterpolation(),{canUseWebGLForProcessing:n}=this,{bitmap:a}=e,{rawPixelData:l}=a;n||null==l?(a.isRendereredSource&&null!=l&&(a.source=l.pixelBlock),a.isRendereredSource=!1):(a.source=await this.layer.applyRenderer(l,"stretch"===i?.type?i:void 0),a.isRendereredSource=!0),a.symbolizerParameters=n?this.layerView.hasTilingEffects?i:r:null,a.bandIds=n?s:null,a.interpolation=o,a.suspended=!1}updateHighlightOptions(e){if(!e.length)return void(this.container.pixelHighlights=void 0);const i=[],{highlights:s}=this.layerView.view;e.sort((e,t)=>s.findIndex(({name:e})=>e===d(t.options))-s.findIndex(({name:t})=>t===d(e.options)));for(const{target:o,options:n}of e){const{pixelRanges:e}=o,a=Array.from({length:2*l},()=>0);for(let t=0;t<e.length;t++)a[2*t]=e[t][0],a[2*t+1]=e[t][1];for(let t=e.length;t<l;t++)a[2*t]=r,a[2*t+1]=-r;const c=o.bandId??0,p=d(n),u=s.find(e=>e.name===p)?.color??h,m=t.toUnitRGBA(u);i.push({ranges:a,bandId:c,color:m})}this.container.pixelHighlights=i}_getLayerInterpolation(){const{interpolation:e,renderer:t}=this.layer;if(!t)return e;const r=t.type;return"raster-colormap"===r||"unique-value"===r?"nearest":"raster-stretch"===t.type&&null!=t.colorRamp?"bilinear"===e||"cubic"===e?"bilinear":"nearest":e}_addProjection(e){return e?.functions?.length&&!e.hasFocalFunction&&e.functions.unshift({name:"Reproject",parameters:{targetImageSize:this._tileInfoView.tileInfo.size,requireNNEdge:e.isSourceSingleBand},pixelType:"f32",id:0,isNoopProcess:!1}),e}};e([i()],m.prototype,"canUseWebGLForProcessing",null),e([i()],m.prototype,"container",void 0),e([i()],m.prototype,"layer",void 0),e([i()],m.prototype,"type",void 0),m=e([s("esri.views.2d.layers.imagery.ImageryTileView2D")],m);export{m 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/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import r from"../../../../core/Accessor.js";import{property as t}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{i as n}from"../../../../chunks/vec32.js";import{fromValues as s,create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as a,width as c,height as p,expand as d}from"../../../../geometry/support/aaBoundingRect.js";import{vectorCoordinates as l}from"../../../../geometry/support/coordinateSystem.js";let m=class extends r{constructor(e){super(e)}get localOrigin(){const{extent:e}=this;return s(e.center.x,e.center.y,0)}get localOriginRenderSpace(){const{extent:e,localOrigin:r,renderCoordsHelper:t}=this,o=i();return t.toRenderCoords(r,e.spatialReference,o),o}get cameraPositionRenderSpace(){const{localOriginRenderSpace:e,renderCoordsHelper:r}=this,t=i();return r.setAltitude(t,h,e),t}get cameraDimensions(){const{extent:e,renderCoordsHelper:r}=this;if(2===r.viewingMode)return{width:e.width,height:e.height};const t=a();this._expandBoundingRect(e.xmin,e.ymin,t),this._expandBoundingRect(e.xmax,e.ymin,t),this._expandBoundingRect(e.xmin,e.ymax,t),this._expandBoundingRect(e.xmax,e.ymax,t);return{width:c(t),height:p(t)}}get cameraNearFar(){return{near:x,far:y}}get upVector(){return this.renderCoordsHelper.worldBasisAtPosition(this.cameraPositionRenderSpace,2,i())}get northVector(){return this.renderCoordsHelper.worldBasisAtPosition(this.cameraPositionRenderSpace,1,i())}get eastVector(){return this.renderCoordsHelper.worldBasisAtPosition(this.cameraPositionRenderSpace,0,i())}_expandBoundingRect(e,r,t){const{extent:o,eastVector:s,northVector:i,upVector:a,renderCoordsHelper:c}=this,p=o.center.z??0;n(u,e,r,p),c.toRenderCoords(u,o.spatialReference,u),l(u,s,i,a,g),d(t,g,t)}};e([t()],m.prototype,"renderCoordsHelper",void 0),e([t()],m.prototype,"extent",void 0),e([t()],m.prototype,"localOrigin",null),e([t()],m.prototype,"localOriginRenderSpace",null),e([t()],m.prototype,"cameraPositionRenderSpace",null),e([t()],m.prototype,"cameraDimensions",null),e([t()],m.prototype,"upVector",null),e([t()],m.prototype,"northVector",null),e([t()],m.prototype,"eastVector",null),m=e([o("esri.views.3d.analysis.VolumeMeasurement.
|
|
5
|
+
import{__decorate as e}from"tslib";import r from"../../../../core/Accessor.js";import{property as t}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{i as n}from"../../../../chunks/vec32.js";import{fromValues as s,create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as a,width as c,height as p,expand as d}from"../../../../geometry/support/aaBoundingRect.js";import{vectorCoordinates as l}from"../../../../geometry/support/coordinateSystem.js";let m=class extends r{constructor(e){super(e)}get localOrigin(){const{extent:e}=this;return s(e.center.x,e.center.y,0)}get localOriginRenderSpace(){const{extent:e,localOrigin:r,renderCoordsHelper:t}=this,o=i();return t.toRenderCoords(r,e.spatialReference,o),o}get cameraPositionRenderSpace(){const{localOriginRenderSpace:e,renderCoordsHelper:r}=this,t=i();return r.setAltitude(t,h,e),t}get cameraDimensions(){const{extent:e,renderCoordsHelper:r}=this;if(2===r.viewingMode)return{width:e.width,height:e.height};const t=a();this._expandBoundingRect(e.xmin,e.ymin,t),this._expandBoundingRect(e.xmax,e.ymin,t),this._expandBoundingRect(e.xmin,e.ymax,t),this._expandBoundingRect(e.xmax,e.ymax,t);return{width:c(t),height:p(t)}}get cameraNearFar(){return{near:x,far:y}}get upVector(){return this.renderCoordsHelper.worldBasisAtPosition(this.cameraPositionRenderSpace,2,i())}get northVector(){return this.renderCoordsHelper.worldBasisAtPosition(this.cameraPositionRenderSpace,1,i())}get eastVector(){return this.renderCoordsHelper.worldBasisAtPosition(this.cameraPositionRenderSpace,0,i())}_expandBoundingRect(e,r,t){const{extent:o,eastVector:s,northVector:i,upVector:a,renderCoordsHelper:c}=this,p=o.center.z??0;n(u,e,r,p),c.toRenderCoords(u,o.spatialReference,u),l(u,s,i,a,g),d(t,g,t)}};e([t()],m.prototype,"renderCoordsHelper",void 0),e([t()],m.prototype,"extent",void 0),e([t()],m.prototype,"localOrigin",null),e([t()],m.prototype,"localOriginRenderSpace",null),e([t()],m.prototype,"cameraPositionRenderSpace",null),e([t()],m.prototype,"cameraDimensions",null),e([t()],m.prototype,"upVector",null),e([t()],m.prototype,"northVector",null),e([t()],m.prototype,"eastVector",null),m=e([o("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillComputation")],m);const u=i(),g=i(),h=9e3,x=0,y=2e4;export{m as VolumeMeasurementCutFillComputation};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{syncAndInitial as i,watch as n,initial as a}from"../../../../core/reactiveUtils.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as l}from"../../../../core/support/UpdatingHandles.js";import{projectOrLoad as p}from"../../../../geometry/projectionUtils.js";import{projectBoundingRect as m}from"../../../../geometry/projection/projectBoundingRect.js";import{empty as d,fromExtent as u,intersects as c}from"../../../../geometry/support/aaBoundingRect.js";import{logFailedGeometryProjectionError as y}from"../support/projectionUtils.js";import{
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{syncAndInitial as i,watch as n,initial as a}from"../../../../core/reactiveUtils.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as l}from"../../../../core/support/UpdatingHandles.js";import{projectOrLoad as p}from"../../../../geometry/projectionUtils.js";import{projectBoundingRect as m}from"../../../../geometry/projection/projectBoundingRect.js";import{empty as d,fromExtent as u,intersects as c}from"../../../../geometry/support/aaBoundingRect.js";import{logFailedGeometryProjectionError as y}from"../support/projectionUtils.js";import{VolumeMeasurementCutFillComputation as g}from"./VolumeMeasurementCutFillComputation.js";import{getElevationAtPoint as h}from"../../support/ElevationProvider.js";let v=class extends t{constructor(e){super(e),this._updatingHandles=new l,this._computation=null}initialize(){this._updatingHandles.add(()=>({geometry:this.analysis.geometry,projectedGeometry:p(this.analysis.geometry,this.view.spatialReference)}),({geometry:e,projectedGeometry:t})=>{null==t.pending?this._onGeometryChange(e,t.geometry):this._updatingHandles.addPromise(t.pending)},i),this.addHandles([this._createElevationUpdateHandle(),n(()=>[this.analysis.measureType,this.analysisViewData.elevationAlignedGeometry,this.analysisViewData.effectiveTargetElevation],()=>this._updateTargetGeometry()),n(()=>this.analysisViewData.elevationAlignedGeometry?.extent,e=>{e?this._updateComputation(e):this._removeComputation()},a)])}destroy(){this._updatingHandles.destroy()}get updating(){return this._updatingHandles.updating}_createComputation(e){const{renderCoordsHelper:t}=this.view;this._computation=new g({extent:e,renderCoordsHelper:t})}_updateComputation(e){this._computation?this._computation.extent=e:this._createComputation(e)}_removeComputation(){this._computation=null}_createElevationUpdateHandle(){const e=t=>{const o=this.analysis.geometry;if(null==o||"ground"!==t.context)return;const i=p(o,this.view.spatialReference);if(null!=i.pending)return this._updatingHandles.addPromise(i.pending),void i.pending.finally(()=>e(t));const n=i.geometry;null!=n&&null!=n.extent&&(m(t.extent,t.spatialReference,_,this.view.spatialReference),u(n.extent,w),c(_,w)&&this._onGeometryChange(o,n))};return this.view.elevationProvider.on("elevation-change",t=>e(t))}_onGeometryChange(e,t){const{elevationProvider:i}=this.view,{valid:n}=this.analysis;if(null==e||!n)return void(this.analysisViewData.elevationAlignedGeometry=null);if(null==t)return y(this.analysis,e.spatialReference,o.getLogger(this)),void(this.analysisViewData.elevationAlignedGeometry=null);const a=t.clone();f(i,a),this.analysisViewData.elevationAlignedGeometry=a}_updateTargetGeometry(){const{measureType:e}=this.analysis,{elevationAlignedGeometry:t,effectiveTargetElevation:o}=this.analysisViewData;if(!t)return void(this.analysisViewData.targetGeometry=null);if("stockpile"===e||null==o)return void(this.analysisViewData.targetGeometry=t);const i=t.clone();i.rings[0].forEach(e=>{e[2]=o}),this.analysisViewData.targetGeometry=i}};function f(e,t){t.rings[0].forEach(t=>{t[2]=h(e,t,"ground")??0})}e([r({constructOnly:!0})],v.prototype,"analysis",void 0),e([r({constructOnly:!0})],v.prototype,"analysisViewData",void 0),e([r({constructOnly:!0})],v.prototype,"view",void 0),e([r()],v.prototype,"updating",null),e([r({readOnly:!0})],v.prototype,"_updatingHandles",void 0),e([r()],v.prototype,"_computation",void 0),v=e([s("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillController")],v);const _=d(),w=d();export{v as VolumeMeasurementCutFillController};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../../../Color.js";import i from"../../../../core/Accessor.js";import{destroyMaybe as o}from"../../../../core/maybe.js";import{watch as s}from"../../../../core/reactiveUtils.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{i as l}from"../../../../chunks/vec32.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{cutFillConfiguration as m}from"./VolumeMeasurementConfiguration.js";import{LineVisualElement as c}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as p}from"../../interactive/visualElements/OutlineVisualElement.js";import{GeodesicSegment as h}from"../../interactive/visualElements/support/Segment.js";import{createStipplePatternSimple as u}from"../../webgl-engine/materials/lineStippleUtils.js";let d=class extends i{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}constructor(e){super(e)}initialize(){const{accentColor:e}=this.view.effectiveTheme,i={view:this.view,isDecoration:!0},o=m,r={...i,width:o.geometryOutlineWidth},n=t.toUnitRGBA(e),l=t.toUnitRGBA(o.targetGeometryOutlineColor);this._elevationAlignedGeometry=new p({...r,isDraped:!0,color:n}),this._targetGeometry=new p({...r,color:l});const a={...i,attached:!0,width:o.projectionLineWidth,stipplePattern:u(o.projectionLineStippleSize),renderOccluded:4},h=t.toUnitRGBA(o.cutProjectionLineColor),d=t.toUnitRGBA(o.fillProjectionLineColor);this._cutProjectionLines=new c({...a,color:h}),this._fillProjectionLines=new c({...a,color:d}),this.addHandles([s(()=>[this.analysisViewData.elevationAlignedGeometry,this.analysisViewData.targetGeometry,this.visible],()=>this._updateVisualElements()),s(()=>this.view.effectiveTheme.accentColor,e=>{this._elevationAlignedGeometry.color=t.toUnitRGBA(e)})])}destroy(){this._elevationAlignedGeometry=o(this._elevationAlignedGeometry),this._targetGeometry=o(this._targetGeometry),this._cutProjectionLines=o(this._cutProjectionLines),this._fillProjectionLines=o(this._fillProjectionLines)}_updateVisualElements(){this._updateGeometries(),this._updateProjectionLines()}_updateGeometries(){const e=this.visible,{elevationAlignedGeometry:t,targetGeometry:i}=this.analysisViewData;this._elevationAlignedGeometry.geometry=t,this._elevationAlignedGeometry.visible=e,this._targetGeometry.geometry=i,this._targetGeometry.visible=e}_updateProjectionLines(){const e=this.visible,{elevationAlignedGeometry:t,targetGeometry:i}=this.analysisViewData;if(this._cutProjectionLines.visible=e,this._fillProjectionLines.visible=e,!t||!i)return;const{renderCoordsHelper:o}=this.view,s=o.spatialReference,r=[],n=[],a=t.spatialReference;for(let m=0;m<t.rings[0].length;++m){const e=t.rings[0][m],c=l(y,e[0],e[1],e[2]);o.toRenderCoords(c,a,c);const p=i.rings[0][m],u=l(v,p[0],p[1],p[2]);o.toRenderCoords(u,a,u);const d=new h(c,u,s);c[2]>u[2]?r.push(d):n.push(d)}this._cutProjectionLines.setGeometryFromSegments(r),this._fillProjectionLines.setGeometryFromSegments(n)}};e([r({constructOnly:!0})],d.prototype,"view",void 0),e([r({constructOnly:!0})],d.prototype,"analysisViewData",void 0),e([r({readOnly:!0})],d.prototype,"visible",null),d=e([n("esri.views.3d.analysis.VolumeMeasurement.
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../../Color.js";import i from"../../../../core/Accessor.js";import{destroyMaybe as o}from"../../../../core/maybe.js";import{watch as s}from"../../../../core/reactiveUtils.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{i as l}from"../../../../chunks/vec32.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{cutFillConfiguration as m}from"./VolumeMeasurementConfiguration.js";import{LineVisualElement as c}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as p}from"../../interactive/visualElements/OutlineVisualElement.js";import{GeodesicSegment as h}from"../../interactive/visualElements/support/Segment.js";import{createStipplePatternSimple as u}from"../../webgl-engine/materials/lineStippleUtils.js";let d=class extends i{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}constructor(e){super(e)}initialize(){const{accentColor:e}=this.view.effectiveTheme,i={view:this.view,isDecoration:!0},o=m,r={...i,width:o.geometryOutlineWidth},n=t.toUnitRGBA(e),l=t.toUnitRGBA(o.targetGeometryOutlineColor);this._elevationAlignedGeometry=new p({...r,isDraped:!0,color:n}),this._targetGeometry=new p({...r,color:l});const a={...i,attached:!0,width:o.projectionLineWidth,stipplePattern:u(o.projectionLineStippleSize),renderOccluded:4},h=t.toUnitRGBA(o.cutProjectionLineColor),d=t.toUnitRGBA(o.fillProjectionLineColor);this._cutProjectionLines=new c({...a,color:h}),this._fillProjectionLines=new c({...a,color:d}),this.addHandles([s(()=>[this.analysisViewData.elevationAlignedGeometry,this.analysisViewData.targetGeometry,this.visible],()=>this._updateVisualElements()),s(()=>this.view.effectiveTheme.accentColor,e=>{this._elevationAlignedGeometry.color=t.toUnitRGBA(e)})])}destroy(){this._elevationAlignedGeometry=o(this._elevationAlignedGeometry),this._targetGeometry=o(this._targetGeometry),this._cutProjectionLines=o(this._cutProjectionLines),this._fillProjectionLines=o(this._fillProjectionLines)}_updateVisualElements(){this._updateGeometries(),this._updateProjectionLines()}_updateGeometries(){const e=this.visible,{elevationAlignedGeometry:t,targetGeometry:i}=this.analysisViewData;this._elevationAlignedGeometry.geometry=t,this._elevationAlignedGeometry.visible=e,this._targetGeometry.geometry=i,this._targetGeometry.visible=e}_updateProjectionLines(){const e=this.visible,{elevationAlignedGeometry:t,targetGeometry:i}=this.analysisViewData;if(this._cutProjectionLines.visible=e,this._fillProjectionLines.visible=e,!t||!i)return;const{renderCoordsHelper:o}=this.view,s=o.spatialReference,r=[],n=[],a=t.spatialReference;for(let m=0;m<t.rings[0].length;++m){const e=t.rings[0][m],c=l(y,e[0],e[1],e[2]);o.toRenderCoords(c,a,c);const p=i.rings[0][m],u=l(v,p[0],p[1],p[2]);o.toRenderCoords(u,a,u);const d=new h(c,u,s);c[2]>u[2]?r.push(d):n.push(d)}this._cutProjectionLines.setGeometryFromSegments(r),this._fillProjectionLines.setGeometryFromSegments(n)}};e([r({constructOnly:!0})],d.prototype,"view",void 0),e([r({constructOnly:!0})],d.prototype,"analysisViewData",void 0),e([r({readOnly:!0})],d.prototype,"visible",null),d=e([n("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillVisualization")],d);const y=a(),v=a();export{d as VolumeMeasurementCutFillVisualization};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as r}from"./AnalysisView3D.js";import{
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as r}from"./AnalysisView3D.js";import{VolumeMeasurementCutFillController as l}from"./VolumeMeasurement/VolumeMeasurementCutFillController.js";import{VolumeMeasurementCutFillVisualization as a}from"./VolumeMeasurement/VolumeMeasurementCutFillVisualization.js";let n=class extends(r(e)){constructor(t){super(t),this.type="volume-measurement-view-3d",this.analysis=null,this.elevationAlignedGeometry=null,this.targetGeometry=null,this.tool=null}initialize(){const{analysis:t,view:e}=this;this._analysisController=new l({view:e,analysis:t,analysisViewData:this}),this._analysisVisualization=new a({view:e,analysisViewData:this})}destroy(){this._analysisController=s(this._analysisController),this._analysisVisualization=s(this._analysisVisualization)}get result(){return null}get effectiveTargetElevation(){const{targetElevation:t}=this.analysis.cutFillOptions;if(null!=t)return t;const e=this.elevationAlignedGeometry?.extent;return e&&e.zmin&&e.zmax?(e.zmax+e.zmin)/2:null}get updating(){return null!=this._analysisController&&this._analysisController.updating}};t([o({readOnly:!0})],n.prototype,"type",void 0),t([o({constructOnly:!0,nonNullable:!0})],n.prototype,"analysis",void 0),t([o()],n.prototype,"result",null),t([o()],n.prototype,"elevationAlignedGeometry",void 0),t([o({type:Number})],n.prototype,"effectiveTargetElevation",null),t([o()],n.prototype,"targetGeometry",void 0),t([o()],n.prototype,"updating",null),n=t([i("esri.views.3d.analysis.VolumeMeasurementAnalysisView3D")],n);const u=n;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/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as r}from"tslib";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as t}from"../../../core/accessorSupport/decorators/subclass.js";import e from"
|
|
5
|
+
import{__decorate as r}from"tslib";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as t}from"../../../core/accessorSupport/decorators/subclass.js";import e from"./FeatureLayerViewBase3D.js";import{CatalogFootprintLayerView as s}from"../../layers/CatalogFootprintLayerView.js";let i=class extends(s(e)){constructor(){super(...arguments),this.type="catalog-footprint-3d"}get graphicOrigin(){return this.layer.graphicOrigin}};r([o()],i.prototype,"parent",void 0),r([o()],i.prototype,"graphicOrigin",null),i=r([t("esri.views.3d.layers.CatalogFootprintLayerView3D")],i);const a=i;export{a as default};
|