@arcgis/core 4.34.0-next.65 → 4.34.0-next.67
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/Graphic.js +1 -1
- package/WebDocument2D.js +1 -1
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0814676e4bac81f96140.js +1 -0
- package/assets/esri/core/workers/chunks/{6ab435423acb0ed0b1c7.js → 09dbb3e200ef8d514eb3.js} +2 -2
- package/assets/esri/core/workers/chunks/0b71100fa1e7ca706dbb.js +1 -0
- package/assets/esri/core/workers/chunks/0c4f07eb3f3dd5cd2c6c.js +1 -0
- package/assets/esri/core/workers/chunks/{3167230555c63f943485.js → 0cbd5335cc92f5891bcf.js} +1 -1
- package/assets/esri/core/workers/chunks/{79933271a76a1756584f.js → 12d30c2367652e2c688b.js} +1 -1
- package/assets/esri/core/workers/chunks/144bfd64daf103a06734.js +1 -0
- package/assets/esri/core/workers/chunks/{0b53bc76d38e85902748.js → 170ec7fb070c63230c81.js} +1 -1
- package/assets/esri/core/workers/chunks/18c7b1e1fbf7eb6c3c33.js +1 -0
- package/assets/esri/core/workers/chunks/1ada9e6cdd6792e3847a.js +1 -0
- package/assets/esri/core/workers/chunks/1e86df439c564fe752e3.js +1 -0
- package/assets/esri/core/workers/chunks/{4459c8e495a37d4c4eb8.js → 25118304c9a914194e90.js} +1 -1
- package/assets/esri/core/workers/chunks/{426232091caf8608e5f1.js → 26b791291689434dde09.js} +1 -1
- package/assets/esri/core/workers/chunks/3212a476184be25d17f8.js +1 -0
- package/assets/esri/core/workers/chunks/{d823277612f971a9c2f0.js → 3245663da75e168bf85c.js} +1 -1
- package/assets/esri/core/workers/chunks/37d7c249114994a7dfac.js +1 -0
- package/assets/esri/core/workers/chunks/{e72aee3f857aa473822c.js → 39d69afc9da9db0c75ab.js} +1 -1
- package/assets/esri/core/workers/chunks/4102ed32b8dbdc32cb3b.js +1 -0
- package/assets/esri/core/workers/chunks/{7c3a1958990de095d3a1.js → 48316d91c06928f69f61.js} +1 -1
- package/assets/esri/core/workers/chunks/{dbcef57073075e9cfdfe.js → 489fa17e60f25d5f33ae.js} +1 -1
- package/assets/esri/core/workers/chunks/{19e5e011f929b6b940fe.js → 4bc091770bab38874848.js} +1 -1
- package/assets/esri/core/workers/chunks/4f0f6653b8e92c633d14.js +1 -0
- package/assets/esri/core/workers/chunks/{09f0c9f0b6aa58ae3c52.js → 4f22e5a7f81883e8e5b6.js} +1 -1
- package/assets/esri/core/workers/chunks/5185c63fecc5f493e142.js +1 -0
- package/assets/esri/core/workers/chunks/{6fff219dfaa86167c326.js → 5303d77a3ab1b7ddeef3.js} +1 -1
- package/assets/esri/core/workers/chunks/548818df658b607a364e.js +1 -0
- package/assets/esri/core/workers/chunks/{22ec2b0a853911692dc8.js → 5993427325d1add18ed9.js} +1 -1
- package/assets/esri/core/workers/chunks/{657b01a6df8dc46c5209.js → 5b84eba4a28e25b6d5c0.js} +1 -1
- package/assets/esri/core/workers/chunks/5c053d197935c65792ce.js +1 -0
- package/assets/esri/core/workers/chunks/{497214e9e82b936fc94e.js → 5ed381a268855bcad072.js} +1 -1
- package/assets/esri/core/workers/chunks/{33718ea851645d9078d1.js → 605acf18cbeb89e4f29f.js} +1 -1
- package/assets/esri/core/workers/chunks/66cb5b294d7f251c2cc8.js +1 -0
- package/assets/esri/core/workers/chunks/6a5b5b80917a5375b9f6.js +1 -0
- package/assets/esri/core/workers/chunks/{4d7fcec769369c576847.js → 6e59ba2afd444eb4be18.js} +1 -1
- package/assets/esri/core/workers/chunks/{a700f57af6856cb5313c.js → 70dc7ec6474f0801bc04.js} +1 -1
- package/assets/esri/core/workers/chunks/7e95896ac41c7e2ca26a.js +1 -0
- package/assets/esri/core/workers/chunks/80b0c88a76bd523a406a.js +1 -0
- package/assets/esri/core/workers/chunks/{5d12862042b6bf9f9d54.js → 82cb5defb0593e3017ff.js} +1 -1
- package/assets/esri/core/workers/chunks/837830e1cf712d4243a5.js +1 -0
- package/assets/esri/core/workers/chunks/87fb5d755860057da164.js +1 -0
- package/assets/esri/core/workers/chunks/{a29fb90226bd08157bd1.js → 8a104b35708a492bd614.js} +1 -1
- package/assets/esri/core/workers/chunks/{5cb238318a24b70d5ac3.js → 8bc8caa384b24af12411.js} +1 -1
- package/assets/esri/core/workers/chunks/8e2558b14be70b273ce4.js +1 -0
- package/assets/esri/core/workers/chunks/{8e40c409a9b0a2a768a9.js → 8f02349602b072186a1f.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa0f94318173db2034de.js → 90491262b6d6a126c32f.js} +1 -1
- package/assets/esri/core/workers/chunks/99f133a152afb4f1b067.js +1 -0
- package/assets/esri/core/workers/chunks/9eb1bfcb9b05f2a36748.js +1 -0
- package/assets/esri/core/workers/chunks/{0a36df6fdab95785d1ce.js → a2963ffc9a8c90822d2d.js} +1 -1
- package/assets/esri/core/workers/chunks/{8e3c09c3524654830b14.js → a634764dec5404f4a1d7.js} +1 -1
- package/assets/esri/core/workers/chunks/a895da7fd64ebad3d5a4.js +1 -0
- package/assets/esri/core/workers/chunks/aa970a547c60c43d6c7f.js +1 -0
- package/assets/esri/core/workers/chunks/ab727ed4417b7dd94ce9.js +1 -0
- package/assets/esri/core/workers/chunks/{d1e8220dcae1d01d3c35.js → ad3ebd4f05cc673140f3.js} +1 -1
- package/assets/esri/core/workers/chunks/{9f93513037a6e87433c4.js → adfb018f510e19a520fb.js} +1 -1
- package/assets/esri/core/workers/chunks/{a1bd4eecca1e3272bffb.js → aff553c3d6544e20f188.js} +1 -1
- package/assets/esri/core/workers/chunks/b052d3ef5493eedb44a5.js +1 -0
- package/assets/esri/core/workers/chunks/b335e96f6bcac6d2f0ee.js +1 -0
- package/assets/esri/core/workers/chunks/b482132638f3b351724c.js +1 -0
- package/assets/esri/core/workers/chunks/{e1b25b1ce3bd4f0f2cda.js → bc5fa33afec5354601a1.js} +1 -1
- package/assets/esri/core/workers/chunks/{dd1d9913b33d4e48baff.js → c35dad3d5ceaac6ad5a4.js} +1 -1
- package/assets/esri/core/workers/chunks/{e1b573840ec1f7c3afd3.js → c4b2678dd46fa1e22f7e.js} +1 -1
- package/assets/esri/core/workers/chunks/{bc931865a77fc48871d3.js → c94c797864a85342b105.js} +1 -1
- package/assets/esri/core/workers/chunks/{e97250ae8da4bd0d6bc9.js → cad03967e132a28512c2.js} +1 -1
- package/assets/esri/core/workers/chunks/{904c116c6b093e0e970c.js → d1b361b8adf1c719a10a.js} +1 -1
- package/assets/esri/core/workers/chunks/{c7a386ac90e58eb71935.js → da1a5537e2f2ca6cc247.js} +1 -1
- package/assets/esri/core/workers/chunks/dd447dfc50ee7f511b84.js +1 -0
- package/assets/esri/core/workers/chunks/e0fe6bb51ecc9b2faf69.js +1 -0
- package/assets/esri/core/workers/chunks/{0f9813e7d4e2b47b2c39.js → e47acdb1fbf797342716.js} +1 -1
- package/assets/esri/core/workers/chunks/e4e224983c3ee24fc51d.js +1 -0
- package/assets/esri/core/workers/chunks/{a16b471c3706ee37f9b6.js → e6f2ac738df16fb5e13a.js} +1 -1
- package/assets/esri/core/workers/chunks/ed1272e7681e561d843f.js +1 -0
- package/assets/esri/core/workers/chunks/ee391a41144855fc625d.js +1 -0
- package/assets/esri/core/workers/chunks/efea3e82cec476d486e0.js +1 -0
- package/assets/esri/core/workers/chunks/f054557e23978e174686.js +1 -0
- package/assets/esri/core/workers/chunks/{ff2614d96ca5228e9685.js → f4d4c1f13522f20b00d1.js} +1 -1
- package/assets/esri/core/workers/chunks/{897f9775f06ddbf6486f.js → f9385d7fb5ff20f7b252.js} +1 -1
- package/assets/esri/core/workers/chunks/{b30de4936caa654d7817.js → fac020b6886ff2d75015.js} +1 -1
- package/assets/esri/core/workers/chunks/fe353a53968827bcd9cc.js +1 -0
- package/chunks/GlowComposition.glsl.js +3 -3
- package/chunks/RibbonLine.glsl.js +2 -2
- package/config.js +1 -1
- package/core/AsyncUpdate.js +1 -1
- package/core/mapCollectionUtils.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtPolygonCentroid.js +1 -1
- package/geometry/Polygon.js +1 -1
- package/geometry/support/centroid.js +1 -1
- package/geometry/support/geometryUtils.js +1 -1
- package/graphic/AggregateGraphicOrigin.js +1 -1
- package/graphic/BuildingGraphicOrigin.js +1 -1
- package/graphic/CSVGraphicOrigin.js +1 -1
- package/graphic/CatalogGraphicOrigin.js +1 -1
- package/graphic/FeatureGraphicOrigin.js +1 -1
- package/graphic/GeoJSONGraphicOrigin.js +1 -1
- package/graphic/GeoRSSGraphicOrigin.js +1 -1
- package/graphic/ImageryGraphicOrigin.js +1 -1
- package/graphic/ImageryTileGraphicOrigin.js +1 -1
- package/graphic/KMLGraphicOrigin.js +1 -1
- package/graphic/KnowledgeGraphGraphicOrigin.js +1 -1
- package/graphic/LinkChartGraphicOrigin.js +1 -1
- package/graphic/MapImageGraphicOrigin.js +1 -1
- package/graphic/MapNotesGraphicOrigin.js +1 -1
- package/graphic/OGCFeatureGraphicOrigin.js +1 -1
- package/graphic/OrientedImageryGraphicOrigin.js +1 -1
- package/graphic/ParquetGraphicOrigin.js +1 -1
- package/graphic/PointCloudGraphicOrigin.js +1 -1
- package/graphic/SceneGraphicOrigin.js +1 -1
- package/graphic/StreamGraphicOrigin.js +1 -1
- package/graphic/SubtypeGroupGraphicOrigin.js +1 -1
- package/graphic/TileGraphicOrigin.js +1 -1
- package/graphic/TrackGraphicOrigin.js +1 -1
- package/graphic/VectorTileGraphicOrigin.js +1 -1
- package/graphic/VoxelGraphicOrigin.js +1 -1
- package/graphic/WCSGraphicOrigin.js +1 -1
- package/graphic/WFSGraphicOrigin.js +1 -1
- package/graphic/getIdFieldsProvider.js +5 -0
- package/graphic/getSliceableContainer.js +5 -0
- package/graphic/graphicOrigins.d.ts +0 -2
- package/graphic/graphicOrigins.js +1 -1
- package/interfaces.d.ts +172 -244
- package/kernel.js +1 -1
- package/layers/GaussianSplatLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/Layer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/MapImageLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/VoxelLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/mixins/OperationalLayer.js +1 -1
- package/layers/mixins/TemporalLayer.js +1 -1
- package/layers/mixins/TemporalSceneLayer.js +1 -1
- package/layers/mixins/operationalLayers.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/support/FeatureFilter.js +1 -1
- package/layers/support/TimeInfo.js +1 -1
- package/layers/support/TrackInfo.js +1 -1
- package/layers/support/layersCreator.js +1 -1
- package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
- package/package.json +2 -2
- package/portal/schemas/definitions.js +1 -1
- package/portal/support/portalLayers.js +1 -1
- package/rest/support/AttributeBinsQuery.js +1 -1
- package/rest/support/IdentifyParameters.js +1 -1
- package/rest/support/ImageGPSInfoParameters.js +1 -1
- package/rest/support/ImageHistogramParameters.js +1 -1
- package/rest/support/ImageIdentifyParameters.js +1 -1
- package/rest/support/ImageParameters.js +1 -1
- package/rest/support/ImageSampleParameters.js +1 -1
- package/rest/support/Query.js +1 -1
- package/rest/support/TopFeaturesQuery.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerBinningAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/support/timeUtils.js +1 -1
- package/symbols/support/previewCIMSymbol.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/symbols/support/renderUtils.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/time/TimeExtent.js +1 -1
- package/time/TimeInterval.js +1 -1
- package/views/2d/analysis/ElevationProfile/ElevationProfileInputVisualization2D.js +5 -0
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +5 -0
- package/views/2d/analysis/ElevationProfile/ElevationProfileVisualization2D.js +5 -0
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
- package/views/2d/engine/webgl/effects/post-processing/EffectManager.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/bloom/BloomTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/blur/BlurTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/colorize/ColorizeTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/grid/GridTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlitShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlurShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PostProcessingShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileInputVisualization3D.js +5 -0
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +5 -0
- package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +5 -0
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +5 -0
- package/views/3d/analysis/VolumeMeasurement/volumeMeasurementGeometryUtils.js +5 -0
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/QueryEngine.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
- package/views/3d/layers/i3s/Intersector.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
- package/views/3d/layers/support/SublayerPopupHighlightHelper3D.js +1 -1
- package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/Intersector.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +4 -4
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColor.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaOutlineItem.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +5 -0
- package/views/VideoView.js +1 -1
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileGenerationError.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/constants.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileInputVisualizationUtils.js +5 -0
- package/views/draw/support/createUtils.js +1 -1
- package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
- package/webdoc/support/timeProperties.js +1 -1
- package/webdoc/widgets/TimeSlider.js +1 -1
- package/webmap/InitialViewProperties.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/Legend/styles/card/CardView.js +1 -1
- package/widgets/Legend/styles/card/ColorRamp.js +1 -1
- package/widgets/Legend/styles/card/LegendElement.js +1 -1
- package/widgets/Legend/styles/card/UnivariateAboveAndBelowRamp.js +1 -1
- package/widgets/Legend/styles/card/UnivariateColorSizeRamp.js +1 -1
- package/widgets/Legend/styles/classic/ClassicView.js +1 -1
- package/widgets/Legend/styles/classic/LegendElement.js +1 -1
- package/widgets/Legend/styles/classic/UnivariateAboveAndBelowRamp.js +1 -1
- package/widgets/Legend/styles/classic/UnivariateColorSizeRamp.js +1 -1
- package/widgets/Legend/styles/support/relationshipUtils.js +1 -1
- package/widgets/Legend/styles/support/univariateUtils.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/UtilityNetworkTrace/support/GraphicHandler.js +1 -1
- package/TimeExtent.d.ts +0 -4
- package/TimeExtent.js +0 -5
- package/TimeInterval.d.ts +0 -4
- package/TimeInterval.js +0 -5
- package/assets/esri/core/workers/chunks/0264905da9fa56166538.js +0 -1
- package/assets/esri/core/workers/chunks/070b29cba896f46537f9.js +0 -1
- package/assets/esri/core/workers/chunks/0b01c87db77246632ad9.js +0 -1
- package/assets/esri/core/workers/chunks/0cb2f7172190babb4139.js +0 -1
- package/assets/esri/core/workers/chunks/0cdf6b51f2a63f348530.js +0 -1
- package/assets/esri/core/workers/chunks/0d82cc6905b105b3568a.js +0 -1
- package/assets/esri/core/workers/chunks/0e28cb5d8d89ae29cdd0.js +0 -1
- package/assets/esri/core/workers/chunks/1143313f2f6f34deaad7.js +0 -1
- package/assets/esri/core/workers/chunks/14c6461ffd36319e1d74.js +0 -1
- package/assets/esri/core/workers/chunks/2394ac65d64e50399d76.js +0 -1
- package/assets/esri/core/workers/chunks/47febd4de836a33b51b1.js +0 -1
- package/assets/esri/core/workers/chunks/487afbf352d12c745430.js +0 -1
- package/assets/esri/core/workers/chunks/56b4dcd04c844eaacd60.js +0 -1
- package/assets/esri/core/workers/chunks/5d65987f2c1b5c56a799.js +0 -1
- package/assets/esri/core/workers/chunks/77e27f318b5863dd0f5c.js +0 -1
- package/assets/esri/core/workers/chunks/7b7f5028a488bb9c10f4.js +0 -1
- package/assets/esri/core/workers/chunks/808cfed7022e3846d5b2.js +0 -1
- package/assets/esri/core/workers/chunks/8bd5a0ff7dcf1067bf53.js +0 -1
- package/assets/esri/core/workers/chunks/99b20eef2893047fac10.js +0 -1
- package/assets/esri/core/workers/chunks/9f4e23bae621ff3ecea3.js +0 -1
- package/assets/esri/core/workers/chunks/a596d6ccb6103e594031.js +0 -1
- package/assets/esri/core/workers/chunks/a5e6359fadbd699b1c8e.js +0 -1
- package/assets/esri/core/workers/chunks/a7f3cdd9a249ef4572ce.js +0 -1
- package/assets/esri/core/workers/chunks/a80d769b0ed025f0df64.js +0 -1
- package/assets/esri/core/workers/chunks/af83dddddbfe25194527.js +0 -1
- package/assets/esri/core/workers/chunks/b057e6d593c1607cae61.js +0 -1
- package/assets/esri/core/workers/chunks/b1f1a26e7a2ef5b783ee.js +0 -1
- package/assets/esri/core/workers/chunks/b605dfdfed8ff8eda4f3.js +0 -1
- package/assets/esri/core/workers/chunks/c337c1a2dbc452780dd7.js +0 -1
- package/assets/esri/core/workers/chunks/c601bbdafdee5074b04f.js +0 -1
- package/assets/esri/core/workers/chunks/c696615cae5daefa2d98.js +0 -1
- package/assets/esri/core/workers/chunks/c8694a27e2cf28b010e8.js +0 -1
- package/assets/esri/core/workers/chunks/e6457ac25c0829ee039c.js +0 -1
- package/assets/esri/core/workers/chunks/eadac757f74470b89a36.js +0 -1
- package/assets/esri/core/workers/chunks/f4167fc895d4009df1c7.js +0 -1
- package/assets/esri/core/workers/chunks/f76774781865cb1411b0.js +0 -1
- package/assets/esri/core/workers/chunks/fd04df45cdcc6ff52554.js +0 -1
- package/chunks/TimeExtent.js +0 -5
- package/chunks/TimeInterval.js +0 -5
- package/graphic/IntegratedMesh3DTilesGraphicOrigin.d.ts +0 -4
- package/graphic/IntegratedMesh3DTilesGraphicOrigin.js +0 -5
- package/graphic/IntegratedMeshGraphicOrigin.d.ts +0 -4
- package/graphic/IntegratedMeshGraphicOrigin.js +0 -5
- package/graphic/isIntegratedMesh3DTilesGraphicOrigin.js +0 -5
- package/graphic/isIntegratedMeshGraphicOrigin.js +0 -5
- package/views/2d/engine/webgl/effects/post-processing/Bloom.js +0 -5
- package/views/2d/engine/webgl/effects/post-processing/Blur.js +0 -5
- package/views/2d/engine/webgl/effects/post-processing/Colorize.js +0 -5
- package/views/2d/engine/webgl/effects/post-processing/DropShadow.js +0 -5
- package/views/2d/engine/webgl/effects/post-processing/Opacity.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileInputVisualization.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization.js +0 -5
- package/views/3d/webgl-engine/shaders/FocusAreaColor.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/FocusAreaMask.glsl.js +0 -5
|
@@ -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 r from"../../core/Logger.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{Integer as n,ensureClass as o}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as a}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as l}from"../../core/accessorSupport/decorators/reader.js";import{subclass as u}from"../../core/accessorSupport/decorators/subclass.js";import m from"../../geometry/Point.js";import p from"../../geometry/SpatialReference.js";import{getInfo as c}from"../../geometry/support/spatialReferenceUtils.js";import{sanitizeUrl as d}from"../support/arcgisLayerUrl.js";import{url as h}from"../support/commonProperties.js";import f from"../support/DimensionalDefinition.js";import y from"../support/MultidimensionalSubset.js";import{interpolationKebab as g}from"../support/rasterEnums.js";import b from"../support/RasterFunction.js";import R from"../support/TileInfo.js";import{isFunctionRaster as I}from"../support/rasterDatasets/datasetUtils.js";import x from"../support/rasterDatasets/FunctionRaster.js";import{getEffectiveMultidimensionalDefinition as S,getDefaultVariableInfo as w,isMultiSliceOrRangeDefinition as v,convertOleDateTimeToEpoch as F,getSubsetVariablesFromMdInfo as _,getDefaultMultidimensionalDefinition as j}from"../support/rasterDatasets/multidimensionalUtils.js";import{snapToRaster as D,clip as J}from"../support/rasterFunctions/clipUtils.js";import{create as N}from"../support/rasterFunctions/rasterFunctionHelper.js";import{load as T,projectExtent as O,projectPolygon as z}from"../support/rasterFunctions/rasterProjectionHelper.js";import{computeStatisticsHistograms as H}from"../support/rasterFunctions/stretchUtils.js";import{getVariableRasterInfo as P,getDefaultInterpolation as C,matchPresetRenderer as E,getDefaultBandCombination as M,getFunctionColorRamp as U,createDefaultRenderer as B,normalizeRendererJSON as q}from"../../renderers/support/rasterRendererHelper.js";import L from"../../renderers/support/RasterSymbolizer.js";import{websceneRasterRendererTypes as k,rasterRendererTypes as A,read as V}from"../../renderers/support/rasterTypeUtils.js";import $ from"../../rest/support/ImageHistogramParameters.js";import G from"../../rest/support/ImageSample.js";import W from"../../rest/support/ImageSampleParameters.js";import K from"../../rest/support/ImageSampleResult.js";const Q=1e3,X=X=>{const Y=X;let Z=class extends Y{constructor(...e){super(...e),this._isConstructedFromFunctionRaster=!1,this.bandIds=null,this.copyright=null,this.interpolation=null,this.multidimensionalSubset=null,this.raster=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster=I(e[0]?.raster)}destroy(){this._shutdownJobHandler()}get fullExtent(){return this.serviceRasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}set rasterFunction(e){"none"===e?.functionName?.toLowerCase()&&(e=void 0),this._set("rasterFunction",e),this.updateRasterFunction()}set url(e){this._set("url",d(e,r.getLogger(this)))}get renderer(){if("imagery-tile"!==this.type)return this.internalRenderer;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){"imagery-tile"===this.type&&(this.activePresetRendererName=null),this.internalRenderer=e}set internalRenderer(e){null==e&&null==this.rasterFunction?this._configDefaultRenderer("override"):(this._set("internalRenderer",e),this.updateRenderer())}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer;return V(r,i)||void 0}async computeStatisticsHistograms(e,t){await this.load(t),e=o($,e).clone();const{serviceRasterInfo:r}=this;if(null==r)throw new i("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");const{geometry:s}=e;if(null==s)throw new i("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let n=s;const{spatialReference:a}=r;if(!s.spatialReference.equals(a)){await T();const e="extent"===s.type?O(s,a):z(s,a);if(null==e)throw new i("imagery-tile-mixin:compute-statistics-histograms","geometry cannot be projected to the data source");n=e}const l=e.pixelSize??new m({x:r.pixelSize.x,y:r.pixelSize.y,spatialReference:a}),{extent:u,width:p,height:c}=D(r,n,l),d=await this.fetchPixels(u,p,c,{...t,interpolation:"nearest"});if(null==d.pixelBlock)throw new i("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const h=await J(d.pixelBlock,u,n),f=this._rasterJobHandler;return f?f.computeStatisticsHistograms({pixelBlock:h},t):H(h)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;const i=S({rasterInfo:this.raster.rasterInfo,multidimensionalDefinition:e.multidimensionalDefinition||this.multidimensionalDefinition,timeExtent:e.timeExtent??this.timeExtent,multidimensionalSubset:this.multidimensionalSubset});return{...e,multidimensionalDefinition:i,timeExtent:void 0}}async updateRasterFunction(){return this.loaded&&"imagery-tile"===this.type&&(this.rasterFunction||this._cachedRasterFunctionJson)&&JSON.stringify(this.rasterFunction)!==JSON.stringify(this._cachedRasterFunctionJson)?(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this._rasterFunctionUpdatePromise=this._updateRasterFunction(),this._rasterFunctionUpdatePromise):this._rasterFunctionUpdatePromise}async updateRenderer(){const{loaded:e,symbolizer:t,renderer:i}=this;if(!e||!t||!i)return;const{rasterInfo:r}=this.raster,s=w(r,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),n=s?.name,o=P(r,n);return this._updateSymbolizer(t,i,n,o)}async applyRenderer(e,t,i){const r=e?.pixelBlock;if(!(null!=r&&r.pixels&&r.pixels.length>0))return null;await this.updateRenderer();const s=this.bandIds??[],{pixelBlock:n}=await this._symbolize({pixelData:e,simpleStretchParams:t,bandIds:s,symbolizer:this.symbolizer},i);return n}getRawDisplayBandIds(){let{bandIds:e,raster:t}=this;if(this.rasterFunction&&I(t)){const i=t.rasterFunction.rawInputBandIds;e=e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):i}return e&&e.length>3&&e.every((e,t)=>e===t)?null:e}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;const r=c(e);return R.create({size:256,spatialReference:e,origin:r?{x:r.origin[0],y:r.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,i,r,s={}){if(ee(this),s.requestAsImageElement){const n=this.getTileUrl(e,i,r);return t(n,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:s.signal}).then(e=>e.data)}const{serviceRasterInfo:n}=this;if(null!=n.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition){const t=s.tileInfo||n.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(e,i,r,t),pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(s={...s,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,i,r,s)}async fetchPixels(e,t,i,r={}){return null!=this.serviceRasterInfo.multidimensionalInfo&&null==(r=this.normalizeRasterFetchOptions(r)).multidimensionalDefinition?{extent:e,pixelBlock:null}:(await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i),this.raster.fetchPixels(e,t,i,r))}async getSamples(e,t){if(await this.load(),(e=o(W,e).clone()).interpolation&&"nearest"!==e.interpolation)throw new i("imagery-tile-mixin:get-samples","only nearest interpolation is currently supported");const r=e.mosaicRule?.multidimensionalDefinition,s={...t,multidimensionalDefinition:r},n=(await this._getSampleLocations(e)).map(e=>this.identify(e,s).then(t=>(t.location=e,t))),a=(await Promise.all(n)).flatMap((e,t)=>this._convertRasterIdentifyResultToSample(e,t));return new K({samples:a})}async identify(e,t={}){await this.load();const{raster:r,serviceRasterInfo:s}=this;if(null!=s?.multidimensionalInfo){if(!(s.hasMultidimensionalTranspose&&!(!v(t.multidimensionalDefinition)&&!t.transposedVariableName))&&null==(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition)return{location:e,value:null}}const n=this.multidimensionalSubset?.areaOfInterest;if(n&&!n.contains(e))throw new i("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");let o;if(this.serviceRasterInfo?.storageInfo.isBsqTile){const e=I(r)?this.getRawDisplayBandIds():this.bandIds;o=e?.length?e:void 0}return r.identify(e,{...t,bandIds:o})}hasStandardTime(){const e=this.serviceRasterInfo?.multidimensionalInfo;if(null==e||"standard-time"!==this.serviceRasterInfo?.dataType)return!1;const t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some(e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some(e=>"StdTime"===e.name)))}getStandardTimeValue(e){return new Date(F(e)).toISOString()}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo?.multidimensionalInfo;return _(this.multidimensionalSubset,t)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=j(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&I(this.raster)&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(async()=>{if(!this._rasterJobHandler)return;ee(this);const{raster:e}=this;e.rasterJobHandler=this._rasterJobHandler,I(e)&&e.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch(()=>{}),this.renderer&&this.updateRenderer()}).catch(()=>{})}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}async _getSampleLocations(e){const{geometry:t}=e;if("point"===t.type)return[t];const{spatialReference:i,type:r}=t;if("multipoint"===r)return t.points.map(e=>new m({x:e[0],y:e[1],spatialReference:i}));if("polyline"===r){let r=t;if(e.sampleCount||e.sampleDistance){const i=await import("../../geometry/operators/densifyOperator.js"),s=(await import("../../geometry/operators/lengthOperator.js")).execute(t,{unit:"meters"}),n=Math.min(e.sampleCount||100,Q);let o=e.sampleDistance;if(!o){o=s/(n+(2===r.paths[0].length?1:0))}r=i.execute(t,o,{unit:"meters"})}return r.paths.flatMap(e=>e.map(e=>new m({x:e[0],y:e[1],spatialReference:i})))}const s=Math.min(e.sampleCount||100,Q),n="extent"===t.type,o=n?t:t.extent,a=Math.sqrt(o.width*o.height/s),l=o.height/a,u=o.width/a,{xmin:p,ymax:c}=o,d=[];for(let h=0;h<l;h++)for(let e=0;e<u;e++){const r=new m({x:p+(e+.5)*a,y:c-(h+.5)*a,spatialReference:i});(n||t.contains(r))&&d.push(r)}return d}_configDefaultInterpolation(){if(null==this.interpolation){ee(this);const{raster:e}=this,t=C(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){ee(this);const{rasterInfo:t}=this.raster,i=w(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),s=i?.name,n=E({variableName:s,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=n?.bandIds??M(t)),!this.renderer||"override"===e){const e=U(this.raster),i=n?.renderer??B(t,{bandIds:this.bandIds,variableName:s,rasterFunctionColorRamp:e}),r=t.statistics,o=r&&r.length>0?r[0]:null,a=o?.max??0,l=o?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===i.type&&(a>1e24||l<-1e24)&&(i.dynamicRangeAdjustment=!0,i.customStatistics=null,"none"===i.stretchType&&(i.stretchType="min-max")),this.renderer=i}const o=q({...this.renderer.toJSON(),variableName:s}),a=P(t,s);this.symbolizer?(this.symbolizer.rendererJSON=o,this.symbolizer.rasterInfo=a):this.symbolizer=new L({rendererJSON:o,rasterInfo:a});const l=this.symbolizer.bind();if(l.success){if("auto"===e){const{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){const e=B(this.raster.rasterInfo);JSON.stringify(e)!==JSON.stringify(t)&&this._configDefaultRenderer("override")}else if("raster-stretch"===t.type){const e=this.bandIds?.length,i=t.customStatistics?.length;!t.dynamicRangeAdjustment&&i&&e&&i!==e&&this._configDefaultRenderer("override")}}}else r.getLogger(this).warn("imagery-tile-mixin",l.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}async _updateRasterFunction(){if(this._isConstructedFromFunctionRaster&&I(this.raster)){const e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",b.fromJSON(e)))}let e,t=this.raster,i=!1;I(t)?(e=t.primaryRasters.rasters,t=e[0],i=!0):e=[t];const{rasterFunction:r}=this;if(r){const i={raster:t};e.length>1&&e.forEach(e=>i[e.url]=e);const s=N(r.functionDefinition?.toJSON()??r.toJSON(),i),n=new x({rasterFunction:s});n.rasterJobHandler=this._rasterJobHandler,await n.open(),this.raster=n}else this.raster=t,await t.open();if(this._cachedRendererJson=void 0,!i&&!r)return;const{bandIds:s}=this,{bandCount:n}=this.raster.rasterInfo,o=s?.length?s.some(e=>e>=n):n>=3;s&&(o||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}_convertRasterIdentifyResultToSample(e,t){const{rasterInfo:i}=this.raster,r=i.storageInfo.pyramidScalingFactor**(e.pyramidLevel??0),s=(i.pixelSize.x+i.pixelSize.y)/2*r;if(!e.dataSeries?.length)return[new G({location:e.location,pixelValue:e.value,locationId:t,resolution:s})];const n=[];return e.dataSeries.forEach(({value:i,multidimensionalDefinition:r},o)=>{const a={Variables:r[0].variableName,Dimensions:r.flatMap(({dimensionName:e})=>e).join(",")};for(const{dimensionName:e,values:t}of r){a[e]=Array.isArray(t[0])?t[0][0]:t[0];const i=t[t.length-1];a[`${e}_Max`]=Array.isArray(i)?i[i.length-1]:i}const l=new G({location:e.location,pixelValue:i,rasterId:o,locationId:t,resolution:s,attributes:a});n.push(l)}),n}};function ee(e){if(!e.raster||!e.serviceRasterInfo)throw new i("imagery-tile","no raster")}return e([s({clonable:!1})],Z.prototype,"_cachedRasterFunctionJson",void 0),e([s({clonable:!1})],Z.prototype,"_compatibleFullExtent",void 0),e([s({clonable:!1})],Z.prototype,"_isConstructedFromFunctionRaster",void 0),e([s({clonable:!1})],Z.prototype,"_rasterFunctionUpdatePromise",void 0),e([s({type:[n],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],Z.prototype,"bandIds",void 0),e([s({json:{origins:{service:{read:{source:"copyrightText"}}}}})],Z.prototype,"copyright",void 0),e([s({json:{read:!1}})],Z.prototype,"fullExtent",null),e([s({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),a(g)],Z.prototype,"interpolation",void 0),e([s()],Z.prototype,"ioConfig",void 0),e([s({type:[f],json:{write:!0}})],Z.prototype,"multidimensionalDefinition",null),e([s({type:y,json:{write:!0}})],Z.prototype,"multidimensionalSubset",void 0),e([s()],Z.prototype,"raster",void 0),e([s({type:b})],Z.prototype,"rasterFunction",null),e([s()],Z.prototype,"serviceRasterInfo",void 0),e([s()],Z.prototype,"sourceJSON",void 0),e([s({readOnly:!0,type:p,json:{read:!1}})],Z.prototype,"spatialReference",void 0),e([s({type:R})],Z.prototype,"tileInfo",void 0),e([s(h)],Z.prototype,"url",null),e([s()],Z.prototype,"renderer",null),e([s({types:A,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:k,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],Z.prototype,"internalRenderer",null),e([l("internalRenderer")],Z.prototype,"readRenderer",null),e([s({clonable:!1})],Z.prototype,"symbolizer",void 0),Z=e([u("esri.layers.mixins.ImageryTileMixin")],Z),Z};export{X as ImageryTileMixin};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../request.js";import i from"../../core/Error.js";import r from"../../core/Logger.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{Integer as n,ensureClass as o}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as a}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as l}from"../../core/accessorSupport/decorators/reader.js";import{subclass as u}from"../../core/accessorSupport/decorators/subclass.js";import m from"../../geometry/Point.js";import c from"../../geometry/SpatialReference.js";import{getInfo as p}from"../../geometry/support/spatialReferenceUtils.js";import{sanitizeUrl as d}from"../support/arcgisLayerUrl.js";import{url as h}from"../support/commonProperties.js";import f from"../support/DimensionalDefinition.js";import y from"../support/MultidimensionalSubset.js";import{interpolationKebab as g}from"../support/rasterEnums.js";import b from"../support/RasterFunction.js";import R from"../support/TileInfo.js";import{isFunctionRaster as I}from"../support/rasterDatasets/datasetUtils.js";import x from"../support/rasterDatasets/FunctionRaster.js";import{getEffectiveMultidimensionalDefinition as S,getDefaultVariableInfo as w,isMultiSliceOrRangeDefinition as v,convertOleDateTimeToEpoch as F,getSubsetVariablesFromMdInfo as _,getDefaultMultidimensionalDefinition as j}from"../support/rasterDatasets/multidimensionalUtils.js";import{snapToRaster as D,clip as J}from"../support/rasterFunctions/clipUtils.js";import{create as T}from"../support/rasterFunctions/rasterFunctionHelper.js";import{load as N,projectExtent as O,projectPolygon as z}from"../support/rasterFunctions/rasterProjectionHelper.js";import{computeStatisticsHistograms as H}from"../support/rasterFunctions/stretchUtils.js";import{getVariableRasterInfo as P,getDefaultInterpolation as C,matchPresetRenderer as E,getDefaultBandCombination as B,getFunctionColorRamp as M,createDefaultRenderer as U,normalizeRendererJSON as q}from"../../renderers/support/rasterRendererHelper.js";import k from"../../renderers/support/RasterSymbolizer.js";import{websceneRasterRendererTypes as L,rasterRendererTypes as A,read as V}from"../../renderers/support/rasterTypeUtils.js";import $ from"../../rest/support/ImageHistogramParameters.js";import G from"../../rest/support/ImageSample.js";import W from"../../rest/support/ImageSampleParameters.js";import K from"../../rest/support/ImageSampleResult.js";const Q=1e3,X=X=>{const Y=X;let Z=class extends Y{constructor(...e){super(...e),this._isConstructedFromFunctionRaster=!1,this.bandIds=null,this.copyright=null,this.interpolation=null,this.multidimensionalSubset=null,this.raster=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster=I(e[0]?.raster)}destroy(){this._shutdownJobHandler()}get fullExtent(){return this.serviceRasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}set rasterFunction(e){"none"===e?.functionName?.toLowerCase()&&(e=void 0),this._set("rasterFunction",e),this.updateRasterFunction()}set url(e){this._set("url",d(e,r.getLogger(this)))}get renderer(){if("imagery-tile"!==this.type)return this.internalRenderer;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){"imagery-tile"===this.type&&(this.activePresetRendererName=null),this.internalRenderer=e}set internalRenderer(e){null==e&&null==this.rasterFunction?this._configDefaultRenderer("override"):(this._set("internalRenderer",e),this.updateRenderer())}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer;return V(r,i)||void 0}async computeStatisticsHistograms(e,t){await this.load(t),e=o($,e).clone();const{serviceRasterInfo:r}=this;if(null==r)throw new i("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");const{geometry:s}=e;if(null==s)throw new i("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let n=s;const{spatialReference:a}=r;if(!s.spatialReference.equals(a)){await N();const e="extent"===s.type?O(s,a):z(s,a);if(null==e)throw new i("imagery-tile-mixin:compute-statistics-histograms","geometry cannot be projected to the data source");n=e}const l=e.pixelSize??new m({x:r.pixelSize.x,y:r.pixelSize.y,spatialReference:a}),{extent:u,width:c,height:p}=D(r,n,l),d=await this.fetchPixels(u,c,p,{...t,interpolation:"nearest"});if(null==d.pixelBlock)throw new i("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const h=await J(d.pixelBlock,u,n),f=this._rasterJobHandler;return f?f.computeStatisticsHistograms({pixelBlock:h},t):H(h)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;const i=S({rasterInfo:this.raster.rasterInfo,multidimensionalDefinition:e.multidimensionalDefinition||this.multidimensionalDefinition,timeExtent:e.timeExtent??this.timeExtent,multidimensionalSubset:this.multidimensionalSubset});return{...e,multidimensionalDefinition:i,timeExtent:void 0}}async updateRasterFunction(){return this.loaded&&"imagery-tile"===this.type&&(this.rasterFunction||this._cachedRasterFunctionJson)&&JSON.stringify(this.rasterFunction)!==JSON.stringify(this._cachedRasterFunctionJson)?(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this._rasterFunctionUpdatePromise=this._updateRasterFunction(),this._rasterFunctionUpdatePromise):this._rasterFunctionUpdatePromise}async updateRenderer(){const{loaded:e,symbolizer:t,renderer:i}=this;if(!e||!t||!i)return;const{rasterInfo:r}=this.raster,s=w(r,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),n=s?.name,o=P(r,n);return this._updateSymbolizer(t,i,n,o)}async applyRenderer(e,t,i){const r=e?.pixelBlock;if(!(null!=r&&r.pixels&&r.pixels.length>0))return null;await this.updateRenderer();const s=this.bandIds??[],{pixelBlock:n}=await this._symbolize({pixelData:e,simpleStretchParams:t,bandIds:s,symbolizer:this.symbolizer},i);return n}getRawDisplayBandIds(){let{bandIds:e,raster:t}=this;if(this.rasterFunction&&I(t)){const i=t.rasterFunction.rawInputBandIds;e=e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):i}return e&&e.length>3&&e.every((e,t)=>e===t)?null:e}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;const r=p(e);return R.create({size:256,spatialReference:e,origin:r?{x:r.origin[0],y:r.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,i,r,s={}){if(ee(this),s.requestAsImageElement){const n=this.getTileUrl(e,i,r);return t(n,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:s.signal}).then(e=>e.data)}const{serviceRasterInfo:n}=this;if(null!=n.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition){const t=s.tileInfo||n.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(e,i,r,t),pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(s={...s,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,i,r,s)}async fetchPixels(e,t,i,r={}){if(null!=this.serviceRasterInfo.multidimensionalInfo&&null==(r=this.normalizeRasterFetchOptions(r)).multidimensionalDefinition)return{extent:e,pixelBlock:null};await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i);const s=await this.raster.fetchPixels(e,t,i,r);return r.bandIds?.length&&!this.raster.rasterInfo.storageInfo.isBsqTile&&(s.pixelBlock=s.pixelBlock?.extractBands(r.bandIds)),s}async getSamples(e,t){if(await this.load(),(e=o(W,e).clone()).interpolation&&"nearest"!==e.interpolation)throw new i("imagery-tile-mixin:get-samples","only nearest interpolation is currently supported");const r=e.mosaicRule?.multidimensionalDefinition,s={...t,multidimensionalDefinition:r},n=(await this._getSampleLocations(e)).map(e=>this.identify(e,s).then(t=>(t.location=e,t))),a=(await Promise.all(n)).flatMap((e,t)=>this._convertRasterIdentifyResultToSample(e,t));return new K({samples:a})}async identify(e,t={}){await this.load();const{raster:r,serviceRasterInfo:s}=this;if(null!=s?.multidimensionalInfo){if(!(s.hasMultidimensionalTranspose&&!(!v(t.multidimensionalDefinition)&&!t.transposedVariableName))&&null==(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition)return{location:e,value:null}}const n=this.multidimensionalSubset?.areaOfInterest;if(n&&!n.contains(e))throw new i("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");let o;if(this.serviceRasterInfo?.storageInfo.isBsqTile){const e=I(r)?this.getRawDisplayBandIds():this.bandIds;o=e?.length?e:void 0}return r.identify(e,{...t,bandIds:o})}hasStandardTime(){const e=this.serviceRasterInfo?.multidimensionalInfo;if(null==e||"standard-time"!==this.serviceRasterInfo?.dataType)return!1;const t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some(e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some(e=>"StdTime"===e.name)))}getStandardTimeValue(e){return new Date(F(e)).toISOString()}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo?.multidimensionalInfo;return _(this.multidimensionalSubset,t)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=j(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&I(this.raster)&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(async()=>{if(!this._rasterJobHandler)return;ee(this);const{raster:e}=this;e.rasterJobHandler=this._rasterJobHandler,I(e)&&e.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch(()=>{}),this.renderer&&this.updateRenderer()}).catch(()=>{})}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}async _getSampleLocations(e){const{geometry:t}=e;if("point"===t.type)return[t];const{spatialReference:i,type:r}=t;if("multipoint"===r)return t.points.map(e=>new m({x:e[0],y:e[1],spatialReference:i}));if("polyline"===r){let r=t;if(e.sampleCount||e.sampleDistance){const i=await import("../../geometry/operators/densifyOperator.js"),s=(await import("../../geometry/operators/lengthOperator.js")).execute(t,{unit:"meters"}),n=Math.min(e.sampleCount||100,Q);let o=e.sampleDistance;if(!o){o=s/(n+(2===r.paths[0].length?1:0))}r=i.execute(t,o,{unit:"meters"})}return r.paths.flatMap(e=>e.map(e=>new m({x:e[0],y:e[1],spatialReference:i})))}const s=Math.min(e.sampleCount||100,Q),n="extent"===t.type,o=n?t:t.extent,a=Math.sqrt(o.width*o.height/s),l=o.height/a,u=o.width/a,{xmin:c,ymax:p}=o,d=[];for(let h=0;h<l;h++)for(let e=0;e<u;e++){const r=new m({x:c+(e+.5)*a,y:p-(h+.5)*a,spatialReference:i});(n||t.contains(r))&&d.push(r)}return d}_configDefaultInterpolation(){if(null==this.interpolation){ee(this);const{raster:e}=this,t=C(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){ee(this);const{rasterInfo:t}=this.raster,i=w(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),s=i?.name,n=E({variableName:s,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=n?.bandIds??B(t)),!this.renderer||"override"===e){const e=M(this.raster),i=n?.renderer??U(t,{bandIds:this.bandIds,variableName:s,rasterFunctionColorRamp:e}),r=t.statistics,o=r&&r.length>0?r[0]:null,a=o?.max??0,l=o?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===i.type&&(a>1e24||l<-1e24)&&(i.dynamicRangeAdjustment=!0,i.customStatistics=null,"none"===i.stretchType&&(i.stretchType="min-max")),this.renderer=i}const o=q({...this.renderer.toJSON(),variableName:s}),a=P(t,s);this.symbolizer?(this.symbolizer.rendererJSON=o,this.symbolizer.rasterInfo=a):this.symbolizer=new k({rendererJSON:o,rasterInfo:a});const l=this.symbolizer.bind();if(l.success){if("auto"===e){const{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){const e=U(this.raster.rasterInfo);JSON.stringify(e)!==JSON.stringify(t)&&this._configDefaultRenderer("override")}else if("raster-stretch"===t.type){const e=this.bandIds?.length,i=t.customStatistics?.length;!t.dynamicRangeAdjustment&&i&&e&&i!==e&&this._configDefaultRenderer("override")}}}else r.getLogger(this).warn("imagery-tile-mixin",l.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}async _updateRasterFunction(){if(this._isConstructedFromFunctionRaster&&I(this.raster)){const e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",b.fromJSON(e)))}let e,t=this.raster,i=!1;I(t)?(e=t.primaryRasters.rasters,t=e[0],i=!0):e=[t];const{rasterFunction:r}=this;if(r){const i={raster:t};e.length>1&&e.forEach(e=>i[e.url]=e);const s=T(r.functionDefinition?.toJSON()??r.toJSON(),i),n=new x({rasterFunction:s});n.rasterJobHandler=this._rasterJobHandler,await n.open(),this.raster=n}else this.raster=t,await t.open();if(this._cachedRendererJson=void 0,!i&&!r)return;const{bandIds:s}=this,{bandCount:n}=this.raster.rasterInfo,o=s?.length?s.some(e=>e>=n):n>=3;s&&(o||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}_convertRasterIdentifyResultToSample(e,t){const{rasterInfo:i}=this.raster,r=i.storageInfo.pyramidScalingFactor**(e.pyramidLevel??0),s=(i.pixelSize.x+i.pixelSize.y)/2*r;if(!e.dataSeries?.length)return[new G({location:e.location,pixelValue:e.value,locationId:t,resolution:s})];const n=[];return e.dataSeries.forEach(({value:i,multidimensionalDefinition:r},o)=>{const a={Variables:r[0].variableName,Dimensions:r.flatMap(({dimensionName:e})=>e).join(",")};for(const{dimensionName:e,values:t}of r){a[e]=Array.isArray(t[0])?t[0][0]:t[0];const i=t[t.length-1];a[`${e}_Max`]=Array.isArray(i)?i[i.length-1]:i}const l=new G({location:e.location,pixelValue:i,rasterId:o,locationId:t,resolution:s,attributes:a});n.push(l)}),n}};function ee(e){if(!e.raster||!e.serviceRasterInfo)throw new i("imagery-tile","no raster")}return e([s({clonable:!1})],Z.prototype,"_cachedRasterFunctionJson",void 0),e([s({clonable:!1})],Z.prototype,"_compatibleFullExtent",void 0),e([s({clonable:!1})],Z.prototype,"_isConstructedFromFunctionRaster",void 0),e([s({clonable:!1})],Z.prototype,"_rasterFunctionUpdatePromise",void 0),e([s({type:[n],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],Z.prototype,"bandIds",void 0),e([s({json:{origins:{service:{read:{source:"copyrightText"}}}}})],Z.prototype,"copyright",void 0),e([s({json:{read:!1}})],Z.prototype,"fullExtent",null),e([s({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),a(g)],Z.prototype,"interpolation",void 0),e([s()],Z.prototype,"ioConfig",void 0),e([s({type:[f],json:{write:!0}})],Z.prototype,"multidimensionalDefinition",null),e([s({type:y,json:{write:!0}})],Z.prototype,"multidimensionalSubset",void 0),e([s()],Z.prototype,"raster",void 0),e([s({type:b})],Z.prototype,"rasterFunction",null),e([s()],Z.prototype,"serviceRasterInfo",void 0),e([s()],Z.prototype,"sourceJSON",void 0),e([s({readOnly:!0,type:c,json:{read:!1}})],Z.prototype,"spatialReference",void 0),e([s({type:R})],Z.prototype,"tileInfo",void 0),e([s(h)],Z.prototype,"url",null),e([s()],Z.prototype,"renderer",null),e([s({types:A,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:L,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],Z.prototype,"internalRenderer",null),e([l("internalRenderer")],Z.prototype,"readRenderer",null),e([s({clonable:!1})],Z.prototype,"symbolizer",void 0),Z=e([u("esri.layers.mixins.ImageryTileMixin")],Z),Z};export{X as ImageryTileMixin};
|
|
@@ -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/Error.js";import{isBlobProtocol as t}from"../../core/urlUtils.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import{Integer as o,Null as s}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{reader as n}from"../../core/accessorSupport/decorators/reader.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../../core/accessorSupport/decorators/writer.js";import{excludeTables as l}from"../../core/accessorSupport/layerContainerType.js";import{readLoadable as y}from"../../core/accessorSupport/read.js";import{willPropertyWrite as m}from"../../core/accessorSupport/write.js";import{supportedTypes as c}from"./operationalLayers.js";import{listMode as d,opacity as u}from"../support/commonProperties.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import r from"../../core/Error.js";import{isBlobProtocol as t}from"../../core/urlUtils.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import{Integer as o,Null as s}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{reader as n}from"../../core/accessorSupport/decorators/reader.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../../core/accessorSupport/decorators/writer.js";import{excludeTables as l}from"../../core/accessorSupport/layerContainerType.js";import{readLoadable as y}from"../../core/accessorSupport/read.js";import{willPropertyWrite as m}from"../../core/accessorSupport/write.js";import{supportedTypes as c}from"./operationalLayers.js";import{listMode as d,opacity as u}from"../support/commonProperties.js";import w from"../../time/TimeExtent.js";const b=b=>{const g=b;let T=class extends g{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,r,t){return"Group Layer"===t?.portalItem?.type?void 0:e}writeListMode(e,r,t,i){(i&&"ground"===i.layerContainerType||e&&m(this,t,{},i))&&(r[t]=e)}writeOperationalLayerType(e,r,t){e&&(r[t]=e)}writeTitle(e,r){r.title=e??"Layer"}readVisibilityTimeExtent(e){return e?w.fromArray(e):null}writeVisibilityTimeExtent(e,t,i,o){e&&"tables"!==o.layerContainerType&&(e.isEmpty?o?.messages&&o.messages.push(new r("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[i]=e.toArray())}read(e,r){r&&(r.layer=this),y(this,e,r=>super.read(e,r),r)}write(e,i){if(!this.persistenceEnabled&&!i?.ignorePersistenceEnabled)return null;if(i?.origin){const e=`${i.origin}/${i.layerContainerType||"operational-layers"}`,t=c[e];let o=!!t?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(o=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(o=!1),!o)return i.messages?.push(new r("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const o=super.write(e,{...i,layer:this}),s=!!i&&!!i.messages&&!!i.messages.filter(e=>e instanceof r&&"web-document-write:property-required"===e.name).length;return t(o?.url)?(i?.messages?.push(new r("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&s?null:o}beforeSave(){}};return e([i({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],T.prototype,"id",void 0),e([n("id",["id"])],T.prototype,"readId",null),e([i(d)],T.prototype,"listMode",void 0),e([p("listMode")],T.prototype,"writeListMode",null),e([i({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:l,isRequired:!0}}}}})],T.prototype,"operationalLayerType",void 0),e([p("operationalLayerType")],T.prototype,"writeOperationalLayerType",null),e([i(u)],T.prototype,"opacity",void 0),e([i({type:Boolean,readOnly:!1})],T.prototype,"persistenceEnabled",void 0),e([i({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],T.prototype,"title",void 0),e([p("title"),p(["web-scene"],"title")],T.prototype,"writeTitle",null),e([i({type:w,json:{origins:{"web-scene":{write:{layerContainerTypes:l}}}}})],T.prototype,"visibilityTimeExtent",void 0),e([n("visibilityTimeExtent")],T.prototype,"readVisibilityTimeExtent",null),e([p(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[o,s]]}})],T.prototype,"writeVisibilityTimeExtent",null),e([i({type:Boolean,json:{name:"visibility",write:{layerContainerTypes:l}}})],T.prototype,"visible",void 0),T=e([a("esri.layers.mixins.OperationalLayer")],T),T};export{b as OperationalLayer};
|
|
@@ -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{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{reader as o}from"../../core/accessorSupport/decorators/reader.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import{excludeTables as
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{reader as o}from"../../core/accessorSupport/decorators/reader.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import{excludeTables as i}from"../../core/accessorSupport/layerContainerType.js";import{fixTimeInfoFields as s}from"../support/fieldUtils.js";import m from"../support/TimeInfo.js";import{timeUnitKebabDictionary as p}from"../../portal/timeUnitKebabDictionary.js";import n from"../../time/TimeExtent.js";import a from"../../time/TimeInterval.js";const f={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:i}}},l=i=>{const l=i;let c=class extends l{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(t,e){const o=e.timeInfo.exportOptions;if(!o)return null;const r=o.timeOffset,i=p.fromJSON(o.timeOffsetUnits);return r&&i?new a({value:r,unit:i}):null}set timeInfo(t){s(t,this.fieldsIndex),this._set("timeInfo",t)}};return t([e({type:n,json:{write:!1}})],c.prototype,"timeExtent",void 0),t([e({type:a})],c.prototype,"timeOffset",void 0),t([o("service","timeOffset",["timeInfo.exportOptions"])],c.prototype,"readOffset",null),t([e({value:null,type:m,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"timeInfo",null),t([e(f)],c.prototype,"useViewTime",void 0),c=t([r("esri.layers.mixins.TemporalLayer")],c),c};export{l as TemporalLayer,f as useViewTimeProperty};
|
|
@@ -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{JSONSupport as t}from"../../core/JSONSupport.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 i}from"../../core/accessorSupport/decorators/subclass.js";import{fixTimeInfoFields as n}from"../support/fieldUtils.js";import{cacheIsOutOfSync as s}from"../support/sceneLayerCacheUtils.js";import o from"../support/TimeInfo.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.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 i}from"../../core/accessorSupport/decorators/subclass.js";import{fixTimeInfoFields as n}from"../support/fieldUtils.js";import{cacheIsOutOfSync as s}from"../support/sceneLayerCacheUtils.js";import o from"../support/TimeInfo.js";import l from"../../time/TimeExtent.js";import m from"../../time/TimeInterval.js";const a=t=>{const a=t;let p=class extends a{constructor(){super(...arguments),this.serviceTimeInfo=null}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return n(t,this.fieldsIndex),t}set timeInfo(e){n(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:r,endTimeField:i}=t;if(null==r&&null==i)return;if(s({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const n=async t=>{let i=null;try{const r=await(this.fetchStatistics?.(t,e));i=r?.stats}catch{}if(null==i)return null;const{minTimeStr:n,min:s,maxTimeStr:o,max:l}=i,m=t===r?n??s:o??l;return null!=m?new Date(m):null},[m,a]=await Promise.all([n(r),n(i)]);if(null!=r&&null==m||null!=i&&null==a)return;const c=new l({start:m,end:a});this.setAtOrigin("timeInfo",new o({endField:i,startField:r,fullTimeExtent:c}),"service")}};return e([r({type:o,json:{read:!1,write:!1}})],p.prototype,"timeInfo",null),e([r({type:l,json:{read:!1,write:!1}})],p.prototype,"timeExtent",null),e([r({type:m,json:{read:!1,write:!1}})],p.prototype,"timeOffset",null),e([r({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],p.prototype,"datesInUnknownTimezone",null),e([r({type:c,readOnly:!0,json:{read:{source:"timeInfo"}},clonable:!1})],p.prototype,"serviceTimeInfo",void 0),p=e([i("esri.layers.mixins.TemporalSceneLayer")],p),p};let c=class extends t{constructor(){super(...arguments),this.endTimeField=null,this.startTimeField=null}};e([r({type:String})],c.prototype,"endTimeField",void 0),e([r({type:String})],c.prototype,"startTimeField",void 0),c=e([i("esri.layers.mixins.TemporalSceneLayer.SceneServiceTimeInfo")],c);export{a as TemporalSceneLayer};
|
|
@@ -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 e={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,ArcGISVideoLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},r={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},a={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},S={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,Object3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,ViewshedLayer:!0,Voxel:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap-base-layers":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap-ground-layers":{IntegratedMesh3DTilesLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":e,"web-map/basemap-base-layers":r,"web-map/tables":a,"link-chart/operational-layers":{...e,LinkChartLayer:!0},"link-chart/basemap-base-layers":r,"link-chart/tables":a,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0,WCS:!0},"portal-item/tables":{ArcGISFeatureLayer:!0,SubtypeGroupTable:!0}};export{S as supportedTypes};
|
|
5
|
+
const e={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,ArcGISVideoLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},r={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},a={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},S={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GaussianSplatLayer:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,Object3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,ViewshedLayer:!0,Voxel:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap-base-layers":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap-ground-layers":{IntegratedMesh3DTilesLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":e,"web-map/basemap-base-layers":r,"web-map/tables":a,"link-chart/operational-layers":{...e,LinkChartLayer:!0},"link-chart/basemap-base-layers":r,"link-chart/tables":a,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0,WCS:!0},"portal-item/tables":{ArcGISFeatureLayer:!0,SubtypeGroupTable:!0}};export{S as supportedTypes};
|
|
@@ -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{throwIfAborted as e}from"../../../core/promiseUtils.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{zeros as
|
|
5
|
+
import{throwIfAborted as e}from"../../../core/promiseUtils.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{zeros as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{transpose as n}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{a as o,f as a}from"../../../chunks/vec32.js";import i from"../../../geometry/Circle.js";import s from"../../../geometry/Mesh.js";import c from"../../../geometry/Multipoint.js";import f from"../../../geometry/Polygon.js";import{projectWithZConversion as l}from"../../../geometry/projectionUtils.js";import m from"../../../geometry/SpatialReference.js";import{polygonCentroidPoint as u}from"../../../geometry/support/centroid.js";import{earth as p}from"../../../geometry/support/Ellipsoid.js";import h from"../../../geometry/support/MeshComponent.js";import{MeshVertexAttributes as y}from"../../../geometry/support/MeshVertexAttributes.js";import{create as g,fromArray as x,intersectRay as d}from"../../../geometry/support/plane.js";import{isWebMercator as w}from"../../../geometry/support/spatialReferenceUtils.js";import{convertToSRUnits as M,getWebMercatorScalingFactor as R,createRotationMatrixFromHPR as j,transformMat3 as v,scaleAndAddWithFactor as P,scaleWithFactor as D,computeHFOVAndVFOV as b,projectiveTransform as A}from"../transformations/utils.js";const I=Math.PI/180;function z(e){const t=M(e,e.geometry.spatialReference);return e.isSpherical?S(t):V(t)}function V(e){const{horizontalFieldOfView:t,verticalFieldOfView:r,geometry:n,cameraHeading:o}=e,a=R(n.y,n.spatialReference);let i=e.cameraPitch,s=e.cameraRoll??0,c=150;t>150&&(i=90,s=0,c=5);const l=Math.ceil(t/c),m=F(l,o,t);let u=e.farDistance?e.farDistance*a:e.cameraHeight*a/Math.cos(i*I);e.cameraPitch+r/2>=90&&(u=(e.farDistance||20)*a);const p=new f({spatialReference:n?.spatialReference});p.imageID=e.objectId;let h=null;for(const f of m)h=H(f,i,e.cameraHeight,n,u,a,r,t,l,p,s,e.nearDistance);return h.imageID=e.objectId,{polygon:p,frustum:h}}function F(e,t,r){const n=[];if(e%2==0)for(let o=0;o<e/2;o++)n.push(t-r/e*(o+.5),t+r/e*(o+.5));else{n.push(t);for(let o=1;o<e/2;o++)n.push(t-r/e*o,t+r/e*o)}return n.sort(),n}function H(e,i,s,c,f,l,m,u,p,h,y=0,g=0){const x=n(t(),j([e,i,y??0])),d=U({cameraHeight:s,cameraPitch:i,farDistance:f,location:c,horizontalFieldOfView:u,nearDistance:g,verticalFieldOfView:m},x),w=v([0,0,-1],x),{x:M,y:R}=c,b=P([M,R,s],w,f,l),A=2*Math.tan(m*I/2)*f,z=2*Math.tan(u/p*I/2)*f,V=v([0,1,0],x),F=v([1,0,0],x),H=D(V,A/2,l),S=D(F,z/2,l),q=o(r(),H,S),C=a(r(),H,S),E=O([a(r(),b,q),a(r(),b,C),o(r(),b,q),o(r(),b,C)],s,c,l);return E.push(E[0]),h.addRing(E),d}function O(e,t,r,n){return e.map(e=>E(e,t,r,n))}function S(e){const{geometry:t,farDistance:r,objectId:n,nearDistance:o,cameraHeight:a}=e,c=R(t.y,t.spatialReference),f=new i({center:t.clone(),radius:r*c});if(f.imageID=n,o){const e=new i({center:t.clone(),radius:o*c});f.addRing(e.rings[0])}const l=t.clone();l.z=a-r*c;const m=s.createSphere(l,{size:2*r*c});return m.imageID=n,{polygon:f,frustum:m}}function q(e,t){return e.contains(t)}function C(e,t){return Math.sign(e)!==Math.sign(t)}function U(e,t,n){const{cameraHeight:i,cameraPitch:c,farDistance:f,location:l,horizontalFieldOfView:m,nearDistance:u,verticalFieldOfView:p}=e,h=L(l),g=c+p/2>=90==!1,x=2*Math.tan(p*I/2)*u,d=2*Math.tan(m*I/2)*u,w=2*Math.tan(p*I/2)*f,M=2*Math.tan(m*I/2)*f;let R,j;j=[0,0,-1],j=v(j,t),R=P([l.x,l.y,i],j,f,h),g&&(R[2]=0);const b=P([l.x,l.y,i],j,u,h);let A=[0,1,0];A=v(A,t);let z=[1,0,0];z=v(z,t);let V=[],F=[];u?(F=[{faces:[4,0,3,4,7,3]},{faces:[5,1,2,5,6,2]},{faces:[4,0,1,4,5,1]},{faces:[6,2,3,6,7,3]}],V=V.concat(a(r(),b,o(r(),D(A,x/2,h),D(z,d/2,h)))),V=V.concat(a(r(),b,a(r(),D(A,x/2,h),D(z,d/2,h)))),V=V.concat(o(r(),b,o(r(),D(A,x/2,h),D(z,d/2,h)))),V=V.concat(o(r(),b,a(r(),D(A,x/2,h),D(z,d/2,h))))):(V=[l.x,l.y,i],F=[{faces:[0,1,2,0,2,3,0,3,4,0,4,1]}]),V=V.concat(a(r(),R,o(r(),D(A,w/2,h),D(z,M/2,h)))),V=V.concat(a(r(),R,a(r(),D(A,w/2,h),D(z,M/2,h)))),V=V.concat(o(r(),R,o(r(),D(A,w/2,h),D(z,M/2,h)))),V=V.concat(o(r(),R,a(r(),D(A,w/2,h),D(z,M/2,h))));const H=new y({position:Float64Array.from(V)});return new s({vertexAttributes:H,components:F,spatialReference:l.spatialReference})}function E(e,t,n,a){{const i=Math.sqrt((e[2]-t)**2+(Math.sqrt((e[0]-n.x)**2+(e[1]-n.y)**2)/a)**2)*a,s=D(o(r(),[e[0],e[1],e[2]],[n.x,n.y,t]),1/i,1/a),c=t/(t-e[2]),f={x:(1-c)*n.x+c*e[0],y:(1-c)*n.y+c*e[1],z:(1-c)*t+c*e[2]},l=Math.sqrt((f.z-t)**2+(Math.sqrt((f.x-n.x)**2+(f.y-n.y)**2)/a)**2)*a,m=D(o(r(),[f.x,f.y,f.z],[n.x,n.y,t]),1/l,1/a);return C(s[0],m[0])&&C(s[1],m[1])&&C(s[2],m[2])||e[2]>=0?[e[0],e[1],0]:[f.x,f.y,f.z]}}function k(e){const{spatialReference:t,x:r,y:n}=e.geometry,{cameraHeading:o,cameraPitch:a,farDistance:i,nearDistance:s}=e,c=L(e.geometry),l=new f({spatialReference:t}),m=Math.abs(1.44*i*c);let u=Math.abs(1.44*s*c);(a<20||null==o)&&(u=m);const p=[];return p[0]={x:r+m*Math.sin((o-45)*I),y:n+m*Math.cos((o-45)*I)},p[1]={x:r+m*Math.sin((o+45)*I),y:n+m*Math.cos((o+45)*I)},p[2]={x:r+u*Math.sin((o+135)*I),y:n+u*Math.cos((o+135)*I)},p[3]={x:r+u*Math.sin((o+225)*I),y:n+u*Math.cos((o+225)*I)},l.addRing([[p[0].x,p[0].y,0],[p[1].x,p[1].y,0],[p[2].x,p[2].y,0],[p[3].x,p[3].y,0],[p[0].x,p[0].y,0]]),l}function L(e){return e&&w(e?.spatialReference)?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*e.y/p.radius))):1}function W(e,t){const n=1+t/100;if("esri.geometry.Circle"===e.declaredClass){const{radius:t,center:r}=e,o=new i({radius:t*n,center:r});return e.rings.length>1&&o.addRing(e.rings[1]),o}if("esri.geometry.Polygon"===e.declaredClass){const t=new f({spatialReference:e.spatialReference}),a=u(e);if(a){const i=[];for(let t=0;t<e.rings[0].length;t++){const s=Math.sqrt((a.x-e.rings[0][t][0])**2+(a.y-e.rings[0][t][1])**2),c=D(o(r(),[e.rings[0][t][0],e.rings[0][t][1],0],[a.x,a.y,0]),1/s,1),f=P([a.x,a.y,0],c,s*n,1);i.push({x:f[0],y:f[1]})}t.addRing([[i[0].x,i[0].y,0],[i[1].x,i[1].y,0],[i[2].x,i[2].y,0],[i[3].x,i[3].y,0],[i[0].x,i[0].y,0]])}return t}return e}async function B(e,t,r){const{cameraHeight:n,cameraLocation:o,cameraPitch:a,frustumVertices:i,horizontalFieldOfView:s,imageHeight:c,imageWidth:f,inSRS:l,outSRS:u,verticalFieldOfView:p,cameraRoll:h,options:y}=r,g=new m(l),x=new m(u),d=b(s,p,h??0),w=i.length>15;return a+d.vfov/2>=90?await Q(i,e,f,c,g,x,w,y):await G(i,e,t,o,n,w,g,x,y)}async function G(e,t,r,n,o,a,i,c,f){const l=J(e,t,r,n,o);if(!l)return;const{farPlane:m,nearPlane:u}=l,p=await T([...u?.vertexPositions??e.slice(0,3),...m.vertexPositions],i,c,f),h=_(p);return new s({vertexAttributes:new y({position:p}),components:$(a?Y(h,!0):Z(h,!0)),spatialReference:c})}function J(e,t,r,n,o){const a=X(e),i=X(e,"near");if(!a)return;const s=t.length;for(let c=0;c<s;c++){const e=Array.from(r[c]),t=[e[0]-n[0],e[1]-n[1],e[2]-(n[2]??o)];N(n,t,c,i),K(n,t,c,a)}return{farPlane:a,nearPlane:i}}function K(e,t,n,o){const{coefficients:a,vertexPositions:i}=o,s=r();d(a,{origin:e,direction:t},s)&&i.splice(3*n,3,...s)}function N(e,t,n,o){if(!o)return;const a=r();d(o.coefficients,{origin:e,direction:t},a)&&o.vertexPositions.splice(3*n,3,...a)}async function Q(e,t,r,n,o,a,i,c){let f,l=i?new Array:[e[0],e[1],e[2]],m=new Array;for(const s of t)i?(f=A([s[0],s[1],1],[[0,0,1],[r,0,1],[r,n,1],[0,n,1]],[[e[0],e[1],e[2]],[e[3],e[4],e[5]],[e[6],e[7],e[8]],[e[9],e[10],e[11]]]),l=l.concat(...f),f=A([s[0],s[1],1],[[0,0,1],[r,0,1],[r,n,1],[0,n,1]],[[e[12],e[13],e[14]],[e[15],e[16],e[17]],[e[18],e[19],e[20]],[e[21],e[22],e[23]]]),m=m.concat(...f)):(f=A([s[0],s[1],1],[[0,0,1],[r,0,1],[r,n,1],[0,n,1]],[[e[3],e[4],e[5]],[e[6],e[7],e[8]],[e[9],e[10],e[11]],[e[12],e[13],e[14]]]),l=l.concat(...f));l=l.concat(m);const u=await T(l,o,a,c),p=_(u);return new s({vertexAttributes:new y({position:u}),components:$(i?Y(p,!0):Z(p,!0)),spatialReference:a})}async function T(t,r,n,o){if(r.equals(n))return t;const a=t.reduce((e,t,r)=>{const n=Math.floor(r/3);return e[n]||(e[n]=new Array),e[n].push(t),e},new Array),{points:i}=await l(new c({points:a,spatialReference:r}),n,o);return e(o),i.flat()}function X(e,t="far"){const r=g();let n;switch(t){case"far":if(n=Array.from(15===e.length?e.slice(3):e.slice(12)),x(r,n,!1))return{coefficients:r,vertexPositions:n};break;case"near":if(n=Array.from(e.slice(0,12)),15===e.length||!x(r,n,!1))return;return{coefficients:r,vertexPositions:n}}}const Y=(e,t=!1)=>{if(t&&e-2<=4||e<=4||e%2!=0)throw new Error("Invalid number of vertices");const r=[],n=e/2,o=Math.round((t?e-2:e)/2);for(let a=0;a<o;a++){const o=a+n,i=t?o+1:o,s=i%e,c=(t?o:i+1)%e;r.push({faces:new Uint32Array([a,c,s,a,a+1,s])})}return r};function Z(e,t=!1){if(e<3||t&&e-1<3)throw new Error("Invalid number of vertices");const r=[],n=t?e-2:e-1;for(let o=0;o<n;o++)r.push({faces:new Uint32Array([0,o+1,o+2])});return r}const $=e=>e.map(e=>new h(e)),_=e=>e.length/3;export{q as checkIfPolygonContainsSelectedPoint,k as computePolygonForInspection,z as createCoveragePolygon,O as limitZToGround,T as projectVertices,W as resizePolygon,B as updateFrustum};
|
|
@@ -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{JSONMap as t}from"../../core/jsonMap.js";import{JSONSupport as i}from"../../core/JSONSupport.js";import{clone as r}from"../../core/lang.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{geometryTypes as
|
|
5
|
+
import{__decorate as e}from"tslib";import{JSONMap as t}from"../../core/jsonMap.js";import{JSONSupport as i}from"../../core/JSONSupport.js";import{clone as r}from"../../core/lang.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{geometryTypes as l}from"../../geometry/support/typeUtils.js";import n from"../../rest/support/Query.js";import a from"../../time/TimeExtent.js";var p;const c=new t({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),m=new t({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let u=p=class extends i{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:i,spatialRelationship:s,timeExtent:o,objectIds:l,units:a,distance:p}=this;return new n({geometry:r(i),objectIds:r(l),spatialRelationship:s,timeExtent:r(o),where:t,units:a,distance:p,...e})}clone(){const{where:e,geometry:t,spatialRelationship:i,timeExtent:s,objectIds:o,units:l,distance:n}=this;return new p({geometry:r(t),objectIds:r(o),spatialRelationship:i,timeExtent:r(s),where:e,units:l,distance:n})}};e([s({type:String,json:{write:!0}})],u.prototype,"where",void 0),e([s({types:l,json:{write:!0}})],u.prototype,"geometry",void 0),e([s({type:c.apiValues,json:{name:"spatialRel",read:{reader:c.read},write:{allowNull:!1,writer:c.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],u.prototype,"spatialRelationship",void 0),e([s({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],u.prototype,"distance",void 0),e([s({type:[Number],json:{write:!0}})],u.prototype,"objectIds",void 0),e([s({type:m.apiValues,json:{read:m.read,write:{writer:m.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],u.prototype,"units",void 0),e([s({type:a,json:{write:!0}})],u.prototype,"timeExtent",void 0),u=p=e([o("esri.layers.support.FeatureFilter")],u);const d=u;export{d as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{ClonableMixin as e}from"../../core/Clonable.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{reader as o}from"../../core/accessorSupport/decorators/reader.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{writer as n}from"../../core/accessorSupport/decorators/writer.js";import
|
|
5
|
+
import{__decorate as t}from"tslib";import{ClonableMixin as e}from"../../core/Clonable.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{reader as o}from"../../core/accessorSupport/decorators/reader.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{writer as n}from"../../core/accessorSupport/decorators/writer.js";import a from"../../time/TimeExtent.js";import s from"../../time/TimeInterval.js";import{timeZoneProperty as m}from"../../time/timeZoneUtils.js";function p(t,e){return s.fromJSON({value:t,unit:e})}let u=class extends(e(r)){constructor(t){super(t),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(t,e){return e.timeExtent&&Array.isArray(e.timeExtent)&&2===e.timeExtent.length?a.fromArray(e.timeExtent):null}writeFullTimeExtent(t,e){null!=t?.start&&null!=t.end?e.timeExtent=t.toArray():e.timeExtent=null}readInterval(t,e){return e.timeInterval&&e.timeIntervalUnits?p(e.timeInterval,e.timeIntervalUnits):e.defaultTimeInterval&&e.defaultTimeIntervalUnits?p(e.defaultTimeInterval,e.defaultTimeIntervalUnits):null}writeInterval(t,e){e.timeInterval=t?.toJSON().value??null,e.timeIntervalUnits=t?.toJSON().unit??null}};t([l({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],u.prototype,"cumulative",void 0),t([l({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],u.prototype,"endField",void 0),t([l({type:a,json:{write:{enabled:!0,allowNull:!0}}})],u.prototype,"fullTimeExtent",void 0),t([o("fullTimeExtent",["timeExtent"])],u.prototype,"readFullTimeExtent",null),t([n("fullTimeExtent")],u.prototype,"writeFullTimeExtent",null),t([l({type:Boolean,json:{write:!0}})],u.prototype,"hasLiveData",void 0),t([l({type:s,json:{write:{enabled:!0,allowNull:!0}}})],u.prototype,"interval",void 0),t([o("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],u.prototype,"readInterval",null),t([n("interval")],u.prototype,"writeInterval",null),t([l({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],u.prototype,"startField",void 0),t([l(m("timeReference",!0))],u.prototype,"timeZone",void 0),t([l({type:String,json:{write:{enabled:!0,allowNull:!0}}})],u.prototype,"trackIdField",void 0),t([l({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],u.prototype,"useTime",void 0),t([l({type:[Date],json:{read:!1}})],u.prototype,"stops",void 0),u=t([i("esri.layers.support.TimeInfo")],u);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 e}from"tslib";import o from"../../PopupTemplate.js";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{setDeepValue as s}from"../../core/object.js";import{property as p}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{writer as a}from"../../core/accessorSupport/decorators/writer.js";import m from"./AggregateField.js";import{popupEnabled as n}from"./commonProperties.js";import l from"./TrackPartInfo.js";import d from"../../renderers/SimpleRenderer.js";import{defaultPointSymbol2D as c,defaultPolylineSymbol2D as y}from"../../symbols/support/defaults.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import o from"../../PopupTemplate.js";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{setDeepValue as s}from"../../core/object.js";import{property as p}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{writer as a}from"../../core/accessorSupport/decorators/writer.js";import m from"./AggregateField.js";import{popupEnabled as n}from"./commonProperties.js";import l from"./TrackPartInfo.js";import d from"../../renderers/SimpleRenderer.js";import{defaultPointSymbol2D as c,defaultPolylineSymbol2D as y}from"../../symbols/support/defaults.js";import j from"../../time/TimeInterval.js";let u=class extends(r(t)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new l({renderer:new d({symbol:c.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new l({renderer:new d({symbol:c.clone()})}),this.trackLines=new l({renderer:new d({symbol:y.clone()})}),this.timeField="startTimeField"}writeFields(e,o,r){const t=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());s(r,t,o)}};e([p({type:Boolean,json:{write:!0}})],u.prototype,"enabled",void 0),e([p({type:[m],json:{write:!0}})],u.prototype,"fields",void 0),e([a("fields")],u.prototype,"writeFields",null),e([p({type:l,json:{write:!0}})],u.prototype,"latestObservations",void 0),e([p({type:j,json:{write:!0}})],u.prototype,"maxDisplayDuration",void 0),e([p({type:Number,json:{write:!0}})],u.prototype,"maxDisplayObservationsPerTrack",void 0),e([p(n)],u.prototype,"popupEnabled",void 0),e([p({type:o,json:{name:"popupInfo",write:!0}})],u.prototype,"popupTemplate",void 0),e([p({type:l,json:{write:!0}})],u.prototype,"previousObservations",void 0),e([p({type:l,json:{write:!0}})],u.prototype,"trackLines",void 0),e([p({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],u.prototype,"timeField",void 0),u=e([i("esri.layers.support.TrackInfo")],u);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 e from"../../core/Collection.js";import"../../core/has.js";import{LayerLoadContext as r}from"./LayerLoadContext.js";import{layerLookupMap as a}from"./lazyLayerLoader.js";import y from"../../portal/PortalItem.js";import{isMapNotesLayer as t,isMarkupLayer as i,isRouteLayer as L}from"../../portal/support/featureCollectionUtils.js";import{selectLayerClassPath as
|
|
5
|
+
import e from"../../core/Collection.js";import"../../core/has.js";import{LayerLoadContext as r}from"./LayerLoadContext.js";import{layerLookupMap as a}from"./lazyLayerLoader.js";import y from"../../portal/PortalItem.js";import{isMapNotesLayer as t,isMarkupLayer as i,isRouteLayer as L}from"../../portal/support/featureCollectionUtils.js";import{selectLayerClassPath as n}from"../../portal/support/portalLayers.js";import{loadStyleRenderer as o}from"../../renderers/support/styleUtils.js";async function l(e,r,a){if(!r)return;const y=r.map(e=>f(e,a)),t=await Promise.allSettled(y);for(const i of t)"rejected"===i.status||i.value&&e.add(i.value)}const c={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GaussianSplatLayer:"GaussianSplatLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",Object3DTilesLayer:"UnsupportedLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},s={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},p={ArcGISFeatureLayer:"FeatureLayer"},S={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},u={IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer"},d={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",ArcGISVideoLayer:"VideoLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},I={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},g={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},m={...d,LinkChartLayer:"LinkChartLayer"},T={...I},G={...g};async function f(e,r){return M(await b(e,r),e,r)}async function M(e,r,a){const y=new e;return y.read(r,a.context),"group"===y.type&&("GroupLayer"===r.layerType?await C(y,r,a):w(r)?h(y,r,a.context):A(r)&&await W(y,r,a.context)),await o(y,a.context),y}async function b(e,o){const l=o.context,c=v(l);let s=e.layerType||e.type;!s&&o?.defaultLayerType&&(s=o.defaultLayerType);const p=c[s];let S=p?a[p]:a.UnknownLayer;if(w(e)){const t=l?.portal;if(e.itemId){const i=new y({id:e.itemId,portal:t});await i.load();const L=(await n(i,new r)).className||"UnknownLayer";S=a[L]}}else"ArcGISFeatureLayer"===s?t(e)||i(e)?S=a.MapNotesLayer:L(e)?S=a.RouteLayer:A(e)&&(S=a.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?S=a.WMTSLayer:"WFS"===s&&"2.0.0"!==e.wfsInfo?.version&&(S=a.UnsupportedLayer);return S()}function A(e){if("ArcGISFeatureLayer"!==e.layerType||w(e))return!1;return(e.featureCollection?.layers?.length??0)>1}function w(e){return"Feature Collection"===e.type}function v(e){let r;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap-base-layers":r=S;break;case"basemap-ground-layers":r=u;break;case"ground":r=s;break;case"tables":r=p;break;default:r=c}break;case"link-chart":switch(e.layerContainerType){case"basemap-base-layers":r=G;break;case"tables":r=T;break;default:r=m}break;default:switch(e.layerContainerType){case"basemap-base-layers":r=g;break;case"tables":r=I;break;default:r=d}}return r}async function C(r,a,y){const t=new e,i=l(t,Array.isArray(a.layers)?a.layers:[],y);try{try{if(await i,"group"===r.type)return r.layers.addMany(t),r}catch(L){r.destroy();for(const e of t)e.destroy();throw L}}catch(L){throw L}}function h(e,r,a){r.itemId&&(e.portalItem=new y({id:r.itemId,portal:a?.portal}),e.when(()=>{const y=y=>{const t=y.layerId;F(y,e,r,t,a);const i=r.featureCollection?.layers?.[t];i&&y.read(i,a)};e.layers?.forEach(y),e.tables?.forEach(y)}))}async function W(e,r,y){const t=a.FeatureLayer,i=await t(),L=r.featureCollection,n=L?.showLegend,o=L?.layers?.map((a,t)=>{const L=new i;L.read(a,y);const o={...y,ignoreDefaults:!0};return F(L,e,r,t,o),null!=n&&L.read({showLegend:n},o),L});e.layers.addMany(o??[])}function F(e,r,a,y,t){e.read({id:`${r.id}-sublayer-${y}`,visibility:a.visibleLayers?.includes(y)??!0},t)}export{C as populateGroupLayer,l as populateOperationalLayers};
|
|
@@ -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{isSome as e}from"../../../core/arrayUtils.js";import n from"../DimensionalDefinition.js";function t(e,n,i){const a=n.shift();if(0===i.length){const e=[];i.push({sliceId:-1,multidimensionalDefinition:e})}const s=i.length;for(let t=0;t<s;t++){const n=i.shift().multidimensionalDefinition;a.values?.forEach(t=>{i.push({sliceId:-1,multidimensionalDefinition:[...n,{variableName:e,dimensionName:a.name,values:[t]}]})})}n.length&&t(e,n,i)}function i(e,n){const i=[];let a=0;return(n?e.variables.filter(e=>e.name.toLowerCase()===n.toLowerCase()):[...e.variables].sort((e,n)=>e.name>n.name?1:-1)).forEach(e=>{const n=[],s=[...e.dimensions].sort((e,n)=>e.name>n.name?-1:1);t(e.name,s,n),n.forEach(e=>{i.push({...e,sliceId:a++})})}),i}function a(e,n,t){let i=e;if(n&&(n=[...n].sort((e,n)=>e.dimensionName<n.dimensionName?-1:1)).forEach(({dimensionName:e,values:n,isSlice:t})=>{n.length&&(i=i.filter(i=>{const a=i.multidimensionalDefinition.find(n=>n.dimensionName===e);if(null==a)return!1;const s=a.values[0];return"number"==typeof s?"number"==typeof n[0]?n.includes(s):n.some(e=>e[0]<=s&&e[1]>=s):"number"==typeof n[0]?n.some(e=>s[0]<=e&&s[1]>=e):t?n.some(e=>e[0]===s[0]&&e[0]===s[1]):n.some(e=>e[0]>=s[0]&&e[0]<=s[1]||e[1]>=s[0]&&e[1]<=s[1]||e[0]<s[0]&&e[1]>s[1])}))}),i.length&&null!=t?.start&&null!=t.end){const e=t.start.getTime(),n=t.end.getTime(),a=i[0].multidimensionalDefinition.findIndex(e=>"StdTime"===e.dimensionName);a>-1&&(i=i.filter(t=>{const i=t.multidimensionalDefinition[a].values[0];return e<=i&&n>=i}))}return i.map(e=>e.sliceId)}function s(e,n){return Array.isArray(e)?n[0]===n[1]?e[0]===n[0]||e[1]===n[0]:e[0]>=n[0]&&e[0]<=n[1]&&e[1]>=n[0]&&e[1]<=n[1]:e>=n[0]&&e<=n[1]}function l(e,n){return e[0]<=n[0]&&e[1]>=n[0]||e[0]<=n[1]&&e[1]>=n[1]||e[0]>=n[0]&&e[1]<=n[1]}function r(e){return 1===e.length?[e[0],e[0]]:[e[0],e[e.length-1]]}function u(e,n,t){if(!n?.subsetDefinitions?.length)return e;let i;if(t){const{variables:a}=n;if(a.length&&!a.includes(t))return null;const s=n.subsetDefinitions.find(n=>n.dimensionName===e.name&&n.variableName===t);if(!s?.values?.length)return e;i=r(s.values)}else{const t=n.dimensions.find(({name:n})=>n===e.name);i=t?.extent}const a=i;if(!a?.length)return e;const l=e.values.filter(e=>s(e,a));return{...e,extent:[...a],values:l}}function o(e,n,t){if(!n?.subsetDefinitions?.length)return!1;const{variables:i}=n;if(i.length&&e.some(({variableName:e})=>e&&!i.includes(e)))return!0;for(let a=0;a<e.length;a++){const i=e[a],u=n.subsetDefinitions.find(e=>(""===i.variableName||e.variableName===i.variableName)&&e.dimensionName===i.dimensionName);if(u?.values.length){const e=r(u.values);if(!i.isSlice&&2===i.values.length&&!Array.isArray(i.values[0])&&i.values[0]!==i.values[1]&&t){if(!l(i.values,e))return!0}else if(i.values.some(n=>!s(n,e)))return!0}}return!1}function m(e,n){if(null==e)return{isOutside:!1};const{geometry:t,timeExtent:i,multidimensionalDefinition:a}=n;let s=null;if(null!=i&&(s=c(e,i),null==s))return{isOutside:!0};const{areaOfInterest:l}=e;if(l&&t){const e="point"===t.type?t:"extent"===t.type?t.center:"polygon"===t.type?t.centroid:null;if(e&&!l.contains(e))return{isOutside:!0}}return null!=a&&a.length&&o(a,e,!0)?{isOutside:!0}:{isOutside:!1,intersection:{geometry:t,timeExtent:s,multidimensionalDefinition:a}}}function c(e,t){const i=e.dimensions.find(({name:e})=>"StdTime"===e);if(null==i||null==t.start&&null==t.end)return t;t=t.clone();const{start:a,end:s}=t.toJSON(),l=a===s?[a]:null!=a&&null!=s?[a,s]:[a??s];if(2===l.length&&i?.extent.length&&(l[0]=Math.max(l[0],i.extent[0]),l[1]=Math.min(l[1],i.extent[1]??i.extent[0]),l[1]<l[0]))return null;return o([new n({variableName:"",dimensionName:"StdTime",isSlice:1===l.length,values:l})],e,!0)?null:(t.start=new Date(l[0]),t.end=new Date(l[1]??l[0]),t)}function f(e){const{rasterInfo:n,multidimensionalSubset:t}=e,{multidimensionalInfo:i}=n;if(null==i)return null;let a=e.multidimensionalDefinition?.length?e.multidimensionalDefinition:h(n,{multidimensionalSubset:t});if(!a?.length)return null;if(a.some(e=>!e.dimensionName)){const{variableName:e}=a[0],i=h(n,{multidimensionalSubset:t,variableName:e});i?.forEach(e=>{const n=a?.find(({dimensionName:n})=>n===e.dimensionName);n?.values?.length&&(e.values=n.values,e.isSlice=n.isSlice)}),a=i}const{timeExtent:s}=e;if(null!=a&&null!=s&&(null!=s.start||null!=s.end)){a=a.map(e=>e.clone());const e=i.variables.find(({name:e})=>e===a[0].variableName)?.dimensions?.find(({name:e})=>"StdTime"===e),n=a.find(({dimensionName:e})=>"StdTime"===e);if(!e||!n)return null;const{start:t,end:l}=s,r=null==t?null:t.getTime(),u=null==l?null:l.getTime(),o=r??u,m=u??r;if(null!=e.values){const t=e.values.filter(e=>{if(Array.isArray(e)){if(o===m)return e[0]<=o&&e[1]>=o;const n=e[0]<=o&&e[1]>o||e[0]<m&&e[1]>=m,t=e[0]>=o&&e[1]<=m||e[0]<o&&e[1]>m;return n||t}return o===m?e===o:e>=o&&e<=m});if(t.length){const e=t.sort((e,n)=>{const t=Array.isArray(e)?e[0]:e,i=Array.isArray(e)?e[1]:e,a=Array.isArray(n)?n[0]:n,s=Array.isArray(n)?n[1]:n;if(o===m)return t-a;return Math.abs(i-m)-Math.abs(s-m)})[0];n.values=[e]}else a=null}else if(e.hasRegularIntervals&&e.extent){const[t,i]=e.extent;o>i||m<t?a=null:n.values=o===m?[o]:[Math.max(t,o),Math.min(i,m)]}}return null!=a&&o(a,t)?null:a}function d(e,n={}){const{multidimensionalInfo:t,keyProperties:i}=e;if(null==t)return null;const{variableName:a,multidimensionalSubset:s,multidimensionalDefinition:l}=n,r=null!=l?l[0]?.variableName:null,u=a||r||i?.DefaultVariable;let{variables:o}=t;s?.variables?.length&&(o=o.filter(({name:e})=>s.variables.includes(e)));return u?o.find(({name:e})=>e===u)??o[0]:o[0]}function h(e,t={}){const i=d(e,t);if(!i)return null;const a=[],{dimensions:s,name:l}=i;if(0===s.length)return[new n({variableName:l,dimensionName:"",values:[],isSlice:!0})];for(let r=0;r<s.length;r++){const e=u(s[r],t.multidimensionalSubset,l);if(!e)return null;const{values:i,extent:o}=e;let m=i?.[0]??o?.[0];"stdz"===e.name.toLowerCase()&&!e.hasRanges&&o&&Math.abs(o[1])<=Math.abs(o[0])&&(m=i?.length?i[i.length-1]:o[1]),a.push(new n({variableName:l,dimensionName:e.name,values:[m],isSlice:!t.useRangeForRangedDimensionInfo||!!e.hasRanges}))}return a}function g(e){return!!e?.length&&e.some(e=>{if(null==e.values)return!0;const n=e.values.length;return 0===n||n>1||!e.isSlice&&Array.isArray(e.values[0])})}function v(n,t){if(null==t||null==n)return null;let i=t.variables.map(e=>({...e}));return n?.variables?.length&&(i=i.filter(({name:e})=>n.variables.includes(e)),i.forEach(t=>{t.dimensions=t.dimensions.map(e=>u(e,n,t.name)).filter(e)})),i}function b(e,n){const{values:t}=n;if(t?.length){const n=Array.isArray(t[0]),i=Array.isArray(e);return n!==i?-1:n&&i?t.findIndex(n=>n[0]===e[0]&&n[1]===e[1]):t.indexOf(e)}const{extent:i}=n;if(Array.isArray(e)||!i||e<i[0]||e>i[1])return-1;const a=n.interval||1;if("ISO8601"!==n.unit)return Math.round((e-i[0])/a);const s=i[0];let l=-1;switch(n.intervalUnit?.toLowerCase()||"days"){case"seconds":l=Math.round((e-s)/1e3/a);break;case"minutes":l=Math.round((e-s)/6e4/a);break;case"hours":l=Math.round((e-s)/36e5/a);break;case"days":l=Math.round((e-s)/864e5/a);break;case"months":{const n=new Date(e).getUTCFullYear()-new Date(s).getUTCFullYear(),t=new Date(s).getUTCMonth(),i=new Date(e).getUTCMonth();l=0===n?i-t:i+11-t+12*(n-1)}break;case"years":l=Math.round((new Date(e).getUTCFullYear()-new Date(s).getUTCFullYear())/a);break;case"decades":l=Math.round((new Date(e).getUTCFullYear()-new Date(s).getUTCFullYear())/10/a)}return l}function y(e){let n=e.values?.length;if(n)return n;const{extent:t,unit:i}=e,a=e.interval||1,s=t?t[1]-t[0]:0;if("ISO8601"!==i)return Math.round(s/a);switch(e.intervalUnit?.toLowerCase()??"seconds"){case"seconds":n=Math.round(s/1e3/a);break;case"minutes":n=Math.round(s/6e4/a);break;case"hours":n=Math.round(s/36e5/a);break;case"days":n=Math.round(s/864e5/a);break;case"months":if(t){const e=new Date(t[1]).getUTCFullYear()-new Date(t[0]).getUTCFullYear(),i=new Date(t[0]).getUTCMonth(),a=new Date(t[1]).getUTCMonth();n=0===e?a-i+1:a+11-i+12*(e-1)+1}else n=0;break;case"years":n=t?Math.round((new Date(t[1]).getUTCFullYear()-new Date(t[0]).getUTCFullYear())/a):0;break;case"decades":n=t?Math.round((new Date(t[1]).getUTCFullYear()-new Date(t[0]).getUTCFullYear())/10/a):0;break;default:n=0}return n}function D(e){if(2!==e.extent?.length||!e.interval)return[];const{extent:[n,t],interval:i}=e;if("ISO8601"===e.unit){const a=e.intervalUnit?.toLowerCase()??"days";return["decades","years","months","days","hours","minutes","seconds"].includes(a)?T(n,t,i,a):[]}const a=Math.round((t-n)/i);return Array.from({length:a},(e,s)=>s===a-1?t:n+s*i)}function T(e,n,t,i){const a=[];let s=e;const l=new Date(e);for(;s<=n;)switch(a.push(s),i){case"decades":l.setUTCFullYear(l.getUTCFullYear()+10*t),s=l.getTime();break;case"years":l.setUTCFullYear(l.getUTCFullYear()+t),s=l.getTime();break;case"months":l.setUTCMonth(l.getUTCMonth()+t),s=l.getTime();break;case"days":s+=864e5*t;break;case"hours":s+=36e5*t;break;case"minutes":s+=6e4*t;break;case"seconds":s+=1e3*t}return 1===a.length?a[1]=n:a[a.length-1]=n,a}function N(e,n){let t=0;const i=e[0].variableName,a=[...n.variables].sort((e,n)=>e.name>n.name?1:-1);for(let s=0;s<a.length;s++){const n=a[s],l=[...n.dimensions].sort((e,n)=>e.name>n.name?-1:1);if(n.name!==i){t+=l.map(e=>y(e)).reduce((e,n)=>e*n);continue}const r=l.map(e=>y(e)),u=l.length;for(let i=0;i<u;i++){const n=e.find(e=>e.dimensionName===l[i].name);if(null==n)return null;const a=b(n.values[0],l[i]);if(-1===a)return null;r.shift(),t+=i===u-1?a:a*r.reduce((e,n)=>e*n)}break}return t}function w(e){return Math.round(24*(e-25569)*3600*1e3)}export{w as convertOleDateTimeToEpoch,i as createSlices,h as getDefaultMultidimensionalDefinition,d as getDefaultVariableInfo,D as getDimensionValues,f as getEffectiveMultidimensionalDefinition,a as getSliceIds,N as getSliceIndex,v as getSubsetVariablesFromMdInfo,T as getTimeDimensionValues,o as hasExcludedVariableOrDimension,m as intersectMultimensionalSubset,g as isMultiSliceOrRangeDefinition};
|
|
5
|
+
import{isSome as e}from"../../../core/arrayUtils.js";import n from"../../../geometry/Point.js";import{polygonCentroidPoint as t}from"../../../geometry/support/centroid.js";import i from"../DimensionalDefinition.js";function a(e,n,t){const i=n.shift();if(0===t.length){const e=[];t.push({sliceId:-1,multidimensionalDefinition:e})}const s=t.length;for(let a=0;a<s;a++){const n=t.shift().multidimensionalDefinition;i.values?.forEach(a=>{t.push({sliceId:-1,multidimensionalDefinition:[...n,{variableName:e,dimensionName:i.name,values:[a]}]})})}n.length&&a(e,n,t)}function s(e,n){const t=[];let i=0;return(n?e.variables.filter(e=>e.name.toLowerCase()===n.toLowerCase()):[...e.variables].sort((e,n)=>e.name>n.name?1:-1)).forEach(e=>{const n=[],s=[...e.dimensions].sort((e,n)=>e.name>n.name?-1:1);a(e.name,s,n),n.forEach(e=>{t.push({...e,sliceId:i++})})}),t}function r(e,n,t){let i=e;if(n&&(n=[...n].sort((e,n)=>e.dimensionName<n.dimensionName?-1:1)).forEach(({dimensionName:e,values:n,isSlice:t})=>{n.length&&(i=i.filter(i=>{const a=i.multidimensionalDefinition.find(n=>n.dimensionName===e);if(null==a)return!1;const s=a.values[0];return"number"==typeof s?"number"==typeof n[0]?n.includes(s):n.some(e=>e[0]<=s&&e[1]>=s):"number"==typeof n[0]?n.some(e=>s[0]<=e&&s[1]>=e):t?n.some(e=>e[0]===s[0]&&e[0]===s[1]):n.some(e=>e[0]>=s[0]&&e[0]<=s[1]||e[1]>=s[0]&&e[1]<=s[1]||e[0]<s[0]&&e[1]>s[1])}))}),i.length&&null!=t?.start&&null!=t.end){const e=t.start.getTime(),n=t.end.getTime(),a=i[0].multidimensionalDefinition.findIndex(e=>"StdTime"===e.dimensionName);a>-1&&(i=i.filter(t=>{const i=t.multidimensionalDefinition[a].values[0];return e<=i&&n>=i}))}return i.map(e=>e.sliceId)}function l(e,n){return Array.isArray(e)?n[0]===n[1]?e[0]===n[0]||e[1]===n[0]:e[0]>=n[0]&&e[0]<=n[1]&&e[1]>=n[0]&&e[1]<=n[1]:e>=n[0]&&e<=n[1]}function u(e,n){return e[0]<=n[0]&&e[1]>=n[0]||e[0]<=n[1]&&e[1]>=n[1]||e[0]>=n[0]&&e[1]<=n[1]}function o(e){return 1===e.length?[e[0],e[0]]:[e[0],e[e.length-1]]}function m(e,n,t){if(!n?.subsetDefinitions?.length)return e;let i;if(t){const{variables:a}=n;if(a.length&&!a.includes(t))return null;const s=n.subsetDefinitions.find(n=>n.dimensionName===e.name&&n.variableName===t);if(!s?.values?.length)return e;i=o(s.values)}else{const t=n.dimensions.find(({name:n})=>n===e.name);i=t?.extent}const a=i;if(!a?.length)return e;const s=e.values.filter(e=>l(e,a));return{...e,extent:[...a],values:s}}function c(e,n,t){if(!n?.subsetDefinitions?.length)return!1;const{variables:i}=n;if(i.length&&e.some(({variableName:e})=>e&&!i.includes(e)))return!0;for(let a=0;a<e.length;a++){const i=e[a],s=n.subsetDefinitions.find(e=>(""===i.variableName||e.variableName===i.variableName)&&e.dimensionName===i.dimensionName);if(s?.values.length){const e=o(s.values);if(!i.isSlice&&2===i.values.length&&!Array.isArray(i.values[0])&&i.values[0]!==i.values[1]&&t){if(!u(i.values,e))return!0}else if(i.values.some(n=>!l(n,e)))return!0}}return!1}function f(e,n){if(null==e)return{isOutside:!1};const{geometry:t,timeExtent:i,multidimensionalDefinition:a}=n;let s=null;if(null!=i&&(s=h(e,i),null==s))return{isOutside:!0};const{areaOfInterest:r}=e;if(r&&t){const e=d(t);if(e&&!r.contains(e))return{isOutside:!0}}return null!=a&&a.length&&c(a,e,!0)?{isOutside:!0}:{isOutside:!1,intersection:{geometry:t,timeExtent:s,multidimensionalDefinition:a}}}function d(e){switch(e.type){case"point":return e;case"extent":return e.center;case"polygon":{const i=t(e);return i?n.fromJSON(i):null}}return null}function h(e,n){const t=e.dimensions.find(({name:e})=>"StdTime"===e);if(null==t||null==n.start&&null==n.end)return n;n=n.clone();const{start:a,end:s}=n.toJSON(),r=a===s?[a]:null!=a&&null!=s?[a,s]:[a??s];if(2===r.length&&t?.extent.length&&(r[0]=Math.max(r[0],t.extent[0]),r[1]=Math.min(r[1],t.extent[1]??t.extent[0]),r[1]<r[0]))return null;return c([new i({variableName:"",dimensionName:"StdTime",isSlice:1===r.length,values:r})],e,!0)?null:(n.start=new Date(r[0]),n.end=new Date(r[1]??r[0]),n)}function g(e){const{rasterInfo:n,multidimensionalSubset:t}=e,{multidimensionalInfo:i}=n;if(null==i)return null;let a=e.multidimensionalDefinition?.length?e.multidimensionalDefinition:b(n,{multidimensionalSubset:t});if(!a?.length)return null;if(a.some(e=>!e.dimensionName)){const{variableName:e}=a[0],i=b(n,{multidimensionalSubset:t,variableName:e});i?.forEach(e=>{const n=a?.find(({dimensionName:n})=>n===e.dimensionName);n?.values?.length&&(e.values=n.values,e.isSlice=n.isSlice)}),a=i}const{timeExtent:s}=e;if(null!=a&&null!=s&&(null!=s.start||null!=s.end)){a=a.map(e=>e.clone());const e=i.variables.find(({name:e})=>e===a[0].variableName)?.dimensions?.find(({name:e})=>"StdTime"===e),n=a.find(({dimensionName:e})=>"StdTime"===e);if(!e||!n)return null;const{start:t,end:r}=s,l=null==t?null:t.getTime(),u=null==r?null:r.getTime(),o=l??u,m=u??l;if(null!=e.values){const t=e.values.filter(e=>{if(Array.isArray(e)){if(o===m)return e[0]<=o&&e[1]>=o;const n=e[0]<=o&&e[1]>o||e[0]<m&&e[1]>=m,t=e[0]>=o&&e[1]<=m||e[0]<o&&e[1]>m;return n||t}return o===m?e===o:e>=o&&e<=m});if(t.length){const e=t.sort((e,n)=>{const t=Array.isArray(e)?e[0]:e,i=Array.isArray(e)?e[1]:e,a=Array.isArray(n)?n[0]:n,s=Array.isArray(n)?n[1]:n;if(o===m)return t-a;return Math.abs(i-m)-Math.abs(s-m)})[0];n.values=[e]}else a=null}else if(e.hasRegularIntervals&&e.extent){const[t,i]=e.extent;o>i||m<t?a=null:n.values=o===m?[o]:[Math.max(t,o),Math.min(i,m)]}}return null!=a&&c(a,t)?null:a}function v(e,n={}){const{multidimensionalInfo:t,keyProperties:i}=e;if(null==t)return null;const{variableName:a,multidimensionalSubset:s,multidimensionalDefinition:r}=n,l=null!=r?r[0]?.variableName:null,u=a||l||i?.DefaultVariable;let{variables:o}=t;s?.variables?.length&&(o=o.filter(({name:e})=>s.variables.includes(e)));return u?o.find(({name:e})=>e===u)??o[0]:o[0]}function b(e,n={}){const t=v(e,n);if(!t)return null;const a=[],{dimensions:s,name:r}=t;if(0===s.length)return[new i({variableName:r,dimensionName:"",values:[],isSlice:!0})];for(let l=0;l<s.length;l++){const e=m(s[l],n.multidimensionalSubset,r);if(!e)return null;const{values:t,extent:u}=e;let o=t?.[0]??u?.[0];"stdz"===e.name.toLowerCase()&&!e.hasRanges&&u&&Math.abs(u[1])<=Math.abs(u[0])&&(o=t?.length?t[t.length-1]:u[1]),a.push(new i({variableName:r,dimensionName:e.name,values:[o],isSlice:!n.useRangeForRangedDimensionInfo||!!e.hasRanges}))}return a}function y(e){return!!e?.length&&e.some(e=>{if(null==e.values)return!0;const n=e.values.length;return 0===n||n>1||!e.isSlice&&Array.isArray(e.values[0])})}function D(n,t){if(null==t||null==n)return null;let i=t.variables.map(e=>({...e}));return n?.variables?.length&&(i=i.filter(({name:e})=>n.variables.includes(e)),i.forEach(t=>{t.dimensions=t.dimensions.map(e=>m(e,n,t.name)).filter(e)})),i}function N(e,n){const{values:t}=n;if(t?.length){const n=Array.isArray(t[0]),i=Array.isArray(e);return n!==i?-1:n&&i?t.findIndex(n=>n[0]===e[0]&&n[1]===e[1]):t.indexOf(e)}const{extent:i}=n;if(Array.isArray(e)||!i||e<i[0]||e>i[1])return-1;const a=n.interval||1;if("ISO8601"!==n.unit)return Math.round((e-i[0])/a);const s=i[0];let r=-1;switch(n.intervalUnit?.toLowerCase()||"days"){case"seconds":r=Math.round((e-s)/1e3/a);break;case"minutes":r=Math.round((e-s)/6e4/a);break;case"hours":r=Math.round((e-s)/36e5/a);break;case"days":r=Math.round((e-s)/864e5/a);break;case"months":{const n=new Date(e).getUTCFullYear()-new Date(s).getUTCFullYear(),t=new Date(s).getUTCMonth(),i=new Date(e).getUTCMonth();r=0===n?i-t:i+11-t+12*(n-1)}break;case"years":r=Math.round((new Date(e).getUTCFullYear()-new Date(s).getUTCFullYear())/a);break;case"decades":r=Math.round((new Date(e).getUTCFullYear()-new Date(s).getUTCFullYear())/10/a)}return r}function T(e){let n=e.values?.length;if(n)return n;const{extent:t,unit:i}=e,a=e.interval||1,s=t?t[1]-t[0]:0;if("ISO8601"!==i)return Math.round(s/a);switch(e.intervalUnit?.toLowerCase()??"seconds"){case"seconds":n=Math.round(s/1e3/a);break;case"minutes":n=Math.round(s/6e4/a);break;case"hours":n=Math.round(s/36e5/a);break;case"days":n=Math.round(s/864e5/a);break;case"months":if(t){const e=new Date(t[1]).getUTCFullYear()-new Date(t[0]).getUTCFullYear(),i=new Date(t[0]).getUTCMonth(),a=new Date(t[1]).getUTCMonth();n=0===e?a-i+1:a+11-i+12*(e-1)+1}else n=0;break;case"years":n=t?Math.round((new Date(t[1]).getUTCFullYear()-new Date(t[0]).getUTCFullYear())/a):0;break;case"decades":n=t?Math.round((new Date(t[1]).getUTCFullYear()-new Date(t[0]).getUTCFullYear())/10/a):0;break;default:n=0}return n}function w(e){if(2!==e.extent?.length||!e.interval)return[];const{extent:[n,t],interval:i}=e;if("ISO8601"===e.unit){const a=e.intervalUnit?.toLowerCase()??"days";return["decades","years","months","days","hours","minutes","seconds"].includes(a)?M(n,t,i,a):[]}const a=Math.round((t-n)/i);return Array.from({length:a},(e,s)=>s===a-1?t:n+s*i)}function M(e,n,t,i){const a=[];let s=e;const r=new Date(e);for(;s<=n;)switch(a.push(s),i){case"decades":r.setUTCFullYear(r.getUTCFullYear()+10*t),s=r.getTime();break;case"years":r.setUTCFullYear(r.getUTCFullYear()+t),s=r.getTime();break;case"months":r.setUTCMonth(r.getUTCMonth()+t),s=r.getTime();break;case"days":s+=864e5*t;break;case"hours":s+=36e5*t;break;case"minutes":s+=6e4*t;break;case"seconds":s+=1e3*t}return 1===a.length?a[1]=n:a[a.length-1]=n,a}function C(e,n){let t=0;const i=e[0].variableName,a=[...n.variables].sort((e,n)=>e.name>n.name?1:-1);for(let s=0;s<a.length;s++){const n=a[s],r=[...n.dimensions].sort((e,n)=>e.name>n.name?-1:1);if(n.name!==i){t+=r.map(e=>T(e)).reduce((e,n)=>e*n);continue}const l=r.map(e=>T(e)),u=r.length;for(let i=0;i<u;i++){const n=e.find(e=>e.dimensionName===r[i].name);if(null==n)return null;const a=N(n.values[0],r[i]);if(-1===a)return null;l.shift(),t+=i===u-1?a:a*l.reduce((e,n)=>e*n)}break}return t}function U(e){return Math.round(24*(e-25569)*3600*1e3)}export{U as convertOleDateTimeToEpoch,s as createSlices,b as getDefaultMultidimensionalDefinition,v as getDefaultVariableInfo,w as getDimensionValues,g as getEffectiveMultidimensionalDefinition,r as getSliceIds,C as getSliceIndex,D as getSubsetVariablesFromMdInfo,M as getTimeDimensionValues,c as hasExcludedVariableOrDimension,f as intersectMultimensionalSubset,y as isMultiSliceOrRangeDefinition};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "4.34.0-next.
|
|
3
|
+
"version": "4.34.0-next.67",
|
|
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": [
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
22
22
|
"@esri/calcite-components": "^3.2.1",
|
|
23
|
-
"@vaadin/grid": "~24.8.
|
|
23
|
+
"@vaadin/grid": "~24.8.6",
|
|
24
24
|
"@zip.js/zip.js": "~2.7.72",
|
|
25
25
|
"luxon": "~3.7.1",
|
|
26
26
|
"marked": "~16.2.0",
|