@arcgis/core 4.34.0-next.80 → 4.34.0-next.82

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.
Files changed (111) hide show
  1. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +4 -0
  2. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.js +5 -0
  3. package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +4 -0
  4. package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.js +5 -0
  5. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/{c90571063bd2bb57a5a7.js → 1d491447b13f2f2b4399.js} +1 -1
  8. package/assets/esri/core/workers/chunks/264a9a916e1e972b69d7.js +1 -0
  9. package/assets/esri/core/workers/chunks/30c85a1a4f118cc45a25.js +1 -0
  10. package/assets/esri/core/workers/chunks/3192b68675ff2afcb1d6.js +1 -0
  11. package/assets/esri/core/workers/chunks/365d63c2aed3a49918f2.js +1 -0
  12. package/assets/esri/core/workers/chunks/3ef8a7468d7e3b2f0b69.js +351 -0
  13. package/assets/esri/core/workers/chunks/a1196637268b89281780.js +1 -0
  14. package/assets/esri/core/workers/chunks/a1b08aab73747f4e7e25.js +1 -0
  15. package/assets/esri/core/workers/chunks/{b815c2f61fb9c58a2956.js → b6c4712e00fce87bd0f4.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{db2396bf062468ee8b60.js → b8810711d058300395cd.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{22bd4255b6b511a43b66.js → c2bc70b65f5c2a2c9671.js} +1 -1
  18. package/assets/esri/core/workers/chunks/cc579c94438f48a0dbab.js +1 -0
  19. package/assets/esri/core/workers/chunks/e1b3ae6426886e2fab07.js +1 -0
  20. package/assets/esri/core/workers/chunks/e4acc3c2b6d865ed1940.js +1 -0
  21. package/assets/esri/core/workers/chunks/f6513ec888a7d927d948.js +1 -0
  22. package/assets/esri/core/workers/chunks/{ede479faa4e6920fe673.js → f8f85207b382c1ea038c.js} +17 -9
  23. package/assets/esri/core/workers/chunks/{23a13fbab9984953a7c6.js → fc06014fb484fc8c697e.js} +1 -1
  24. package/assets/esri/libs/dracoMeshDecoder/draco_mesh_decoder.wasm +0 -0
  25. package/chunks/CutFillComposition.glsl.js +8 -0
  26. package/chunks/CutFillMask.glsl.js +6 -0
  27. package/chunks/GaussianSplat.glsl.js +2 -2
  28. package/chunks/HUDMaterial.glsl.js +4 -6
  29. package/chunks/draco_mesh_decoder.js +5 -0
  30. package/config.js +1 -1
  31. package/core/unitUtils.js +1 -1
  32. package/interfaces.d.ts +147 -13
  33. package/kernel.js +1 -1
  34. package/layers/CSVLayer.js +1 -1
  35. package/layers/FeatureLayer.js +1 -1
  36. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  37. package/layers/OrientedImageryLayer.js +1 -1
  38. package/layers/support/ElevationSampler.js +1 -1
  39. package/layers/support/FieldConfiguration.js +1 -1
  40. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  41. package/layers/support/rasterDatasets/datasetUtils.js +1 -1
  42. package/libs/dracoMeshDecoder/dracoMeshDecoder.js +5 -0
  43. package/package.json +1 -1
  44. package/portal/schemas/definitions.js +1 -1
  45. package/rest/featureService/FeatureService.js +1 -1
  46. package/support/revision.js +1 -1
  47. package/views/2d/engine/Stage.js +1 -1
  48. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
  49. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsDiffShader.js +1 -1
  50. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsMinMaxSumShader.js +1 -1
  51. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsStdDevShader.js +1 -1
  52. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsSumOfSquaredDiffShader.js +1 -1
  53. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
  54. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  55. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  56. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  57. package/views/3d/glTF/internal/Resource.js +1 -1
  58. package/views/3d/glTF/loader.js +1 -1
  59. package/views/3d/layers/FlowSubView3D.js +1 -1
  60. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  61. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  62. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  63. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  64. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  65. package/views/3d/layers/graphics/pipeline/rendering/RenderCommandContext.js +1 -1
  66. package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
  67. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  68. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  69. package/views/3d/support/engineContent/line.js +1 -1
  70. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  71. package/views/3d/support/flow/constants.js +1 -1
  72. package/views/3d/support/flow/geometryUtils.js +1 -1
  73. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  74. package/views/3d/support/gaussianSplatting/GaussianSplatQualitySettings.js +5 -0
  75. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  76. package/views/3d/webgl-engine/core/shaderLibrary/attributes/MaskedColor.glsl.js +15 -7
  77. package/views/3d/webgl-engine/lib/CutFillColor.js +5 -0
  78. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  79. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  80. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  81. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  82. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  83. package/views/3d/webgl-engine/materials/HUDMaterialBaseInstance.js +5 -0
  84. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  85. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  86. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  87. package/views/3d/webgl-engine/shaders/CutFillComposition.glsl.js +5 -0
  88. package/views/3d/webgl-engine/shaders/CutFillCompositionTechnique.js +5 -0
  89. package/views/3d/webgl-engine/shaders/CutFillMask.glsl.js +5 -0
  90. package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +5 -0
  91. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  92. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
  93. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  94. package/views/3d/webgl.js +1 -1
  95. package/views/webgl/VertexArrayObject.js +1 -1
  96. package/widgets/Attribution/AttributionViewModel.js +1 -1
  97. package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
  98. package/widgets/Legend/LegendViewModel.js +1 -1
  99. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  100. package/widgets/Search/SearchViewModel.js +1 -1
  101. package/widgets/Search.js +1 -1
  102. package/assets/esri/core/workers/chunks/07a355a9c95154971aab.js +0 -1
  103. package/assets/esri/core/workers/chunks/22a66db7d73e733917e3.js +0 -1
  104. package/assets/esri/core/workers/chunks/49486c2e12e768b347ed.js +0 -1
  105. package/assets/esri/core/workers/chunks/66e0bc4acb18f00a433d.js +0 -1
  106. package/assets/esri/core/workers/chunks/76db75337044de8218c9.js +0 -353
  107. package/assets/esri/core/workers/chunks/978fab0f0b10edde4ff8.js +0 -1
  108. package/assets/esri/core/workers/chunks/a07321a901d6847d1a6b.js +0 -1
  109. package/assets/esri/core/workers/chunks/ae8dce1a43ca7019f81d.js +0 -1
  110. package/assets/esri/core/workers/chunks/cb3b88959b2f048e54a5.js +0 -1
  111. package/assets/esri/core/workers/chunks/da1a5537e2f2ca6cc247.js +0 -1
@@ -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/Error.js";import{clone as i}from"../core/lang.js";import{setDeepValue as r}from"../core/object.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";import n from"../graphic/OrientedImageryGraphicOrigin.js";import s from"./FeatureLayer.js";import{useViewTimeProperty as p}from"./mixins/TemporalLayer.js";import{getEffectiveElevationSource as m,orientedImageryTypeMap as l,timeIntervalUnitTypeMap as d,verticalMeasurementTypeMap as y,padAccuracyArray as u,isOrientationAccuracy as c}from"./orientedImagery/core/utils.js";import h from"../tables/AttributeTableTemplate.js";import g from"../time/TimeExtent.js";const f=new Set(["demPathPrefix","demPathSuffix","depthImagePathPrefix","depthImagePathSuffix","elevationSource","horizontalMeasurementUnit","imageGeometryField","imageReferenceField","referenceIDField","sequenceOrderField","verticalMeasurementUnit","videoPathPrefix","videoPathSuffix","timeAnimation","visibilityTimeExtent"]),v=(e,t)=>!f.has(t)&&e,j=(e,t,i)=>{const r=`orientedImageryProperties.${e}`;return{name:r,write:t?{ignoreOrigin:!0,target:r,writer:t}:{ignoreOrigin:!0},read:i?{ignoreOrigin:!0,source:r,reader:i}:{ignoreOrigin:!0}}};function P(e){return e.json?(e.json.origins=e.json.origins??{},e.json.origins["web-scene"]={write:!1,read:!1},e):e}function S(e,t,i,r){const{name:o,write:a,read:n}=j(e,t,i),s={name:o,write:a,read:n,origins:{service:{name:`orientedImageryInfo.${o}`,write:t,read:i},"web-scene":{name:o,write:v(a,e),read:v(n,e)},"web-map":{name:o,write:a,read:n}}};return r&&s.origins?(s.type=r,s.origins["web-map"].type=r,s.origins["web-scene"].type=r,s):s}let x=class extends s{constructor(e){super(e),this.attributeTableTemplate=null,this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.graphicOrigin=new n(this),this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imageGeometryField="ImageGeometry",this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageReferenceField="OIObjectID",this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.referenceIDField="OBJECTID",this.sequenceOrderField="SequenceOrder",this.supportedSourceTypes=new Set(["Oriented Imagery Layer"]),this.type="oriented-imagery",this.timeIntervalUnit="days",this.useViewTime=!0,this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.videoPathPrefix=null,this.videoPathSuffix=null,this.virtualCacheDirectory=null,this.visibilityTimeExtent=null}get effectiveElevationSource(){const{elevationSource:e,demPathPrefix:t,demPathSuffix:i}=this;return m(e,t,i)}set portalItem(e){super.portalItem=e}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}findFirstValidLayerId(e){return e.layers?.find(e=>this.supportedSourceTypes.has(e.type))?.id}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new t("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};e([o({type:h,json:{write:!1,read:!1}})],x.prototype,"attributeTableTemplate",void 0),e([o({type:Number,json:S("cameraHeading")})],x.prototype,"cameraHeading",void 0),e([o({type:Number,json:S("cameraHeight")})],x.prototype,"cameraHeight",void 0),e([o({type:Number,json:S("cameraPitch")})],x.prototype,"cameraPitch",void 0),e([o({type:Number,json:S("cameraRoll")})],x.prototype,"cameraRoll",void 0),e([o({type:Number,json:S("coveragePercent")})],x.prototype,"coveragePercent",void 0),e([o({type:String,json:S("demPathPrefix")})],x.prototype,"demPathPrefix",void 0),e([o({type:String,json:S("demPathSuffix")})],x.prototype,"demPathSuffix",void 0),e([o({type:String,json:S("depthImagePathPrefix")})],x.prototype,"depthImagePathPrefix",void 0),e([o({type:String,json:S("depthImagePathSuffix")})],x.prototype,"depthImagePathSuffix",void 0),e([o({type:Object,json:S("elevationSource")})],x.prototype,"elevationSource",void 0),e([o({readOnly:!0})],x.prototype,"effectiveElevationSource",null),e([o({type:Number,json:S("farDistance")})],x.prototype,"farDistance",void 0),e([o()],x.prototype,"geometryType",void 0),e([o({readOnly:!0,clonable:!1})],x.prototype,"graphicOrigin",void 0),e([o({type:Number,json:S("horizontalFieldOfView")})],x.prototype,"horizontalFieldOfView",void 0),e([o({type:String,json:S("horizontalMeasurementUnit")})],x.prototype,"horizontalMeasurementUnit",void 0),e([o({type:String,json:{...S("imageGeometryField"),default:"ImageGeometry"}})],x.prototype,"imageGeometryField",void 0),e([o({type:String,json:S("imagePathPrefix")})],x.prototype,"imagePathPrefix",void 0),e([o({type:String,json:S("imagePathSuffix")})],x.prototype,"imagePathSuffix",void 0),e([o({type:String,json:{...S("imageReferenceField"),default:"OIObjectID"}})],x.prototype,"imageReferenceField",void 0),e([o({type:Number,json:S("imageRotation")})],x.prototype,"imageRotation",void 0),e([o({type:Number,json:S("maximumDistance")})],x.prototype,"maximumDistance",void 0),e([o({type:Number,json:S("nearDistance")})],x.prototype,"nearDistance",void 0),e([o({type:["OrientedImageryLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],x.prototype,"operationalLayerType",void 0),e([o({json:{...S("orientationAccuracy",(e,t,i)=>{r(i,e.join(";"),t)},e=>{const t=e?.split(";")?.map(Number);return c(t)?u(t):[0,0,0,0,0,0,0,0]},String)}})],x.prototype,"orientationAccuracy",void 0),e([o({json:{...S("orientedImageryType",l.write,l.read,l.jsonValues.slice(1))}})],x.prototype,"orientedImageryType",void 0),e([o({type:String,json:{...S("referenceIDField"),default:"OBJECTID"}})],x.prototype,"referenceIDField",void 0),e([o({type:String,json:{...S("sequenceOrderField"),default:"SequenceOrder"}})],x.prototype,"sequenceOrderField",void 0),e([o({json:{read:!1},value:"oriented-imagery",readOnly:!0})],x.prototype,"type",void 0),e([o({type:d.apiValues,json:{...S("timeIntervalUnit",d.write,d.read,d.jsonValues)}})],x.prototype,"timeIntervalUnit",void 0),e([o(P(i(p)))],x.prototype,"useViewTime",void 0),e([o({type:Number,json:S("verticalFieldOfView")})],x.prototype,"verticalFieldOfView",void 0),e([o({type:y.apiValues,json:{...S("verticalMeasurementUnit",y.write,y.read,y.jsonValues)}})],x.prototype,"verticalMeasurementUnit",void 0),e([o({type:String,json:S("videoPathPrefix")})],x.prototype,"videoPathPrefix",void 0),e([o({type:String,json:S("videoPathSuffix")})],x.prototype,"videoPathSuffix",void 0),e([o({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.orientedImageryProperties.virtualCacheDirectory",read:!0}}}})],x.prototype,"virtualCacheDirectory",void 0),e([o({type:g,json:{origins:{"web-scene":{write:!1,read:!1}}}})],x.prototype,"visibilityTimeExtent",void 0),x=e([a("esri.layers.OrientedImageryLayer")],x);const I=x;export{I as default};
5
+ import{__decorate as e}from"tslib";import t from"../core/Error.js";import{clone as i}from"../core/lang.js";import{setDeepValue as r}from"../core/object.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";import n from"../graphic/OrientedImageryGraphicOrigin.js";import s from"./FeatureLayer.js";import{useViewTimeProperty as p}from"./mixins/TemporalLayer.js";import{getEffectiveElevationSource as l,orientedImageryTypeMap as m,timeIntervalUnitTypeMap as d,verticalMeasurementTypeMap as y,padAccuracyArray as u,isOrientationAccuracy as c}from"./orientedImagery/core/utils.js";import g from"../tables/AttributeTableTemplate.js";import h from"../time/TimeExtent.js";const f=new Set(["demPathPrefix","demPathSuffix","depthImagePathPrefix","depthImagePathSuffix","elevationSource","horizontalMeasurementUnit","imageGeometryField","imageReferenceField","referenceIDField","sequenceOrderField","verticalMeasurementUnit","videoPathPrefix","videoPathSuffix","timeAnimation","visibilityTimeExtent"]),v=(e,t)=>!f.has(t)&&e,j=(e,t,i)=>{const r=`orientedImageryProperties.${e}`;return{name:r,write:t?{ignoreOrigin:!0,target:r,writer:t}:{ignoreOrigin:!0},read:i?{ignoreOrigin:!0,source:r,reader:i}:{ignoreOrigin:!0}}};function P(e){return e.json?(e.json.origins=e.json.origins??{},e.json.origins["web-scene"]={write:!1,read:!1},e):e}function S(e,t,i,r){const{name:o,write:a,read:n}=j(e,t,i),s={name:o,write:a,read:n,origins:{service:{name:`orientedImageryInfo.${o}`,write:t,read:i},"web-scene":{name:o,write:v(a,e),read:v(n,e)},"web-map":{name:o,write:a,read:n}}};return r&&s.origins?(s.type=r,s.origins["web-map"].type=r,s.origins["web-scene"].type=r,s):s}let x=class extends s{constructor(e){super(e),this.attributeTableTemplate=null,this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.graphicOrigin=new n(this),this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imageGeometryField="ImageGeometry",this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageReferenceField="OIObjectID",this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.referenceIDField="OBJECTID",this.sequenceOrderField="SequenceOrder",this.supportedSourceTypes=new Set(["Oriented Imagery Layer"]),this.type="oriented-imagery",this.timeIntervalUnit="days",this.useViewTime=!0,this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.videoPathPrefix=null,this.videoPathSuffix=null,this.virtualCacheDirectory=null,this.visibilityTimeExtent=null}get effectiveElevationSource(){const{elevationSource:e,demPathPrefix:t,demPathSuffix:i}=this;return l(e,t,i)}set fieldConfigurations(e){}get fieldConfigurations(){}set portalItem(e){super.portalItem=e}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}findFirstValidLayerId(e){return e.layers?.find(e=>this.supportedSourceTypes.has(e.type))?.id}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new t("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};e([o({type:g,json:{write:!1,read:!1}})],x.prototype,"attributeTableTemplate",void 0),e([o({type:Number,json:S("cameraHeading")})],x.prototype,"cameraHeading",void 0),e([o({type:Number,json:S("cameraHeight")})],x.prototype,"cameraHeight",void 0),e([o({type:Number,json:S("cameraPitch")})],x.prototype,"cameraPitch",void 0),e([o({type:Number,json:S("cameraRoll")})],x.prototype,"cameraRoll",void 0),e([o({type:Number,json:S("coveragePercent")})],x.prototype,"coveragePercent",void 0),e([o({type:String,json:S("demPathPrefix")})],x.prototype,"demPathPrefix",void 0),e([o({type:String,json:S("demPathSuffix")})],x.prototype,"demPathSuffix",void 0),e([o({type:String,json:S("depthImagePathPrefix")})],x.prototype,"depthImagePathPrefix",void 0),e([o({type:String,json:S("depthImagePathSuffix")})],x.prototype,"depthImagePathSuffix",void 0),e([o({type:Object,json:S("elevationSource")})],x.prototype,"elevationSource",void 0),e([o({readOnly:!0})],x.prototype,"effectiveElevationSource",null),e([o({type:Number,json:S("farDistance")})],x.prototype,"farDistance",void 0),e([o({json:{write:!1}})],x.prototype,"fieldConfigurations",null),e([o()],x.prototype,"geometryType",void 0),e([o({readOnly:!0,clonable:!1})],x.prototype,"graphicOrigin",void 0),e([o({type:Number,json:S("horizontalFieldOfView")})],x.prototype,"horizontalFieldOfView",void 0),e([o({type:String,json:S("horizontalMeasurementUnit")})],x.prototype,"horizontalMeasurementUnit",void 0),e([o({type:String,json:{...S("imageGeometryField"),default:"ImageGeometry"}})],x.prototype,"imageGeometryField",void 0),e([o({type:String,json:S("imagePathPrefix")})],x.prototype,"imagePathPrefix",void 0),e([o({type:String,json:S("imagePathSuffix")})],x.prototype,"imagePathSuffix",void 0),e([o({type:String,json:{...S("imageReferenceField"),default:"OIObjectID"}})],x.prototype,"imageReferenceField",void 0),e([o({type:Number,json:S("imageRotation")})],x.prototype,"imageRotation",void 0),e([o({type:Number,json:S("maximumDistance")})],x.prototype,"maximumDistance",void 0),e([o({type:Number,json:S("nearDistance")})],x.prototype,"nearDistance",void 0),e([o({type:["OrientedImageryLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],x.prototype,"operationalLayerType",void 0),e([o({json:{...S("orientationAccuracy",(e,t,i)=>{r(i,e.join(";"),t)},e=>{const t=e?.split(";")?.map(Number);return c(t)?u(t):[0,0,0,0,0,0,0,0]},String)}})],x.prototype,"orientationAccuracy",void 0),e([o({json:{...S("orientedImageryType",m.write,m.read,m.jsonValues.slice(1))}})],x.prototype,"orientedImageryType",void 0),e([o({type:String,json:{...S("referenceIDField"),default:"OBJECTID"}})],x.prototype,"referenceIDField",void 0),e([o({type:String,json:{...S("sequenceOrderField"),default:"SequenceOrder"}})],x.prototype,"sequenceOrderField",void 0),e([o({json:{read:!1},value:"oriented-imagery",readOnly:!0})],x.prototype,"type",void 0),e([o({type:d.apiValues,json:{...S("timeIntervalUnit",d.write,d.read,d.jsonValues)}})],x.prototype,"timeIntervalUnit",void 0),e([o(P(i(p)))],x.prototype,"useViewTime",void 0),e([o({type:Number,json:S("verticalFieldOfView")})],x.prototype,"verticalFieldOfView",void 0),e([o({type:y.apiValues,json:{...S("verticalMeasurementUnit",y.write,y.read,y.jsonValues)}})],x.prototype,"verticalMeasurementUnit",void 0),e([o({type:String,json:S("videoPathPrefix")})],x.prototype,"videoPathPrefix",void 0),e([o({type:String,json:S("videoPathSuffix")})],x.prototype,"videoPathSuffix",void 0),e([o({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.orientedImageryProperties.virtualCacheDirectory",read:!0}}}})],x.prototype,"virtualCacheDirectory",void 0),e([o({type:h,json:{origins:{"web-scene":{write:!1,read:!1}}}})],x.prototype,"visibilityTimeExtent",void 0),x=e([a("esri.layers.OrientedImageryLayer")],x);const I=x;export{I as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"../../core/has.js";import{makeHandle as e}from"../../core/handleUtils.js";import t from"../../core/Logger.js";import{getMetersPerUnitForSR as n}from"../../core/unitUtils.js";import s from"../../geometry/Point.js";import i from"../../geometry/SpatialReference.js";import{toExtent as o,create as a,containsXY as r}from"../../geometry/support/aaBoundingRect.js";import{project as l}from"../../geometry/support/webMercatorUtils.js";const m=()=>t.getLogger("esri.layers.support.ElevationSampler");class u{queryElevation(e){return h(e.clone(),this)}on(){return e()}}class c extends u{get spatialReference(){return this.extent.spatialReference}constructor(e,t,s){super(),this.tile=e,this.noDataValue=s;const i=e.tile.extent;this.extent=o(i,t.spatialReference),this.extent.zmin=e.zmin,this.extent.zmax=e.zmax,this._aaExtent=i;const a=n(t.spatialReference),r=t.lodAt(e.tile.level).resolution*a;this.demResolution={min:r,max:r}}contains(e){const t=f(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return r(this._aaExtent,e,t)}elevationAt(e,t){if(!this.containsAt(e,t)){const n=this.extent,s=`${n.xmin}, ${n.ymin}, ${n.xmax}, ${n.ymax}`;return m().warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler extent (${s})`),this.noDataValue}return this.tile.sample(e,t)??this.noDataValue}}class p extends u{get spatialReference(){return this.extent.spatialReference}constructor(e,t,n){let s;super(),"number"==typeof t?(this.noDataValue=t,this.samplers=e):(s=t,this.noDataValue=n,this.samplers=e.map(e=>new c(e,s,this.noDataValue)));const r=this.samplers[0];if(r){this.extent=r.extent.clone();const{min:e,max:t}=r.demResolution;this.demResolution={min:e,max:t};for(let n=1;n<this.samplers.length;n++){const e=this.samplers[n];this.extent.union(e.extent),this.demResolution.min=Math.min(this.demResolution.min,e.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,e.demResolution.max)}}else this.extent=o(a(),s?.spatialReference??i.WGS84),this.demResolution={min:0,max:0}}elevationAt(e,t){let n;for(const s of this.samplers)if(s.containsAt(e,t)&&(n=s.elevationAt(e,t),n!==s.noDataValue))return n;return null!=n?n:(m().warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue)}}function h(e,t){const n=f(e,t.spatialReference);if(!n)return null;switch(e.type){case"point":return x(e,n,t);case"polyline":return R(e,n,t);case"multipoint":return d(e,n,t);default:return null}}function f(e,t){if(null==e)return null;const n=e.spatialReference;if(n.equals(t))return e;const s=l(e,t);return s||m().error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),s}function x(e,t,n){return e.hasZ=!0,e.z=n.elevationAt(t.x,t.y),e}function R(e,t,n){y.spatialReference=t.spatialReference;const s=e.hasM&&!e.hasZ;for(let i=0;i<e.paths.length;i++){const o=e.paths[i],a=t.paths[i];for(let e=0;e<o.length;e++){const t=o[e],i=a[e];y.x=i[0],y.y=i[1],s&&(t[3]=t[2]),t[2]=n.elevationAt(y.x,y.y)}}return e.hasZ=!0,e}function d(e,t,n){y.spatialReference=t.spatialReference;const s=e.hasM&&!e.hasZ;for(let i=0;i<e.points.length;i++){const o=e.points[i],a=t.points[i];y.x=a[0],y.y=a[1],s&&(o[3]=o[2]),o[2]=n.elevationAt(y.x,y.y)}return e.hasZ=!0,e}const y=new s;export{u as ElevationSamplerBase,p as MultiTileElevationSampler,c as TileElevationSampler,h as updateGeometryElevation};
5
+ import"../../core/has.js";import{Evented as e}from"../../core/Evented.js";import t from"../../core/Logger.js";import{getMetersPerUnitForSR as n}from"../../core/unitUtils.js";import s from"../../geometry/Point.js";import i from"../../geometry/SpatialReference.js";import{toExtent as o,create as a,containsXY as r}from"../../geometry/support/aaBoundingRect.js";import{project as l}from"../../geometry/support/webMercatorUtils.js";const m=()=>t.getLogger("esri.layers.support.ElevationSampler");class u extends e{queryElevation(e){return h(e.clone(),this)}}class c extends u{get spatialReference(){return this.extent.spatialReference}constructor(e,t,s){super(),this.tile=e,this.noDataValue=s;const i=e.tile.extent;this.extent=o(i,t.spatialReference),this.extent.zmin=e.zmin,this.extent.zmax=e.zmax,this._aaExtent=i;const a=n(t.spatialReference),r=t.lodAt(e.tile.level).resolution*a;this.demResolution={min:r,max:r}}contains(e){const t=f(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return r(this._aaExtent,e,t)}elevationAt(e,t){if(!this.containsAt(e,t)){const n=this.extent,s=`${n.xmin}, ${n.ymin}, ${n.xmax}, ${n.ymax}`;return m().warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler extent (${s})`),this.noDataValue}return this.tile.sample(e,t)??this.noDataValue}}class p extends u{get spatialReference(){return this.extent.spatialReference}constructor(e,t,n){let s;super(),"number"==typeof t?(this.noDataValue=t,this.samplers=e):(s=t,this.noDataValue=n,this.samplers=e.map(e=>new c(e,s,this.noDataValue)));const r=this.samplers[0];if(r){this.extent=r.extent.clone();const{min:e,max:t}=r.demResolution;this.demResolution={min:e,max:t};for(let n=1;n<this.samplers.length;n++){const e=this.samplers[n];this.extent.union(e.extent),this.demResolution.min=Math.min(this.demResolution.min,e.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,e.demResolution.max)}}else this.extent=o(a(),s?.spatialReference??i.WGS84),this.demResolution={min:0,max:0}}elevationAt(e,t){let n;for(const s of this.samplers)if(s.containsAt(e,t)&&(n=s.elevationAt(e,t),n!==s.noDataValue))return n;return null!=n?n:(m().warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue)}}function h(e,t){const n=f(e,t.spatialReference);if(!n)return null;switch(e.type){case"point":return x(e,n,t);case"polyline":return R(e,n,t);case"multipoint":return d(e,n,t);default:return null}}function f(e,t){if(null==e)return null;const n=e.spatialReference;if(n.equals(t))return e;const s=l(e,t);return s||m().error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),s}function x(e,t,n){return e.hasZ=!0,e.z=n.elevationAt(t.x,t.y),e}function R(e,t,n){y.spatialReference=t.spatialReference;const s=e.hasM&&!e.hasZ;for(let i=0;i<e.paths.length;i++){const o=e.paths[i],a=t.paths[i];for(let e=0;e<o.length;e++){const t=o[e],i=a[e];y.x=i[0],y.y=i[1],s&&(t[3]=t[2]),t[2]=n.elevationAt(y.x,y.y)}}return e.hasZ=!0,e}function d(e,t,n){y.spatialReference=t.spatialReference;const s=e.hasM&&!e.hasZ;for(let i=0;i<e.points.length;i++){const o=e.points[i],a=t.points[i];y.x=a[0],y.y=a[1],s&&(o[3]=o[2]),o[2]=n.elevationAt(y.x,y.y)}return e.hasZ=!0,e}const y=new s;export{u as ElevationSamplerBase,p as MultiTileElevationSampler,c as TileElevationSampler,h as updateGeometryElevation};
@@ -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 o}from"tslib";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import i from"./DateTimeFieldFormat.js";import p from"./FieldFormat.js";import a from"./NumberFieldFormat.js";const m={base:p,key:"type",errorContext:"field-configuration-format",typeMap:{"date-time":i,number:a}};let l=class extends(r(t)){constructor(o){super(o),this.alias=null,this.name=void 0,this.format=null}};o([e({json:{write:!0}})],l.prototype,"alias",void 0),o([e({nonNullable:!0,json:{write:{isRequired:!0}}})],l.prototype,"name",void 0),o([e({types:m,json:{write:!0}})],l.prototype,"format",void 0),l=o([s("esri.layers.support.FieldConfiguration")],l);export{l as default};
5
+ import{__decorate as o}from"tslib";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import i from"./DateTimeFieldFormat.js";import p from"./FieldFormat.js";import a from"./NumberFieldFormat.js";const m={base:p,key:"type",errorContext:"field-configuration-format",typeMap:{"date-time":i,number:a}};let l=class extends(r(t)){constructor(o){super(o),this.alias=null,this.name=void 0,this.format=null}};o([e({type:String,json:{write:!0}})],l.prototype,"alias",void 0),o([e({type:String,nonNullable:!0,json:{write:{isRequired:!0}}})],l.prototype,"name",void 0),o([e({types:m,json:{write:!0}})],l.prototype,"format",void 0),l=o([s("esri.layers.support.FieldConfiguration")],l);export{l as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../request.js";import i from"../../../core/Error.js";import{JSONSupport as o}from"../../../core/JSONSupport.js";import r from"../../../core/Logger.js";import{onAbort as n}from"../../../core/promiseUtils.js";import{QueueProcessor as s}from"../../../core/QueueProcessor.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import{ensureClass as a}from"../../../core/accessorSupport/ensureType.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import f from"../../../geometry/Extent.js";import m from"../../../geometry/Point.js";import u from"../../../geometry/SpatialReference.js";import{sanitizeUrl as h}from"../arcgisLayerUrl.js";import{url as p}from"../commonProperties.js";import d from"../DimensionalDefinition.js";import x from"../LOD.js";import y from"../RasterStorageInfo.js";import g from"../TileInfo.js";import{isFunctionRaster as I}from"./datasetUtils.js";import{isMultiSliceOrRangeDefinition as R,getSliceIndex as w,createSlices as S,getSliceIds as k}from"./multidimensionalUtils.js";import{getRasterId as b,getBlock as v,putBlock as T,deleteBlock as P,decreaseRefCount as B}from"./RawBlockCache.js";import{convertNoDataToMask as _}from"../rasterFormats/pixelRangeUtils.js";import{decode as M}from"../rasterFormats/RasterCodec.js";import{mosaic as C,approximateTransform as W,getLocalArithmeticNorthRotations as j}from"../rasterFunctions/pixelUtils.js";import{getWorldWidth as z,load as H,projectPoint as L,snapPyramid as E,shiftExtent as D,getWorldWrapCount as O,projectExtent as F,getProjectionOffsetGrid as A,getRasterDatasetAlignmentInfo as G,projectResolution as q}from"../rasterFunctions/rasterProjectionHelper.js";import{convertToLocalDirections as N,uvComponentToVector as J}from"../rasterFunctions/vectorFieldUtils.js";const V=8,U=256;let Q=0,$=class extends o{constructor(){super(...arguments),this._tileFetchQueue=new s({concurrency:32,process:(e,t)=>this._fetchRawTile(e.pyramidLevel,e.row,e.col,{...e.options,signal:t})}),this.datasetName=null,this.datasetFormat=null,this.hasUniqueSourceStorageInfo=!0,this.rasterInfo=null,this.ioConfig={sampling:"closest"}}normalizeCtorArgs(e){return e?.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:g.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=z(e.spatialReference);return null!=t&&e.extent.width>=t/2}get _hasNoneOrGCSShiftTransform(){const{transform:e}=this.rasterInfo;return null==e||"gcs-shift"===e.type}set rasterJobHandler(e){this._set("rasterJobHandler",e),I(this)&&this.primaryRasters?.rasters?.forEach(t=>t.rasterJobHandler=e)}get rasterId(){return this.url||"rasterId-"+Q++}set url(e){this._set("url",h(e,r.getLogger(this)))}async open(e){return this._openPromise??=H().then(()=>this._open(e)),this._openPromise}async fetchTile(e,t,i,o={}){const r=o.tileInfo||this.rasterInfo.storageInfo.tileInfo,n=this.getTileExtentFromTileInfo(e,t,i,r);return o={noClip:!0,...o},this.fetchPixels(n,r.size[0],r.size[1],o)}async identify(e,t={}){e=a(m,e).clone().normalize();const{multidimensionalDefinition:i,timeExtent:o}=t,{rasterInfo:r}=this,{hasMultidimensionalTranspose:n,multidimensionalInfo:s}=r;let{transposedVariableName:l}=t;const c=null!=s&&n&&(null!=o||R(i));if(c&&!l){l=null!=i&&i.length>0?i[0].variableName??void 0:s.variables[0].name,t={...t,transposedVariableName:l}}t=this._getRequestOptionsWithSliceId(t);const{spatialReference:u,extent:h}=r,{datumTransformation:p}=t;let d=L(e,u,p);if(!h.intersects(d))return{location:d,value:null};if(null!=r.transform){const e=r.transform.inverseTransform(d);if(!r.nativeExtent.intersects(e))return{location:e,value:null};d=e}let x=0;const y=null!=l&&null!=s&&r.hasMultidimensionalTranspose;if(I(this)){const e=this.primaryRasters.rasters[0];if(y)return e.identify(d,t);const{pixelSize:o}=r,n=3,s=o.x*n/2,l=o.y*n/2,a=new f({xmin:d.x-s,xmax:d.x+s,ymin:d.y-l,ymax:d.y+l,spatialReference:u}),c={interpolation:"nearest",multidimensionalDefinition:i,sliceId:t.sliceId,bandIds:t.bandIds},{pixelBlock:m}=await e.fetchPixels(a,n,n,c),{pixelBlock:h}=await this.fetchPixels(a,n,n,c);if(null==m)return{location:d,value:null};const p=Math.floor(n*n*.5),x=!m.mask||m.mask[p]?m.pixels.map(e=>e[p]):null;let g;return null!=h&&(g=!h.mask||h.mask[p]?h.pixels.map(e=>e[p]):void 0),{location:d,value:x,processedValue:g,pyramidLevel:0}}if(!y)if(t.srcResolution){x=E(t.srcResolution,r,this.ioConfig.sampling).pyramidLevel}else if(x=await this.computeBestPyramidLevelForLocation(e,t),null==x)return{location:d,value:null};const g=this.identifyPixelLocation(d,x,null,y);if(null===g)return{location:d,value:null};const{row:w,col:S,rowOffset:k,colOffset:b,blockWidth:v}=g,T=await this._tileFetchQueue.push({pyramidLevel:x,row:w,col:S,options:t},{signal:t.signal});if(!T?.pixels?.length)return{location:d,value:null};const P=k*v+b;return this._processIdentifyResult(T,{srcLocation:d,position:P,pyramidLevel:x,useTransposedTile:!!y,requestSomeSlices:c,identifyOptions:t})}async fetchPixels(e,t,i,o={}){e=D(e),o=this._getRequestOptionsWithSliceId(o);const{_hasNoneOrGCSShiftTransform:r}=this;if(o.requestRawData&&r)return this._fetchPixels(e,t,i,o);const n=z(e.spatialReference),s=O(e);if(null==n||0===s||1===s&&this._isGlobalWrappableSource&&r)return this._fetchPixels(e,t,i,o);if(s>=3)return{extent:e,pixelBlock:null};const l=[],{xmin:a,xmax:c}=e,m=Math.round(n/(c-a)*t),u=m-Math.round((n/2-a)/(c-a)*t);let h=0;const p=[];for(let g=0;g<=s;g++){const r=new f({xmin:0===g?a:-n/2,xmax:g===s?c-n*g:n/2,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),d=0===g?m-u:g===s?t-h:m;h+=d,p.push(d);const x=o.disableWrapAround&&g>0?null:this._fetchPixels(r,d,i,o);l.push(x)}const d=(await Promise.all(l)).map(e=>e?.pixelBlock);let x=null;const y={width:t,height:i};if(this.rasterJobHandler){x=(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:d,srcMosaicSize:y,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:p},o)).pixelBlock}else x=C(d,y,{blockWidths:p});return{extent:e,srcExtent:F(e,this.rasterInfo.spatialReference,o.datumTransformation),pixelBlock:x}}async fetchRawPixels(e,t,i,o={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};const r=await this._fetchRawTiles(e,t,i,o),{nativeExtent:n,nativePixelSize:s,storageInfo:l}=this.rasterInfo,a=2**e,c=s.x*a,m=s.y*a,u=new f({xmin:n.xmin+c*t.x,xmax:n.xmin+c*(t.x+i.width-1),ymin:n.ymax-m*(t.y+i.height-1),ymax:n.ymax-m*t.y,spatialReference:n.spatialReference});if(!r)return{extent:u,srcExtent:u,pixelBlock:null};const{pixelBlocks:h,mosaicSize:p}=r;if(1===h.length&&null!=h[0]&&h[0].width===i.width&&h[0].height===i.height)return{extent:u,srcExtent:u,pixelBlock:r.pixelBlocks[0]};const d=e>0?l.pyramidBlockWidth:l.blockWidth,x=e>0?l.pyramidBlockHeight:l.blockHeight,y={x:t.x%d,y:t.y%x};let g;if(this.rasterJobHandler){g=(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:h,srcMosaicSize:p,destDimension:i,clipOffset:y,clipSize:i,coefs:null,sampleSpacing:null,interpolation:o.interpolation,alignmentInfo:null,blockWidths:null},o)).pixelBlock}else g=C(h,p,{clipOffset:y,clipSize:i});return{extent:u,srcExtent:u,pixelBlock:g}}fetchRawTile(e,t,o,r){throw new i("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return F(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?M(e,t):this.rasterJobHandler.decode({data:e,options:t})}async request(e,i,o=0){const{customFetchParameters:r}=this.ioConfig,{range:n,query:s,headers:l}=i;o=o??i.retryCount??this.ioConfig.retryCount;const a=n?{Range:`bytes=${n.from}-${n.to}`}:null;try{return await t(e,{...i,query:{...s,...r},headers:{...l,...a}})}catch(c){if(o>0)return o--,this.request(e,i,o);throw c}}getSliceIndex(e){const{multidimensionalInfo:t}=this.rasterInfo;return null==t||null==e||0===e.length?null:w(e,t)}getTileExtentFromTileInfo(e,t,i,o){const r=o.lodAt(e);return this.getTileExtent({x:r.resolution,y:r.resolution},t,i,o.origin,o.spatialReference,o.size)}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:i,pixelSize:o}=this.rasterInfo,{pyramidResolutions:r}=e;if(!e.tileInfo){const n=[],s=e.maximumPyramidLevel||0;let l=(o.x+o.y)/2,a=1/.0254*96*l;for(let e=0;e<=s&&(n.unshift(new x({level:s-e,resolution:l,scale:a})),e!==s);e++)if(r){const t=(r[e].x+r[e].y)/2;a*=t/l,l=t}else l*=2,a*=2;const c=new m({x:i.xmin,y:i.ymax,spatialReference:t});e.tileInfo=new g({origin:c,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:n}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,i=512,o){const{width:r,height:n,nativeExtent:s,pixelSize:l,spatialReference:a}=e,c=new m({x:s.xmin,y:s.ymax,spatialReference:a});null==o&&(o=Math.max(0,Math.round(Math.log(Math.max(r,n))/Math.LN2-8)));const f=this.computeBlockBoundary(s,512,512,{x:s.xmin,y:s.ymax},[l],o);e.storageInfo=new y({blockWidth:t,blockHeight:i,pyramidBlockWidth:t,pyramidBlockHeight:i,origin:c,firstPyramidLevel:1,maximumPyramidLevel:o,blockBoundary:f})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,i,o,r,n=0,s=2){if(1===r.length&&n>0){r=[...r];let{x:e,y:t}=r[0];for(let i=0;i<n;i++)e*=s,t*=s,r.push({x:e,y:t})}const l=[],{x:a,y:c}=o;for(let f=0;f<r.length;f++){const{x:o,y:n}=r[f];l.push({minCol:Math.floor((e.xmin-a+.1*o)/t/o),maxCol:Math.floor((e.xmax-a-.1*o)/t/o),minRow:Math.floor((c-e.ymax+.1*n)/i/n),maxRow:Math.floor((c-e.ymin-.1*n)/i/n)})}return l}getPyramidPixelSize(e){const{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:i,pyramidScalingFactor:o}=this.rasterInfo.storageInfo;if(0===e)return t;if(null!=i&&i.length)return i[e-1];const r=o**e;return{x:t.x*r,y:t.y*r}}identifyPixelLocation(e,t,i,o){const{spatialReference:r,nativeExtent:n,storageInfo:s}=this.rasterInfo,{maximumPyramidLevel:l,origin:a,transposeInfo:c}=s,f=o&&null!=c?c.tileSize[0]:s.blockWidth,m=o&&null!=c?c.tileSize[1]:s.blockHeight,u=L(e,r,i);if(!n.intersects(u))return null;if(t<0||t>l)return null;const h=this.getPyramidPixelSize(t),{x:p,y:d}=h,x=(a.y-u.y)/d/m,y=(u.x-a.x)/p/f,g=Math.min(m-1,Math.floor((x-Math.floor(x))*m)),I=Math.min(f-1,Math.floor((y-Math.floor(y))*f));return{pyramidLevel:t,row:Math.floor(x),col:Math.floor(y),rowOffset:g,colOffset:I,blockWidth:f,srcLocation:u}}getTileExtent(e,t,i,o,r,n){const[s,l]=n,a=o.x+i*s*e.x,c=a+s*e.x,m=o.y-t*l*e.y,u=m-l*e.y;return new f({xmin:a,xmax:c,ymin:u,ymax:m,spatialReference:r})}getBlockWidthHeight(e){return{blockWidth:e>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:e>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(e,t,i){const o=this.rasterInfo.storageInfo.blockBoundary[e];return!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i}updateImageSpaceRasterInfo(e){const{pixelSize:t}=e,{width:i,height:o}=e,r=u.WebMercator;e.spatialReference=r,e.extent=e.nativeExtent=new f({xmin:-.5,ymax:.5,xmax:i-.5,ymin:.5-o,spatialReference:r}),e.isPseudoSpatialReference=!0,e.transform=null,e.pixelSize=new m({x:1,y:1,spatialReference:r});const{extent:n,storageInfo:s}=e;if(s){s.origin=new m({x:n.xmin,y:n.ymax,spatialReference:r});const{pyramidResolutions:i,tileInfo:o}=s;if(i&&i.forEach(e=>{e.x/=t.x,e.y/=t.y}),o){o.origin=s.origin;const t=(e.nativePixelSize.x+e.nativePixelSize.y)/2;o.lods.forEach((e,i)=>{e.resolution=t*2**i,e.scale=96*e.resolution/.0254})}}}async _fetchPixels(e,t,i,o={}){let r=O(e);if(r>=2)return{extent:e,pixelBlock:null};const n=this._getSourceDataInfo(e,t,i,o),{pyramidLevel:s,srcResolution:l,srcExtent:a,srcWidth:c,srcHeight:f,ul:u}=n;if(0===c||0===f)return{extent:e,srcExtent:a,pixelBlock:null};const{rasterInfo:h}=this,p=h.transform,d="gcs-shift"===p?.type,x=null!=z(e.spatialReference);!d&&x||(r=O(n.srcExtent,d));const y=await this._fetchRawTiles(s,u,{width:c,height:f,wrapCount:r},o);if(!y)return{extent:e,srcExtent:a,pixelBlock:null};const g=h.storageInfo,I=s>0?g.pyramidBlockWidth:g.blockWidth,R=s>0?g.pyramidBlockHeight:g.blockHeight;let{x:w,y:S}=h.pixelSize;if(s>0){const{pyramidResolutions:e,pyramidScalingFactor:t}=g;if(null!=e&&e[s-1])({x:w,y:S}=e[s-1]);else{const e=t**s;w*=e,S*=e}}const k=h.spatialReference,b=new m({x:w,y:S,spatialReference:k}),v=I===c&&R===f&&u.x%I===0&&u.y%R===0,T=new m({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),P=!e.spatialReference.equals(k),B=k.isGeographic?1e-9:1e-4,{datumTransformation:_}=o;if(!P&&v&&1===y.pixelBlocks.length&&I===t&&R===i&&X(l,T,B))return{extent:e,srcExtent:a,srcTilePixelSize:b,pixelBlock:y.pixelBlocks[0]};const M=x&&null!=z(a.spatialReference)&&this._hasNoneOrGCSShiftTransform,L=o.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");L&&!this.rasterJobHandler&&await H();const E=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:T.toJSON(),datumTransformation:_,rasterTransform:p,hasWrapAround:r>0||M,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:L},o):A({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:T,datumTransformation:_,rasterTransform:p,hasWrapAround:r>0||M,isAdaptive:!1,includeGCSGrid:L});let D;const F=!o.requestRawData,G={rows:E.spacing[0],cols:E.spacing[1]},q=this._hasNoneOrGCSShiftTransform?this._getRasterTileAlignmentInfo(s,y.extent.xmin):void 0,{pixelBlocks:J,mosaicSize:V,isPartiallyFilled:U}=y;let Q=null;if(this.rasterJobHandler){const e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:J,srcMosaicSize:V,destDimension:F?{width:t,height:i}:null,coefs:F?E.coefficients:null,sampleSpacing:F?G:null,projectDirections:L,gcsGrid:L?E.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:o.interpolation,alignmentInfo:q,blockWidths:null},o);({pixelBlock:D,localNorthDirections:Q}=e)}else{const e=C(J,V,{alignmentInfo:q});D=F?W(e,{width:t,height:i},E.coefficients,G,o.interpolation):e,L&&E.gcsGrid&&(Q=j({width:t,height:i},E.gcsGrid),D=N(D,this.rasterInfo.dataType,Q))}return o.requestRawData||L?{extent:e,srcExtent:a,srcTilePixelSize:b,pixelBlock:D,transformGrid:E,localNorthDirections:Q,isPartiallyFilled:U}:{extent:e,srcExtent:a,srcTilePixelSize:b,pixelBlock:D}}async _fetchRawTiles(e,t,i,o){const{origin:r,blockBoundary:n}=this.rasterInfo.storageInfo,{blockWidth:s,blockHeight:l}=this.getBlockWidthHeight(e);let{x:a,y:c}=t,{width:m,height:u,wrapCount:h}=i;const p=this._getRasterTileAlignmentInfo(e,0);o.buffer&&(a-=o.buffer.cols,c-=o.buffer.rows,m+=2*o.buffer.cols,u+=2*o.buffer.rows);let d=0,x=0,y=0;if(h&&null!=p){({worldColumnCountFromOrigin:x,originColumnOffset:y,rightPadding:d}=p);x*p.blockWidth-d>=a+m&&(d=0)}const g=Math.floor(a/s),I=Math.floor(c/l),R=Math.floor((a+m+d-1)/s),w=Math.floor((c+u+d-1)/l),S=n[e];if(!S)return null;const{minRow:k,minCol:b,maxCol:v,maxRow:T}=S;if(0===h&&(w<k||R<b||I>T||g>v))return null;const P=new Array;let B=!1;const _=null==this.ioConfig.allowPartialFill?o.allowPartialFill:this.ioConfig.allowPartialFill;for(let f=I;f<=w;f++)for(let t=g;t<=R;t++){let i=t;if(!o.disableWrapAround&&h&&null!=p&&x<=t&&(i=t-x-y),f>=k&&i>=b&&T>=f&&v>=i){const t=this._tileFetchQueue.push({pyramidLevel:e,row:f,col:i,options:o},{signal:o.signal});_?P.push(new Promise(e=>{t.then(t=>e(t)).catch(()=>{B=!0,e(null)})})):P.push(t)}else P.push(Promise.resolve(null))}if(0===P.length)return null;const M=await Promise.all(P),C={height:(w-I+1)*l,width:(R-g+1)*s},{spatialReference:W}=this.rasterInfo,j=this.getPyramidPixelSize(e),{x:z,y:H}=j;return{extent:new f({xmin:r.x+g*s*z,xmax:r.x+(R+1)*s*z,ymin:r.y-(w+1)*l*H,ymax:r.y-I*l*H,spatialReference:W}),pixelBlocks:M,mosaicSize:C,isPartiallyFilled:B}}_fetchRawTile(e,t,i,o){const{storageInfo:r}=this.rasterInfo,s=null!=r.transposeInfo&&!!o.transposedVariableName;if(!s){const o=r.blockBoundary[e];if(!o)return Promise.resolve(null);const{minRow:n,minCol:s,maxCol:l,maxRow:a}=o;if(t<n||i<s||t>a||i>l)return Promise.resolve(null)}const l=s?o.transposeVariableName:o.sliceId,a=this.rasterInfo.storageInfo.isBsqTile?o.bandIds:null,c=b(this.rasterId,l,a),f=`${e}/${t}/${i}`;let m=v(c,o.registryId,f);if(null==m){const r=new AbortController;m=this.fetchRawTile(e,t,i,{...o,signal:r.signal}),T(c,o.registryId,f,m,r),m.catch(()=>P(c,o.registryId,f))}return o.signal&&n(o,()=>{B(c,o.registryId,f)}),m}_computeMagDirValues(e){const{bandCount:t,dataType:i}=this.rasterInfo;if(!(2===t&&"vector-magdir"===i||"vector-uv"===i)||2!==e?.length||!e[0]?.length)return null;const o=e[0].length;if("vector-magdir"===i){const t=e[1].map(e=>(e+360)%360);return[e[0],t]}const[r,n]=e,s=[],l=[];for(let a=0;a<o;a++){const[e,t]=J([r[a],n[a]]);s.push(e),l.push(t)}return[s,l]}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlignmentInfo&&(this._rasterTileAlignmentInfo=G(this.rasterInfo)),null==this._rasterTileAlignmentInfo.pyramidsInfo?null:{startX:t,halfWorldWidth:this._rasterTileAlignmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlignmentInfo.hasGCSSShiftTransform,...this._rasterTileAlignmentInfo.pyramidsInfo[e]}}_getSourceDataInfo(e,t,i,o={}){const r={datumTransformation:o.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0,ul:{x:0,y:0}};o.srcResolution&&(r.srcResolution=o.srcResolution,this._updateSourceDataInfo(e,r));const n=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:s,srcHeight:l,pyramidLevel:a}=r,c=s/t,f=l/i,u=a<n&&c*f>=16,h=a===n&&this._requireTooManySrcTiles(s,l,t,i);if(u||h||(0===s||0===l)){const s=new m({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference});let l=q(s,this.rasterInfo.spatialReference,e,r.datumTransformation);const h=!l||o.srcResolution&&l.x+l.y<o.srcResolution.x+o.srcResolution.y;if(u&&o.srcResolution&&h){const e=Math.round(Math.log(Math.max(c,f))/Math.LN2)-1;if(n-a+3>=e){const t=2**e;l={x:o.srcResolution.x*t,y:o.srcResolution.y*t}}}l&&(r.srcResolution=l,this._updateSourceDataInfo(e,r))}return this._requireTooManySrcTiles(r.srcWidth,r.srcHeight,t,i)&&(r.srcWidth=0,r.srcHeight=0),r}_requireTooManySrcTiles(e,t,i,o){const{tileInfo:r}=this.rasterInfo.storageInfo,n=Math.ceil(e/r.size[0])*Math.ceil(t/r.size[1]),s=e/i,l=t/o,a=Math.max(1,(i+o)/1024);return n>=U*a||s>V||l>V}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;const{rasterInfo:i}=this,o=i.spatialReference,{srcResolution:r,datumTransformation:n}=t,{pyramidLevel:s,pyramidResolution:l,excessiveReading:a}=E(r,i,this.ioConfig.sampling);if(a)return;let c=t.srcExtent||F(e,o,n);if(null==c)return;const f=i.transform;f&&(c=f.inverseTransform(c)),t.srcExtent=c;const{x:m,y:u}=i.storageInfo.origin,h=Math.floor((c.xmin-m)/l.x+.1),p=Math.floor((u-c.ymax)/l.y+.1),d=Math.floor((c.xmax-m)/l.x-.1),x=Math.floor((u-c.ymin)/l.y-.1),y=c.width<.1*l.x?0:d-h+1,g=c.height<.1*l.y?0:x-p+1;t.pyramidLevel=s,t.pyramidResolution=l,t.srcWidth=y,t.srcHeight=g,t.ul={x:h,y:p}}_getRequestOptionsWithSliceId(e){return null!=this.rasterInfo.multidimensionalInfo&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}_processIdentifyResult(e,t){const{srcLocation:i,position:o,pyramidLevel:r,useTransposedTile:n}=t,s=e.pixels[0].length/e.width/e.height;if(!(!e.mask||e.mask[o]))return{location:i,value:null};const{multidimensionalInfo:l}=this.rasterInfo;if(null==l||!n){const t=e.pixels.map(e=>e[o]),n={location:i,value:t,pyramidLevel:r},s=this._computeMagDirValues(t.map(e=>[e]));return s?.length&&(n.magdirValue=s.map(e=>e[0])),n}let a=e.pixels.map(e=>e.slice(o*s,o*s+s)),c=this._computeMagDirValues(a);const{requestSomeSlices:f,identifyOptions:m}=t;let u=S(l,m.transposedVariableName);if(f){const e=k(u,m.multidimensionalDefinition,m.timeExtent);a=a.map(t=>e.map(e=>t[e])),c=c?.map(t=>e.map(e=>t[e])),u=e.map(e=>u[e])}const h=e.noDataValues||this.rasterInfo.noDataValue,p={pixels:a,pixelType:e.pixelType};let x;null!=h&&(_(p,h),x=p.mask);return{location:i,value:null,dataSeries:u.map((e,t)=>{const i={value:0===x?.[t]?null:a.map(e=>e[t]),multidimensionalDefinition:e.multidimensionalDefinition.map(e=>new d({...e,isSlice:!0}))};return c?.length&&(i.magdirValue=[c[0][t],c[1][t]]),i}),pyramidLevel:r}}};function X(e,t,i){return Math.abs(e.x-t.x)<i&&Math.abs(e.y-t.y)<i}e([l()],$.prototype,"_rasterTileAlignmentInfo",void 0),e([l()],$.prototype,"_tileFetchQueue",void 0),e([l({readOnly:!0})],$.prototype,"_isGlobalWrappableSource",null),e([l({readOnly:!0})],$.prototype,"_hasNoneOrGCSShiftTransform",null),e([l()],$.prototype,"_openPromise",void 0),e([l()],$.prototype,"rasterJobHandler",null),e([l({readOnly:!0})],$.prototype,"rasterId",null),e([l(p)],$.prototype,"url",null),e([l({type:String,json:{write:!0}})],$.prototype,"datasetName",void 0),e([l({type:String,json:{write:!0}})],$.prototype,"datasetFormat",void 0),e([l()],$.prototype,"hasUniqueSourceStorageInfo",void 0),e([l()],$.prototype,"rasterInfo",void 0),e([l()],$.prototype,"ioConfig",void 0),e([l()],$.prototype,"sourceJSON",void 0),$=e([c("esri.layers.support.rasterDatasets.BaseRaster")],$);export{$ as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../request.js";import i from"../../../core/Error.js";import{JSONSupport as r}from"../../../core/JSONSupport.js";import o from"../../../core/Logger.js";import{onAbort as n}from"../../../core/promiseUtils.js";import{QueueProcessor as s}from"../../../core/QueueProcessor.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import{ensureClass as a}from"../../../core/accessorSupport/ensureType.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import f from"../../../geometry/Extent.js";import m from"../../../geometry/Point.js";import u from"../../../geometry/SpatialReference.js";import{sanitizeUrl as h}from"../arcgisLayerUrl.js";import{url as p}from"../commonProperties.js";import d from"../DimensionalDefinition.js";import x from"../LOD.js";import y from"../RasterStorageInfo.js";import g from"../TileInfo.js";import{isFunctionRaster as I,getPixelSpaceCoverage as R}from"./datasetUtils.js";import{isMultiSliceOrRangeDefinition as w,getSliceIndex as S,createSlices as k,getSliceIds as b}from"./multidimensionalUtils.js";import{getRasterId as v,getBlock as T,putBlock as P,deleteBlock as B,decreaseRefCount as _}from"./RawBlockCache.js";import{convertNoDataToMask as M}from"../rasterFormats/pixelRangeUtils.js";import{decode as C}from"../rasterFormats/RasterCodec.js";import{mosaic as W,approximateTransform as j,getLocalArithmeticNorthRotations as z}from"../rasterFunctions/pixelUtils.js";import{getWorldWidth as H,load as L,projectPoint as E,snapPyramid as D,shiftExtent as O,getWorldWrapCount as F,projectExtent as A,getProjectionOffsetGrid as G,getRasterDatasetAlignmentInfo as q,projectResolution as N}from"../rasterFunctions/rasterProjectionHelper.js";import{convertToLocalDirections as J,uvComponentToVector as V}from"../rasterFunctions/vectorFieldUtils.js";const U=8,Q=256;let $=0,X=class extends r{constructor(){super(...arguments),this._tileFetchQueue=new s({concurrency:32,process:(e,t)=>this._fetchRawTile(e.pyramidLevel,e.row,e.col,{...e.options,signal:t})}),this.datasetName=null,this.datasetFormat=null,this.hasUniqueSourceStorageInfo=!0,this.rasterInfo=null,this.ioConfig={sampling:"closest"}}normalizeCtorArgs(e){return e?.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:g.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=H(e.spatialReference);return null!=t&&e.extent.width>=t/2}get _hasNoneOrGCSShiftTransform(){const{transform:e}=this.rasterInfo;return null==e||"gcs-shift"===e.type}set rasterJobHandler(e){this._set("rasterJobHandler",e),I(this)&&this.primaryRasters?.rasters?.forEach(t=>t.rasterJobHandler=e)}get rasterId(){return this.url||"rasterId-"+$++}set url(e){this._set("url",h(e,o.getLogger(this)))}async open(e){return this._openPromise??=L().then(()=>this._open(e)),this._openPromise}async fetchTile(e,t,i,r={}){const o=r.tileInfo||this.rasterInfo.storageInfo.tileInfo,n=this.getTileExtentFromTileInfo(e,t,i,o);return r={noClip:!0,...r},this.fetchPixels(n,o.size[0],o.size[1],r)}async identify(e,t={}){e=a(m,e).clone().normalize();const{multidimensionalDefinition:i,timeExtent:r}=t,{rasterInfo:o}=this,{hasMultidimensionalTranspose:n,multidimensionalInfo:s}=o;let{transposedVariableName:l}=t;const c=null!=s&&n&&(null!=r||w(i));if(c&&!l){l=null!=i&&i.length>0?i[0].variableName??void 0:s.variables[0].name,t={...t,transposedVariableName:l}}t=this._getRequestOptionsWithSliceId(t);const{spatialReference:u,extent:h}=o,{datumTransformation:p}=t;let d=E(e,u,p);if(!h.intersects(d))return{location:d,value:null};if(null!=o.transform){const e=o.transform.inverseTransform(d);if(!o.nativeExtent.intersects(e))return{location:e,value:null};d=e}let x=0;const y=null!=l&&null!=s&&o.hasMultidimensionalTranspose;if(I(this)){const e=this.primaryRasters.rasters[0];if(y)return e.identify(d,t);const{pixelSize:r}=o,n=3,s=r.x*n/2,l=r.y*n/2,a=new f({xmin:d.x-s,xmax:d.x+s,ymin:d.y-l,ymax:d.y+l,spatialReference:u}),c={interpolation:"nearest",multidimensionalDefinition:i,sliceId:t.sliceId,bandIds:t.bandIds},{pixelBlock:m}=await e.fetchPixels(a,n,n,c),{pixelBlock:h}=await this.fetchPixels(a,n,n,c);if(null==m)return{location:d,value:null};const p=Math.floor(n*n*.5),x=!m.mask||m.mask[p]?m.pixels.map(e=>e[p]):null;let g;return null!=h&&(g=!h.mask||h.mask[p]?h.pixels.map(e=>e[p]):void 0),{location:d,value:x,processedValue:g,pyramidLevel:0}}if(!y)if(t.srcResolution){x=D(t.srcResolution,o,this.ioConfig.sampling).pyramidLevel}else if(x=await this.computeBestPyramidLevelForLocation(e,t),null==x)return{location:d,value:null};const g=this.identifyPixelLocation(d,x,null,y);if(null===g)return{location:d,value:null};const{row:R,col:S,rowOffset:k,colOffset:b,blockWidth:v}=g,T=await this._tileFetchQueue.push({pyramidLevel:x,row:R,col:S,options:t},{signal:t.signal});if(!T?.pixels?.length)return{location:d,value:null};const P=k*v+b;return this._processIdentifyResult(T,{srcLocation:d,position:P,pyramidLevel:x,useTransposedTile:!!y,requestSomeSlices:c,identifyOptions:t})}async fetchPixels(e,t,i,r={}){e=O(e),r=this._getRequestOptionsWithSliceId(r);const{_hasNoneOrGCSShiftTransform:o}=this;if(r.requestRawData&&o)return this._fetchPixels(e,t,i,r);const n=H(e.spatialReference),s=F(e);if(null==n||0===s||1===s&&this._isGlobalWrappableSource&&o)return this._fetchPixels(e,t,i,r);if(s>=3)return{extent:e,pixelBlock:null};const l=[],{xmin:a,xmax:c}=e,m=Math.round(n/(c-a)*t),u=m-Math.round((n/2-a)/(c-a)*t);let h=0;const p=[];for(let g=0;g<=s;g++){const o=new f({xmin:0===g?a:-n/2,xmax:g===s?c-n*g:n/2,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),d=0===g?m-u:g===s?t-h:m;h+=d,p.push(d);const x=r.disableWrapAround&&g>0?null:this._fetchPixels(o,d,i,r);l.push(x)}const d=(await Promise.all(l)).map(e=>e?.pixelBlock);let x=null;const y={width:t,height:i};if(this.rasterJobHandler){x=(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:d,srcMosaicSize:y,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:p},r)).pixelBlock}else x=W(d,y,{blockWidths:p});return{extent:e,srcExtent:A(e,this.rasterInfo.spatialReference,r.datumTransformation),pixelBlock:x}}async fetchRawPixels(e,t,i,r={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};const o=await this._fetchRawTiles(e,t,i,r),{nativeExtent:n,nativePixelSize:s,storageInfo:l}=this.rasterInfo,a=2**e,c=s.x*a,m=s.y*a,u=new f({xmin:n.xmin+c*t.x,xmax:n.xmin+c*(t.x+i.width-1),ymin:n.ymax-m*(t.y+i.height-1),ymax:n.ymax-m*t.y,spatialReference:n.spatialReference});if(!o)return{extent:u,srcExtent:u,pixelBlock:null};const{pixelBlocks:h,mosaicSize:p}=o;if(1===h.length&&null!=h[0]&&h[0].width===i.width&&h[0].height===i.height)return{extent:u,srcExtent:u,pixelBlock:o.pixelBlocks[0]};const d=e>0?l.pyramidBlockWidth:l.blockWidth,x=e>0?l.pyramidBlockHeight:l.blockHeight,y={x:t.x%d,y:t.y%x};let g;if(this.rasterJobHandler){g=(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:h,srcMosaicSize:p,destDimension:i,clipOffset:y,clipSize:i,coefs:null,sampleSpacing:null,interpolation:r.interpolation,alignmentInfo:null,blockWidths:null},r)).pixelBlock}else g=W(h,p,{clipOffset:y,clipSize:i});return{extent:u,srcExtent:u,pixelBlock:g}}fetchRawTile(e,t,r,o){throw new i("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return A(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?C(e,t):this.rasterJobHandler.decode({data:e,options:t})}async request(e,i,r=0){const{customFetchParameters:o}=this.ioConfig,{range:n,query:s,headers:l}=i;r=r??i.retryCount??this.ioConfig.retryCount;const a=n?{Range:`bytes=${n.from}-${n.to}`}:null;try{return await t(e,{...i,query:{...s,...o},headers:{...l,...a}})}catch(c){if(r>0)return r--,this.request(e,i,r);throw c}}getSliceIndex(e){const{multidimensionalInfo:t}=this.rasterInfo;return null==t||null==e||0===e.length?null:S(e,t)}getTileExtentFromTileInfo(e,t,i,r){const o=r.lodAt(e);return this.getTileExtent({x:o.resolution,y:o.resolution},t,i,r.origin,r.spatialReference,r.size)}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:i,pixelSize:r}=this.rasterInfo,{pyramidResolutions:o}=e;if(!e.tileInfo){const n=[],s=e.maximumPyramidLevel||0;let l=(r.x+r.y)/2,a=1/.0254*96*l;for(let e=0;e<=s&&(n.unshift(new x({level:s-e,resolution:l,scale:a})),e!==s);e++)if(o){const t=(o[e].x+o[e].y)/2;a*=t/l,l=t}else l*=2,a*=2;const c=new m({x:i.xmin,y:i.ymax,spatialReference:t});e.tileInfo=new g({origin:c,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:n}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,i=512,r){const{width:o,height:n,nativeExtent:s,pixelSize:l,spatialReference:a}=e,c=new m({x:s.xmin,y:s.ymax,spatialReference:a});null==r&&(r=Math.max(0,Math.round(Math.log(Math.max(o,n))/Math.LN2-8)));const f=this.computeBlockBoundary(s,512,512,{x:s.xmin,y:s.ymax},[l],r);e.storageInfo=new y({blockWidth:t,blockHeight:i,pyramidBlockWidth:t,pyramidBlockHeight:i,origin:c,firstPyramidLevel:1,maximumPyramidLevel:r,blockBoundary:f})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,i,r,o,n=0,s=2){if(1===o.length&&n>0){o=[...o];let{x:e,y:t}=o[0];for(let i=0;i<n;i++)e*=s,t*=s,o.push({x:e,y:t})}const l=[],{x:a,y:c}=r;for(let f=0;f<o.length;f++){const{x:r,y:n}=o[f];l.push({minCol:Math.floor((e.xmin-a+.1*r)/t/r),maxCol:Math.floor((e.xmax-a-.1*r)/t/r),minRow:Math.floor((c-e.ymax+.1*n)/i/n),maxRow:Math.floor((c-e.ymin-.1*n)/i/n)})}return l}getPyramidPixelSize(e){const{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:i,pyramidScalingFactor:r}=this.rasterInfo.storageInfo;if(0===e)return t;if(null!=i&&i.length)return i[e-1];const o=r**e;return{x:t.x*o,y:t.y*o}}identifyPixelLocation(e,t,i,r){const{spatialReference:o,nativeExtent:n,storageInfo:s}=this.rasterInfo,{maximumPyramidLevel:l,origin:a,transposeInfo:c}=s,f=r&&null!=c?c.tileSize[0]:s.blockWidth,m=r&&null!=c?c.tileSize[1]:s.blockHeight,u=E(e,o,i);if(!n.intersects(u))return null;if(t<0||t>l)return null;const h=this.getPyramidPixelSize(t),{x:p,y:d}=h,x=(a.y-u.y)/d/m,y=(u.x-a.x)/p/f,g=Math.min(m-1,Math.floor((x-Math.floor(x))*m)),I=Math.min(f-1,Math.floor((y-Math.floor(y))*f));return{pyramidLevel:t,row:Math.floor(x),col:Math.floor(y),rowOffset:g,colOffset:I,blockWidth:f,srcLocation:u}}getTileExtent(e,t,i,r,o,n){const[s,l]=n,a=r.x+i*s*e.x,c=a+s*e.x,m=r.y-t*l*e.y,u=m-l*e.y;return new f({xmin:a,xmax:c,ymin:u,ymax:m,spatialReference:o})}getBlockWidthHeight(e){return{blockWidth:e>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:e>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(e,t,i){const r=this.rasterInfo.storageInfo.blockBoundary[e];return!r||r.maxRow<t||r.maxCol<i||r.minRow>t||r.minCol>i}updateImageSpaceRasterInfo(e){const{pixelSize:t}=e,{width:i,height:r}=e,o=u.WebMercator;e.spatialReference=o,e.extent=e.nativeExtent=new f({xmin:-.5,ymax:.5,xmax:i-.5,ymin:.5-r,spatialReference:o}),e.isPseudoSpatialReference=!0,e.transform=null,e.pixelSize=new m({x:1,y:1,spatialReference:o});const{extent:n,storageInfo:s}=e;if(s){s.origin=new m({x:n.xmin,y:n.ymax,spatialReference:o});const{pyramidResolutions:i,tileInfo:r}=s;if(i&&i.forEach(e=>{e.x/=t.x,e.y/=t.y}),r){r.origin=s.origin;const t=(e.nativePixelSize.x+e.nativePixelSize.y)/2;r.lods.forEach((e,i)=>{e.resolution=t*2**i,e.scale=96*e.resolution/.0254})}}}async _fetchPixels(e,t,i,r={}){let o=F(e);if(o>=2)return{extent:e,pixelBlock:null};const n=this._getSourceDataInfo(e,t,i,r),{pyramidLevel:s,srcResolution:l,srcExtent:a,srcWidth:c,srcHeight:f,ul:u}=n;if(0===c||0===f)return{extent:e,srcExtent:a,pixelBlock:null};const{rasterInfo:h}=this,p=h.transform,d="gcs-shift"===p?.type,x=null!=H(e.spatialReference);!d&&x||(o=F(n.srcExtent,d));const y=await this._fetchRawTiles(s,u,{width:c,height:f,wrapCount:o},r);if(!y)return{extent:e,srcExtent:a,pixelBlock:null};const g=h.storageInfo,I=s>0?g.pyramidBlockWidth:g.blockWidth,R=s>0?g.pyramidBlockHeight:g.blockHeight;let{x:w,y:S}=h.pixelSize;if(s>0){const{pyramidResolutions:e,pyramidScalingFactor:t}=g;if(null!=e&&e[s-1])({x:w,y:S}=e[s-1]);else{const e=t**s;w*=e,S*=e}}const k=h.spatialReference,b=new m({x:w,y:S,spatialReference:k}),v=I===c&&R===f&&u.x%I===0&&u.y%R===0,T=new m({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),P=!e.spatialReference.equals(k),B=k.isGeographic?1e-9:1e-4,{datumTransformation:_}=r;if(!P&&v&&1===y.pixelBlocks.length&&I===t&&R===i&&K(l,T,B))return{extent:e,srcExtent:a,srcTilePixelSize:b,pixelBlock:y.pixelBlocks[0]};const M=x&&null!=H(a.spatialReference)&&this._hasNoneOrGCSShiftTransform,C=r.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");C&&!this.rasterJobHandler&&await L();const E=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:T.toJSON(),datumTransformation:_,rasterTransform:p,hasWrapAround:o>0||M,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:C},r):G({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:T,datumTransformation:_,rasterTransform:p,hasWrapAround:o>0||M,isAdaptive:!1,includeGCSGrid:C});let D;const O=!r.requestRawData,A={rows:E.spacing[0],cols:E.spacing[1]},q=this._hasNoneOrGCSShiftTransform?this._getRasterTileAlignmentInfo(s,y.extent.xmin):void 0,{pixelBlocks:N,mosaicSize:V,isPartiallyFilled:U}=y;let Q=null;if(this.rasterJobHandler){const e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:N,srcMosaicSize:V,destDimension:O?{width:t,height:i}:null,coefs:O?E.coefficients:null,sampleSpacing:O?A:null,projectDirections:C,gcsGrid:C?E.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:r.interpolation,alignmentInfo:q,blockWidths:null},r);({pixelBlock:D,localNorthDirections:Q}=e)}else{const e=W(N,V,{alignmentInfo:q});D=O?j(e,{width:t,height:i},E.coefficients,A,r.interpolation):e,C&&E.gcsGrid&&(Q=z({width:t,height:i},E.gcsGrid),D=J(D,this.rasterInfo.dataType,Q))}return r.requestRawData||C?{extent:e,srcExtent:a,srcTilePixelSize:b,pixelBlock:D,transformGrid:E,localNorthDirections:Q,isPartiallyFilled:U}:{extent:e,srcExtent:a,srcTilePixelSize:b,pixelBlock:D}}async _fetchRawTiles(e,t,i,r){const{origin:o,blockBoundary:n}=this.rasterInfo.storageInfo,{blockWidth:s,blockHeight:l}=this.getBlockWidthHeight(e);let{x:a,y:c}=t,{width:m,height:u,wrapCount:h}=i;const p=this._getRasterTileAlignmentInfo(e,0);r.buffer&&(a-=r.buffer.cols,c-=r.buffer.rows,m+=2*r.buffer.cols,u+=2*r.buffer.rows);let d=0,x=0,y=0;if(h&&null!=p){({worldColumnCountFromOrigin:x,originColumnOffset:y,rightPadding:d}=p);x*p.blockWidth-d>=a+m&&(d=0)}const g=Math.floor(a/s),I=Math.floor(c/l),R=Math.floor((a+m+d-1)/s),w=Math.floor((c+u+d-1)/l),S=n[e];if(!S)return null;const{minRow:k,minCol:b,maxCol:v,maxRow:T}=S;if(0===h&&(w<k||R<b||I>T||g>v))return null;const P=new Array;let B=!1;const _=null==this.ioConfig.allowPartialFill?r.allowPartialFill:this.ioConfig.allowPartialFill;for(let f=I;f<=w;f++)for(let t=g;t<=R;t++){let i=t;if(!r.disableWrapAround&&h&&null!=p&&x<=t&&(i=t-x-y),f>=k&&i>=b&&T>=f&&v>=i){const t=this._tileFetchQueue.push({pyramidLevel:e,row:f,col:i,options:r},{signal:r.signal});_?P.push(new Promise(e=>{t.then(t=>e(t)).catch(()=>{B=!0,e(null)})})):P.push(t)}else P.push(Promise.resolve(null))}if(0===P.length)return null;const M=await Promise.all(P),C={height:(w-I+1)*l,width:(R-g+1)*s},{spatialReference:W}=this.rasterInfo,j=this.getPyramidPixelSize(e),{x:z,y:H}=j;return{extent:new f({xmin:o.x+g*s*z,xmax:o.x+(R+1)*s*z,ymin:o.y-(w+1)*l*H,ymax:o.y-I*l*H,spatialReference:W}),pixelBlocks:M,mosaicSize:C,isPartiallyFilled:B}}_fetchRawTile(e,t,i,r){const{storageInfo:o}=this.rasterInfo,s=null!=o.transposeInfo&&!!r.transposedVariableName;if(!s){const r=o.blockBoundary[e];if(!r)return Promise.resolve(null);const{minRow:n,minCol:s,maxCol:l,maxRow:a}=r;if(t<n||i<s||t>a||i>l)return Promise.resolve(null)}const l=s?r.transposeVariableName:r.sliceId,a=this.rasterInfo.storageInfo.isBsqTile?r.bandIds:null,c=v(this.rasterId,l,a),f=`${e}/${t}/${i}`;let m=T(c,r.registryId,f);if(null==m){const o=new AbortController;m=this.fetchRawTile(e,t,i,{...r,signal:o.signal}),P(c,r.registryId,f,m,o),m.catch(()=>B(c,r.registryId,f))}return r.signal&&n(r,()=>{_(c,r.registryId,f)}),m}_computeMagDirValues(e){const{bandCount:t,dataType:i}=this.rasterInfo;if(!(2===t&&"vector-magdir"===i||"vector-uv"===i)||2!==e?.length||!e[0]?.length)return null;const r=e[0].length;if("vector-magdir"===i){const t=e[1].map(e=>(e+360)%360);return[e[0],t]}const[o,n]=e,s=[],l=[];for(let a=0;a<r;a++){const[e,t]=V([o[a],n[a]]);s.push(e),l.push(t)}return[s,l]}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlignmentInfo&&(this._rasterTileAlignmentInfo=q(this.rasterInfo)),null==this._rasterTileAlignmentInfo.pyramidsInfo?null:{startX:t,halfWorldWidth:this._rasterTileAlignmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlignmentInfo.hasGCSSShiftTransform,...this._rasterTileAlignmentInfo.pyramidsInfo[e]}}_getSourceDataInfo(e,t,i,r={}){const o={datumTransformation:r.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0,ul:{x:0,y:0}};r.srcResolution&&(o.srcResolution=r.srcResolution,this._updateSourceDataInfo(e,o));const n=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:s,srcHeight:l,pyramidLevel:a}=o,c=s/t,f=l/i,u=a<n&&c*f>=16,h=a===n&&this._requireTooManySrcTiles(s,l,t,i);if(u||h||(0===s||0===l)){const s=new m({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference});let l=N(s,this.rasterInfo.spatialReference,e,o.datumTransformation);const h=!l||r.srcResolution&&l.x+l.y<r.srcResolution.x+r.srcResolution.y;if(u&&r.srcResolution&&h){const e=Math.round(Math.log(Math.max(c,f))/Math.LN2)-1;if(n-a+3>=e){const t=2**e;l={x:r.srcResolution.x*t,y:r.srcResolution.y*t}}}l&&(o.srcResolution=l,this._updateSourceDataInfo(e,o))}return this._requireTooManySrcTiles(o.srcWidth,o.srcHeight,t,i)&&(o.srcWidth=0,o.srcHeight=0),o}_requireTooManySrcTiles(e,t,i,r){const{tileInfo:o}=this.rasterInfo.storageInfo,n=Math.ceil(e/o.size[0])*Math.ceil(t/o.size[1]),s=e/i,l=t/r,a=Math.max(1,(i+r)/1024);return n>=Q*a||s>U||l>U}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;const{rasterInfo:i}=this,r=i.spatialReference,{srcResolution:o,datumTransformation:n}=t,{pyramidLevel:s,pyramidResolution:l,excessiveReading:a}=D(o,i,this.ioConfig.sampling);if(a)return;let c=t.srcExtent||A(e,r,n);if(null==c)return;const f=i.transform;f&&(c=f.inverseTransform(c)),t.srcExtent=c;const{origin:m}=i.storageInfo,{width:u,height:h,ul:p}=R(c,m,l,s);t.pyramidLevel=s,t.pyramidResolution=l,t.srcWidth=u,t.srcHeight=h,t.ul=p}_getRequestOptionsWithSliceId(e){return null!=this.rasterInfo.multidimensionalInfo&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}_processIdentifyResult(e,t){const{srcLocation:i,position:r,pyramidLevel:o,useTransposedTile:n}=t,s=e.pixels[0].length/e.width/e.height;if(!(!e.mask||e.mask[r]))return{location:i,value:null};const{multidimensionalInfo:l}=this.rasterInfo;if(null==l||!n){const t=e.pixels.map(e=>e[r]),n={location:i,value:t,pyramidLevel:o},s=this._computeMagDirValues(t.map(e=>[e]));return s?.length&&(n.magdirValue=s.map(e=>e[0])),n}let a=e.pixels.map(e=>e.slice(r*s,r*s+s)),c=this._computeMagDirValues(a);const{requestSomeSlices:f,identifyOptions:m}=t;let u=k(l,m.transposedVariableName);if(f){const e=b(u,m.multidimensionalDefinition,m.timeExtent);a=a.map(t=>e.map(e=>t[e])),c=c?.map(t=>e.map(e=>t[e])),u=e.map(e=>u[e])}const h=e.noDataValues||this.rasterInfo.noDataValue,p={pixels:a,pixelType:e.pixelType};let x;null!=h&&(M(p,h),x=p.mask);return{location:i,value:null,dataSeries:u.map((e,t)=>{const i={value:0===x?.[t]?null:a.map(e=>e[t]),multidimensionalDefinition:e.multidimensionalDefinition.map(e=>new d({...e,isSlice:!0}))};return c?.length&&(i.magdirValue=[c[0][t],c[1][t]]),i}),pyramidLevel:o}}};function K(e,t,i){return Math.abs(e.x-t.x)<i&&Math.abs(e.y-t.y)<i}e([l()],X.prototype,"_rasterTileAlignmentInfo",void 0),e([l()],X.prototype,"_tileFetchQueue",void 0),e([l({readOnly:!0})],X.prototype,"_isGlobalWrappableSource",null),e([l({readOnly:!0})],X.prototype,"_hasNoneOrGCSShiftTransform",null),e([l()],X.prototype,"_openPromise",void 0),e([l()],X.prototype,"rasterJobHandler",null),e([l({readOnly:!0})],X.prototype,"rasterId",null),e([l(p)],X.prototype,"url",null),e([l({type:String,json:{write:!0}})],X.prototype,"datasetName",void 0),e([l({type:String,json:{write:!0}})],X.prototype,"datasetFormat",void 0),e([l()],X.prototype,"hasUniqueSourceStorageInfo",void 0),e([l()],X.prototype,"rasterInfo",void 0),e([l()],X.prototype,"ioConfig",void 0),e([l()],X.prototype,"sourceJSON",void 0),X=e([c("esri.layers.support.rasterDatasets.BaseRaster")],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
- function r(r){return"Function"===r?.datasetFormat}function t(t){return r(t)?t.primaryRasters.rasters:[t]}export{t as getPrimaryRasters,r as isFunctionRaster};
5
+ function t(t){return"Function"===t?.datasetFormat}function r(r){return t(r)?r.primaryRasters.rasters:[r]}function n(t,r,n,o){const{x:a,y:i}=r,{x:h,y:e}=n,{xmin:m,xmax:u,ymin:x,ymax:f}=t,{width:s,height:y}=t,M=s/h,c=y/e,l=Math.min(M,c),d=l<=1?0:Math.min(.1,l/100),g=Math.floor((m-a)/h+d),p=Math.floor((i-f)/e+d),w=Math.floor((u-a)/h-d),F=Math.floor((i-x)/e-d);return{ul:{x:g,y:p},width:o>0&&M<.1?0:w-g+1,height:o>0&&c<.1?0:F-p+1}}export{n as getPixelSpaceCoverage,r as getPrimaryRasters,t as isFunctionRaster};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import{getAssetUrl as e}from"../../assets.js";let r;function t(){return r??=(async()=>{const{default:r}=await import("../../chunks/draco_mesh_decoder.js");return await r({locateFile:r=>e(`esri/libs/dracoMeshDecoder/${r}`)})})(),r}export{t as getDracoMeshDecoder};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.34.0-next.80",
3
+ "version": "4.34.0-next.82",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [