@arcgis/core 5.0.0-next.66 → 5.0.0-next.68
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/Ground.d.ts +4 -4
- package/Map.d.ts +1 -1
- package/WebDocument2D.d.ts +2 -3
- package/WebScene.d.ts +2 -3
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +9 -6
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.js +1 -1
- package/applications/Components/QuantityFormatter.d.ts +14 -1
- package/applications/Components/SelectionOperation.d.ts +45 -9
- package/applications/Components/SketchTooltipControls.d.ts +31 -6
- package/applications/Components/actionUtils.d.ts +1 -0
- package/applications/Components/analysisUtils.d.ts +98 -26
- package/applications/Components/arcadeEditorUtils.d.ts +3 -0
- package/applications/Components/arcadeFeatureUtils.d.ts +34 -6
- package/applications/Components/baUtils.d.ts +8 -8
- package/applications/Components/basemapUtils.d.ts +2 -0
- package/applications/Components/drawUtils.d.ts +6 -1
- package/applications/Components/featureUtils.d.ts +9 -0
- package/applications/Components/fontUtils.d.ts +2 -0
- package/applications/Components/formatUtils.d.ts +2 -0
- package/applications/Components/getDefaultUnits.d.ts +2 -0
- package/applications/Components/imageryUtils.d.ts +135 -27
- package/applications/Components/layerOriginUtils.d.ts +5 -0
- package/applications/Components/layersEffectsJsonUtils.d.ts +2 -0
- package/applications/Components/previewSymbol2D.d.ts +2 -0
- package/applications/Components/reactiveUtils.d.ts +13 -9
- package/applications/Components/sanitizerUtils.d.ts +2 -0
- package/applications/Components/stringUtils.d.ts +5 -0
- package/applications/Components/styleUtils.d.ts +2 -0
- package/applications/Components/svgUtils.d.ts +4 -0
- package/applications/Components/testUtils.d.ts +3 -0
- package/applications/Components/viewUtils.d.ts +2 -0
- package/applications/Components/webStyleSymbolUtils.d.ts +2 -0
- package/applications/Excalibur/videoViewUtils.d.ts +19 -3
- package/applications/ExperienceBuilder/sketchUtils.d.ts +10 -1
- package/applications/KnowledgeStudio/dataModelVisualization.d.ts +2 -0
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +33 -4
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +73 -10
- package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +12 -1
- package/applications/KnowledgeStudio/reshape.d.ts +144 -28
- package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +17 -3
- package/applications/MapViewer/layerUtils.d.ts +2 -0
- package/applications/MapViewer/mediaUtils.d.ts +42 -8
- package/applications/MapViewer/templateUtils.d.ts +78 -16
- package/applications/PortalApp/layerUtils.d.ts +2 -0
- package/applications/SceneViewer/colorUtils.d.ts +2 -0
- package/applications/SceneViewer/devEnvironmentUtils.d.ts +3 -0
- package/applications/SceneViewer/layerUtils.d.ts +5 -3
- package/applications/SceneViewer/sceneViewerUtils.d.ts +52 -5
- package/applications/SceneViewer/symbolUtils.d.ts +2 -0
- package/applications/Urban/LineImagePattern3D.d.ts +8 -2
- package/applications/Urban/imagePatternUtils.d.ts +10 -2
- package/applications/Urban/meshUtils.d.ts +2 -0
- package/applications/WebEditor/sketchUtils.d.ts +24 -4
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/batchExec.js +1 -1
- package/arcade/compilerUtils.js +1 -1
- package/arcade/featureset/actions/SpatialFilter.js +1 -1
- package/arcade/geometry/unitConversion.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/arcade.js +1 -1
- package/assets/components/assets/icon/fileEsl16.json +1 -0
- package/assets/components/assets/icon/fileEsl24.json +1 -0
- package/assets/components/assets/icon/fileEsl32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{251eb6e00f99a816d55c.js → 0326314947734b8e640a.js} +1 -1
- package/assets/esri/core/workers/chunks/04176244b0a3539c9681.js +1 -0
- package/assets/esri/core/workers/chunks/04958494022f82dca473.js +1 -0
- package/assets/esri/core/workers/chunks/0b7bbdc0d71ee6721751.js +2 -0
- package/assets/esri/core/workers/chunks/{5909a0e763fddc3542e7.js.LICENSE.txt → 0b7bbdc0d71ee6721751.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/0f8149fdcf0adeca268e.js +1 -0
- package/assets/esri/core/workers/chunks/{aa7a1705266eec353cb6.js → 0fc22ad791d3ec0a9c5e.js} +1 -1
- package/assets/esri/core/workers/chunks/10e474d664b20adcd917.js +1 -0
- package/assets/esri/core/workers/chunks/12f9a55253084a910b2e.js +1 -0
- package/assets/esri/core/workers/chunks/14dedd80fb797303f91f.js +1 -0
- package/assets/esri/core/workers/chunks/1a6d2f525dd30d08cf9b.js +1 -0
- package/assets/esri/core/workers/chunks/{81d89107ff82604a3ea0.js → 1b445981fbc8373f4dd8.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ba3c2b9f699d94d62b8.js → 1ec1a1997b5577619040.js} +1 -1
- package/assets/esri/core/workers/chunks/204d738c8b651314ae64.js +1 -0
- package/assets/esri/core/workers/chunks/2085084324cd5a81783f.js +1 -0
- package/assets/esri/core/workers/chunks/{e95821a199e10b389e29.js → 25f3ee666f545a7a7993.js} +2 -2
- package/assets/esri/core/workers/chunks/{e95821a199e10b389e29.js.LICENSE.txt → 25f3ee666f545a7a7993.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/2c2c0f66cffc521df736.js +1 -0
- package/assets/esri/core/workers/chunks/2dd347aa2a061d536e69.js +1 -0
- package/assets/esri/core/workers/chunks/2dfa7abf2d39fa5a3874.js +1 -0
- package/assets/esri/core/workers/chunks/322085d63719da6e443c.js +1 -0
- package/assets/esri/core/workers/chunks/{76086517591d0eb35156.js → 34a2e0462eb05986cdd1.js} +1 -1
- package/assets/esri/core/workers/chunks/{a6dcd13c792b6538ac50.js → 35593a9790818b689455.js} +1 -1
- package/assets/esri/core/workers/chunks/36ecf951c0c7dad84b69.js +1 -0
- package/assets/esri/core/workers/chunks/37002a46f03a9fc5f644.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/3a04153ca9d8e4f01185.js +1 -0
- package/assets/esri/core/workers/chunks/{4e9a8fce55cad841c731.js → 3b25f5d9c8f78bb6e011.js} +1 -1
- package/assets/esri/core/workers/chunks/3e7ea06b342e33bc48a5.js +1 -0
- package/assets/esri/core/workers/chunks/3ed317900f0edf635508.js +1 -0
- package/assets/esri/core/workers/chunks/401ce5cb98fa14c1a725.js +1 -0
- package/assets/esri/core/workers/chunks/4319b89cfa02894a8cae.js +1 -0
- package/assets/esri/core/workers/chunks/43e2c1d72cd9c8beed2f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/45a9cd722e98dd1548ae.js +1 -0
- package/assets/esri/core/workers/chunks/4a060147d25929680ec8.js +1 -0
- package/assets/esri/core/workers/chunks/4bcd74951477e8977ba1.js +1 -0
- package/assets/esri/core/workers/chunks/4d0eaeb4cd6cd55e25fd.js +1 -0
- package/assets/esri/core/workers/chunks/{687d2b761dc5b5cf0c31.js → 4d4d71d24c1a9cb342b8.js} +1 -1
- package/assets/esri/core/workers/chunks/4fa230dc6e5e87b0dec1.js +1 -0
- package/assets/esri/core/workers/chunks/50f03813fba4b752ca9f.js +1 -0
- package/assets/esri/core/workers/chunks/{abc236e99b52be1c83b9.js → 52a14266fe239b95c5ce.js} +1 -1
- package/assets/esri/core/workers/chunks/53b5c77832df7df4d4e3.js +1 -0
- package/assets/esri/core/workers/chunks/{34178ace79e8dea3567d.js → 562cddaf63985e53ee6e.js} +1 -1
- package/assets/esri/core/workers/chunks/59a45533e96cedf1c480.js +1 -0
- package/assets/esri/core/workers/chunks/{c2aeecd27e004c6cd7e1.js → 5b9f2aa3ba1bf12c3240.js} +2 -2
- package/assets/esri/core/workers/chunks/{c2aeecd27e004c6cd7e1.js.LICENSE.txt → 5b9f2aa3ba1bf12c3240.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{6599cc702a46f81a5634.js → 5dd5be91038df8902dc4.js} +1 -1
- package/assets/esri/core/workers/chunks/{49a1b7f700b8a42de817.js → 60c7f896f2246a8aa6d7.js} +19 -19
- package/assets/esri/core/workers/chunks/60f363ee2add089e8f0b.js +1 -0
- package/assets/esri/core/workers/chunks/61801bb8c7be8fe77086.js +1 -0
- package/assets/esri/core/workers/chunks/679cd6424e0e2d7f372b.js +1 -0
- package/assets/esri/core/workers/chunks/68074a484d7f9bc713c0.js +1 -0
- package/assets/esri/core/workers/chunks/6acfa51b81e6f4255118.js +1 -0
- package/assets/esri/core/workers/chunks/{3fe7be535affae31de7e.js → 6b85a8776ec2beff63cb.js} +1 -1
- package/assets/esri/core/workers/chunks/6be530ab81291745485b.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/6df484faf54e90a6cc77.js +1 -0
- package/assets/esri/core/workers/chunks/6ea6ad894ac634aa4391.js +1 -0
- package/assets/esri/core/workers/chunks/6f8098f9fe233833245a.js +1 -0
- package/assets/esri/core/workers/chunks/73c416ae0ec5a1815591.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/75fd2ef1236a9364ca7f.js +1 -0
- package/assets/esri/core/workers/chunks/{23b623637126f8411a30.js → 7aec07f2482934259d12.js} +1 -1
- package/assets/esri/core/workers/chunks/7be9bbae23895d1cfa92.js +1 -0
- package/assets/esri/core/workers/chunks/{741d170187e58e81584d.js → 7d744554d14057d9b2b1.js} +1 -1
- package/assets/esri/core/workers/chunks/7ea48661f1087d06aa41.js +1 -0
- package/assets/esri/core/workers/chunks/{47e5149765beee46f208.js → 7ee68f67f9cc48a328f0.js} +1 -1
- package/assets/esri/core/workers/chunks/866477acdf03b8a40bc9.js +1 -0
- package/assets/esri/core/workers/chunks/8e83c133b201b9b61e70.js +1 -0
- package/assets/esri/core/workers/chunks/9086a4933d3d3d9ffa72.js +1 -0
- package/assets/esri/core/workers/chunks/94174d40de39dbe7d0bf.js +1 -0
- package/assets/esri/core/workers/chunks/98f4b44eca91c42ca08e.js +1 -0
- package/assets/esri/core/workers/chunks/9ccabf8142fb5de4d3e2.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{dd99b77a7c0a052507bb.js → 9d88b4ba8e511da64583.js} +3 -3
- package/assets/esri/core/workers/chunks/a808be466812db51813d.js +1 -0
- package/assets/esri/core/workers/chunks/{6b4a24248182245167ca.js → a931515a2569713e743b.js} +1 -1
- package/assets/esri/core/workers/chunks/a95e28ade258b144cbb5.js +1 -0
- package/assets/esri/core/workers/chunks/adc68e2c6d2698a52bfe.js +1 -0
- package/assets/esri/core/workers/chunks/aeb524eded012217a865.js +1 -0
- package/assets/esri/core/workers/chunks/b2a1e5e9182b643909eb.js +316 -0
- package/assets/esri/core/workers/chunks/{ac6f002cfad42e60de8f.js → b48033645091c91e0d88.js} +1 -1
- package/assets/esri/core/workers/chunks/b8988771bfa4e785ebd6.js +1 -0
- package/assets/esri/core/workers/chunks/bb4574a87ca21e719f0d.js +1 -0
- package/assets/esri/core/workers/chunks/{07639f406b71bb49ffd6.js → bdbb5b33f0f49661bf6d.js} +1 -1
- package/assets/esri/core/workers/chunks/c042269586921e337be9.js +1 -0
- package/assets/esri/core/workers/chunks/c623918e289a09905cd1.js +1 -0
- package/assets/esri/core/workers/chunks/c7391b0b5a9c916a53f7.js +1 -0
- package/assets/esri/core/workers/chunks/{ac83c2999a3d2ffb4356.js → c7838ac0db8570a2d2c1.js} +1 -1
- package/assets/esri/core/workers/chunks/c91ef3814e7f024043cf.js +1 -0
- package/assets/esri/core/workers/chunks/{43d28c6509c21b8917a8.js → ca7523c14d81c470e92e.js} +1 -1
- package/assets/esri/core/workers/chunks/cd2708fb7636b3ace229.js +1 -0
- package/assets/esri/core/workers/chunks/{310f3268582e61cd86da.js → d21480925a8bc9c7de96.js} +1 -1
- package/assets/esri/core/workers/chunks/d445e9399fe4ca3d2a50.js +1 -0
- package/assets/esri/core/workers/chunks/d7683a95775c9f401a7e.js +1 -0
- package/assets/esri/core/workers/chunks/{9d6945cda99d14af83ac.js → d7d9656b990ce8be2152.js} +1 -1
- package/assets/esri/core/workers/chunks/d9ca754f51b9812bb179.js +1 -0
- package/assets/esri/core/workers/chunks/d9ef0b3341e2744d8f2f.js +1 -0
- package/assets/esri/core/workers/chunks/df4a0af329ce94a47a7b.js +1 -0
- package/assets/esri/core/workers/chunks/e10d6e511921394474ca.js +1 -0
- package/assets/esri/core/workers/chunks/e4b6aa8f67c2bd285020.js +1 -0
- package/assets/esri/core/workers/chunks/e5aac523c37d906eece6.js +1 -0
- package/assets/esri/core/workers/chunks/e6ca02f98f855024f74b.js +1 -0
- package/assets/esri/core/workers/chunks/{892157696e8f9e38c472.js → e6e837e43b9348050832.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3325ed8d224e2350db7.js → e8a3ad00936f2ccaf362.js} +1 -1
- package/assets/esri/core/workers/chunks/{f351007cdcd0938d3b6c.js → eeb24a4ab4993f1f4e8e.js} +1 -1
- package/assets/esri/core/workers/chunks/ef7063ee790d2d64d4b2.js +1 -0
- package/assets/esri/core/workers/chunks/{b65fcfde62d49de1fa54.js → ef977be20a647aeded0a.js} +1 -1
- package/assets/esri/core/workers/chunks/efb631371b6bb3f043bb.js +1 -0
- package/assets/esri/core/workers/chunks/{0f5693541111fcae0c2f.js → f0914715e90e43466f8c.js} +1 -1
- package/assets/esri/core/workers/chunks/f25bebd2b6eb0d0f6626.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/f95e488d2b86e320624f.js +1 -0
- package/assets/esri/core/workers/chunks/{bfc063d4431bfa162160.js → fd09f38fb4d99bf34988.js} +1 -1
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/libs/text/pkg/bundle_bg.wasm +0 -0
- package/chunks/boundedPlane.js +1 -1
- package/chunks/bundle2.js +5 -0
- package/config.js +1 -1
- package/copyright.txt +70 -1
- package/core/BidiText.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/compilerUtils.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/core/units.js +1 -1
- package/core/workers/loaderConfig.js +1 -1
- package/editing/sharedTemplates/SharedTemplate.js +1 -1
- package/geometry/support/FloatArray.js +1 -1
- package/geometry/support/Indices.js +1 -1
- package/geometry/support/MeshTexture.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/geometry/support/boundedPlane.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/geometry/support/meshUtils/External.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/imageutils.js +1 -1
- package/geometry/support/meshUtils/loadExternal.js +1 -1
- package/geometry/support/rotate.js +1 -1
- package/interfaces.d.ts +23 -24
- package/kernel.js +1 -1
- package/layers/BingMapsLayer.d.ts +2 -3
- package/layers/BuildingSceneLayer.d.ts +3 -5
- package/layers/CatalogLayer.d.ts +2 -4
- package/layers/DimensionLayer.d.ts +2 -3
- package/layers/ElevationLayer.d.ts +2 -4
- package/layers/FeatureLayer.d.ts +2 -4
- package/layers/GaussianSplatLayer.d.ts +1 -3
- package/layers/GeoJSONLayer.d.ts +2 -3
- package/layers/GeoRSSLayer.d.ts +2 -3
- package/layers/GroupLayer.d.ts +2 -3
- package/layers/ImageryLayer.d.ts +2 -5
- package/layers/ImageryTileLayer.d.ts +3 -7
- package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -4
- package/layers/IntegratedMeshLayer.d.ts +2 -4
- package/layers/KMLLayer.d.ts +2 -3
- package/layers/KnowledgeGraphLayer.d.ts +2 -4
- package/layers/LineOfSightLayer.d.ts +2 -3
- package/layers/LinkChartLayer.d.ts +2 -3
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/MapImageLayer.d.ts +2 -4
- package/layers/MapNotesLayer.d.ts +2 -3
- package/layers/MediaLayer.d.ts +3 -4
- package/layers/OGCFeatureLayer.d.ts +2 -3
- package/layers/ParquetLayer.d.ts +2 -3
- package/layers/PointCloudLayer.d.ts +2 -4
- package/layers/RouteLayer.d.ts +2 -3
- package/layers/SceneLayer.d.ts +2 -4
- package/layers/StreamLayer.d.ts +2 -4
- package/layers/SubtypeGroupLayer.d.ts +2 -4
- package/layers/TileLayer.d.ts +2 -4
- package/layers/UnknownLayer.d.ts +2 -3
- package/layers/UnsupportedLayer.d.ts +2 -3
- package/layers/VectorTileLayer.d.ts +2 -4
- package/layers/VideoLayer.d.ts +8 -9
- package/layers/ViewshedLayer.d.ts +2 -3
- package/layers/VoxelLayer.d.ts +2 -4
- package/layers/WCSLayer.d.ts +2 -4
- package/layers/WFSLayer.d.ts +2 -3
- package/layers/WMSLayer.d.ts +5 -6
- package/layers/WMTSLayer.d.ts +4 -5
- package/layers/WebTileLayer.d.ts +2 -3
- package/layers/buildingSublayers/BuildingGroupSublayer.d.ts +1 -1
- package/layers/buildingSublayers/BuildingSublayer.d.ts +3 -3
- package/layers/buildingSublayers/BuildingSublayer.js +1 -1
- package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -3
- package/layers/catalog/CatalogFootprintLayer.d.ts +2 -3
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/dehydratedFeatureComparison.js +1 -1
- package/layers/graphics/dehydratedFeatures.js +1 -1
- package/layers/graphics/hydratedFeatures.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +4 -6
- package/layers/{support/media.d.ts → media/types.d.ts} +9 -9
- package/layers/mixins/ArcGISImageService.d.ts +1 -1
- package/layers/mixins/ImageryTileMixin.d.ts +1 -1
- package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
- package/layers/raster/datasets/wcsCoverageParser.d.ts +1 -1
- package/layers/raster/functions/changeDetectionUtils.js +1 -1
- package/layers/raster/functions/creators/createLocalFunctions.d.ts +1 -1
- package/layers/raster/functions/customBandIndexUtils.js +1 -1
- package/layers/raster/functions/focalStatUtils.js +1 -1
- package/layers/raster/functions/pixelTransformUtils.js +1 -1
- package/layers/raster/functions/types.d.ts +1 -1
- package/layers/{support/RasterTypes.d.ts → raster/types.d.ts} +2 -2
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/support/ElevationQuery.d.ts +2 -2
- package/layers/support/ElevationSampler.js +1 -1
- package/layers/support/FeatureType.d.ts +2 -2
- package/layers/support/Field.d.ts +2 -3
- package/layers/support/FieldConfiguration.d.ts +1 -1
- package/layers/support/ImageElement.d.ts +3 -3
- package/layers/support/LocalMediaElementSource.d.ts +1 -1
- package/layers/support/MediaElementBase.d.ts +4 -7
- package/layers/support/PixelBlock.d.ts +1 -1
- package/layers/support/RasterFunction.d.ts +1 -1
- package/layers/support/RasterInfo.d.ts +1 -1
- package/layers/support/Sublayer.d.ts +2 -3
- package/layers/support/Subtype.d.ts +2 -2
- package/layers/support/SubtypeSublayer.d.ts +2 -3
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/VideoElement.d.ts +2 -2
- package/layers/support/WMSSublayer.d.ts +6 -6
- package/layers/support/WMSSublayer.js +1 -1
- package/layers/support/domains.js +1 -1
- package/layers/support/rasterFunctionUtils.d.ts +1 -1
- package/layers/support/tiles3DUtils.js +1 -1
- package/layers/support/types.d.ts +33 -1
- package/layers/types.d.ts +17 -2
- package/layers/wmts/types.d.ts +2 -0
- package/libs/text/loadTextModule.js +5 -0
- package/linkChart/LinkChartProperties.d.ts +4 -6
- package/linkChart/LinkChartProperties.js +1 -1
- package/networks/Network.d.ts +2 -4
- package/networks/support/NamedTraceConfiguration.d.ts +3 -3
- package/networks/support/NamedTraceConfiguration.js +1 -1
- package/networks/support/TopologyValidationJobInfo.js +1 -1
- package/networks/support/TraceJobInfo.js +1 -1
- package/package.json +3 -3
- package/popup/FieldInfo.d.ts +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/rendererConversion.js +1 -1
- package/renderers/visualVariables/support/visualVariableUtils.js +1 -1
- package/request/process.js +1 -1
- package/rest/geometryService/types.d.ts +59 -0
- package/rest/geometryService.d.ts +3 -5
- package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/query/support/AttachmentInfo.d.ts +2 -2
- package/rest/support/AlgorithmicColorRamp.d.ts +2 -2
- package/rest/support/BinParametersBase.d.ts +2 -2
- package/rest/support/BinParametersBase.js +1 -1
- package/rest/support/DateBinTimeInterval.d.ts +1 -1
- package/rest/support/GeneralizeParameters.d.ts +1 -1
- package/rest/support/ImageSampleParameters.d.ts +1 -1
- package/rest/support/JobInfo.js +1 -1
- package/rest/support/PrintTemplate.d.ts +4 -6
- package/rest/support/ServiceAreaParameters.js +1 -1
- package/rest/support/types.d.ts +17 -1
- package/smartMapping/heuristics/sizeRange.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/statistics/support/statsWorker.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/WebStyleSymbol.d.ts +0 -24
- package/symbols/WebStyleSymbol.js +1 -1
- package/symbols/support/ElevationInfo.d.ts +2 -2
- package/symbols/support/IconSymbol3DLayerResource.d.ts +1 -1
- package/symbols/support/defaults.js +1 -1
- package/symbols/support/defaults3D.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/symbolLayerUtils3D.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +16 -11
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
- package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/GlyphSDFCreator.js +5 -0
- package/views/2d/engine/webgl/GlyphSource.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/TextureUploadManager.js +1 -1
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/input/handlers/DoubleTapDragZoom.js +1 -1
- package/views/2d/input/handlers/KeyZoom.js +1 -1
- package/views/2d/layers/BaseLayerView2D.d.ts +3 -6
- package/views/2d/layers/BaseLayerViewGL2D.d.ts +3 -6
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/utils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +16 -11
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/environment/CloudsParameters.js +1 -1
- package/views/3d/environment/CloudsRenderer.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/glTF/internal/fillDefaults.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/editingTools/isSupportedObjectUtils.js +1 -1
- package/views/3d/interactive/editingTools/move/isSupportedObject.js +1 -1
- package/views/3d/interactive/editingTools/transform/isSupportedGraphic.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/LabelInfo.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/layers/graphics/lineUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/primitiveObjectUtils.js +1 -1
- package/views/3d/layers/graphics/primitiveObjectSymbolUtils.js +1 -1
- package/views/3d/layers/i3s/BuildingFilterUtil.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/I3SNode.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
- package/views/3d/layers/i3s/SphereCone.js +5 -0
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/layers/support/edgeUtils.js +1 -1
- package/views/3d/layers/support/featureReference.js +1 -1
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/buffer/glUtil.js +1 -1
- package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
- package/views/3d/webgl/RenderNode.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +8 -8
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeWorkerHandle.js +1 -1
- package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +4 -4
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +8 -8
- package/views/VideoView.d.ts +2 -3
- package/views/VideoView.js +1 -1
- package/views/View2D.d.ts +2 -3
- package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileIndicatorPointVisualization.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +1 -1
- 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/draw/Draw.js +1 -1
- package/views/input/ViewEvents.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
- package/views/interactive/snapping/featureSources/snappingCandidateElevationFilter.js +1 -1
- package/views/interactive/snapping/featureSources/symbologySnappingCandidates.js +1 -1
- package/views/layers/MediaLayerViewMixin.d.ts +1 -1
- package/views/support/PromiseQueue.js +1 -1
- package/views/support/screenUtils.js +1 -1
- package/views/support/screenshotUtils.js +1 -1
- package/views/types.d.ts +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/Uniform.js +1 -1
- package/views/webgl/Util.js +1 -1
- package/webdoc/applicationProperties/SearchLayerField.d.ts +1 -1
- package/webdoc/applicationProperties/SearchTableField.d.ts +1 -1
- package/webscene/Slide.d.ts +2 -2
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/components/PendingFeatureList.js +1 -1
- package/widgets/Editor/components/workflowAdapters/pendingFeatureList/{CreateFeaturesWorkflowPendingFeatureListAdapter.ts.js → CreateFeaturesWorkflowPendingFeatureListAdapter.js} +1 -1
- package/widgets/Editor/types.d.ts +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Feature.d.ts +3 -5
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/FieldInput.d.ts +2 -2
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +1 -1
- package/widgets/FeatureTemplates/TemplateItem.d.ts +1 -1
- package/widgets/FeatureTemplates/types.d.ts +1 -1
- package/widgets/Features.d.ts +3 -5
- package/widgets/Print/CustomTemplate.d.ts +3 -4
- package/widgets/Print/TemplateOptions.d.ts +3 -4
- package/widgets/Print/types.d.ts +3 -4
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/support/OperationHandle.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0099f4729c94c779ba35.js +0 -1
- package/assets/esri/core/workers/chunks/058fb2cd6387acfd458c.js +0 -1
- package/assets/esri/core/workers/chunks/0ae018098906d6a88904.js +0 -1
- package/assets/esri/core/workers/chunks/0dc3a04ce717b7ddd957.js +0 -1
- package/assets/esri/core/workers/chunks/0e5cd0cf6ab7cb37d723.js +0 -1
- package/assets/esri/core/workers/chunks/0ee407b8db5c07a00d82.js +0 -1
- package/assets/esri/core/workers/chunks/10373885604655f673df.js +0 -1
- package/assets/esri/core/workers/chunks/13d61d34e55c80e4ecdf.js +0 -1
- package/assets/esri/core/workers/chunks/17dea03fc4eb414f0022.js +0 -1
- package/assets/esri/core/workers/chunks/1967239713b58dccfd81.js +0 -1
- package/assets/esri/core/workers/chunks/1ab98591d2f2bc604505.js +0 -1
- package/assets/esri/core/workers/chunks/1b838638e66e82d76cf3.js +0 -1
- package/assets/esri/core/workers/chunks/1c350a2c4014146dbcd9.js +0 -1
- package/assets/esri/core/workers/chunks/2266a8f2c2ec37c19bb4.js +0 -1
- package/assets/esri/core/workers/chunks/226acd251ad7d7ee3b57.js +0 -1
- package/assets/esri/core/workers/chunks/22b07c54a5fcc27771b0.js +0 -1
- package/assets/esri/core/workers/chunks/22ca80f491e070b2a5e7.js +0 -1
- package/assets/esri/core/workers/chunks/22dd5cecc7e2d4d0baf8.js +0 -316
- package/assets/esri/core/workers/chunks/2402d305a77fef4694a0.js +0 -1
- package/assets/esri/core/workers/chunks/27f096c434f049b8df01.js +0 -1
- package/assets/esri/core/workers/chunks/2a6231db5ee6cbfd59a5.js +0 -1
- package/assets/esri/core/workers/chunks/3371935a4fd6346d3a17.js +0 -1
- package/assets/esri/core/workers/chunks/3c4f8597f602779174f1.js +0 -1
- package/assets/esri/core/workers/chunks/3da53c017f9c5d2d778a.js +0 -1
- package/assets/esri/core/workers/chunks/45b898367b6224dda46f.js +0 -1
- package/assets/esri/core/workers/chunks/4785cd108e2dec6e1697.js +0 -1
- package/assets/esri/core/workers/chunks/4d6d962d25aa836f53ee.js +0 -1
- package/assets/esri/core/workers/chunks/4f33a2ecb154a2c2449c.js +0 -1
- package/assets/esri/core/workers/chunks/52726458f590e726d52c.js +0 -1
- package/assets/esri/core/workers/chunks/536c492fdda30f2f1288.js +0 -1
- package/assets/esri/core/workers/chunks/5909a0e763fddc3542e7.js +0 -2
- package/assets/esri/core/workers/chunks/5cee6c3ff23fb93f857a.js +0 -1
- package/assets/esri/core/workers/chunks/600e2e6b51e2fb9c598c.js +0 -1
- package/assets/esri/core/workers/chunks/6035daa65fc3ebf86515.js +0 -1
- package/assets/esri/core/workers/chunks/63b8cd7d5cafbaeed894.js +0 -1
- package/assets/esri/core/workers/chunks/6cb44cd319cb6c2539c8.js +0 -1
- package/assets/esri/core/workers/chunks/7033fa18b7dd7bd3e49c.js +0 -1
- package/assets/esri/core/workers/chunks/7306b5b66e738a281d83.js +0 -1
- package/assets/esri/core/workers/chunks/7694abe44d55dae8872d.js +0 -1
- package/assets/esri/core/workers/chunks/7f4fa2f2e85863d3cfb9.js +0 -1
- package/assets/esri/core/workers/chunks/8f4c480c418eba299c2b.js +0 -1
- package/assets/esri/core/workers/chunks/964de713042f52d71e42.js +0 -1
- package/assets/esri/core/workers/chunks/a3836f6a93924ee4816e.js +0 -1
- package/assets/esri/core/workers/chunks/ab520fd1ae917daf07d8.js +0 -1
- package/assets/esri/core/workers/chunks/acc7ff44bfcb5c195114.js +0 -1
- package/assets/esri/core/workers/chunks/ad92427bf597a6e0a299.js +0 -1
- package/assets/esri/core/workers/chunks/b25a131c04092c3ab75d.js +0 -1
- package/assets/esri/core/workers/chunks/b285de471ca90f38ec25.js +0 -1
- package/assets/esri/core/workers/chunks/b8f83a272fc41765031d.js +0 -1
- package/assets/esri/core/workers/chunks/b9909264cfea68d5f2a1.js +0 -1
- package/assets/esri/core/workers/chunks/bb08359610a41e304b55.js +0 -1
- package/assets/esri/core/workers/chunks/bcf612eabe7577540953.js +0 -1
- package/assets/esri/core/workers/chunks/bfbbcaa1fb04f17fc869.js +0 -1
- package/assets/esri/core/workers/chunks/c02b09f16241db233103.js +0 -1
- package/assets/esri/core/workers/chunks/c3007b916ba933137709.js +0 -1
- package/assets/esri/core/workers/chunks/cc5c1887e6d7079e5fe3.js +0 -1
- package/assets/esri/core/workers/chunks/ce8f075c814a8378c00c.js +0 -1
- package/assets/esri/core/workers/chunks/cfe1506a443fc84a0b91.js +0 -1
- package/assets/esri/core/workers/chunks/d30cfc5fa302cc08d862.js +0 -1
- package/assets/esri/core/workers/chunks/d723619579cc8f5ef2cd.js +0 -1
- package/assets/esri/core/workers/chunks/da99fd0d3106dd357743.js +0 -1
- package/assets/esri/core/workers/chunks/de71db3b0fb947b13c97.js +0 -1
- package/assets/esri/core/workers/chunks/dfbbead4c24d13682891.js +0 -1
- package/assets/esri/core/workers/chunks/e69255e38ff200dda14b.js +0 -1
- package/assets/esri/core/workers/chunks/e705d041f6c1632bfbcc.js +0 -1
- package/assets/esri/core/workers/chunks/e85da52d9cc7d9396872.js +0 -1
- package/assets/esri/core/workers/chunks/ee186ddbb1eb5144a790.js +0 -1
- package/assets/esri/core/workers/chunks/f9370830051865a3435b.js +0 -1
- package/core/MultiOriginJSONSupport.d.ts +0 -13
- package/core/NumericIdentifiable.d.ts +0 -6
- package/core/ReadOnlyMultiOriginJSONSupport.d.ts +0 -6
- package/core/WriteableMultiOriginJSONMixin.d.ts +0 -6
- package/layers/knowledgeGraph/KnowledgeGraphSublayerBase.d.ts +0 -6
- package/layers/mixins/ArcGISService.d.ts +0 -6
- package/layers/mixins/RasterJobHandlerMixin.d.ts +0 -6
- package/layers/support/RasterFunctionProperties.d.ts +0 -2
- package/layers/support/domains.d.ts +0 -5
- package/layers/support/editableLayers.d.ts +0 -11
- package/layers/support/exifUtils.d.ts +0 -21
- package/layers/support/fieldFormatUtils.d.ts +0 -4
- package/layers/support/fieldType.d.ts +0 -2
- package/layers/support/layerUtils.d.ts +0 -4
- package/layers/support/wmtsUtils.d.ts +0 -2
- package/layers/video/videoUtils.d.ts +0 -5
- package/rest/geometryService/cut.d.ts +0 -7
- package/rest/geometryService/fromGeoCoordinateString.d.ts +0 -28
- package/rest/geometryService/toGeoCoordinateString.d.ts +0 -25
- package/rest/operations/generalize.d.ts +0 -3
- package/rest/support/DateBinUtils.d.ts +0 -2
- package/rest/support/colorRamps.d.ts +0 -6
- package/rest/support/fileFormat.d.ts +0 -4
- package/rest/support/layoutTemplate.d.ts +0 -2
- package/rest/support/reportTemplate.d.ts +0 -2
- package/views/2d/layers/LayerView2D.d.ts +0 -6
- package/views/Viewport2DBaseMixin.d.ts +0 -6
- package/views/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +0 -5
- package/views/layers/RefreshableLayerView.d.ts +0 -6
- package/widgets/Feature/support/FeatureContentMixin.d.ts +0 -6
- /package/layers/video/{IVideoController.d.ts → types.d.ts} +0 -0
- /package/layers/{support/wmsUtils.d.ts → wms/types.d.ts} +0 -0
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{clone as e}from"../../../core/lang.js";import{polygonCentroid as t,extentCentroid as i}from"../../../geometry/support/centroid.js";import{getPolygonExtent as s,getGeometryExtent as a}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as r}from"../../../geometry/support/quantizationUtils.js";import{isValid as n,equals as o}from"../../../geometry/support/spatialReferenceUtils.js";import{closestPointOnCurve as l}from"../../../geometry/support/curves/closestPointOnCurve.js";import{getEndpoint as u}from"../../../geometry/support/curves/curveUtils.js";import c from"./AttributesBuilder.js";import{cleanFromGeometryEngine as m,getGeometry as d,transformCentroid as f}from"./geometryUtils.js";import{project as p}from"./projectionSupport.js";import{getDateInNumber as h}from"./queryUtils.js";import{SnappingCandidateEdge as y,SnappingCandidateVertex as g}from"./SnappingCandidate.js";import{isDateField as x,isDateOnlyField as T,isTimestampOffsetField as F,isStringField as I,isTimeOnlyField as _}from"../../support/fieldUtils.js";import v from"../../../rest/support/AutoIntervalBinParameters.js";import S from"../../../rest/support/DateBinParameters.js";import{unitsDict as V}from"../../../rest/support/DateBinUtils.js";import b from"../../../rest/support/FixedBoundariesBinParameters.js";import R from"../../../rest/support/FixedIntervalBinParameters.js";import{isNullCountSupported as z,calculateStringStatistics as B,calculateStatistics as M,processSummaryStatisticsResult as A,calculateUniqueValuesCount as w,createUVResult as N,calculateClassBreaks as P,resolveCBResult as D,calculateHistogram as q,getAttributeComparator as j,calculatePercentile as C,binIndex as Z,getBinParams as G}from"../../../statistics/utils.js";import{utc as O}from"../../../time/constants.js";import{DateTime as E}from"luxon";const H="bin";class U{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new c(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,a=t?.length;if(!!!a)return 1;const r=new Map,n=new Map,o=new Set;for(const l of s){const{statisticType:s}=l,a="exceedslimit"!==s?l.onStatisticField:void 0;if(!n.has(a)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,r);i.push(t)}n.set(a,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=n.get(a);for(const t in u){const{data:s,items:a}=u[t],r=s.join(",");i&&!e.validateItems(a,i)||o.add(r)}}return o.size}async createQueryResponse(){let e;if(this.query.outStatistics){e=this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items)}else e=this._createFeatureQueryResponse(this.query);if(this.query.returnQueryGeometry){const t=this.query.geometry;n(this.query.outSR)&&!o(t.spatialReference,this.query.outSR)?e.queryGeometry=m({spatialReference:this.query.outSR,...p(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=m({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const s=this.featureAdapter,a=J(this.hasZ,this.hasM),{point:r,mode:n}=e,o="number"==typeof e.distance?e.distance:e.distance.x,c="number"==typeof e.distance?e.distance:e.distance.y;function m(e,t){const i=(e-r.x)/o,s=(t-r.y)/c;return i*i+s*s}const d={candidates:[]},f="esriGeometryPolygon"===this.geometryType,p="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,h=this._getPointCreator(n,t,this.spatialReference,i),x=new k(null,0),T=new k(null,0),F={x:0,y:0,z:0};for(const l of this.items){const e=s.getObjectId(l),t=s.getGeometryWithCurves?.(l);if(null!=t){_(t,e);continue}const i=s.getGeometry(l);null==i||I(i,e)}return d.candidates.sort((e,t)=>e.distance-t.distance),d;function I(t,i){const{coords:s}=t,n=t.isPoint?Y:t.lengths;if(x.coords=s,T.coords=s,e.returnEdge){let e=0;for(let t=0;t<n.length;t++){const s=n[t],o=e;for(let t=0;t<s;t++,e+=a){if(!f&&t===s-1)continue;if(x.coordsIndex=e,T.coordsIndex=t===s-1?o:e+a,!Q(F,r,x,T))continue;const n=m(F.x,F.y);n<=1&&d.candidates.push(new y(i,h(F),Math.sqrt(n),h(x),h(T)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<n.length;t++){const s=n[t],r=e,o=T;o.coordsIndex=r;for(let t=0;t<s;t++,e+=a){if(x.coordsIndex=e,f&&t===s-1&&x.x===o.x&&x.y===o.y)continue;const a=m(x.x,x.y);a<=1&&d.candidates.push(new g(i,h(x),Math.sqrt(a)))}}}else if(p&&"ends"===e.vertexMode){let e=0;const t=[];for(let i=0;i<n.length;i++){t.push(e);const s=n[i];e+=s*a,s>1&&t.push(e-a)}for(const s of t){x.coordsIndex=s;const e=m(x.x,x.y);e<=1&&d.candidates.push(new g(i,h(x),Math.sqrt(e)))}}}function _(t,i){const{candidates:s}=d,a={x:0,y:0,z:0};if(e.returnEdge){const e=[r.x,r.y],n={x:0,y:0,z:0},o={x:0,y:0,z:0};for(const{segments:r}of t.parts)for(const{start:t,curve:c}of r){const r=l(t,c,e);if(null==r)continue;const d=m(...r.curvePoint);d>1||([n.x,n.y]=t,[a.x,a.y]=r.curvePoint,[o.x,o.y]=u(c),s.push(new y(i,h(a),Math.sqrt(d),h(n),h(o))))}}function n(e){a.x=t.vertexXY[2*e],a.y=t.vertexXY[2*e+1];const r=m(a.x,a.y);r>1||(a.z=t.vertexZ?.[e]??0,s.push(new g(i,h(a),Math.sqrt(r))))}if("all"===e.vertexMode){const{vertexCount:e}=t;for(let t=0;t<e;++t)n(t);return}if("ends"===e.vertexMode)switch(t.type){case"point":n(0);break;case"polyline":for(let e=0;e<t.partCount;++e){const i=t.partOffsets[e],s=t.partOffsets[e+1];n(i),s!==i&&n(s)}}}}_getPointCreator(e,t,i,s){const a=null==s||o(i,s)?e=>e:e=>p(e,i,s),{hasZ:r}=this,n=0;return"3d"===e?r&&t?({x:e,y:t,z:i})=>a({x:e,y:t,z:i}):({x:e,y:t})=>a({x:e,y:t,z:n}):({x:e,y:t})=>a({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,minValue:n,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,m=this.fieldsIndex.get(t),d=x(m)||T(m)||F(m),f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,scale:l,timeZone:u},this.items),p=z({normalizationType:a,normalizationField:s,minValue:n,maxValue:o}),h={value:.5,fieldType:m?.type},y=I(m)?B({values:f,supportsNullCount:p,percentileParams:h,outStatisticTypes:c}):M({values:f,minValue:n,maxValue:o,useSampleStdDev:!a,supportsNullCount:p,percentileParams:h,outStatisticTypes:c});return A(y,c,d)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:a,scale:r,timeZone:n}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:r,timeZone:n},this.items,!1),l=w(o);return N(l,s,a,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:m,timeZone:d}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,scale:m,timeZone:d},this.items),p=P(f,{field:t,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return D(p,n)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:m,timeZone:d}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,scale:m,timeZone:d},this.items);return q(f,{field:t,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const t=s.split(" "),a=t[0],r=this.fieldsIndex.get(a),n=!!t[1]&&"desc"===t[1].toLowerCase(),o=j(r?.type,n,"case-sensitive");e.sort((e,t)=>{const s=i(e,a,r),n=i(t,a,r);return o(s,n)})}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:a,objectIdField:n,spatialReference:o}=this,{outFields:l,outSR:u,quantizationParameters:c,resultRecordCount:d,resultOffset:f,returnZ:p,returnM:h}=e,y=null!=d&&t.length>(f||0)+d,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&h,hasZ:a&&p,objectIdFieldName:n,spatialReference:m(u||o),transform:c&&r(c)||null}}_createFeatures(e,t){const i=new c(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:a}=this,{orderByFields:n,quantizationParameters:o,returnGeometry:l,returnCentroid:u,maxAllowableOffset:m,resultOffset:p,resultRecordCount:h,returnZ:y=!1,returnM:g=!1}=e,x=a&&y,T=s&&g;let F=[],I=0;const _=[...t];if(this._sortFeatures(_,n,(e,t,s)=>i.getFieldValue(e,t,s)),this.geometryType&&(l||u)){const e=r(o)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const s of _){const a=this.featureAdapter.getGeometry(s),r=this._addFeatureJSONMetadata(s,{attributes:i.getAttributes(s),geometry:d(this.geometryType,a,m,e,x,T)});t&&a&&!r.geometry&&(r.centroid=f(this,this.featureAdapter.getCentroid(s,this),e)),F[I++]=r}else if(!l&&u)for(const s of _)F[I++]=this._addFeatureJSONMetadata(s,{attributes:i.getAttributes(s),centroid:f(this,this.featureAdapter.getCentroid(s,this),e)});else for(const s of _)F[I++]=this._addFeatureJSONMetadata(s,{attributes:i.getAttributes(s),centroid:f(this,this.featureAdapter.getCentroid(s,this),e),geometry:d(this.geometryType,this.featureAdapter.getGeometry(s),m,e,x,T)})}else for(const r of _){const e=i.getAttributes(r);e&&(F[I++]=this._addFeatureJSONMetadata(r,{attributes:e}))}const v=p||0;if(null!=h){const e=v+h;F=F.slice(v,Math.min(F.length,e))}return F}_addFeatureJSONMetadata(e,t){const i=this.featureAdapter.getMetadata?.(e);return void 0!==i&&(t.metadata=i),t}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const a of this.query.outStatistics??[])if("exceedslimit"===a.statisticType){t=null!=a.maxPointCount?a.maxPointCount:Number.POSITIVE_INFINITY,i=null!=a.maxRecordCount?a.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=a.maxVertexCount?a.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=J(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)},0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],a=new Map,r=new Map,n=new Map,o=new Map,l=new c(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:m,having:d,orderByFields:f,resultRecordCount:p}=e,h=m?.length,y=!!h,g=y?m[0]:null,x=y&&!this.fieldsIndex.get(g);for(const c of u??[]){const{outStatisticFieldName:e,statisticType:u}=c,f=c,p="exceedslimit"!==u?c.onStatisticField:void 0,T="percentile_disc"===u||"percentile_cont"===u,F="EnvelopeAggregate"===u||"CentroidAggregate"===u||"ConvexHullAggregate"===u,_=y&&1===h&&(p===g||x)&&"count"===u;if(y){if(!n.has(p)){const e=[];for(const i of m){const s=this._getAttributeValues(l,i,t,a);e.push(s)}n.set(p,this._calculateUniqueValues(e,t,!F&&l.returnDistinctValues))}const i=n.get(p);if(!i)continue;const s=Object.keys(i);for(const r of s){const{count:s,data:n,items:u,itemPositions:c}=i[r],h=n.join(",");if(!d||l.validateItems(u,d)){const i=o.get(h)||{attributes:{}};if(F){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(f,u);i.aggregateGeometries[t]=e}else{let r=null;if(_)r=s;else{const e=this._getAttributeValues(l,p,t,a),i=c.map(t=>e[t]);r=T&&"statisticParameters"in f?this._getPercentileValue(f,i):this._getStatisticValue(f,i,null,l.returnDistinctValues)}i.attributes[e]=r}let r=0;m.forEach((e,t)=>i.attributes[this.fieldsIndex.get(e)?e:"EXPR_"+ ++r]=n[t]),o.set(h,i)}}}else if(F){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(f,t);i.aggregateGeometries[s]=e}else{const s=this._getAttributeValues(l,p,t,a);i.attributes[e]=T&&"statisticParameters"in f?this._getPercentileValue(f,s):this._getStatisticValue(f,s,r,l.returnDistinctValues)}const v="min"!==u&&"max"!==u||!I(this.fieldsIndex.get(p))&&!this._isAnyDateField(p)?null:this.fieldsIndex.get(p)?.type;s.push({name:e,alias:e,type:v||"esriFieldTypeDouble"})}const T=y?Array.from(o.values()):[i];return this._sortFeatures(T,f,(e,t)=>e.attributes[t]),p&&(T.length=Math.min(p,T.length)),{fields:s,features:T}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return x(t)||T(t)||F(t)||_(t)}async _getAggregateGeometry(e,r){const{convexHull:n,union:o}=await import("../../../geometry/geometryEngineJSON.js"),{statisticType:l,outStatisticFieldName:u}=e,{featureAdapter:c,spatialReference:m,geometryType:f}=this,p=r.map(e=>d(f,c.getGeometry(e))),h=n(m,p,!0)[0],y={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===l){const e=h?s(h):a(o(m,p));y.aggregateGeometries={...e,spatialReference:m},y.outStatisticFieldName=u||"extent"}else if("CentroidAggregate"===l){const e=h?t(h):i(a(o(m,p)));y.aggregateGeometries={x:e[0],y:e[1],spatialReference:m},y.outStatisticFieldName=u||"centroid"}else"ConvexHullAggregate"===l&&(y.aggregateGeometries=h,y.outStatisticFieldName=u||"convexHull");return y}_getStatisticValue(e,t,i,s){const{onStatisticField:a,statisticType:r}=e;let n=null;n=i?.has(a)?i.get(a):I(this.fieldsIndex.get(a))||this._isAnyDateField(a)?B({values:t,returnDistinct:s}):M({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(a,n);return n["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:a}=e,{value:r,orderBy:n}=s,o=this.fieldsIndex.get(i);return C(t,{value:r,orderBy:n,fieldType:o?.type,isDiscrete:"percentile_disc"===a})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const a=this.fieldsIndex.get(t),r=i.map(i=>e.getFieldValue(i,t,a));return s.set(t,r),r}_calculateUniqueValues(e,t,i){const s={},a=t.length;for(let r=0;r<a;r++){const a=t[r],n=[];for(const t of e)n.push(t[r]);const o=n.join(",");null==s[o]?s[o]={count:1,data:n,items:[a],itemPositions:[r]}:(i||s[o].count++,s[o].items.push(a),s[o].itemPositions.push(r))}return s}async _getDataValues(t,i,s=!0){const a=new c(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:r,scale:n,timeZone:o}=t;return r?a.getExpressionValues(i,r,{viewingMode:"map",scale:n,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):a.getDataValues(i,e(t),s)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,a=t.min??0,r=t.max??0,n=s.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let o=0;o<e.length;o++){const t=e[o],l=i[o];if(null!=t&&t>=a&&t<=r){const e=Z(s,t);e>-1&&(n[e].count++,n[e].items.push(l))}}return n}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:a}=t,r=[],n=[{name:s??i,alias:s??i,type:a??"esriFieldTypeString"},{name:H,alias:H,type:"esriFieldTypeInteger"}],o=new c(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const m=this._getAttributeValues(o,i,u,l),d=this._calculateUniqueValues([m],u,o.returnDistinctValues);for(const c in d){const{items:t}=d[c],a=await this._createBinsResponse(e,t);if(r.push(...a.features.map(e=>({...e,attributes:{...e.attributes,[s??i]:c}}))),a.fields)for(const e of a.fields)n.some(t=>t.name===e.name)||n.push(e)}return{fields:n,features:r}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(v.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(S.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(b.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(R.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:a,numBins:r,normalizationType:n,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),m=G(c,{field:s,normalizationField:a,normalizationType:n,normalizationTotal:o,numBins:r,minValue:h(l,!1),maxValue:h(u,!1)}),d=this._calculateHistogramBins(c,m,i);return this._createFeaturesFromHistogramBins(d,t)}async _createDateBinsResponse(e,t,i){const{field:s,interval:a,start:r,end:n,snapToData:o,returnFullIntervalBin:l}=e,u=a.unit,c=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},i),m=_(this.fieldsIndex.get(s)),d=V.toJSON(u),f=c.filter(Boolean).sort((e,t)=>e-t),p=null!=r?h(r,m):f[0],y=null!=n?h(n,m):f[f.length-1],g=[];if(null!=p&&null!=y){const e={zone:t.outTimeReference?.ianaTimeZone??O},i=E.fromMillis(p,e),s=E.fromMillis(y,e);if("last"===o){let e=s;for(;e>i;){const t=e.minus({[d]:a.value});if(t<i){g.unshift([l?t.toMillis():i.toMillis(),e.toMillis()]);break}g.unshift([t.toMillis(),e.toMillis()]),e=t}}else{let e="first"===o?i:i.startOf(d);for(;e<=s;){const t=e.plus({[d]:a.value});if(t>s){g.push([e.toMillis(),l?t.toMillis():s.toMillis()]);break}g.push([e.toMillis(),t.toMillis()]),e=t}}}const x=this._calculateHistogramBins(c,{intervals:g,min:p,max:y},i);return this._createFeaturesFromHistogramBins(x,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,a=await this._getDataValues({field:s,timeZone:t.outTimeReference?.ianaTimeZone},i),r=_(this.fieldsIndex.get(s)),n=e.boundaries.map(e=>h(e,r)).sort((e,t)=>e-t),o=[];for(let c=0;c<n.length-1;c++)o.push([n[c],n[c+1]]);const l={intervals:o,min:n.at(0),max:n.at(-1)},u=this._calculateHistogramBins(a,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:a,start:r,end:n}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),l=_(this.fieldsIndex.get(s)),u=G(o,{field:s,classificationMethod:"defined-interval",definedInterval:a,minValue:h(r,l),maxValue:h(n,l)},!0),c=this._calculateHistogramBins(o,u,i);return this._createFeaturesFromHistogramBins(c,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,a=s||"lowerBoundary",r=i||"upperBoundary",n=[],o=[{name:a,alias:a,type:"esriFieldTypeDouble"},{name:r,alias:r,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:H,alias:H,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const m="dateBin"===t.bin.type,d=t.outTimeReference?.ianaTimeZone;for(const f of e){const{minValue:e,maxValue:i,items:s}=f,p={attributes:{}};let h;if(p.attributes[a]=m&&d&&null!=e?E.fromMillis(e,{zone:d}).toISO():e,p.attributes[r]=m&&d&&null!=i?E.fromMillis(i,{zone:d}).toISO():i,l?(h=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},s),p.attributes[H]=++c,"flat"===t.bin.jsonStyle?n.push(...h.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...p.attributes}:{...t,...p.attributes}}))):(p.stackedAttributes=h.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),n.push(p))):(t.bin?.splitBy&&(p.attributes[H]=++c),h=await this._createStatisticsQueryResponse(t,s,p),n.push(p)),h.fields)for(const t of h.fields)o.some(e=>e.name===t.name)||o.push(t)}return"desc"===t.binOrder&&n.reverse(),{fields:o,features:n}}}function Q(e,t,i,s){const a=s.x-i.x,r=s.y-i.y,n=t.x-i.x,o=t.y-i.y,l=a*a+r*r;if(0===l)return!1;const u=n*a+o*r,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+a*c,e.y=i.y+r*c,!0}function J(e,t){return e?t?4:3:t?3:2}class k{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const Y=[1];export{U as QueryEngineResult};
|
|
5
|
+
import{clone as e}from"../../../core/lang.js";import{polygonCentroid as t,extentCentroid as i}from"../../../geometry/support/centroid.js";import{getPolygonExtent as s,getGeometryExtent as a}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as n}from"../../../geometry/support/quantizationUtils.js";import{isValid as r,equals as o}from"../../../geometry/support/spatialReferenceUtils.js";import{closestPointOnCurve as l}from"../../../geometry/support/curves/closestPointOnCurve.js";import{getEndpoint as u}from"../../../geometry/support/curves/curveUtils.js";import c from"./AttributesBuilder.js";import{cleanFromGeometryEngine as m,getGeometry as d,transformCentroid as p}from"./geometryUtils.js";import{project as f}from"./projectionSupport.js";import{getDateInNumber as h}from"./queryUtils.js";import{SnappingCandidateEdge as y,SnappingCandidateVertex as g}from"./SnappingCandidate.js";import{isDateField as x,isDateOnlyField as T,isTimestampOffsetField as F,isStringField as I,isTimeOnlyField as v}from"../../support/fieldUtils.js";import _ from"../../../rest/support/AutoIntervalBinParameters.js";import V from"../../../rest/support/DateBinParameters.js";import{unitsDict as S}from"../../../rest/support/DateBinUtils.js";import b from"../../../rest/support/FixedBoundariesBinParameters.js";import z from"../../../rest/support/FixedIntervalBinParameters.js";import{isNullCountSupported as R,calculateStringStatistics as B,calculateStatistics as M,processSummaryStatisticsResult as A,calculateUniqueValuesCount as w,createUVResult as N,calculateClassBreaks as P,resolveCBResult as D,calculateHistogram as q,getAttributeComparator as j,calculatePercentile as C,binIndex as O,getBinParams as Z}from"../../../statistics/utils.js";import{utc as G}from"../../../time/constants.js";import{DateTime as E}from"luxon";const H="bin";class U{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new c(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,a=t?.length;if(!!!a)return 1;const n=new Map,r=new Map,o=new Set;for(const l of s){const{statisticType:s}=l,a="exceedslimit"!==s?l.onStatisticField:void 0;if(!r.has(a)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,n);i.push(t)}r.set(a,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=r.get(a);for(const t in u){const{data:s,items:a}=u[t],n=s.join(",");i&&!e.validateItems(a,i)||o.add(n)}}return o.size}async createQueryResponse(){let e;if(this.query.outStatistics){e=this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items)}else e=this._createFeatureQueryResponse(this.query);if(this.query.returnQueryGeometry){const t=this.query.geometry;r(this.query.outSR)&&!o(t.spatialReference,this.query.outSR)?e.queryGeometry=m({spatialReference:this.query.outSR,...f(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=m({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const s=this.featureAdapter,a=J(this.hasZ,this.hasM),{point:n,mode:r}=e,o="number"==typeof e.distance?e.distance:e.distance.x,c="number"==typeof e.distance?e.distance:e.distance.y;function m(e,t){const i=(e-n.x)/o,s=(t-n.y)/c;return i*i+s*s}const d={candidates:[]},p="esriGeometryPolygon"===this.geometryType,f="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,h=this._getPointCreator(r,t,this.spatialReference,i),x=new Q(null,0),T=new Q(null,0),F={x:0,y:0,z:0};for(const l of this.items){const e=s.getObjectId(l),t=s.getGeometryWithCurves?.(l);if(null!=t){v(t,e);continue}const i=s.getGeometry(l);null==i||I(i,e)}return d.candidates.sort((e,t)=>e.distance-t.distance),d;function I(t,i){const{coords:s}=t,r=t.isPoint?Y:t.lengths;if(x.coords=s,T.coords=s,e.returnEdge){let e=0;for(let t=0;t<r.length;t++){const s=r[t],o=e;for(let t=0;t<s;t++,e+=a){if(!p&&t===s-1)continue;if(x.coordsIndex=e,T.coordsIndex=t===s-1?o:e+a,!k(F,n,x,T))continue;const r=m(F.x,F.y);r<=1&&d.candidates.push(new y(i,h(F),Math.sqrt(r),h(x),h(T)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<r.length;t++){const s=r[t],n=e,o=T;o.coordsIndex=n;for(let t=0;t<s;t++,e+=a){if(x.coordsIndex=e,p&&t===s-1&&x.x===o.x&&x.y===o.y)continue;const a=m(x.x,x.y);a<=1&&d.candidates.push(new g(i,h(x),Math.sqrt(a)))}}}else if(f&&"ends"===e.vertexMode){let e=0;const t=[];for(let i=0;i<r.length;i++){t.push(e);const s=r[i];e+=s*a,s>1&&t.push(e-a)}for(const s of t){x.coordsIndex=s;const e=m(x.x,x.y);e<=1&&d.candidates.push(new g(i,h(x),Math.sqrt(e)))}}}function v(t,i){const{candidates:s}=d,a={x:0,y:0,z:0};if(e.returnEdge){const e=[n.x,n.y],r={x:0,y:0,z:0},o={x:0,y:0,z:0};for(const{segments:n}of t.parts)for(const{start:t,curve:c}of n){const n=l(t,c,e);if(null==n)continue;const d=m(...n.curvePoint);d>1||([r.x,r.y]=t,[a.x,a.y]=n.curvePoint,[o.x,o.y]=u(c),s.push(new y(i,h(a),Math.sqrt(d),h(r),h(o))))}}function r(e){a.x=t.vertexXY[2*e],a.y=t.vertexXY[2*e+1];const n=m(a.x,a.y);n>1||(a.z=t.vertexZ?.[e]??0,s.push(new g(i,h(a),Math.sqrt(n))))}if("all"===e.vertexMode){const{vertexCount:e}=t;for(let t=0;t<e;++t)r(t);return}if("ends"===e.vertexMode)switch(t.type){case"point":r(0);break;case"polyline":for(let e=0;e<t.partCount;++e){const i=t.partOffsets[e],s=t.partOffsets[e+1];r(i),s!==i&&r(s)}}}}_getPointCreator(e,t,i,s){const a=null==s||o(i,s)?e=>e:e=>f(e,i,s),{hasZ:n}=this,r=0;return"3d"===e?n&&t?({x:e,y:t,z:i})=>a({x:e,y:t,z:i}):({x:e,y:t})=>a({x:e,y:t,z:r}):({x:e,y:t})=>a({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:n,minValue:r,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,m=this.fieldsIndex.get(t),d=x(m)||T(m)||F(m),p=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:n,scale:l,timeZone:u},this.items),f=R({normalizationType:a,normalizationField:s,minValue:r,maxValue:o}),h={value:.5,fieldType:m?.type},y=I(m)?B({values:p,supportsNullCount:f,percentileParams:h,outStatisticTypes:c}):M({values:p,minValue:r,maxValue:o,useSampleStdDev:!a,supportsNullCount:f,percentileParams:h,outStatisticTypes:c});return A(y,c,d)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:a,scale:n,timeZone:r}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:n,timeZone:r},this.items,!1),l=w(o);return N(l,s,a,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:n,classificationMethod:r,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:m,timeZone:d}=e,p=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:n,scale:m,timeZone:d},this.items),f=P(p,{field:t,normalizationField:s,normalizationType:a,normalizationTotal:n,classificationMethod:r,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return D(f,r)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:n,classificationMethod:r,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:m,timeZone:d}=e,p=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:n,scale:m,timeZone:d},this.items);return q(p,{field:t,normalizationField:s,normalizationType:a,normalizationTotal:n,classificationMethod:r,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const t=s.split(" "),a=t[0],n=this.fieldsIndex.get(a),r=!!t[1]&&"desc"===t[1].toLowerCase(),o=j(n?.type,r,"case-sensitive");e.sort((e,t)=>{const s=i(e,a,n),r=i(t,a,n);return o(s,r)})}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:a,objectIdField:r,spatialReference:o}=this,{outFields:l,outSR:u,quantizationParameters:c,resultRecordCount:d,resultOffset:p,returnZ:f,returnM:h}=e,y=null!=d&&t.length>(p||0)+d,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&h,hasZ:a&&f,objectIdFieldName:r,spatialReference:m(u||o),transform:c&&n(c)||null}}_createFeatures(e,t){const i=new c(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:a}=this,{orderByFields:r,quantizationParameters:o,returnGeometry:l,returnCentroid:u,maxAllowableOffset:m,resultOffset:f,resultRecordCount:h,returnZ:y=!1,returnM:g=!1}=e,x=a&&y,T=s&&g;let F=[],I=0;const v=[...t];if(this._sortFeatures(v,r,(e,t,s)=>i.getFieldValue(e,t,s)),this.geometryType&&(l||u)){const e=n(o)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const s of v){const a=this.featureAdapter.getGeometry(s),n=this._addFeatureJSONMetadata(s,{attributes:i.getAttributes(s),geometry:d(this.geometryType,a,m,e,x,T)});t&&a&&!n.geometry&&(n.centroid=p(this,this.featureAdapter.getCentroid(s,this),e)),F[I++]=n}else if(!l&&u)for(const s of v)F[I++]=this._addFeatureJSONMetadata(s,{attributes:i.getAttributes(s),centroid:p(this,this.featureAdapter.getCentroid(s,this),e)});else for(const s of v)F[I++]=this._addFeatureJSONMetadata(s,{attributes:i.getAttributes(s),centroid:p(this,this.featureAdapter.getCentroid(s,this),e),geometry:d(this.geometryType,this.featureAdapter.getGeometry(s),m,e,x,T)})}else for(const n of v){const e=i.getAttributes(n);e&&(F[I++]=this._addFeatureJSONMetadata(n,{attributes:e}))}const _=f||0;if(null!=h){const e=_+h;F=F.slice(_,Math.min(F.length,e))}return F}_addFeatureJSONMetadata(e,t){const i=this.featureAdapter.getMetadata?.(e);return void 0!==i&&(t.metadata=i),t}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const a of this.query.outStatistics??[])if("exceedslimit"===a.statisticType){t=null!=a.maxPointCount?a.maxPointCount:Number.POSITIVE_INFINITY,i=null!=a.maxRecordCount?a.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=a.maxVertexCount?a.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=J(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)},0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],a=new Map,n=new Map,r=new Map,o=new Map,l=new c(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:m,having:d,orderByFields:p,resultRecordCount:f}=e,h=m?.length,y=!!h,g=y?m[0]:null,x=y&&!this.fieldsIndex.get(g);for(const c of u??[]){const{outStatisticFieldName:e,statisticType:u}=c,p=c,f="exceedslimit"!==u?c.onStatisticField:void 0,T="percentile_disc"===u||"percentile_cont"===u,F="EnvelopeAggregate"===u||"CentroidAggregate"===u||"ConvexHullAggregate"===u,v=y&&1===h&&(f===g||x)&&"count"===u;if(y){if(!r.has(f)){const e=[];for(const i of m){const s=this._getAttributeValues(l,i,t,a);e.push(s)}r.set(f,this._calculateUniqueValues(e,t,!F&&l.returnDistinctValues))}const i=r.get(f);if(!i)continue;const s=Object.keys(i);for(const n of s){const{count:s,data:r,items:u,itemPositions:c}=i[n],h=r.join(",");if(!d||l.validateItems(u,d)){const i=o.get(h)||{attributes:{}};if(F){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(p,u);i.aggregateGeometries[t]=e}else{let n=null;if(v)n=s;else{const e=this._getAttributeValues(l,f,t,a),i=c.map(t=>e[t]);n=T&&"statisticParameters"in p?this._getPercentileValue(p,i):this._getStatisticValue(p,i,null,l.returnDistinctValues)}i.attributes[e]=n}let n=0;m.forEach((e,t)=>i.attributes[this.fieldsIndex.get(e)?e:"EXPR_"+ ++n]=r[t]),o.set(h,i)}}}else if(F){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(p,t);i.aggregateGeometries[s]=e}else{const s=this._getAttributeValues(l,f,t,a);i.attributes[e]=T&&"statisticParameters"in p?this._getPercentileValue(p,s):this._getStatisticValue(p,s,n,l.returnDistinctValues)}const _="min"!==u&&"max"!==u||!I(this.fieldsIndex.get(f))&&!this._isAnyDateField(f)?null:this.fieldsIndex.get(f)?.type;s.push({name:e,alias:e,type:_||"esriFieldTypeDouble"})}const T=y?Array.from(o.values()):[i];return this._sortFeatures(T,p,(e,t)=>e.attributes[t]),f&&(T.length=Math.min(f,T.length)),{fields:s,features:T}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return x(t)||T(t)||F(t)||v(t)}async _getAggregateGeometry(e,n){const{convexHull:r,union:o}=await import("../../../geometry/geometryEngineJSON.js"),{statisticType:l,outStatisticFieldName:u}=e,{featureAdapter:c,spatialReference:m,geometryType:p}=this,f=n.map(e=>d(p,c.getGeometry(e))),h=r(m,f,!0)[0],y={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===l){const e=h?s(h):a(o(m,f));y.aggregateGeometries={...e,spatialReference:m},y.outStatisticFieldName=u||"extent"}else if("CentroidAggregate"===l){const e=h?t(h):i(a(o(m,f)));y.aggregateGeometries={x:e[0],y:e[1],spatialReference:m},y.outStatisticFieldName=u||"centroid"}else"ConvexHullAggregate"===l&&(y.aggregateGeometries=h,y.outStatisticFieldName=u||"convexHull");return y}_getStatisticValue(e,t,i,s){const{onStatisticField:a,statisticType:n}=e;let r=null;r=i?.has(a)?i.get(a):I(this.fieldsIndex.get(a))||this._isAnyDateField(a)?B({values:t,returnDistinct:s}):M({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(a,r);return r["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:a}=e,{value:n,orderBy:r}=s,o=this.fieldsIndex.get(i);return C(t,{value:n,orderBy:r,fieldType:o?.type,isDiscrete:"percentile_disc"===a})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const a=this.fieldsIndex.get(t),n=i.map(i=>e.getFieldValue(i,t,a));return s.set(t,n),n}_calculateUniqueValues(e,t,i){const s={},a=t.length;for(let n=0;n<a;n++){const a=t[n],r=[];for(const t of e)r.push(t[n]);const o=r.join(",");null==s[o]?s[o]={count:1,data:r,items:[a],itemPositions:[n]}:(i||s[o].count++,s[o].items.push(a),s[o].itemPositions.push(n))}return s}async _getDataValues(t,i,s=!0){const a=new c(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:r,timeZone:o}=t;return n?a.getExpressionValues(i,n,{viewingMode:"map",scale:r,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):a.getDataValues(i,e(t),s)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,a=t.min??0,n=t.max??0,r=s.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let o=0;o<e.length;o++){const t=e[o],l=i[o];if(null!=t&&t>=a&&t<=n){const e=O(s,t);e>-1&&(r[e].count++,r[e].items.push(l))}}return r}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:a}=t,n=[],r=[{name:s??i,alias:s??i,type:a??"esriFieldTypeString"},{name:H,alias:H,type:"esriFieldTypeInteger"}],o=new c(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const m=this._getAttributeValues(o,i,u,l),d=this._calculateUniqueValues([m],u,o.returnDistinctValues);for(const c in d){const{items:t}=d[c],a=await this._createBinsResponse(e,t);if(n.push(...a.features.map(e=>({...e,attributes:{...e.attributes,[s??i]:c}}))),a.fields)for(const e of a.fields)r.some(t=>t.name===e.name)||r.push(e)}return{fields:r,features:n}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(_.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(V.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(b.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(z.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:a,numBins:n,normalizationType:r,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),m=Z(c,{field:s,normalizationField:a,normalizationType:r,normalizationTotal:o,numBins:n,minValue:h(r?e.normalizationMinValue:l,!1),maxValue:h(r?e.normalizationMaxValue:u,!1)}),d=this._calculateHistogramBins(c,m,i);return this._createFeaturesFromHistogramBins(d,t)}async _createDateBinsResponse(e,t,i){const{field:s,interval:a,start:n,end:r,snapToData:o,returnFullIntervalBin:l,offset:u,firstDayOfWeek:c}=e,m=a.unit,d=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},i),p=v(this.fieldsIndex.get(s)),f=S.toJSON(m),y=d.filter(Boolean).sort((e,t)=>e-t),g=null!=n?h(n,p):y[0],x=null!=r?h(r,p):y[y.length-1],T=[];if(null!=g&&null!=x){const e={zone:t.outTimeReference?.ianaTimeZone??G},i=u?.unit?S.toJSON(u.unit):"milliseconds",s={[i]:u?.value||0},n=E.fromMillis(g,e).minus(s),r=E.fromMillis(x,e).minus(s),m="number"==typeof c&&c>=1&&c<=7?c:7,d=(e,t)=>{const i=(e.weekday-t+7)%7;return e.minus({days:i}).startOf("day")};if("last"===o){let e="week"===f?((e,t)=>d(e,t).plus({days:7}))(r,m):r;for(;e>n;){const t=e.minus({[f]:a.value});if(t<n){T.unshift([l?t.plus(s).toMillis():n.plus(s).toMillis(),e.plus(s).toMillis()]);break}T.unshift([t.plus(s).toMillis(),e.plus(s).toMillis()]),e=t}}else{let e="first"===o?n:"week"===f?d(n,m):n.startOf(f);for(;e<=r;){const t=e.plus({[f]:a.value});if(t>r){T.push([e.plus(s).toMillis(),l?t.plus(s).toMillis():r.plus(s).toMillis()]);break}T.push([e.plus(s).toMillis(),t.plus(s).toMillis()]),e=t}}}const F=this._calculateHistogramBins(d,{intervals:T,min:g,max:x},i);return this._createFeaturesFromHistogramBins(F,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,a=await this._getDataValues({field:s,timeZone:t.outTimeReference?.ianaTimeZone},i),n=v(this.fieldsIndex.get(s)),r=e.boundaries.map(e=>h(e,n)).sort((e,t)=>e-t),o=[];for(let c=0;c<r.length-1;c++)o.push([r[c],r[c+1]]);const l={intervals:o,min:r.at(0),max:r.at(-1)},u=this._calculateHistogramBins(a,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:a,normalizationType:n,start:r,end:o}=e,l=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:n,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),u=v(this.fieldsIndex.get(s)),c=Z(l,{field:s,classificationMethod:"defined-interval",definedInterval:a,minValue:h(n?e.normalizationMinValue:r,u),maxValue:h(n?e.normalizationMaxValue:o,u)},!0),m=this._calculateHistogramBins(l,c,i);return this._createFeaturesFromHistogramBins(m,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,a=s||"lowerBoundary",n=i||"upperBoundary",r=[],o=[{name:a,alias:a,type:"esriFieldTypeDouble"},{name:n,alias:n,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:H,alias:H,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const m="dateBin"===t.bin.type,d=t.outTimeReference?.ianaTimeZone;for(const p of e){const{minValue:e,maxValue:i,items:s}=p,f={attributes:{}};let h;if(f.attributes[a]=m&&d&&null!=e?E.fromMillis(e,{zone:d}).toISO():e,t.bin.hideUpperBound||(f.attributes[n]=m&&d&&null!=i?E.fromMillis(i,{zone:d}).toISO():i),l?(h=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},s),f.attributes[H]=++c,"flat"===t.bin.jsonStyle?r.push(...h.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...f.attributes}:{...t,...f.attributes}}))):(f.stackedAttributes=h.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),r.push(f))):(t.bin?.splitBy&&(f.attributes[H]=++c),h=await this._createStatisticsQueryResponse(t,s,f),r.push(f)),h.fields)for(const t of h.fields)o.some(e=>e.name===t.name)||o.push(t)}return"desc"===t.binOrder&&r.reverse(),{fields:o,features:r}}}function k(e,t,i,s){const a=s.x-i.x,n=s.y-i.y,r=t.x-i.x,o=t.y-i.y,l=a*a+n*n;if(0===l)return!1;const u=r*a+o*n,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+a*c,e.y=i.y+n*c,!0}function J(e,t){return e?t?4:3:t?3:2}class Q{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const Y=[1];export{U as QueryEngineResult};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import{floatEqualAbsolute as e}from"../../core/mathUtils.js";import{equals as n}from"../../geometry/support/spatialReferenceUtils.js";function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++){const r=e[t],a=n[t];if(r.length!==a.length)return!1;for(let e=0;e<r.length;e++)if(r[e]!==a[e])return!1}return!0}function r(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1;return!0}function a(e,t){return e===t||null!=e&&null!=t&&n(e.spatialReference,t.spatialReference)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.m===t.m}function u(t,r,a){return t===r||null!=t&&null!=r&&n(t.spatialReference,r.spatialReference)&&e(t.x,r.x,a)&&e(t.y,r.y,a)&&e(t.z??0,r.z??0,a)&&e(t.m??0,r.m??0,a)}function i(e,t){return e.hasZ===t.hasZ&&e.hasM===t.hasM&&(!!n(e.spatialReference,t.spatialReference)&&r(e.paths,t.paths))}function l(e,t){return e.hasZ===t.hasZ&&e.hasM===t.hasM&&(!!n(e.spatialReference,t.spatialReference)&&r(e.rings,t.rings))}function s(e,r){return e.hasZ===r.hasZ&&e.hasM===r.hasM&&(!!n(e.spatialReference,r.spatialReference)&&t(e.points,r.points))}function f(e,t){return e.hasZ===t.hasZ&&e.hasM===t.hasM&&(!!n(e.spatialReference,t.spatialReference)&&(e.xmin===t.xmin&&e.ymin===t.ymin&&e.zmin===t.zmin&&e.xmax===t.xmax&&e.ymax===t.ymax&&e.zmax===t.zmax))}function c(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(e.type!==n.type)return!1;switch(e.type){case"point":return a(e,n);case"extent":return f(e,n);case"polyline":return i(e,n);case"polygon":return l(e,n);case"multipoint":return s(e,n);case"mesh":return!1;default:return}}function o(e,n){if(e===n)return!0;if(!e||!n)return!1;const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(const a of t)if(e[a]!==n[a])return!1;return!0}function h(e,n){return e===n||null!=e&&null!=n&&e.objectId===n.objectId&&(!!c(e.geometry,n.geometry)&&!!o(e.attributes,n.attributes))}export{h as equals,c as geometryEquals,a as pointEquals,u as pointNear};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import{baseObjectMemory as e,estimateNumberArrayMemory as t,estimateNestedObjectMemory as s,estimateAttributesMemory as n}from"../../core/memoryEstimations.js";import{generateUID as r}from"../../core/uid.js";import i from"../../geometry/SpatialReference.js";import{empty as o,expandWithNestedArray as a}from"../../geometry/support/aaBoundingBox.js";import{empty as l,expandWithNestedArray as u}from"../../geometry/support/aaBoundingRect.js";import{unquantizePolyline as c,unquantizePolygon as p,unquantizeMultipoint as m,unquantizePoint as h}from"../../geometry/support/quantizationUtils.js";import{featureGeometryTypeKebabDictionary as f}from"../../geometry/support/typeUtils.js";import y from"../support/Field.js";import{getApproximateMaxDensificationSegments as g}from"../../views/2d/layers/graphics/densificationConstants.js";export{equals}from"./dehydratedFeatureComparison.js";class d{constructor(e,t,s){this.uid=e,this.geometry=t,this.attributes=s,this.visible=!0,this.objectId=null,this.centroid=null}}function b(e){return null!=e.geometry}class x{constructor(){this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null}}function j(e,t){const s=f.fromJSON(e.geometryType),n=i.fromJSON(e.spatialReference),r=e.transform,o=e.objectIdFieldName,a=t?.maxStringAttributeLength,l=t?.maxStringAttributeFields;let u;const g=e.features.map(t=>{const i=N(t,s,n,e.objectIdFieldName),f=i.geometry;if(w(i.attributes,l,a,e=>{u??=[];const t=R(i,o);null!=t&&u.push({objectId:t,attribute:e})}),null!=f&&r)switch(f.type){case"point":i.geometry=h(r,f,f);break;case"multipoint":i.geometry=m(r,f,f);break;case"polygon":i.geometry=p(r,f,f);break;case"polyline":i.geometry=c(r,f,f);break;case"extent":case"mesh":i.geometry=f}return i});return{geometryType:s,features:g,spatialReference:n,fields:e.fields?.map(e=>y.fromJSON(e))??[],objectIdFieldName:e.objectIdFieldName,globalIdFieldName:e.globalIdFieldName,geohashFieldName:e.geohashFieldName,geometryProperties:e.geometryProperties,hasZ:e.hasZ,hasM:e.hasM,exceededTransferLimit:e.exceededTransferLimit,transform:null,missingAttributes:u}}function N(e,t,s,n){return{uid:r(),objectId:n&&e.attributes?e.attributes[n]:null,attributes:e.attributes,geometry:Z(e.geometry,t,s),visible:!0}}function Z(e,t,s){if(null==e)return null;switch(t){case"point":{const t=e;return{x:t.x,y:t.y,z:t.z,m:t.m,hasZ:null!=t.z,hasM:null!=t.m,type:"point",spatialReference:s}}case"polyline":{const t=e;return{paths:t.paths,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"polyline",spatialReference:s}}case"polygon":{const t=e;return{rings:t.rings,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"polygon",spatialReference:s}}case"multipoint":{const t=e;return{points:t.points,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"multipoint",spatialReference:s}}}}function F(n){if(null==n)return 0;switch(n.type){case"point":return e+10+8+24;case"polyline":case"polygon":{let t=0;const r=2+(n.hasZ?1:0)+(n.hasM?1:0),i="polyline"===n.type?n.paths:n.rings,o="polyline"===n.type?n.curvePaths:n.curveRings;if(o?.length){const e=3*g()*128;t=8*e*r+128*e+32*(i.length+1)}else t=s(i);return e+64+t+34}case"multipoint":{const t=s(n.points);return e+t+64+34+32}case"extent":return e+10+64+34;case"mesh":{const s=n.vertexAttributes;return e+t(s.position,s.normal,s.uv,s.tangent)}default:return e}}function I(e){let t=32;return t+=n(e.attributes),t+=3,t+=8+F(e.geometry),t}function k(e){if(null==e)return 0;switch(e.type){case"point":return 1;case"polyline":{let t=0;for(const s of e.paths)t+=s.length;return t}case"polygon":{let t=0;for(const s of e.rings)t+=s.length;return t}case"multipoint":return e.points.length;case"extent":return 2;case"mesh":{const t=e.vertexAttributes&&e.vertexAttributes.position;return t?t.length/3:0}default:return}}function M(e){if(null==e)return!1;switch(e.type){case"extent":case"point":return!0;case"polyline":for(const t of e.paths)if(t.length>0)return!0;return!1;case"polygon":for(const t of e.rings)if(t.length>0)return!0;return!1;case"multipoint":return e.points.length>0;case"mesh":return!e.loaded||e.vertexAttributes.position.length>0}}function v(e,t){switch(o(t),"mesh"===e.type&&(e=e.extent),e.type){case"point":t[0]=t[3]=e.x,t[1]=t[4]=e.y,e.hasZ&&(t[2]=t[5]=e.z);break;case"polyline":for(let s=0;s<e.paths.length;s++)a(t,e.paths[s],!!e.hasZ);break;case"polygon":for(let s=0;s<e.rings.length;s++)a(t,e.rings[s],!!e.hasZ);break;case"multipoint":a(t,e.points,!!e.hasZ);break;case"extent":t[0]=e.xmin,t[1]=e.ymin,t[3]=e.xmax,t[4]=e.ymax,null!=e.zmin&&(t[2]=e.zmin),null!=e.zmax&&(t[5]=e.zmax)}return t}function z(e,t){switch(l(t),"mesh"===e.type&&(e=e.extent),e.type){case"point":t[0]=t[2]=e.x,t[1]=t[3]=e.y;break;case"polyline":for(let s=0;s<e.paths.length;s++)u(t,e.paths[s]);break;case"polygon":for(let s=0;s<e.rings.length;s++)u(t,e.rings[s]);break;case"multipoint":u(t,e.points);break;case"extent":t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax}}function R(e,t){return null!=e.objectId?e.objectId:e.attributes&&t?e.attributes[t]:null}function w(e,t,s,n){if(t?.size&&null!=s&&e)for(const r in e){if(!t.has(r))continue;const i=e[r];"string"==typeof i&&i.length>s&&(n(r),e[r]="")}}export{d as DehydratedFeatureClass,x as DehydratedFeatureSetClass,v as computeAABB,z as computeAABR,F as estimateGeometryMemory,I as estimateSize,j as fromFeatureSetJSON,Z as fromJSONGeometry,R as getObjectId,b as hasGeometry,M as hasVertices,k as numVertices,w as removeLargeStringAttributes};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../Graphic.js";import
|
|
5
|
+
import e from"../../Graphic.js";import{clone as t}from"../../core/lang.js";import{isFloat32Array as n,isFloat64Array as r}from"../../core/typedArrayUtil.js";import a from"../../geometry/SpatialReference.js";import{fromJSON as s}from"../../geometry/support/jsonUtils.js";import{makeDehydratedPoint as i}from"./dehydratedPoint.js";function o(e){return"declaredClass"in e}function m(e){return"declaredClass"in e}function l(e){return"declaredClass"in e}function c(n,r,a){return n?l(n)?(n.origin!==a&&(n.origin=a),n):new e({layer:r,sourceLayer:r,origin:a,visible:n.visible,symbol:t(n.symbol),attributes:t(n.attributes),geometry:u(n.geometry)}):null}function u(e){return null==e?null:o(e)?e:s(f(e))}function f(e){const{wkid:t,wkt:n,wkt2:r,latestWkid:a}=e.spatialReference,s={wkid:t,wkt:n,wkt2:r,latestWkid:a};switch(e.type){case"point":{const{x:t,y:n,z:r,m:a}=e;return{x:t,y:n,z:r,m:a,spatialReference:s}}case"polygon":{const{rings:t,hasZ:n,hasM:r}=e;return{rings:p(t),hasZ:n,hasM:r,spatialReference:s}}case"polyline":{const{paths:t,hasZ:n,hasM:r}=e;return{paths:p(t),hasZ:n,hasM:r,spatialReference:s}}case"extent":{const{xmin:t,xmax:n,ymin:r,ymax:a,zmin:i,zmax:o,mmin:m,mmax:l,hasZ:c,hasM:u}=e;return{xmin:t,xmax:n,ymin:r,ymax:a,zmin:i,zmax:o,mmin:m,mmax:l,hasZ:c,hasM:u,spatialReference:s}}case"multipoint":{const{points:t,hasZ:n,hasM:r}=e;return{points:d(t)?h(t):t,hasZ:n,hasM:r,spatialReference:s}}default:return}}function p(e){return y(e)?e.map(e=>h(e)):e}function h(e){return e.map(e=>Array.from(e))}function y(e){for(const t of e)if(0!==t.length)return d(t);return!1}function d(e){return e.length>0&&(n(e[0])||r(e[0]))}function x(e,t){if(!e)return null;let n;if(m(e)){if(null==t)return e.clone();if(m(t))return t.copy(e)}return null!=t?(n=t,n.x=e.x,n.y=e.y,n.spatialReference=e.spatialReference,e.hasZ?(n.z=e.z,n.hasZ=e.hasZ):(n.z=void 0,n.hasZ=!1),e.hasM?(n.m=e.m,n.hasM=!0):(n.m=void 0,n.hasM=!1)):(n=i(e.x,e.y,e.z,e.spatialReference),e.hasM&&(n.m=e.m,n.hasM=!0)),n}function k(e){const{wkid:t,wkt:n,wkt2:r,latestWkid:s}=e,i={wkid:t,wkt:n,wkt2:r,latestWkid:s};return a.fromJSON(i)}export{x as clonePoint,u as hydrateGeometry,c as hydrateGraphic,k as hydratedSpatialReference,o as isHydratedGeometry,l as isHydratedGraphic,m as isHydratedPoint};
|
|
@@ -12,10 +12,8 @@ import type GraphObjectType from "../../rest/knowledgeGraph/GraphObjectType.js";
|
|
|
12
12
|
import type FeatureSet from "../../rest/support/FeatureSet.js";
|
|
13
13
|
import type Query from "../../rest/support/Query.js";
|
|
14
14
|
import type ElevationInfo from "../../symbols/support/ElevationInfo.js";
|
|
15
|
-
import type { MultiOriginJSONMixin, MultiOriginJSONMixinProperties } from "../../core/MultiOriginJSONSupport.js";
|
|
16
15
|
import type { FeatureGeometryType } from "../../geometry/types.js";
|
|
17
16
|
import type { FeatureLayerCapabilities } from "../types.js";
|
|
18
|
-
import type { KnowledgeGraphSublayerBase, KnowledgeGraphSublayerBaseProperties } from "./KnowledgeGraphSublayerBase.js";
|
|
19
17
|
import type { BlendLayer, BlendLayerProperties } from "../mixins/BlendLayer.js";
|
|
20
18
|
import type { DisplayFilteredLayer, DisplayFilteredLayerProperties } from "../mixins/DisplayFilteredLayer.js";
|
|
21
19
|
import type { FeatureEffectLayer, FeatureEffectLayerProperties } from "../mixins/FeatureEffectLayer.js";
|
|
@@ -25,7 +23,7 @@ import type { RefreshableLayer, RefreshableLayerProperties } from "../mixins/Ref
|
|
|
25
23
|
import type { ScaleRangeLayer, ScaleRangeLayerProperties } from "../mixins/ScaleRangeLayer.js";
|
|
26
24
|
import type { TemporalLayer, TemporalLayerProperties } from "../mixins/TemporalLayer.js";
|
|
27
25
|
import type { FieldDomainOptions } from "../mixins/properties/ILayerWithGetField.js";
|
|
28
|
-
import type {
|
|
26
|
+
import type { DomainUnion } from "../support/types.js";
|
|
29
27
|
import type { RendererUnion } from "../../renderers/types.js";
|
|
30
28
|
import type { RequestOptions } from "../../request/types.js";
|
|
31
29
|
import type { QueryProperties } from "../../rest/support/Query.js";
|
|
@@ -45,7 +43,7 @@ import type { SimpleRendererProperties } from "../../renderers/SimpleRenderer.js
|
|
|
45
43
|
import type { FeatureTemplateProperties } from "../support/FeatureTemplate.js";
|
|
46
44
|
import type { LayerProperties } from "../Layer.js";
|
|
47
45
|
|
|
48
|
-
export interface KnowledgeGraphSublayerProperties extends LayerProperties,
|
|
46
|
+
export interface KnowledgeGraphSublayerProperties extends LayerProperties, RefreshableLayerProperties, ScaleRangeLayerProperties, TemporalLayerProperties, OrderedLayerProperties, BlendLayerProperties, FeatureEffectLayerProperties, FeatureReductionLayerProperties, DisplayFilteredLayerProperties, Partial<Pick<KnowledgeGraphSublayer, "definitionExpression" | "graphType" | "labelsVisible" | "legendEnabled" | "objectIdField" | "objectType" | "parentCompositeLayer" | "popupEnabled">> {
|
|
49
47
|
/**
|
|
50
48
|
* Specifies how features are placed on the vertical axis (z). This property may only be used
|
|
51
49
|
* in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/)
|
|
@@ -610,7 +608,7 @@ export default class KnowledgeGraphSublayer extends KnowledgeGraphSublayerSuperc
|
|
|
610
608
|
* console.log("domain", domain)
|
|
611
609
|
* });
|
|
612
610
|
*/
|
|
613
|
-
getFieldDomain(fieldName: string, options?: FieldDomainOptions):
|
|
611
|
+
getFieldDomain(fieldName: string, options?: FieldDomainOptions): DomainUnion | null | undefined;
|
|
614
612
|
/**
|
|
615
613
|
* Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against the knowledge graph service and
|
|
616
614
|
* returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. If no
|
|
@@ -792,4 +790,4 @@ export default class KnowledgeGraphSublayer extends KnowledgeGraphSublayerSuperc
|
|
|
792
790
|
*/
|
|
793
791
|
queryObjectIds(query?: QueryProperties | null | undefined, options?: RequestOptions): Promise<ObjectId[]>;
|
|
794
792
|
}
|
|
795
|
-
declare const KnowledgeGraphSublayerSuperclass: typeof Layer & typeof
|
|
793
|
+
declare const KnowledgeGraphSublayerSuperclass: typeof Layer & typeof RefreshableLayer & typeof ScaleRangeLayer & typeof TemporalLayer & typeof OrderedLayer & typeof BlendLayer & typeof FeatureEffectLayer & typeof FeatureReductionLayer & typeof DisplayFilteredLayer
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type ControlPointsGeoreference from "
|
|
2
|
-
import type CornersGeoreference from "
|
|
3
|
-
import type ExtentAndRotationGeoreference from "
|
|
4
|
-
import type ImageElement from "
|
|
5
|
-
import type VideoElement from "
|
|
1
|
+
import type ControlPointsGeoreference from "../support/ControlPointsGeoreference.js";
|
|
2
|
+
import type CornersGeoreference from "../support/CornersGeoreference.js";
|
|
3
|
+
import type ExtentAndRotationGeoreference from "../support/ExtentAndRotationGeoreference.js";
|
|
4
|
+
import type ImageElement from "../support/ImageElement.js";
|
|
5
|
+
import type VideoElement from "../support/VideoElement.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Represents animation options, a collection of properties that apply when the [ImageElement#image](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html#image) is an animated GIF or APNG.
|
|
@@ -30,10 +30,10 @@ export type MediaElement = ImageElement | VideoElement;
|
|
|
30
30
|
|
|
31
31
|
export type Georeference = CornersGeoreference | ExtentAndRotationGeoreference | ControlPointsGeoreference;
|
|
32
32
|
|
|
33
|
-
export type
|
|
33
|
+
export type HTMLImageContainer = HTMLImageElement | HTMLCanvasElement;
|
|
34
34
|
|
|
35
|
-
export type
|
|
35
|
+
export type ImageBinarySource = HTMLImageContainer | ImageData;
|
|
36
36
|
|
|
37
|
-
export type
|
|
37
|
+
export type ImageSource = string | ImageBinarySource;
|
|
38
38
|
|
|
39
|
-
export type
|
|
39
|
+
export type VideoSource = string | HTMLVideoElement | null | undefined;
|
|
@@ -41,7 +41,7 @@ import type MeasureLengthFromImageResult from "../../rest/support/MeasureLengthF
|
|
|
41
41
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
42
42
|
import type { GeometryUnion } from "../../geometry/types.js";
|
|
43
43
|
import type { DynamicFetchRasterOptions, OperationCapabilities, QueryCapabilities } from "../types.js";
|
|
44
|
-
import type { RasterInterpolation, RasterNoDataInterpretation, RasterPixelType, RasterFormats } from "../
|
|
44
|
+
import type { RasterInterpolation, RasterNoDataInterpretation, RasterPixelType, RasterFormats } from "../raster/types.js";
|
|
45
45
|
import type { PixelData, RasterMultidimensionalInfo, RasterFunctionInfo } from "../support/types.js";
|
|
46
46
|
import type { RasterRendererUnion } from "../../renderers/support/raster/types.js";
|
|
47
47
|
import type { RequestOptions } from "../../request/types.js";
|
|
@@ -10,7 +10,7 @@ import type ImageSampleResult from "../../rest/support/ImageSampleResult.js";
|
|
|
10
10
|
import type TimeExtent from "../../time/TimeExtent.js";
|
|
11
11
|
import type TimeInterval from "../../time/TimeInterval.js";
|
|
12
12
|
import type { FetchRasterOptions, RasterIdentifyOptions } from "../types.js";
|
|
13
|
-
import type { RasterInterpolation } from "../
|
|
13
|
+
import type { RasterInterpolation } from "../raster/types.js";
|
|
14
14
|
import type { RasterIdentifyResult } from "../support/types.js";
|
|
15
15
|
import type { RasterRendererUnion } from "../../renderers/support/raster/types.js";
|
|
16
16
|
import type { RequestOptions } from "../../request/types.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{deepClone as e}from"../../../arcade/deepClone.js";import"../../../core/
|
|
5
|
+
import{deepClone as e}from"../../../arcade/deepClone.js";import"../../../core/RandomLCG.js";import"../../../core/Logger.js";import"../../../core/has.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import a from"../../../geometry/Point.js";import n from"../../../geometry/Polygon.js";import{fromArray as r,intersectLine as i,fromPoints as o}from"../../../geometry/support/plane.js";import s from"./updateElevation.js";import{pointToArray as c,or as m}from"./utils.js";import{worldToImagePanoramic as p,worldToImage as f}from"./worldToImage.js";import{normalizeDegrees as l}from"../../../widgets/OrientedImageryViewer/components/imageNavigationUtils.js";async function g(e,n,r,s=w){const{cameraLocation:p,farPlaneVertices:f}=r,l=c(p),g=new Array;await d(f,r,g);let h=o(g[0],g[1],g[2]),u=e.clone();for(let w=0;w<s;w++){const s=t();if(!i(h,l,c(e),s))break;let f=0,w=null;if(({error:f,imagePoint:w,pointWithZ:u}=await j(n,new a(s,p.spatialReference),r)),f<=1)break;const[d,b]=y(p.spatialReference,g);if(m(d<=1,b<=1))break;g.splice(0,g.length,...await x(d,b,new a(s,p.spatialReference),r)),h=o(g[0],g[1],g[2])}return c(u)}async function h(e,n,o,s=w){const{cameraLocation:p,farPlaneVertices:f}=o,l=c(p),g=new Array;await d(f,o,g);const h=[0,0,0,0];let u=r(h,g.flat(),!1),j=e.clone();for(let w=0;w<s;w++){const s=t();if(!i(h,l,c(e),s)||!u)break;let f,w=0;if(({error:w,imagePoint:f,pointWithZ:j}=await b(n,new a(s,p.spatialReference),o)),w<=1)break;const[d,R]=y(p.spatialReference,g);if(m(d<=1,R<=1))break;g.splice(0,g.length,...await x(d,R,new a(s,p.spatialReference),o)),u=r(h,g.flat(),!1)}return c(j)}const w=10,u=10;function y(e,t){const a=new n({spatialReference:e});a.addRing(t);return[a.extent?.width?a.extent.width/u:1,a.extent?.height?a.extent.height/u:1]}async function d(t,a,n){const r=e(t),i=await s(r,a);n.push(...i.map(c))}async function j(e,t,a){const n=await s(t,a),r=f(n,a);return{error:R(r,e),imagePoint:r,pointWithZ:n}}async function b(e,t,a){const n=await s(t,a),r=p(n,a),i=l(r.heading+a.cameraHeading);return{error:Math.abs(i-e.heading)+Math.abs(r.pitch-e.pitch),imagePoint:r,pointWithZ:n}}const R=(e,t)=>Math.abs(e.x-t.x)+Math.abs(e.y-t.y);async function x(e,t,n,r){const i=[[-e,-t],[e,-t],[e,t],[-e,t]].map(([e,t])=>new a([n.x+e,n.y+t],n.spatialReference));return s(i,r).then(e=>e.map(e=>e.toArray()))}export{g as rectifyMapPoint,h as rectifyMapPointPanoramic};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type Extent from "../../../geometry/Extent.js";
|
|
2
2
|
import type Polygon from "../../../geometry/Polygon.js";
|
|
3
3
|
import type RasterInfo from "../../support/RasterInfo.js";
|
|
4
|
+
import type { RasterInterpolation } from "../types.js";
|
|
4
5
|
import type { WCSVersion } from "./types.js";
|
|
5
|
-
import type { RasterInterpolation } from "../../support/RasterTypes.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Coverage information associated with a WCS service. It returns information related to coordinate reference systems, spatial and range domains, and formats supported by a service.
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import{JSONMap as e}from"../../../core/jsonMap.js";import{isIntegerPixelType as t}from"../formats/pixelRangeUtils.js";import a from"../../support/PixelBlock.js";const n=new e({0:"difference",1:"relative-difference",2:"categorical",3:"euclidean-distance",4:"angle-difference",5:"band-with-most-change"},{useNumericKeys:!0}),s=new e({0:"all",1:"changed",2:"unchanged"},{useNumericKeys:!0});function i(e,n,s,i){const[f,h]=e,p=t(s)&&!t(f.pixelType)&&!t(h.pixelType),u=[f.mask,h.mask].filter(e=>e),m=a.combineBandMasks(u),g=e.map(e=>e.pixels[0]),{width:k,height:x}=f,b=a.createEmptyBand(s,k*x);switch(n){case"difference":case"relative-difference":o({bands:g,mask:m,outBand:b,isRoundingNeeded:p,isRelative:"relative-difference"===n});break;case"categorical":l({bands:g,mask:m,outBand:b,...i});break;case"euclidean-distance":c({pixels:e.map(e=>e.pixels),mask:m,outBand:b});break;case"angle-difference":d({pixels:e.map(e=>e.pixels),mask:m,outBand:b});break;case"band-with-most-change":r({pixels:e.map(e=>e.pixels),mask:m,outBand:b})}const B=new a({width:k,height:x,pixels:[b],pixelType:s,mask:m});return B.updateStatistics(),B}function o(e){const{bands:[t,a],mask:n,isRelative:s,isRoundingNeeded:i,outBand:o}=e,l=t.length;for(let c=0;c<l;c++)if(!n||n[c]){let e=t[c]-a[c];if(s){const n=Math.max(Math.abs(t[c])-Math.abs(a[c]));e=n>0?e/n:0}o[c]=i?Math.round(e):e}}function l(e){const{bands:[t,a],categoryIndexLookups:[n,s],classNames:[i,o],mask:l,keepMethod:c,outBand:d}=e,r=t.length,f=i.length,h=o.length,p=f*h,u=p+1,m=p+2;for(let g=0;g<r;g++)if(!l||l[g]){const e=t[g],l=a[g],r=n[e],f=s[l],k=i[r],x=o[f];d[g]=null==r||null==f?p:"changed"===c&&k===x?u:"unchanged"===c&&k!==x?m:r*h+f}}function c(e){const{pixels:[t,a],mask:n,outBand:s}=e,i=t[0].length,o=t.length;for(let l=0;l<i;l++)if(!n||n[l]){let e=0;for(let n=0;n<o;n++){const s=t[n][l]-a[n][l];e+=s*s}s[l]=Math.sqrt(e)}}function d(e){const{pixels:[t,a],mask:n,outBand:s}=e,i=t[0].length,o=t.length;for(let l=0;l<i;l++)if(!n||n[l]){let e=0,n=0,i=0;for(let s=0;s<o;s++){const o=t[s][l],c=a[s][l];e+=o*c,n+=o*o,i+=c*c}const c=Math.sqrt(n*i);s[l]=c?Math.acos(e/c):1.5707963267948966}}function r(e){const{pixels:[t,a],mask:n,outBand:s}=e,i=t[0].length,o=t.length;for(let l=0;l<i;l++)if(!n||n[l]){let e=0,n=0;for(let s=0;s<o;s++){const i=Math.abs(t[s][l]-a[s][l]);i>e&&(e=i,n=s)}s[l]=n}}export{n as changeMethodMap,i as computeChange,s as keepMethodMap};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { RasterPixelType } from "../../types.js";
|
|
1
2
|
import type { BaseRasterFunctionParameters, RasterArgument, RasterPrimaryArgument, BaseNRasterFunctionParameters } from "../types.js";
|
|
2
|
-
import type { RasterPixelType } from "../../../support/RasterTypes.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* SetNull parameters
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
const e=new Set(["+","-","*","/","(",")"]);function t(t,r){(t=t.replaceAll(" ","")).startsWith("-")&&(t="0"+t),t.startsWith("+")&&(t=t.slice(1));const l=t.split(""),o=[],s=[];let a="";for(let f=0;f<l.length;f++){const t=l[f];e.has(t)?(a.length&&s.push(n(a,r)),o.push(t),a=""):a=a.concat(t)}return a.length&&s.push(n(a,r)),{ops:o,nums:s}}function n(e,t){return e.toLowerCase().startsWith("b")?t[parseInt(e.slice(1),10)-1]:parseFloat(e)}function r(e,t,n,r){if("number"==typeof n&&"number"==typeof r)return n+r;let l,o,s;"number"==typeof n?(s=r,l=s.length,o=new Float32Array(l),o.fill(n)):(l=n.length,o=n,r.constructor===Number?(s=new Float32Array(l),s.fill(r)):s=r);const a=new Float32Array(l);switch(t){case"+":for(let t=0;t<l;t++)(null==e||e[t])&&(a[t]=o[t]+s[t]);break;case"-":for(let t=0;t<l;t++)(null==e||e[t])&&(a[t]=o[t]-s[t]);break;case"*":for(let t=0;t<l;t++)(null==e||e[t])&&(a[t]=o[t]*s[t]);break;case"/":for(let t=0;t<l;t++)(null==e||e[t])&&s[t]&&(a[t]=o[t]/s[t]);break;case"(":case")":throw new Error("encountered error with custom band index equation")}return a}function l(e,t){e.splice(t,1);let n=0,r=0;do{n=0,r=0;for(let t=0;t<e.length;t++)if("("===e[t])n=t;else if(")"===e[t]){r=t;break}r===n+1&&e.splice(n,2)}while(r===n+1);return e}function o(e){if(1===e.length)return{opIndex:0,numIndex:0};let t=0,n=0;for(let s=0;s<e.length;s++)if("("===e[s])t=s;else if(")"===e[s]){n=s;break}const r=0===n?e:e.slice(t+1,n);let l=-1;for(let s=0;s<r.length;s++)if("*"===r[s]||"/"===r[s]){l=s;break}if(l>-1)n>0&&(l+=t+1);else{for(let e=0;e<r.length;e++)if("+"===r[e]||"-"===r[e]){l=e;break}n>0&&(l+=t+1)}let o=0;for(let s=0;s<l;s++)"("===e[s]&&o++;return{opIndex:l,numIndex:l-o}}function s(e,n,s){let a,{ops:f,nums:i}=t(s,n);if(0===f.length){const e=1===i.length?i[0]:n[0];if(e instanceof Float32Array)return[e];const t=new Float32Array(n[0].length);return"number"==typeof e?t.fill(e):t.set(e),[t]}for(;f.length>0;){const{numIndex:t,opIndex:n}=o(f);if(a=r(e,f[n],i[t],i[t+1]),1===f.length)break;f=l(f,n),i.splice(t,2,a)}return[a]}export{s as calculateCustomBandIndex};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import{JSONMap as t}from"../../../core/jsonMap.js";import{mirror as e}from"./mirror.js";import o from"../../support/PixelBlock.js";const n=new t({1:"min",2:"max",3:"mean",4:"stddev",5:"median",6:"majority",7:"minority"},{useNumericKeys:!0});function s(t,e){const{fillNoDataOnly:o}=e,{band:n,width:s,height:r,mask:i,outBand:l}=t;if(o&&!i)return void l.set(n);const{statisticsType:a,kernelRows:c,kernelCols:f}=e,h="stddev"===a,u=s*r,m=new Float64Array(u),d=new Float64Array(u),y=new Uint32Array(u);for(let A=0;A<r;A++){const t=A*s;let e=0,o=0,r=0;for(let s=0;s<f;s++)i&&!i[t+s]||(e+=n[t+s],h&&(o+=n[t+s]**2),r++);m[t]=e,d[t]=o,y[t]=r;for(let l=1;l<=s-f;l++){const s=t+l-1,a=s+f;i?(i[s]&&(r--,e-=n[s],h&&(o-=n[s]**2)),i[a]&&(r++,e+=n[a],h&&(o+=n[a]**2))):(e-=n[s],e+=n[a],h&&(o-=n[s]**2,o+=n[a]**2)),m[t+l]=e,y[t+l]=r,h&&(d[t+l]=o)}}const k=new Float64Array(u),p=new Float64Array(u),w=new Uint32Array(u),M=c*s;for(let A=0;A<=s-f;A++){let t=0,e=0,o=0;for(let n=0;n<c;n++){const r=n*s+A;t+=m[r],o+=y[r],h&&(e+=d[r])}k[A]=t,p[A]=e,w[A]=o;for(let n=1;n<=r-c;n++){const r=(n-1)*s+A,i=r+M;t-=m[r],t+=m[i],o-=y[r],o+=y[i],h&&(e-=d[r],e+=d[i]),k[n*s+A]=t,p[n*s+A]=e,w[n*s+A]=o}}const g=Math.floor(c/2),b=Math.floor(f/2);for(let A=g;A<r-g;A++){const t=A*s;for(let e=b;e<s-b;e++){const n=(A-g)*s+e-b,r=w[n];if(0===r||o&&(!i||i[t+e]))continue;const a=k[n]/r,c=h?Math.sqrt((p[n]-k[n]*a)/r):a;l[t+e]=c,i&&(i[t+e]=255)}}}function r(t,e){const{fillNoDataOnly:o}=e,{band:n,width:s,height:r,mask:i,outBand:l}=t;if(o&&!i)return void l.set(n);const{kernelRows:a,kernelCols:c,statisticsType:f}=e,h=Math.floor(a/2),u=Math.floor(c/2),m="min"===f,d=l.slice(),y=new Uint32Array(s*r);for(let k=h;k<r-h;k++){const t=k*s;for(let e=u;e<s-u;e++){let o=m?Number.MAX_VALUE:-Number.MAX_VALUE,r=0;for(let l=0;l<a;l++)for(let a=0;a<c;a++){const c=t+e+(l-h)*s+a-u;i&&!i[c]||(o=m?Math.min(o,n[c]):Math.max(o,n[c]),r++)}i?(d[t+e]=0===r?0:o,y[t+e]=r):l[t+e]=0===r?0:o}}if(i)for(let k=h;k<r-h;k++){const t=k*s;for(let e=u;e<s-u;e++)if(y[t+e]){if(o&&i[t+e])continue;l[t+e]=d[t+e],i[t+e]=255}}}function i(t,e){const{fillNoDataOnly:o}=e,{band:n,width:s,height:r,mask:i,outBand:l}=t;if(o&&!i)return void l.set(n);const{kernelRows:a,kernelCols:c}=e,f=Math.floor(a/2),h=Math.floor(c/2),u=l.slice(),m=new Uint32Array(s*r);for(let d=f;d<r-f;d++){const t=d*s;for(let e=h;e<s-h;e++){if(o&&i?.[t+e])continue;const r=[];for(let o=0;o<a;o++)for(let l=0;l<c;l++){const a=t+e+(o-f)*s+l-h;i&&!i[a]||r.push(n[a])}r.length&&(r.sort((t,e)=>t-e),i?(u[t+e]=r[Math.floor((r.length-1)/2)],m[t+e]=r.length):l[t+e]=r[Math.floor((r.length-1)/2)])}}if(i)for(let d=f;d<r-f;d++){const t=d*s;for(let e=h;e<s-h;e++)if(m[t+e]){if(o&&i[t+e])continue;l[t+e]=u[t+e],i[t+e]=255}}}function l(t,e){const{fillNoDataOnly:o}=e,{band:n,width:s,height:r,mask:i,outBand:l}=t;if(o&&!i)return void l.set(n);const{kernelRows:a,kernelCols:c}=e,f=Math.floor(a/2),h=Math.floor(c/2),u="majority"===e.statisticsType,m=a*c,d=l.slice(),y=new Uint32Array(s*r);for(let k=f;k<r-f;k++){const t=k*s;for(let e=h;e<s-h;e++){if(o&&i?.[t+e])continue;const r=new Map;for(let o=0;o<a;o++)for(let l=0;l<c;l++){const a=t+e+(o-f)*s+l-h;if(i&&!i[a])continue;const c=n[a];r.set(c,r.has(c)?r.get(c)+1:1)}if(0===r.size)continue;let k=0,p=0,w=u?0:m+1;for(const t of r.keys())p=r.get(t),u===p>w&&(w=p,k=t);i?(d[t+e]=k,y[t+e]=r.size):l[t+e]=k}}if(i)for(let k=f;k<r-f;k++){const t=k*s;for(let e=h;e<s-h;e++)if(y[t+e]){if(o&&i[t+e])continue;l[t+e]=d[t+e],i[t+e]=255}}}function a(t,n){const{mask:a}=t,{fillNoDataOnly:c}=n;if(c&&!a)return t;const{pixels:f,width:h,height:u,bandMasks:m,pixelType:d}=t,y=f.length,k=h*u,p=[],{kernelRows:w,kernelCols:M,statisticsType:g,mirrorEdges:b}=n;if(c&&!a)return t;const A=n.outputPixelType??d,x=[];for(let j=0;j<y;j++){const t=f[j],d=o.createEmptyBand(A,k);c&&d.set(t);const y=m?.[j]??a,B=y?.slice()??null,N={band:t,width:h,height:u,mask:B,outBand:d};switch(g){case"min":case"max":r(N,n);break;case"mean":case"stddev":s(N,n);break;case"median":i(N,n);break;case"majority":case"minority":l(N,n)}b&&!c&&e(d,h,u,w,M),p.push(d),B&&x.push(B)}let B=x[0]??a;x.length!==y&&(x.length=0),y>1&&m?.length&&(B=o.combineBandMasks(m));const N=new o({pixelType:A,width:h,height:u,pixels:p,bandMasks:m&&x.length?x:null,mask:B});return N.updateStatistics(),N}export{a as computeFocalStatistics,n as statisticsTypeMap};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import{getPixelValueRange as t}from"../formats/pixelRangeUtils.js";import{matchAnyMask as e}from"./pixelUtils.js";import n from"../../support/PixelBlock.js";function r(t,e,r){const a=t.length,s=n.createEmptyBand(r,a);for(let n=0;n<a;n++)if(e[n]){const r=t[n];r<=0?e[n]=0:s[n]=Math.log(r)}return s}function a(e,r,a,s){const i=e.length,o=n.createEmptyBand(a,i),[l,c]=t(a),f=s?.lambda??0,m=s?.shift??0,h=0===f;for(let t=0;t<i;t++)if(r[t]){const n=e[t];if(n<=0)r[t]=0;else if(h)o[t]=Math.log(n+m);else{const e=((n+m)**f-1)/f;o[t]=Math.max(l,Math.min(e,c))}}return o}function s(t,e,r){const a=t.length,s=n.createEmptyBand(r,a);for(let n=0;n<a;n++)if(e[n]){const r=t[n];r<0?e[n]=0:s[n]=Math.sqrt(r)}return s}function i(e,r,a){const s=e.length,i=n.createEmptyBand(a,s),[o,l]=t(a);for(let t=0;t<s;t++)if(!r||r[t]){const n=1/e[t];i[t]=i[t]=Math.max(o,Math.min(n,l))}return i}function o(t,o,l){const{width:c,height:f,pixels:m}=t;let h=[];h=t.bandMasks?t.bandMasks.map(t=>new Uint8Array(t)):m.map(()=>t.mask?new Uint8Array(t.mask):new Uint8Array(c*f).fill(255));const p="f32",u=m.map((t,e)=>{switch(o){case"log":return r(t,h[e],p);case"sqrt":return s(t,h[e],p);case"inverse":return i(t,h[e],p);case"box-cox":return a(t,h[e],p,l);default:return t}}),d="inverse"===o,g=d?t.mask:1===h.length?h[0]:e(h),x=d?t.bandMasks:1===h.length?void 0:h;return new n({width:c,height:f,pixelType:p,bandMasks:x,mask:g,pixels:u})}export{o as transformPixels};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type RasterFunction from "../../support/RasterFunction.js";
|
|
2
|
-
import type { RasterPixelType } from "
|
|
2
|
+
import type { RasterPixelType } from "../types.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Raster argument used to specify raster(s) used in raster processing.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
export type RasterInterpolation = "nearest" | "bilinear" | "cubic" | "majority";
|
|
3
3
|
|
|
4
|
-
export type
|
|
4
|
+
export type RasterTypedArrayUnion = Int8Array<ArrayBuffer> | Uint8Array<ArrayBuffer> | Uint8ClampedArray<ArrayBuffer> | Int16Array<ArrayBuffer> | Uint16Array<ArrayBuffer> | Int32Array<ArrayBuffer> | Uint32Array<ArrayBuffer> | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>;
|
|
5
5
|
|
|
6
|
-
export type RasterNumArray =
|
|
6
|
+
export type RasterNumArray = RasterTypedArrayUnion | number[];
|
|
7
7
|
|
|
8
8
|
/** The output pixel type. */
|
|
9
9
|
export type RasterPixelType = "unknown" | "u1" | "u2" | "u4" | "u8" | "s8" | "u16" | "s16" | "u32" | "s32" | "f32" | "f64" | "c64" | "c128";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{equals as e,difference as r,isSome as a}from"../../core/arrayUtils.js";import
|
|
5
|
+
import{equals as e,difference as r,isSome as a}from"../../core/arrayUtils.js";import t from"../../core/Error.js";import{updateOrigins as n}from"../../core/accessorSupport/originUtils.js";import{save as s,saveAs as o,getLayerJSON as l,getPortalItem as i,addItem as c,ensureLayerConfig as u,ensureItemConfig as y,setCommonItemProperties as p,createErrorMessage as f}from"./utils.js";import{parse as m}from"../support/arcgisLayerUrl.js";import{fetchFeatureService as d,getLayerModuleType as h}from"../support/fetchService.js";import{isLayerWithFeatureLayerSource as b}from"../support/layerUtils.js";import{createForItemWrite as w}from"../../portal/support/jsonContext.js";import{getWGS84ExtentForItem as T,toggleTypeKeyword as v,typeKeyword as S,removeTypeKeyword as L,hasTypeKeyword as I}from"../../portal/support/portalItemUtils.js";const g="Feature Service",E="feature-layer-utils",P=`${E}-save`,O=`${E}-save-as`,A=`${E}-saveall`,x=`${E}-saveall-as`;function N(e){return{isValid:b(e)&&(!("dynamicDataSource"in e)||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function $(e,r){const a=w(e,"portal-item");return r?.isTable&&(a.layerContainerType="tables"),a}function j(e){const r=$(e),a=$(e);return a.layerContainerType="tables",{forLayers:r,forTables:a}}function U(e){const r=[],a=[];for(const{layer:t,layerJSON:n}of e)R(t)?a.push(n):r.push(n);return{layers:r,tables:a}}function R(e,r){return e.isTable}function C(e){return U([e])}async function J(e,r){return/\/\d+\/?$/.test(e.url)?C(r[0]):G(r,e)}async function G(e,r){if(e.reverse(),!r)return U(e);const a=await _(r,e);for(const t of e)V(t.layer,t.layerJSON,a);return M(a,e),a}async function _(e,r){let a=await e.fetchData("json");if(D(a)&&!I(e,S.HOSTED_SERVICE))return a;a||={},F(a);const{layer:{url:t,customParameters:n,apiKey:s}}=r[0];return await B(a,{url:t??"",customParameters:n,apiKey:s},r.map(e=>e.layer.layerId)),a}function D(e){return!!(e&&Array.isArray(e.layers)&&Array.isArray(e.tables))}function F(e){e.layers||=[],e.tables||=[]}function M(e,r){const a=[],t=[];for(const{layer:n}of r){const{isTable:e,layerId:r}=n;e?t.push(r):a.push(r)}Y(e.layers,a),Y(e.tables,t)}function Y(r,a){if(r.length<2)return;const t=[];for(const{id:e}of r)t.push(e);e(t.sort(k),a.slice().sort(k))&&r.sort((e,r)=>{const t=a.indexOf(e.id),n=a.indexOf(r.id);return t<n?-1:t>n?1:0})}function k(e,r){return e<r?-1:e>r?1:0}async function B(e,r,a){const{url:t,customParameters:n,apiKey:s}=r,{serviceJSON:o,layersJSON:l}=await d(t,{customParameters:n,apiKey:s}),i=K(e.layers,o.layers,a),c=K(e.tables,o.tables,a);e.layers=i.itemResources,e.tables=c.itemResources;const u=[...i.added,...c.added],y=l?[...l.layers,...l.tables]:[];await z(e,u,t,y)}function K(e,a,t){const n=r(e,a,(e,r)=>e.id===r.id);e=e.filter(e=>!n.removed.some(r=>r.id===e.id));const s=n.added;return s.forEach(({id:r})=>{e.push({id:r})}),{itemResources:e,added:s.filter(({id:e})=>!t.includes(e))}}async function z(e,r,a,t){const n=await H(r),s=r.map(({id:e,type:r})=>new(n.get(r))({url:a,layerId:e,sourceJSON:t.find(({id:r})=>r===e)}));await Promise.allSettled(s.map(e=>e.load())),s.forEach(r=>{const{layerId:a,loaded:t,defaultPopupTemplate:n}=r;if(!t||null==n)return;const s={id:a,popupInfo:n.toJSON()};V(r,"ArcGISFeatureLayer"===r.operationalLayerType?s:{...s,layerType:r.operationalLayerType},e)})}async function H(e){const r=[];e.forEach(({type:e})=>{switch(h(e)){case"CatalogLayer":r.push(import("../CatalogLayer.js").then(e=>e.default));break;case"FeatureLayer":r.push(import("../FeatureLayer.js").then(e=>e.default));break;case"OrientedImageryLayer":r.push(import("../OrientedImageryLayer.js").then(e=>e.default))}});const a=await Promise.all(r),t=new Map;return e.forEach(({type:e},r)=>{t.set(e,a[r])}),t}function V(e,r,a){e.isTable?q(a.tables,r):q(a.layers,r)}function q(e,r){const a=e.findIndex(({id:e})=>e===r.id);-1===a?e.push(r):e[a]=r}function Q(e,r){if(!e.length)throw new t(`${r}:missing-parameters`,"'layers' array should contain at least one feature layer")}function W(e,r){const a=e.map(e=>e.portalItem.id);if(new Set(a).size>1)throw new t(`${r}:invalid-parameters`,"All layers in the 'layers' array should be loaded from the same portal item")}function X(e,r){const a=e.map(e=>e.layerId);if(new Set(a).size!==a.length)throw new t(`${r}:invalid-parameters`,"'layers' array should contain only one instance each of layer or table in a feature service")}async function Z(e){Q(e,A),await Promise.all(e.map(e=>e.load()));for(const r of e)u(r,A,N),y({layer:r,itemType:g,errorNamePrefix:A});W(e,A),X(e,A)}function ee(e){if(!("layerType"in e))return!!e.charts?.length;switch(e.layerType){case"OrientedImageryLayer":return!!e.charts?.length;case"SubtypeGroupLayer":return!!e.layers.some(e=>!!e.charts?.length);case"SubtypeGroupTable":return!!e.tables.some(e=>!!e.charts?.length);case"CatalogLayer":return!!e.footprintLayer?.charts?.length}}function re(e,r){let a=0,t=0,n=0,s=0;for(const o of[...r.layers,...r.tables])if(ee(o)&&s++,"layerType"in o)switch(o.layerType){case"OrientedImageryLayer":a++;break;case"SubtypeGroupLayer":t++;break;case"SubtypeGroupTable":n++}v(e,S.ORIENTED_IMAGERY_LAYER,a>0),v(e,S.SUBTYPE_GROUP_LAYER,t>0),v(e,S.SUBTYPE_GROUP_TABLE,n>0),v(e,S.CHARTS,s>0)}function ae(e,r,a){L(r,S.METADATA),v(r,S.MULTI_LAYER,e.length>1),v(r,S.SINGLE_LAYER,1===e.length),v(r,S.TABLE,a.tables.length>0&&0===a.layers.length),re(r,a)}async function te(e,r,a){re(r,a)}async function ne(e,r,a){const{url:t,layerId:n,title:s,fullExtent:o,isTable:l}=e,i=m(t);r.url=("FeatureServer"===i?.serverType?t:`${t}/${n}`)??null,r.title||=s,r.extent=null,l||null==o||(r.extent=await T(o)),ae([e],r,a)}function se(e,r){for(const o of e){const a=o.parsedUrl.path,n=m(a),s=n?.url.path;if(!s)throw new t(`${r}:invalid-parameters`,f(o,`has unsupported url pattern: ${a}`),{layer:o});const l=n?.serverType;if("FeatureServer"!==l&&"MapServer"!==l)throw new t(`${r}:invalid-parameters`,f(o,`has unsupported server type: ${l}`),{layer:o});if("MapServer"===l&&e.length>1)throw new t(`${r}:invalid-parameters`,"Only one layer or table in a map service can be saved")}const a=m(e[0].parsedUrl.path),n=a?.url.path,s=e.every(e=>{const r=m(e.parsedUrl.path);return r?.url.path===n});if(!s)throw new t(`${r}:invalid-parameters`,"'layers' array should only contain layers or tables that belong to the same feature service")}async function oe(e){Q(e,x),await Promise.all(e.map(e=>e.load()));for(const r of e)u(r,x,N);se(e,x),X(e,x)}function le(e,r){re(e,r),p(e)}async function ie(e,r,t){let n=0;for(const{isTable:a}of e)a||n++;const s=e[0].parsedUrl.path,o=m(s);if(r.url="FeatureServer"===o?.serverType?o.url.path:s,r.title||=o.title,r.extent=null,n>0){const t=e.map(e=>e.fullExtent).filter(a).reduce((e,r)=>e.clone().union(r));t&&(r.extent=await T(t))}ae(e,r,t),p(r)}async function ce(e,r){return s({layer:e,itemType:g,validateLayer:N,createJSONContext:r=>$(r,e),createItemData:(e,r)=>J(r,[e]),errorNamePrefix:P,setItemProperties:te},r)}async function ue(e,r){await Z(e);const a=e[0].portalItem,t=j(a),s=await Promise.all(e.map(e=>l(e,e.isTable?t.forTables:t.forLayers,r))),o=await J(a,e.map((e,r)=>({layer:e,layerJSON:s[r]})));return le(a,o),await a.update({data:o}),await Promise.all(e.slice(1).map(e=>e.portalItem.reload())),n(t.forLayers),n(t.forTables),a.clone()}async function ye(e,r,a){return o({layer:e,itemType:g,validateLayer:N,createJSONContext:r=>$(r,e),createItemData:(e,r)=>Promise.resolve(C(e)),errorNamePrefix:O,newItem:r,setItemProperties:ne},a)}async function pe(e,r,a){await oe(e);const t=i({itemType:g,errorNamePrefix:x,newItem:r}),s=j(t),o=await Promise.all(e.map(e=>l(e,e.isTable?s.forTables:s.forLayers,a))),u=await G(e.map((e,r)=>({layer:e,layerJSON:o[r]})));await ie(e,t,u),await c(t,u,a);for(const n of e)n.portalItem=t.clone();return n(s.forLayers),n(s.forTables),t}export{ce as save,ue as saveAll,pe as saveAllAs,ye as saveAs};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type Multipoint from "../../geometry/Multipoint.js";
|
|
2
2
|
import type Point from "../../geometry/Point.js";
|
|
3
3
|
import type Polyline from "../../geometry/Polyline.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { GroundElevationLayerUnion } from "../types.js";
|
|
5
5
|
|
|
6
6
|
/** Supported geometries to query elevation for. */
|
|
7
7
|
export type QueryGeometry = Point | Multipoint | Polyline;
|
|
@@ -31,5 +31,5 @@ export interface SampleInfo {
|
|
|
31
31
|
* The elevation source from which
|
|
32
32
|
* the data for the corresponding coordinate was sampled.
|
|
33
33
|
*/
|
|
34
|
-
source?:
|
|
34
|
+
source?: GroundElevationLayerUnion;
|
|
35
35
|
}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import
|
|
5
|
+
import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../core/Evented.js";import r from"../../core/Logger.js";import{subclass as o}from"../../core/accessorSupport/decorators.js";import s from"../../geometry/Point.js";import{project as n}from"../../geometry/support/webMercatorUtils.js";let i=class extends t{queryElevation(e){const t=this.projectIfRequired(e,this.spatialReference);if(!t)return null;switch(e.type){case"point":return a(e,t,this);case"polyline":return l(e,t,this);case"multipoint":return p(e,t,this);default:return null}}projectIfRequired(e,t){if(null==e)return null;const o=e.spatialReference;if(o.equals(t))return e;const s=n(e,t);return s||r.getLogger(this).error(`Cannot project geometry spatial reference (wkid:${o.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),s}};function a(e,t,r){return e.hasZ=!0,e.z=r.elevationAt(t.x,t.y),e}function l(e,t,r){c.spatialReference=t.spatialReference;const o=e.hasM&&!e.hasZ;for(let s=0;s<e.paths.length;s++){const n=e.paths[s],i=t.paths[s];for(let e=0;e<n.length;e++){const t=n[e],s=i[e];c.x=s[0],c.y=s[1],o&&(t[3]=t[2]),t[2]=r.elevationAt(c.x,c.y)}}return e.hasZ=!0,e}function p(e,t,r){c.spatialReference=t.spatialReference;const o=e.hasM&&!e.hasZ;for(let s=0;s<e.points.length;s++){const n=e.points[s],i=t.points[s];c.x=i[0],c.y=i[1],o&&(n[3]=n[2]),n[2]=r.elevationAt(c.x,c.y)}return e.hasZ=!0,e}i=e([o("esri.layers.support.ElevationSampler")],i);const c=new s;export{i as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type FeatureTemplate from "./FeatureTemplate.js";
|
|
2
2
|
import type { ClonableMixin, ClonableMixinProperties } from "../../core/Clonable.js";
|
|
3
3
|
import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { DomainUnion } from "./types.js";
|
|
5
5
|
import type { FeatureTemplateProperties } from "./FeatureTemplate.js";
|
|
6
6
|
|
|
7
7
|
export interface FeatureTypeProperties extends JSONSupportMixinProperties, ClonableMixinProperties, Partial<Pick<FeatureType, "domains" | "id" | "name">> {
|
|
@@ -25,7 +25,7 @@ export default class FeatureType extends FeatureTypeSuperclass {
|
|
|
25
25
|
* [CodedValueDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-CodedValueDomain.html) or [RangeDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RangeDomain.html) then the domain is defined
|
|
26
26
|
* specifically for the given feature type.
|
|
27
27
|
*/
|
|
28
|
-
accessor domains: Record<string,
|
|
28
|
+
accessor domains: Record<string, DomainUnion>;
|
|
29
29
|
/** The feature type identifier. */
|
|
30
30
|
accessor id: number | string;
|
|
31
31
|
/** The feature type name. */
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
|
|
2
|
-
import type { Domain } from "./domains.js";
|
|
3
|
-
import type { Type as FieldType } from "./fieldType.js";
|
|
4
2
|
import type { FieldValueType } from "./FieldValueType.js";
|
|
3
|
+
import type { DomainUnion, FieldType } from "./types.js";
|
|
5
4
|
import type { InheritedDomainProperties } from "./InheritedDomain.js";
|
|
6
5
|
import type { CodedValueDomainProperties } from "./CodedValueDomain.js";
|
|
7
6
|
import type { RangeDomainProperties } from "./RangeDomain.js";
|
|
@@ -119,7 +118,7 @@ export default class Field extends JSONSupport {
|
|
|
119
118
|
* }
|
|
120
119
|
* });
|
|
121
120
|
*/
|
|
122
|
-
get domain():
|
|
121
|
+
get domain(): DomainUnion | null | undefined;
|
|
123
122
|
set domain(value: ((RangeDomainProperties & { type: "range" }) | (CodedValueDomainProperties & { type: "coded-value" }) | (InheritedDomainProperties & { type: "inherited" })) | null | undefined);
|
|
124
123
|
/**
|
|
125
124
|
* Indicates whether the field is editable.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ClonableMixin, ClonableMixinProperties } from "../../core/Clonable.js";
|
|
2
2
|
import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
|
|
3
|
-
import type { FieldFormatUnion } from "./
|
|
3
|
+
import type { FieldFormatUnion } from "./types.js";
|
|
4
4
|
import type { NumberFieldFormatProperties } from "./NumberFieldFormat.js";
|
|
5
5
|
import type { DateTimeFieldFormatProperties } from "./DateTimeFieldFormat.js";
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type MediaElementBase from "./MediaElementBase.js";
|
|
2
|
-
import type { AnimationOptions,
|
|
2
|
+
import type { AnimationOptions, ImageBinarySource, ImageSource } from "../media/types.js";
|
|
3
3
|
import type { MediaElementBaseProperties } from "./MediaElementBase.js";
|
|
4
4
|
|
|
5
5
|
export interface ImageElementProperties extends MediaElementBaseProperties, Partial<Pick<ImageElement, "animationOptions" | "image">> {}
|
|
@@ -60,7 +60,7 @@ export default class ImageElement extends MediaElementBase {
|
|
|
60
60
|
*/
|
|
61
61
|
accessor animationOptions: AnimationOptions | null | undefined;
|
|
62
62
|
/** The image content referenced in the image element instance. The content matches the image referenced in [image](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html#image) parameter. */
|
|
63
|
-
get content():
|
|
63
|
+
get content(): ImageBinarySource | null | undefined;
|
|
64
64
|
/**
|
|
65
65
|
* The image element to be added to the [media layer's source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html#source). The image
|
|
66
66
|
* element can be URL string pointing the image for example.
|
|
@@ -117,7 +117,7 @@ export default class ImageElement extends MediaElementBase {
|
|
|
117
117
|
* georeference: extent
|
|
118
118
|
* });
|
|
119
119
|
*/
|
|
120
|
-
accessor image:
|
|
120
|
+
accessor image: ImageSource | null | undefined;
|
|
121
121
|
/** The element type. */
|
|
122
122
|
get type(): "image";
|
|
123
123
|
}
|
|
@@ -3,8 +3,8 @@ import type { ReadonlyArrayOrCollection } from "../../core/Collection.js";
|
|
|
3
3
|
import type { EventedAccessor, EventedMixinProperties } from "../../core/Evented.js";
|
|
4
4
|
import type { LoadableMixin, LoadableMixinProperties } from "../../core/Loadable.js";
|
|
5
5
|
import type { EsriPromiseMixin, EsriPromiseMixinProperties } from "../../core/Promise.js";
|
|
6
|
+
import type { MediaElement } from "../media/types.js";
|
|
6
7
|
import type { ImageElementProperties } from "./ImageElement.js";
|
|
7
|
-
import type { MediaElement } from "./media.js";
|
|
8
8
|
import type { VideoElementProperties } from "./VideoElement.js";
|
|
9
9
|
|
|
10
10
|
export interface LocalMediaElementSourceProperties extends EventedMixinProperties, EsriPromiseMixinProperties, LoadableMixinProperties {
|