@arcgis/core 5.2.0-next.27 → 5.2.0-next.29
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/WebLinkChart.js +1 -1
- package/WebMap.js +1 -1
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +40 -2
- package/applications/KnowledgeStudio/generalSharedKgUtils.js +1 -1
- package/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/Pixel.js +1 -1
- package/arcade/deepClone.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
- package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0197e459fdb04dfb28ef.js +1 -0
- package/assets/esri/core/workers/chunks/{f7344d855f1092383abe.js → 15aa9b85976069acf4f3.js} +1 -1
- package/assets/esri/core/workers/chunks/{5ee887fc6e1e0e70e02f.js → 1664434dc7a67c8ce453.js} +1 -1
- package/assets/esri/core/workers/chunks/17b98787a0698f584882.js +1 -0
- package/assets/esri/core/workers/chunks/1837f97f720d255a1694.js +1 -0
- package/assets/esri/core/workers/chunks/1b9c68e8431bb4608209.js +1 -0
- package/assets/esri/core/workers/chunks/1bbf5f5da5842b93f638.js +1 -0
- package/assets/esri/core/workers/chunks/1bd7b7f4ee7ea6cb7ef9.js +1 -0
- package/assets/esri/core/workers/chunks/1e386475937e02b3f523.js +1 -0
- package/assets/esri/core/workers/chunks/209460f8aae3f9f8c9b8.js +1 -0
- package/assets/esri/core/workers/chunks/{316a3d5c7842b445e29e.js → 20ffeb09bb30400de110.js} +1 -1
- package/assets/esri/core/workers/chunks/21122f3f3e19a7fd7d33.js +1 -0
- package/assets/esri/core/workers/chunks/{25fd4d5d3af887536b3b.js → 2628136bf9f47d238a24.js} +1 -1
- package/assets/esri/core/workers/chunks/{bf9eca7dd107bdb06614.js → 2665337e1b665e7e2b70.js} +1 -1
- package/assets/esri/core/workers/chunks/2b044c8fab2055a8818d.js +1 -0
- package/assets/esri/core/workers/chunks/2b2b042a6d6949b06127.js +1 -0
- package/assets/esri/core/workers/chunks/2c15c227d057292d4fa8.js +1 -0
- package/assets/esri/core/workers/chunks/2f02880a7f081eb210cd.js +1 -0
- package/assets/esri/core/workers/chunks/2fc3e43b64300014dddc.js +1 -0
- package/assets/esri/core/workers/chunks/{31c4128b23968575feca.js → 31d92ba9089617aa59ab.js} +1 -1
- package/assets/esri/core/workers/chunks/32740b075d7a890d7888.js +1 -0
- package/assets/esri/core/workers/chunks/38b69fba9ae4ccbae6b7.js +1 -0
- package/assets/esri/core/workers/chunks/390f2beee8e3f2a302e4.js +1 -0
- package/assets/esri/core/workers/chunks/3c342e662c13a05f4caf.js +1 -0
- package/assets/esri/core/workers/chunks/{d670e134348954ce465d.js → 3d1e5bfd88771d4a0bf6.js} +1 -1
- package/assets/esri/core/workers/chunks/3eee32db0e9a5086b9a8.js +1 -0
- package/assets/esri/core/workers/chunks/43847d66726fd0bcbbb7.js +1 -0
- package/assets/esri/core/workers/chunks/4545cf12ad0824ce6b41.js +1 -0
- package/assets/esri/core/workers/chunks/45e4b9069263adeae394.js +1 -0
- package/assets/esri/core/workers/chunks/47290f27375c76bcc9c7.js +1 -0
- package/assets/esri/core/workers/chunks/{4e16d7fa2e6f11d082b5.js → 4ba4fd8fa31169760fee.js} +1 -1
- package/assets/esri/core/workers/chunks/{268ee59800e64baa9682.js → 4be0c64bbf2449d57ea5.js} +1 -1
- package/assets/esri/core/workers/chunks/5115059b012ef84407cf.js +1 -0
- package/assets/esri/core/workers/chunks/{e8e7cd26c43f231cdea2.js → 5189413a83faf3480e29.js} +1 -1
- package/assets/esri/core/workers/chunks/5c63b38160c7d063b8af.js +1 -0
- package/assets/esri/core/workers/chunks/5cccb8b06014ccef30f8.js +1 -0
- package/assets/esri/core/workers/chunks/{0098544169e429dd98d2.js → 689673173ca1c0e098fe.js} +1 -1
- package/assets/esri/core/workers/chunks/697e0ce10d77b90d4fee.js +1 -0
- package/assets/esri/core/workers/chunks/6991ba1b204668e7d4da.js +1 -0
- package/assets/esri/core/workers/chunks/{ccffaba50674adba7a0f.js → 6b56971783bf4c31a563.js} +1 -1
- package/assets/esri/core/workers/chunks/70c94bcfa20453134037.js +1 -0
- package/assets/esri/core/workers/chunks/{8f93e6fc11a158d4f1ee.js → 7335a762412bc8c15a2f.js} +1 -1
- package/assets/esri/core/workers/chunks/759686b896f51f0fe6a9.js +1 -0
- package/assets/esri/core/workers/chunks/7656900713e55036c3c1.js +1 -0
- package/assets/esri/core/workers/chunks/{b2b342b06d502fc61ea5.js → 76789f46b2c65d219cf9.js} +1 -1
- package/assets/esri/core/workers/chunks/774615303c1cc9a77e20.js +1 -0
- package/assets/esri/core/workers/chunks/7b290ac2e8a567ecae4a.js +1 -0
- package/assets/esri/core/workers/chunks/7ff37a4f315f7621462b.js +1 -0
- package/assets/esri/core/workers/chunks/8ad5e80e911419c1685a.js +1 -0
- package/assets/esri/core/workers/chunks/{a3ecde3794a7db3cf283.js → 8d90bef1091204fba0f1.js} +1 -1
- package/assets/esri/core/workers/chunks/8f16a358ed83d2264415.js +1 -0
- package/assets/esri/core/workers/chunks/{a454df829a72ab02c860.js → 8fd63cb38036f331a803.js} +1 -1
- package/assets/esri/core/workers/chunks/{bbcad2fde838819ffc7b.js → 906f4c0fa8135e6c2f03.js} +1 -1
- package/assets/esri/core/workers/chunks/989937c120bdd676ec1e.js +1 -0
- package/assets/esri/core/workers/chunks/9ba705a6ddabca0f77b1.js +1 -0
- package/assets/esri/core/workers/chunks/{87011d2fe14c54e296af.js → 9fe71d49c888fd871312.js} +1 -1
- package/assets/esri/core/workers/chunks/a14e5607c5c091c77e3d.js +1 -0
- package/assets/esri/core/workers/chunks/a2be8784f2cfdbb42681.js +1 -0
- package/assets/esri/core/workers/chunks/a6379a8df8c08b729b9c.js +1 -0
- package/assets/esri/core/workers/chunks/a988fd54912969b812ce.js +1 -0
- package/assets/esri/core/workers/chunks/a9db775210ebeee41738.js +1 -0
- package/assets/esri/core/workers/chunks/acbc14395c31f6da509e.js +1 -0
- package/assets/esri/core/workers/chunks/{11d1af758e2140095b10.js → aec82b94787821153d2b.js} +1 -1
- package/assets/esri/core/workers/chunks/b18b6bb85e52b03b85e3.js +680 -0
- package/assets/esri/core/workers/chunks/b624796ff4a9d4c406bf.js +1 -0
- package/assets/esri/core/workers/chunks/b7458bd3a2f590f32111.js +1 -0
- package/assets/esri/core/workers/chunks/bb1fad01d9f070e7d795.js +1 -0
- package/assets/esri/core/workers/chunks/{a9d477f90e5046400dd5.js → bcb2092c87d8d21c6458.js} +1 -1
- package/assets/esri/core/workers/chunks/{3e94ed4d57ee7d870cba.js → c6f5688074ae89c37add.js} +1 -1
- package/assets/esri/core/workers/chunks/caf150028aeac91b8d80.js +1 -0
- package/assets/esri/core/workers/chunks/cb30e8a66d6dcfebd439.js +1 -0
- package/assets/esri/core/workers/chunks/d7c0ab622caf495dbcef.js +1 -0
- package/assets/esri/core/workers/chunks/e181d0f5562878b3dc01.js +1 -0
- package/assets/esri/core/workers/chunks/{fd629872b5c07853f695.js → e4015870412edd69453c.js} +1 -1
- package/assets/esri/core/workers/chunks/{d07068c44d560e4ce02e.js → e5d2fab228d54b18a8a8.js} +1 -1
- package/assets/esri/core/workers/chunks/e774303efefee31952d0.js +1 -0
- package/assets/esri/core/workers/chunks/e98a8f80023c6023e72c.js +1 -0
- package/assets/esri/core/workers/chunks/f10a339b16d84b650012.js +2 -0
- package/assets/esri/core/workers/chunks/f1d211904d5a1de93cb3.js +1 -0
- package/assets/esri/core/workers/chunks/f847a4846c427f671455.js +1 -0
- package/assets/esri/core/workers/chunks/fe42fa2144691b9186fd.js +1 -0
- package/assets/esri/images/portal/gaussiansplatlayer16.png +0 -0
- package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
- package/assets/esri/images/portal/propresentation16.png +0 -0
- package/assets/esri/images/portal/urbanproject16.png +0 -0
- package/assets/esri/images/support/loading-throb.gif +0 -0
- package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
- package/assets/esri/libs/basisu/basis_encoder.wasm +0 -0
- package/assets/esri/libs/dxtEncoder/dxt_encoder.wasm +0 -0
- package/assets/esri/themes/base/icons/style.scss +0 -0
- package/assets/esri/themes/base/icons/variables.scss +0 -0
- package/assets/esri/themes/base/images/files/archive-32.svg +0 -0
- package/assets/esri/themes/base/images/files/cad-32.svg +0 -0
- package/assets/esri/themes/base/images/files/code-32.svg +0 -0
- package/assets/esri/themes/base/images/files/csv-32.svg +0 -0
- package/assets/esri/themes/base/images/files/excel-32.svg +0 -0
- package/assets/esri/themes/base/images/files/generic-32.svg +0 -0
- package/assets/esri/themes/base/images/files/gpx-32.svg +0 -0
- package/assets/esri/themes/base/images/files/image-32.svg +0 -0
- package/assets/esri/themes/base/images/files/pdf-32.svg +0 -0
- package/assets/esri/themes/base/images/files/report-32.svg +0 -0
- package/assets/esri/themes/base/images/files/sound-32.svg +0 -0
- package/assets/esri/themes/base/images/files/text-32.svg +0 -0
- package/assets/esri/themes/base/images/files/video-32.svg +0 -0
- package/assets/esri/themes/base/images/files/word-32.svg +0 -0
- package/assets/esri/themes/base/images/files/zip-32.svg +0 -0
- package/assets/esri/themes/base/images/loading-throb.gif +0 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +24 -0
- package/assets/esri/themes/base/widgets/_Bookmarks.scss +0 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/GlowComposition.glsl.js +5 -5
- package/chunks/OITBlend.glsl.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/config.js +1 -1
- package/core/AsyncUpdate.js +1 -1
- package/core/Loadable.js +1 -1
- package/core/colorUtils.js +1 -1
- package/core/date.js +1 -1
- package/core/has.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
- package/form/elements/AttachmentElement.d.ts +4 -1
- package/form/elements/inputs/attachments/AttachmentInput.d.ts +1 -0
- package/form/elements/inputs/attachments/AudioInput.d.ts +1 -0
- package/form/elements/inputs/attachments/DocumentInput.d.ts +3 -0
- package/form/elements/inputs/attachments/ImageInput.d.ts +1 -0
- package/form/elements/inputs/attachments/VideoInput.d.ts +1 -0
- package/geometry/Mesh.js +1 -1
- package/geometry/support/meshUtils/loadExternal.js +1 -1
- package/identity/OAuthCredential.js +1 -1
- package/kernel.js +1 -1
- package/layers/AnnotationFeatureLayer.d.ts +2 -4
- package/layers/AnnotationFeatureLayer.js +1 -1
- package/layers/DimensionFeatureLayer.d.ts +0 -2
- package/layers/DimensionFeatureLayer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/PointCloudLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/graphics/sources/MemorySource.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/EditBusLayer.js +1 -1
- package/layers/mixins/SceneService.js +1 -1
- package/layers/support/KMLSublayer.js +1 -1
- package/layers/support/ParquetFilesData.js +1 -1
- package/layers/support/TitleCreator.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/parquetUtils.js +1 -1
- package/linkChart/guards.js +2 -0
- package/linkChart/utils.js +1 -1
- package/networks/CircuitManager.d.ts +44 -0
- package/networks/support/CircuitExportJobInfo.d.ts +1 -1
- package/networks/support/CircuitVerifyJobInfo.d.ts +1 -1
- package/networks/support/jsonTypes.d.ts +2 -0
- package/package.json +5 -5
- package/rest/featureService/types.d.ts +4 -7
- package/rest/knowledgeGraph/ReplicaDefinition.d.ts +62 -6
- package/rest/networks/circuits/support/CircuitVerifyResult.d.ts +1 -1
- package/rest/networks/circuits/support/ExportCircuitsParameters.d.ts +1 -1
- package/rest/networks/circuits/support/VerifyCircuitsParameters.d.ts +17 -3
- package/rest/networks/unitIdentifiers/support/UnitQueryResult.d.ts +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerBinningAdapter.js +1 -1
- package/support/ArcadeExpression.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMOperators.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/symbols/support/cimSymbolUtils.js +1 -1
- package/versionManagement/VersionManagementService.js +1 -1
- package/versionManagement/VersionManager.js +1 -1
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
- package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
- package/views/2d/engine/ParentChildStage.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/ThrottledCanvas.js +2 -0
- package/views/2d/engine/webgl/Profiler.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
- package/views/2d/engine/webgl/util/DictionaryMatcher.js +1 -1
- package/views/2d/engine/webgl/util/DimensionMatcher.js +1 -1
- package/views/2d/engine/webgl/util/IntervalMatcher.js +1 -1
- package/views/2d/engine/webgl/util/LabelMatcher.js +1 -1
- package/views/2d/engine/webgl/util/MapMatcher.js +1 -1
- package/views/2d/engine/webgl/util/Matcher.js +1 -1
- package/views/2d/engine/webgl/util/createMatcher.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
- package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
- package/views/2d/layers/support/annodime/MatcherGeometryOverride.js +2 -0
- package/views/2d/layers/support/annodime/PrivateDimensionEffect.js +1 -1
- package/views/2d/layers/support/annodime/PrivateMatcherGeometryOverrideEffect.js +2 -0
- package/views/2d/layers/support/annodime/TileObjectId.js +2 -0
- package/views/2d/layers/support/annodime/annotationGraphic.js +1 -1
- package/views/2d/layers/support/annodime/debugUtils.js +2 -0
- package/views/2d/layers/support/annodime/dimensionStyleDefaults.js +2 -0
- package/views/2d/layers/support/annodime/dimensionSymbols.js +1 -1
- package/views/2d/layers/support/annodime/dimensionUtils.js +1 -1
- package/views/2d/layers/support/annodime/utils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
- package/views/3d/camera/constraintUtils.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/glTF/loader.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorkerHandle.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/state/GoToOperation.js +1 -1
- package/views/3d/state/SurfaceCollisionConstraint.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
- package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/webgl/ManagedFBO.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl/RenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View2D.js +1 -1
- package/views/Viewport2DBaseMixin.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/support/editingSessionUtils.js +1 -1
- package/views/interactive/sketch/SketchLabelOptions.d.ts +0 -6
- package/views/layers/AnnotationFeatureLayerView.d.ts +0 -7
- package/views/layers/DimensionFeatureLayerView.d.ts +0 -7
- package/views/popupAdapter.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/webgl/BufferObject.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +1 -13
- package/widgets/Editor.d.ts +11 -13
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel.js +1 -1
- package/widgets/Locate/LocateViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
- package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/Popup/PopupViewModel.d.ts +0 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.d.ts +0 -12
- package/widgets/Sketch.d.ts +0 -12
- package/widgets/TableList/ListItem.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/support/geolocationUtils.js +1 -1
- package/widgets/support/tests.js +1 -1
- package/assets/esri/core/workers/chunks/04070767356c12026369.js +0 -1
- package/assets/esri/core/workers/chunks/045f178fecc23839bfa8.js +0 -680
- package/assets/esri/core/workers/chunks/073ee52705ea326fecfb.js +0 -1
- package/assets/esri/core/workers/chunks/0e81b6aa64d5491870b2.js +0 -1
- package/assets/esri/core/workers/chunks/126a8c26618425790804.js +0 -1
- package/assets/esri/core/workers/chunks/1a7c0a1dc6ecc93ea03a.js +0 -1
- package/assets/esri/core/workers/chunks/1cb1f125dccbf8c8cac9.js +0 -1
- package/assets/esri/core/workers/chunks/1f03e34520746e432719.js +0 -1
- package/assets/esri/core/workers/chunks/292498a9c7d462d215c6.js +0 -1
- package/assets/esri/core/workers/chunks/2ed81f1e490cb7e73405.js +0 -1
- package/assets/esri/core/workers/chunks/32f26757e36704923286.js +0 -1
- package/assets/esri/core/workers/chunks/33e86dd1a54e447fa0e3.js +0 -1
- package/assets/esri/core/workers/chunks/35c87b0a4d4ee7ce302d.js +0 -1
- package/assets/esri/core/workers/chunks/36b904912cea1744d1c6.js +0 -1
- package/assets/esri/core/workers/chunks/3a35779cae6a11cde51b.js +0 -1
- package/assets/esri/core/workers/chunks/3b7060d264888bf298b1.js +0 -1
- package/assets/esri/core/workers/chunks/3df5394b17e9659ecb8f.js +0 -1
- package/assets/esri/core/workers/chunks/4adfe7f8a8efe2cd8e80.js +0 -1
- package/assets/esri/core/workers/chunks/511b9c12a7479d39dac0.js +0 -1
- package/assets/esri/core/workers/chunks/5396a894e6f8030ca088.js +0 -1
- package/assets/esri/core/workers/chunks/5728d8440aca205e4f53.js +0 -1
- package/assets/esri/core/workers/chunks/66392ff750c28064040a.js +0 -1
- package/assets/esri/core/workers/chunks/668d84dc512b3085a960.js +0 -1
- package/assets/esri/core/workers/chunks/6849282c4a5cd733779d.js +0 -1
- package/assets/esri/core/workers/chunks/6adc17e6e287a365ad8d.js +0 -1
- package/assets/esri/core/workers/chunks/6db5ee9c589265b23b60.js +0 -1
- package/assets/esri/core/workers/chunks/76ed8e455f6bd79e561c.js +0 -1
- package/assets/esri/core/workers/chunks/7c34eb94e2c74602aeab.js +0 -1
- package/assets/esri/core/workers/chunks/831455798b177678720c.js +0 -1
- package/assets/esri/core/workers/chunks/88b08b386926ec889573.js +0 -1
- package/assets/esri/core/workers/chunks/8bd4c43c34aacf3b07da.js +0 -1
- package/assets/esri/core/workers/chunks/8ca88cfc0b9f84dc5832.js +0 -1
- package/assets/esri/core/workers/chunks/928b18e13e015330d44b.js +0 -1
- package/assets/esri/core/workers/chunks/937e347d130d469518ce.js +0 -1
- package/assets/esri/core/workers/chunks/93b40245378ced43ca08.js +0 -1
- package/assets/esri/core/workers/chunks/98dfe31e8ed9b522eaff.js +0 -1
- package/assets/esri/core/workers/chunks/a18cb809dd56c5537b3b.js +0 -1
- package/assets/esri/core/workers/chunks/a195f569eada3a8736be.js +0 -1
- package/assets/esri/core/workers/chunks/a40ede4d3375184f21fe.js +0 -1
- package/assets/esri/core/workers/chunks/a8167ab9fd846d699be5.js +0 -1
- package/assets/esri/core/workers/chunks/af96cbc4fb7bef726635.js +0 -1
- package/assets/esri/core/workers/chunks/b87aca8ad281870ae970.js +0 -1
- package/assets/esri/core/workers/chunks/ceb5bd9f2afaa2ea0808.js +0 -1
- package/assets/esri/core/workers/chunks/d25c37f169577a33db46.js +0 -1
- package/assets/esri/core/workers/chunks/d374cb2d17a2d11c500f.js +0 -1
- package/assets/esri/core/workers/chunks/dadf85890961bcc205eb.js +0 -1
- package/assets/esri/core/workers/chunks/db279d5d9c7deec554bb.js +0 -1
- package/assets/esri/core/workers/chunks/de0c94defb90e1805081.js +0 -1
- package/assets/esri/core/workers/chunks/e1340232962cf576d37e.js +0 -1
- package/assets/esri/core/workers/chunks/e38d1ba15babc238b151.js +0 -1
- package/assets/esri/core/workers/chunks/e73bb7c8de7412d9975c.js +0 -1
- package/assets/esri/core/workers/chunks/f23351a04643c464be84.js +0 -1
- package/assets/esri/core/workers/chunks/f3d331da3c61af5c5a2f.js +0 -1
- package/assets/esri/core/workers/chunks/f5125925f83c979edde7.js +0 -2
- package/assets/esri/core/workers/chunks/f912c173c58ae4299cbe.js +0 -1
- package/assets/esri/core/workers/chunks/f93facf47aba9b128fcc.js +0 -1
- package/assets/esri/core/workers/chunks/fae147d03ed723ab234d.js +0 -1
- package/views/2d/engine/ManagedCanvas.js +0 -2
- package/views/2d/layers/features/support/FeatureSetReaderAnnotationJSON.js +0 -2
- package/views/2d/layers/features/support/FeatureSetReaderDimensionJSON.js +0 -2
- package/views/2d/layers/support/annodime/annotationUtils.js +0 -2
- package/views/3d/state/controllers/SurfaceCollisionCorrectionController.js +0 -2
- /package/assets/esri/core/workers/chunks/{f5125925f83c979edde7.js.LICENSE.txt → f10a339b16d84b650012.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{clone as e}from"../../../../../core/lang.js";import{getEffectiveFeatureReduction as r}from"./featureReductionUtils.js";import{getServiceGeometryType as t}from"./geometryUtils.js";import{createLabelVVEvaluator as i}from"./labelingUtils.js";import{ExceedsLimitCache as a}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as s}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as o}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as l}from"../support/rendererUtils.js";class n{constructor(e){this.layer=e,this._cache=new a}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:i(this.layer.renderer)}}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return s(t,null,{definitionExpression:null,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:null,customParameters:this.layer.customParameters,gdbVersion:null,historicMoment:null,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,t,i){const{fields:a,renderer:s,geometryType:l,labelingInfo:n,labelsVisible:u,orderBy:c,objectIdField:p}=this.layer,d={fields:a.map(e=>e.toJSON()),renderer:s?.clone(),labelingInfoSource:this.layer.id,featureReduction:r(this.layer,t),geometryType:l,labelingInfo:n,labelsVisible:u,objectIdField:p,orderBy:c??"default"};return o(e,t,d,i)}get hasRequiredSupport(){return l(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>r(this.layer,e),()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.renderer]}getRenderer(){return this.layer.renderer}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(r){const i=this.layer,{capabilities:a}=i,s=i.fieldsIndex.toJSON(),o=t(i),l=i.timeInfo?.toJSON(),n=i.spatialReference.toJSON(),u=i.source.getSource(),c=this.layer.objectIdField,p=e(a);p.query.maxRecordCount=u.maxRecordCount;const d=r.spatialReference.toJSON();return{type:"ogc",source:u,orderByFields:c,outSpatialReference:d,metadata:{fieldsIndex:s,geometryType:o,hasZ:this.layer.hasZ??!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:i.objectIdField},timeInfo:l,spatialReference:n,outSpatialReference:d,globalIdField:null,subtypeField:null,subtypes:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:p.query.maxRecordCount,tileMaxRecordCount:p.query.tileMaxRecordCount,supportsCompactGeometry:p.query.supportsCompactGeometry,supportsDefaultSpatialReference:p.query.supportsDefaultSpatialReference,supportsFormatPBF:p.query.supportsFormatPBF,supportsMaxRecordCountFactor:p.query.supportsMaxRecordCountFactor,supportsQuantization:p.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:p.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:p.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:p.query.supportsReturnExceededLimitGeometries,lastEditDate:null}}}}export{n as OGCFeatureLayerAdapter};
|
|
2
|
+
import{clone as e}from"../../../../../core/lang.js";import{getEffectiveFeatureReduction as r}from"./featureReductionUtils.js";import{getServiceGeometryType as t}from"./geometryUtils.js";import{createLabelVVEvaluator as i}from"./labelingUtils.js";import{ExceedsLimitCache as a}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as s}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as o}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as l}from"../support/rendererUtils.js";class n{constructor(e){this.layer=e,this._cache=new a}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:i(this.layer.renderer)}}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return s(t,null,{definitionExpression:null,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:null,customParameters:this.layer.customParameters,gdbVersion:null,historicMoment:null,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,t,i){const{fields:a,renderer:s,geometryType:l,labelingInfo:n,labelsVisible:u,orderBy:c,objectIdField:p}=this.layer,d={fields:a.map(e=>e.toJSON()),renderer:s?.clone(),labelingInfoSource:this.layer.id,featureReduction:r(this.layer,t),geometryType:l,labelingInfo:n,labelsVisible:u,objectIdField:p,orderBy:c??"default"};return o(e,t,d,i)}get hasRequiredSupport(){return l(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>r(this.layer,e),()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.renderer]}getRenderer(){return this.layer.renderer}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(r){const i=this.layer,{capabilities:a}=i,s=i.fieldsIndex.toJSON(),o=t(i),l=i.timeInfo?.toJSON(),n=i.spatialReference.toJSON(),u=i.source.getSource(),c=this.layer.objectIdField,p=e(a);p.query.maxRecordCount=u.maxRecordCount;const d=r.spatialReference.toJSON();return{type:"ogc",source:u,orderByFields:c,outSpatialReference:d,metadata:{fieldsIndex:s,geometryType:o,hasZ:this.layer.hasZ??!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:i.objectIdField},timeInfo:l,spatialReference:n,outSpatialReference:d,attributeSpatialReference:null,globalIdField:null,subtypeField:null,subtypes:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:p.query.maxRecordCount,tileMaxRecordCount:p.query.tileMaxRecordCount,supportsCompactGeometry:p.query.supportsCompactGeometry,supportsDefaultSpatialReference:p.query.supportsDefaultSpatialReference,supportsFormatPBF:p.query.supportsFormatPBF,supportsMaxRecordCountFactor:p.query.supportsMaxRecordCountFactor,supportsQuantization:p.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:p.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:p.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:p.query.supportsReturnExceededLimitGeometries,lastEditDate:null}}}}export{n as OGCFeatureLayerAdapter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as r}from"../../../../../layers/support/arcgisLayerUrl.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{addFloorFilter as i,hasFloorFilter as s}from"./floorFilterUtils.js";import{getServiceGeometryType as a}from"./geometryUtils.js";import{createLabelVVEvaluator as o}from"./labelingUtils.js";import{ExceedsLimitCache as l}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as n,createFeatureSourceSchema as u}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as d}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as p}from"../support/rendererUtils.js";class c{constructor(e){this.layer=e,this._cache=new l}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:o(this.layer.renderer)}}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e),i=null!=this.layer.editingInfo?.lastEditDate,s=this.layer.refreshInterval>0,a=!i&&s,o=n(t.isSourceHosted,a,this.layer.capabilities,t.metadata.geometryType,e.extent,this.layer.fullExtent);return u(t,o,{definitionExpression:this.layer.definitionExpression,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:this.layer.customParameters,gdbVersion:this.layer.gdbVersion,historicMoment:this.layer.historicMoment,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,r,i){const{fields:s,renderer:a,geometryType:o,labelingInfo:l,labelsVisible:n,orderBy:u,objectIdField:p}=this.layer,c={fields:s.map(e=>e.toJSON()),renderer:a?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:o,labelingInfo:l,labelsVisible:n,objectIdField:p,orderBy:u??"default"};return d(e,r,c,i)}get hasRequiredSupport(){return p(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,r){return i(this.layer,e,r)}getUpdateHashProperties(e){return[()=>this.layer.outFields,()=>this.layer.orderBy,()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>this.layer.customParameters,()=>s(this.layer,e)?e.floors:null]}getRenderer(){return this.layer.renderer}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(t){const i=this.layer,{capabilities:s,globalIdField:o,orderBy:l}=i,n=i.fieldsIndex.toJSON(),u=a(i),d=i.timeInfo?.toJSON(),p=i.spatialReference.toJSON(),c=e(this.layer.parsedUrl);let y=this.layer.objectIdField;if(l?.length){const e=!l[0].valueExpression&&l[0].field;e&&(y=e)}const m=r(c.path),h=t.spatialReference.toJSON();return{type:"feature-service",source:c,isSourceHosted:m,orderByFields:y,outSpatialReference:h,metadata:{globalIdField:o,fieldsIndex:n,geometryType:u,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:{type:"object-id",fieldName:i.objectIdField},timeInfo:d,spatialReference:p,outSpatialReference:h,timeReferenceUnknownClient:i.datesInUnknownTimezone,dateFieldsTimeZone:i.dateFieldsTimeZone,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:s.query.maxRecordCount,tileMaxRecordCount:s.query.tileMaxRecordCount,supportsCompactGeometry:s.query.supportsCompactGeometry,supportsDefaultSpatialReference:s.query.supportsDefaultSpatialReference,supportsFormatPBF:s.query.supportsFormatPBF,supportsMaxRecordCountFactor:s.query.supportsMaxRecordCountFactor,supportsQuantization:s.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:s.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:s.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:s.query.supportsReturnExceededLimitGeometries,lastEditDate:null}}}}export{c as OrientedImageryLayerAdapter};
|
|
2
|
+
import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as r}from"../../../../../layers/support/arcgisLayerUrl.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{addFloorFilter as i,hasFloorFilter as s}from"./floorFilterUtils.js";import{getServiceGeometryType as a}from"./geometryUtils.js";import{createLabelVVEvaluator as o}from"./labelingUtils.js";import{ExceedsLimitCache as l}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as n,createFeatureSourceSchema as u}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as d}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as p}from"../support/rendererUtils.js";class c{constructor(e){this.layer=e,this._cache=new l}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:o(this.layer.renderer)}}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e),i=null!=this.layer.editingInfo?.lastEditDate,s=this.layer.refreshInterval>0,a=!i&&s,o=n(t.isSourceHosted,a,this.layer.capabilities,t.metadata.geometryType,e.extent,this.layer.fullExtent);return u(t,o,{definitionExpression:this.layer.definitionExpression,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:this.layer.customParameters,gdbVersion:this.layer.gdbVersion,historicMoment:this.layer.historicMoment,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,r,i){const{fields:s,renderer:a,geometryType:o,labelingInfo:l,labelsVisible:n,orderBy:u,objectIdField:p}=this.layer,c={fields:s.map(e=>e.toJSON()),renderer:a?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:o,labelingInfo:l,labelsVisible:n,objectIdField:p,orderBy:u??"default"};return d(e,r,c,i)}get hasRequiredSupport(){return p(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,r){return i(this.layer,e,r)}getUpdateHashProperties(e){return[()=>this.layer.outFields,()=>this.layer.orderBy,()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>this.layer.customParameters,()=>s(this.layer,e)?e.floors:null]}getRenderer(){return this.layer.renderer}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(t){const i=this.layer,{capabilities:s,globalIdField:o,orderBy:l}=i,n=i.fieldsIndex.toJSON(),u=a(i),d=i.timeInfo?.toJSON(),p=i.spatialReference.toJSON(),c=e(this.layer.parsedUrl);let y=this.layer.objectIdField;if(l?.length){const e=!l[0].valueExpression&&l[0].field;e&&(y=e)}const m=r(c.path),h=t.spatialReference.toJSON();return{type:"feature-service",source:c,isSourceHosted:m,orderByFields:y,outSpatialReference:h,metadata:{globalIdField:o,fieldsIndex:n,geometryType:u,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:{type:"object-id",fieldName:i.objectIdField},timeInfo:d,spatialReference:p,outSpatialReference:h,attributeSpatialReference:null,timeReferenceUnknownClient:i.datesInUnknownTimezone,dateFieldsTimeZone:i.dateFieldsTimeZone,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:s.query.maxRecordCount,tileMaxRecordCount:s.query.tileMaxRecordCount,supportsCompactGeometry:s.query.supportsCompactGeometry,supportsDefaultSpatialReference:s.query.supportsDefaultSpatialReference,supportsFormatPBF:s.query.supportsFormatPBF,supportsMaxRecordCountFactor:s.query.supportsMaxRecordCountFactor,supportsQuantization:s.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:s.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:s.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:s.query.supportsReturnExceededLimitGeometries,lastEditDate:null}}}}export{c as OrientedImageryLayerAdapter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../../../core/Error.js";import{toParquetJSONGeometryType as r}from"../../../../../layers/support/parquetUtils.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{getServiceGeometryType as i}from"./geometryUtils.js";import{createLabelVVEvaluator as a}from"./labelingUtils.js";import{createSimpleProcessorSchema as l}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as s}from"../support/rendererUtils.js";class n{constructor(e){this.layer=e}get hasRequiredSupport(){return s(this.layer.renderer)}get timeOptions(){return null}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:a(this.layer.renderer)}}]}getUpdateHashProperties(e){return[()=>this.layer.data,()=>this.layer.outFields,()=>this.layer.definitionExpression,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>this.layer.customParameters,()=>this.layer.orderBy,()=>this.layer.renderer,()=>this.layer.popupTemplate]}openMessagePorts(){return this.layer.source.openPorts()}async createSourceSchema(e,r){const t=this._createServiceInfo(e),i=e.availableFields.includes("*")?this.layer.fields.map(e=>e.name):e.availableFields,a={partial:{dataSourceHash:this.layer.data?JSON.stringify(this.layer.data.toJSON()):null,availableFields:i},full:{definitionExpression:this.layer.definitionExpression??null,sourceRefreshVersion:r,customParameters:this.layer.customParameters??null}};return{type:"parquet",service:t,strategy:this._createStrategy(t,a)}}_createStrategy(e,r){return e.geometryInfo.displayOptimization?{type:"xz",...r}:{type:"snapshot",...r}}createProcessorSchema(e,r,i){const a={fields:this.layer.fields.map(e=>e.toJSON()),renderer:this.layer.renderer?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:this.layer.geometryType,labelingInfo:this.layer.labelingInfo,labelsVisible:this.layer.labelsVisible,objectIdField:this.layer.objectIdField,orderBy:this.layer.orderBy};return l(e,r,a,i)}getRenderer(){return this.layer.renderer}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}_createServiceInfo(t){const a=i(this.layer),l=t.spatialReference.toJSON(),s=this.layer.geometryEncoding;if(null==s&&null==this.layer.displayOptimization)throw new e("parquet-layer:unsupported","creating a parquet layer view requires an encoding",{layer:this.layer});return{type:"parquet",outSpatialReference:l,geometryInfo:{geometry:s?{geometryType:r(this.layer.geometryType),spatialReference:this.layer.spatialReference.toJSON(),encoding:s.toJSON()}:null,displayOptimization:this.layer.displayOptimization},metadata:{spatialReference:this.layer.spatialReference.toJSON(),outSpatialReference:l,fieldsIndex:this.layer.fieldsIndex.toJSON(),featureIdInfo:{type:"object-id",fieldName:this.layer.objectIdField},geometryType:a,hasZ:!1,hasM:!1,types:null,subtypes:null,timeInfo:null,typeIdField:null,subtypeField:null,globalIdField:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}}}}export{n as ParquetLayerAdapter};
|
|
2
|
+
import e from"../../../../../core/Error.js";import{toParquetJSONGeometryType as r}from"../../../../../layers/support/parquetUtils.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{getServiceGeometryType as i}from"./geometryUtils.js";import{createLabelVVEvaluator as a}from"./labelingUtils.js";import{createSimpleProcessorSchema as l}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as s}from"../support/rendererUtils.js";class n{constructor(e){this.layer=e}get hasRequiredSupport(){return s(this.layer.renderer)}get timeOptions(){return null}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:a(this.layer.renderer)}}]}getUpdateHashProperties(e){return[()=>this.layer.data,()=>this.layer.outFields,()=>this.layer.definitionExpression,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>this.layer.customParameters,()=>this.layer.orderBy,()=>this.layer.renderer,()=>this.layer.popupTemplate]}openMessagePorts(){return this.layer.source.openPorts()}async createSourceSchema(e,r){const t=this._createServiceInfo(e),i=e.availableFields.includes("*")?this.layer.fields.map(e=>e.name):e.availableFields,a={partial:{dataSourceHash:this.layer.data?JSON.stringify(this.layer.data.toJSON()):null,availableFields:i},full:{definitionExpression:this.layer.definitionExpression??null,sourceRefreshVersion:r,customParameters:this.layer.customParameters??null}};return{type:"parquet",service:t,strategy:this._createStrategy(t,a)}}_createStrategy(e,r){return e.geometryInfo.displayOptimization?{type:"xz",...r}:{type:"snapshot",...r}}createProcessorSchema(e,r,i){const a={fields:this.layer.fields.map(e=>e.toJSON()),renderer:this.layer.renderer?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:this.layer.geometryType,labelingInfo:this.layer.labelingInfo,labelsVisible:this.layer.labelsVisible,objectIdField:this.layer.objectIdField,orderBy:this.layer.orderBy};return l(e,r,a,i)}getRenderer(){return this.layer.renderer}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}_createServiceInfo(t){const a=i(this.layer),l=t.spatialReference.toJSON(),s=this.layer.geometryEncoding;if(null==s&&null==this.layer.displayOptimization)throw new e("parquet-layer:unsupported","creating a parquet layer view requires an encoding",{layer:this.layer});return{type:"parquet",outSpatialReference:l,geometryInfo:{geometry:s?{geometryType:r(this.layer.geometryType),spatialReference:this.layer.spatialReference.toJSON(),encoding:s.toJSON()}:null,displayOptimization:this.layer.displayOptimization},metadata:{spatialReference:this.layer.spatialReference.toJSON(),outSpatialReference:l,attributeSpatialReference:null,fieldsIndex:this.layer.fieldsIndex.toJSON(),featureIdInfo:{type:"object-id",fieldName:this.layer.objectIdField},geometryType:a,hasZ:!1,hasM:!1,types:null,subtypes:null,timeInfo:null,typeIdField:null,subtypeField:null,globalIdField:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}}}}export{n as ParquetLayerAdapter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{getEffectiveFeatureReduction as e}from"./featureReductionUtils.js";import{getServiceGeometryType as r}from"./geometryUtils.js";import{createLabelVVEvaluator as t}from"./labelingUtils.js";import{createSimpleProcessorSchema as i}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as a}from"../support/rendererUtils.js";class
|
|
2
|
+
import{getEffectiveFeatureReduction as e}from"./featureReductionUtils.js";import{getServiceGeometryType as r}from"./geometryUtils.js";import{createLabelVVEvaluator as t}from"./labelingUtils.js";import{createSimpleProcessorSchema as i}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as a}from"../support/rendererUtils.js";class l{constructor(e){this.layer=e}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:t(this.layer.renderer)}}]}async createSourceSchema(e,r){return{type:"stream",service:this._createServiceInfo(e),strategy:{type:"stream",partial:{sourceRefreshVersion:r},full:{availableFields:e.availableFields,geometryDefinition:this.layer.geometryDefinition?.toJSON(),definitionExpression:this.layer.definitionExpression,customParameters:this.layer.customParameters,maxReconnectionAttempts:this.layer.maxReconnectionAttempts,maxReconnectionInterval:this.layer.maxReconnectionInterval,purgeOptions:this.layer.purgeOptions.toJSON()}}}}createProcessorSchema(r,t,a){const{fields:l,renderer:n,geometryType:s,labelingInfo:o,labelsVisible:c,objectIdField:y,trackInfo:h}=this.layer,p={fields:l.map(e=>e.toJSON()),renderer:n?.clone(),labelingInfoSource:this.layer.id,featureReduction:e(this.layer,t),geometryType:s,labelingInfo:o,labelsVisible:c,objectIdField:y,orderBy:"default",trackInfo:h};return i(r,t,p,a)}get hasRequiredSupport(){return a(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(r){return[()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>e(this.layer,r),()=>this.layer.customParameters,()=>this.layer.geometryDefinition,()=>this.layer.definitionExpression,()=>this.layer.trackInfo,()=>this.layer?.source?.refreshInterval]}getRenderer(){return this.layer.renderer}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(e){const t=r(this.layer),i=this.layer.timeInfo?.toJSON()||null,a=this.layer.spatialReference?this.layer.spatialReference.toJSON():null,l=e.spatialReference.toJSON();return{type:"stream",source:this.layer.getStreamConnectionSource(),outSpatialReference:l,metadata:{fieldsIndex:this.layer.fieldsIndex.toJSON(),geometryType:t,hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:this.layer.objectIdField},timeInfo:i,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,spatialReference:a,outSpatialReference:l,attributeSpatialReference:null,subtypeField:null,subtypes:null,globalIdField:null,typeIdField:null,types:null}}}}export{l as StreamLayerAdapter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{clone as e}from"../../../../../core/lang.js";import{floatEqualAbsolute as r}from"../../../../../core/mathUtils.js";import{sqlAnd as t}from"../../../../../core/sql.js";import{isHostedAgolService as i}from"../../../../../layers/support/arcgisLayerUrl.js";import s from"../../../../../layers/support/FeatureFilter.js";import{canConvertSqlRelativeTime as a,sqlRelativeTimeToAbsolute as l}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as o}from"../../../../../networks/support/networkFieldUtils.js";import{createFeatureIdInfo as n}from"./featureServiceUtils.js";import{addFloorFilter as u,hasFloorFilter as p}from"./floorFilterUtils.js";import{getServiceGeometryType as y}from"./geometryUtils.js";import{ExceedsLimitCache as c}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as d,createFeatureSourceSchema as m}from"../schema/SourceSchema.js";import{createSubtypeProcessorSchema as h}from"../schema/processor/SubtypeProcessorSchema.js";class f{constructor(e){this.layer=e,this._cache=new c}getLabelingDeconflictionInfo(){return[{vvEvaluators:{}}]}async createSourceSchema(e,r){const{definitionExpression:t,customParameters:i,gdbVersion:s,historicMoment:o,timeExtent:n,apiKey:u,displayFilterInfo:p}=this.layer,y=this._createServiceInfo(e),c=null!=this.layer.editingInfo?.lastEditDate,h=this.layer.refreshInterval>0,f=!c&&h,b=d(y.isSourceHosted,f,this.layer.capabilities,y.metadata.geometryType,e.extent,this.layer.fullExtent),S=a(t)?await l(this.layer.fieldsIndex,t,this.layer.capabilities.query.relativeTimeBinWindow):t,F=t!==S?{where:t}:null;return m(y,b,{definitionExpression:S,returnZ:e.returnZ,returnM:e.returnM,postQueryFilter:F,queryScaleRanges:this.layer.sublayers.items.map(e=>({subtypeCode:e.subtypeCode,minScale:e.minScale,maxScale:e.maxScale})),displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:p,customParameters:i,gdbVersion:s,historicMoment:o,timeExtent:n,apiKey:u,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,r,t){const i={labelingInfoSource:this.layer.id,subtypeField:this.layer.subtypeField,sublayers:Array.from(this.layer.sublayers,(e,r)=>({featureReduction:null,geometryType:this.layer.geometryType,labelingInfoSource:this.layer.id+`-${r}`,labelingInfo:e.labelingInfo,labelsVisible:e.labelsVisible,renderer:e.renderer,subtypeCode:e.subtypeCode,orderBy:null}))};return h(e,r,i,t)}addFilters(e,r){e=u(this.layer,e,r);const i=this.layer.sublayers.filter(e=>!b(e,r)).map(e=>e.subtypeCode);if(!i.length)return e;e??=new s;const a=`NOT ${this.layer.subtypeField} IN (${i.join(",")})`;return e.where=t(e.where,a),e}get hasRequiredSupport(){return!0}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>p(this.layer,e)?e.floors:null,()=>this.layer.outFields,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>e?.requiredFieldsOptions?.featureTitleFields&&this.layer.featureTitleFields,()=>e?.requiredFieldsOptions?.utilityNetworkFields&&o(e,this.layer),()=>this.layer.sublayers.map(({renderer:e,labelsVisible:r,labelingInfo:t,visible:i,minScale:s,maxScale:a})=>({renderer:e,labelsVisible:r,labelingInfo:t,visible:i,minScale:s,maxScale:a}))]}setGraphicOrigin(e){const r=this.layer.findSublayerForFeature(e);e.layer=e.sourceLayer=r,e.origin=r?.graphicOrigin}getRenderer(e){return this.layer.findSublayerForFeature(e)?.renderer}_createServiceInfo(r){const{capabilities:t,datesInUnknownTimezone:s,dateFieldsTimeZone:a,editingInfo:l,globalIdField:o,objectIdField:u,subtypeField:p}=this.layer,c=this.layer.fieldsIndex.toJSON(),d=y(this.layer),m=this.layer.timeInfo?.toJSON(),h=this.layer.spatialReference.toJSON(),f=e(this.layer.parsedUrl),b=u,S=i(f.path),F=r.spatialReference.toJSON();return{type:"feature-service",source:f,isSourceHosted:S,orderByFields:b,outSpatialReference:F,metadata:{timeReferenceUnknownClient:s,dateFieldsTimeZone:a,subtypeField:p,globalIdField:o,fieldsIndex:c,geometryType:d,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:n(this.layer),timeInfo:m,spatialReference:h,outSpatialReference:F,subtypes:this.layer.subtypes?.map(e=>e.toJSON()),typeIdField:null,types:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,tileMaxRecordCount:t.query.tileMaxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:t.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:t.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:t.query.supportsReturnExceededLimitGeometries,lastEditDate:l?.lastEditDate?.getTime()}}}}function b(e,t){return e.visible&&(0===e.minScale||r(t.scale,e.minScale)||t.scale<e.minScale)&&(0===e.maxScale||r(t.scale,e.maxScale)||t.scale>e.maxScale)}export{f as SubtypeGroupLayerAdapter};
|
|
2
|
+
import{clone as e}from"../../../../../core/lang.js";import{floatEqualAbsolute as r}from"../../../../../core/mathUtils.js";import{sqlAnd as t}from"../../../../../core/sql.js";import{isHostedAgolService as i}from"../../../../../layers/support/arcgisLayerUrl.js";import s from"../../../../../layers/support/FeatureFilter.js";import{canConvertSqlRelativeTime as a,sqlRelativeTimeToAbsolute as l}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as o}from"../../../../../networks/support/networkFieldUtils.js";import{createFeatureIdInfo as n}from"./featureServiceUtils.js";import{addFloorFilter as u,hasFloorFilter as p}from"./floorFilterUtils.js";import{getServiceGeometryType as y}from"./geometryUtils.js";import{ExceedsLimitCache as c}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as d,createFeatureSourceSchema as m}from"../schema/SourceSchema.js";import{createSubtypeProcessorSchema as h}from"../schema/processor/SubtypeProcessorSchema.js";class f{constructor(e){this.layer=e,this._cache=new c}getLabelingDeconflictionInfo(){return[{vvEvaluators:{}}]}async createSourceSchema(e,r){const{definitionExpression:t,customParameters:i,gdbVersion:s,historicMoment:o,timeExtent:n,apiKey:u,displayFilterInfo:p}=this.layer,y=this._createServiceInfo(e),c=null!=this.layer.editingInfo?.lastEditDate,h=this.layer.refreshInterval>0,f=!c&&h,b=d(y.isSourceHosted,f,this.layer.capabilities,y.metadata.geometryType,e.extent,this.layer.fullExtent),S=a(t)?await l(this.layer.fieldsIndex,t,this.layer.capabilities.query.relativeTimeBinWindow):t,F=t!==S?{where:t}:null;return m(y,b,{definitionExpression:S,returnZ:e.returnZ,returnM:e.returnM,postQueryFilter:F,queryScaleRanges:this.layer.sublayers.items.map(e=>({subtypeCode:e.subtypeCode,minScale:e.minScale,maxScale:e.maxScale})),displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:p,customParameters:i,gdbVersion:s,historicMoment:o,timeExtent:n,apiKey:u,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,r,t){const i={labelingInfoSource:this.layer.id,subtypeField:this.layer.subtypeField,sublayers:Array.from(this.layer.sublayers,(e,r)=>({featureReduction:null,geometryType:this.layer.geometryType,labelingInfoSource:this.layer.id+`-${r}`,labelingInfo:e.labelingInfo,labelsVisible:e.labelsVisible,renderer:e.renderer,subtypeCode:e.subtypeCode,orderBy:null}))};return h(e,r,i,t)}addFilters(e,r){e=u(this.layer,e,r);const i=this.layer.sublayers.filter(e=>!b(e,r)).map(e=>e.subtypeCode);if(!i.length)return e;e??=new s;const a=`NOT ${this.layer.subtypeField} IN (${i.join(",")})`;return e.where=t(e.where,a),e}get hasRequiredSupport(){return!0}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>p(this.layer,e)?e.floors:null,()=>this.layer.outFields,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>e?.requiredFieldsOptions?.featureTitleFields&&this.layer.featureTitleFields,()=>e?.requiredFieldsOptions?.utilityNetworkFields&&o(e,this.layer),()=>this.layer.sublayers.map(({renderer:e,labelsVisible:r,labelingInfo:t,visible:i,minScale:s,maxScale:a})=>({renderer:e,labelsVisible:r,labelingInfo:t,visible:i,minScale:s,maxScale:a}))]}setGraphicOrigin(e){const r=this.layer.findSublayerForFeature(e);e.layer=e.sourceLayer=r,e.origin=r?.graphicOrigin}getRenderer(e){return this.layer.findSublayerForFeature(e)?.renderer}_createServiceInfo(r){const{capabilities:t,datesInUnknownTimezone:s,dateFieldsTimeZone:a,editingInfo:l,globalIdField:o,objectIdField:u,subtypeField:p}=this.layer,c=this.layer.fieldsIndex.toJSON(),d=y(this.layer),m=this.layer.timeInfo?.toJSON(),h=this.layer.spatialReference.toJSON(),f=e(this.layer.parsedUrl),b=u,S=i(f.path),F=r.spatialReference.toJSON();return{type:"feature-service",source:f,isSourceHosted:S,orderByFields:b,outSpatialReference:F,metadata:{timeReferenceUnknownClient:s,dateFieldsTimeZone:a,subtypeField:p,globalIdField:o,fieldsIndex:c,geometryType:d,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:n(this.layer),timeInfo:m,spatialReference:h,outSpatialReference:F,attributeSpatialReference:null,subtypes:this.layer.subtypes?.map(e=>e.toJSON()),typeIdField:null,types:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,tileMaxRecordCount:t.query.tileMaxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:t.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:t.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:t.query.supportsReturnExceededLimitGeometries,lastEditDate:l?.lastEditDate?.getTime()}}}}function b(e,t){return e.visible&&(0===e.minScale||r(t.scale,e.minScale)||t.scale<e.minScale)&&(0===e.maxScale||r(t.scale,e.maxScale)||t.scale>e.maxScale)}export{f as SubtypeGroupLayerAdapter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{equals as e}from"../../../../../core/SetUtils.js";import t from"../../../../../geometry/SpatialReference.js";import{convertToFeature as s,unquantizeOptimizedGeometryInPlace as a}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as r}from"../../../../../layers/graphics/OptimizedFeature.js";import{checkProjectionSupport as i}from"../../../../../layers/graphics/data/projectionSupport.js";import o from"../../../../../layers/support/FieldsIndex.js";import{ComputedAggregateField as n}from"../aggregation/ComputedAggregateField.js";import{AAggregateStrategy as l}from"./AAggregateStrategy.js";import{UpdateBatch as d,ASendState as c}from"./AProcessorStrategy.js";import{FeatureTileUpdateMessage as u}from"../sources/FeatureSourceMessage.js";import{ComputedAttributeStorage as f}from"../support/ComputedAttributeStorage.js";import p from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as h}from"../support/FeatureMetadata.js";import{FeatureSetReaderJSON as m}from"../support/FeatureSetReaderJSON.js";import{Hashed as g}from"../support/Hashed.js";class y extends c{constructor(e,t){super(e),this.bins=new Map,this.featureCache=new Map,this.done=!1,this._store=t}take(){const e=this.bins,t=this.featureCache;return this.bins=new Map,this.featureCache=new Map,{bins:e,featureCache:t}}destroy(){const e=this.subscription.tile.key.level;for(const t of this.featureCache.keys())this._store.releaseDisplayIdForObjectId(`${t}.${e}`);this.bins.clear(),this.featureCache.clear(),this.handledChunks.clear()}get tile(){return this.subscription.tile}*featuresWorldSpace(){for(const e of this.featureCache.values()){const t=e.clone();t.geometry&&a(t.geometry,this.subscription.tile.transform),yield t}}}class I extends l{static async create(e,s,a,r,o){const l=s.metadata.outSpatialReference,d=new f({spatialReference:l}),c=await Promise.all(e.fields.map(async e=>n.create(d,e))),u=e.featureFilter?await p.create({geometryType:s.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:s.metadata.timeInfo,fieldsIndex:s.metadata.fieldsIndex,spatialReference:l,filterJSON:e.featureFilter}):null;return"geohash"===e.index.type&&await i(l,t.WGS84),new I(e,u,r,c,l,s,a,o)}constructor(e,t,s,a,r,i,n,l){super(i,n,r,a,l),this._schema=e,this._featureFilter=t,this._arcadeContextInfo=s,this._handled=new Set,this._invalidated=!1,this._metadata=h.createFeature({geometryType:"esriGeometryPolygon",hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:"aggregateId"},fieldsIndex:new o(e.fields).toJSON(),globalIdField:null,spatialReference:i.metadata.spatialReference,outSpatialReference:i.metadata.outSpatialReference,subtypeField:null,subtypes:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null}),this._getIndex=this._createGetIndex()}requiresInvalidation(t){for(const e of this._sendStates.values())if(!e.done)return!0;const s=new Set;for(const e of t)s.add(e.chunkId);return!e(s,this._handled)&&(this._handled=s,!0)}invalidate(){this._invalidated=!0}createState(e){return new y(e,this._attributeStore)}async applyOverrideUpdate(e){return null}displayMap(e,t,s){const a=new Map(e.map(e=>[t(e),e])),r=[];for(const i of this._sendStates.values())for(const e of i.featuresWorldSpace()){const{objectId:t,displayId:i}=e,o=a.get(t);if(null!=o){const e=s(i,o,t);r.push(e),a.delete(t)}}return r}getDisplayFeatures(e){const t=new Set(e),a=new Set,r=[];for(const i of this._sendStates.values())for(const e of i.featuresWorldSpace())t.has(e.displayId)&&!a.has(e.objectId)&&(e.geometry&&r.push({...s(e,this._metadata.geometryType,!1,!1),displayId:e.displayId}),a.add(e.objectId));return{features:[],aggregates:r,tracks:[]}}getFeatureObjectIdsForAggregate(e){for(const t of this._sendStates.values())for(const s of t.bins.values())if(s.id===e){const e=[];for(const t of s.containedObjectIds)for(const s of t.values())e.push(s);return e}return[]}async updateChunks(e,t){if(!this._invalidated)return null;this._invalidated=!1;const s=new d;for(const a of this._sendStates.values())s.messages.push(this._update(a,e,t));return s}forEachAggregateWorldSpace(e){const t=new Set;for(const s of this._sendStates.values())for(const a of s.featuresWorldSpace())t.has(a.objectId)||(e(a),t.add(a.objectId))}_createGetIndex(){return(e,t)=>{switch(this._schema.index.type){case"geohash":return e.getGeohashIndex(new g({type:"geohash",fields:this.aggregateFields,featureFilter:this._featureFilter,geohashLevel:this._schema.index.fixBinLevel,spatialReference:this.spatialReference,arcadeContextInfo:this._arcadeContextInfo,scale:t.scale,sqlOptions:this._sqlOptions}));case"grid":{const s=this._schema.index.fixedBinLevel,a=null!=s?t.tileInfoView.getLODInfoAt(s).scale:t.scale;return e.getGridIndex(new g({type:"grid",fields:this.aggregateFields,cellSize:this._schema.index.size,featureFilter:this._featureFilter,spatialReference:this.spatialReference,arcadeContextInfo:this._arcadeContextInfo,scale:a,sqlOptions:this._sqlOptions}))}}}}_update(e,t,s){const{subscription:a}=e,i=e.take(),{bins:o,featureCache:n}=e,l=a.tile,d=new Set;for(const r of t){this._getIndex(r,l).putBounded(o,d,e.tile.extent,e.tile.resolution)}const c=[],f=a.tile.transform,p=a.tile.key.level;for(const u of o.values()){const e=u.getGeometry(this.spatialReference,f),t=new r(e,u.getAttributes(),null,u.id);e||(t.centroid=u.getGeometricCentroid(this.spatialReference,f)),t.displayId=this._attributeStore.createDisplayIdForObjectId(`${t.objectId}.${p}`),n.set(u.id,t),c.push(t)}this.events.emit("changed"),e.done||=!s;const h=m.fromOptimizedFeatures(c,this._metadata,f),g=h.getCursor(),y=e.subscription.tile.createArcadeEvaluationOptions(this._arcadeContextInfo);for(;g.next();)this._attributeStore.setAttributeData(g.getDisplayId(),g,y,this._sqlOptions);const I=new u(e.subscription,h,[],e.done,{});for(const r of i.featureCache.keys())this._attributeStore.releaseDisplayIdForObjectId(`${r}.${p}`);return I}}export{y as BinningState,I as BinningStrategy};
|
|
2
|
+
import{equals as e}from"../../../../../core/SetUtils.js";import t from"../../../../../geometry/SpatialReference.js";import{convertToFeature as s,unquantizeOptimizedGeometryInPlace as a}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as r}from"../../../../../layers/graphics/OptimizedFeature.js";import{checkProjectionSupport as i}from"../../../../../layers/graphics/data/projectionSupport.js";import o from"../../../../../layers/support/FieldsIndex.js";import{ComputedAggregateField as n}from"../aggregation/ComputedAggregateField.js";import{AAggregateStrategy as l}from"./AAggregateStrategy.js";import{UpdateBatch as d,ASendState as c}from"./AProcessorStrategy.js";import{FeatureTileUpdateMessage as u}from"../sources/FeatureSourceMessage.js";import{ComputedAttributeStorage as f}from"../support/ComputedAttributeStorage.js";import p from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as h}from"../support/FeatureMetadata.js";import{FeatureSetReaderJSON as m}from"../support/FeatureSetReaderJSON.js";import{Hashed as g}from"../support/Hashed.js";class y extends c{constructor(e,t){super(e),this.bins=new Map,this.featureCache=new Map,this.done=!1,this._store=t}take(){const e=this.bins,t=this.featureCache;return this.bins=new Map,this.featureCache=new Map,{bins:e,featureCache:t}}destroy(){const e=this.subscription.tile.key.level;for(const t of this.featureCache.keys())this._store.releaseDisplayIdForObjectId(`${t}.${e}`);this.bins.clear(),this.featureCache.clear(),this.handledChunks.clear()}get tile(){return this.subscription.tile}*featuresWorldSpace(){for(const e of this.featureCache.values()){const t=e.clone();t.geometry&&a(t.geometry,this.subscription.tile.transform),yield t}}}class I extends l{static async create(e,s,a,r,o){const l=s.metadata.outSpatialReference,d=new f({spatialReference:l}),c=await Promise.all(e.fields.map(async e=>n.create(d,e))),u=e.featureFilter?await p.create({geometryType:s.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:s.metadata.timeInfo,fieldsIndex:s.metadata.fieldsIndex,spatialReference:l,filterJSON:e.featureFilter}):null;return"geohash"===e.index.type&&await i(l,t.WGS84),new I(e,u,r,c,l,s,a,o)}constructor(e,t,s,a,r,i,n,l){super(i,n,r,a,l),this._schema=e,this._featureFilter=t,this._arcadeContextInfo=s,this._handled=new Set,this._invalidated=!1,this._metadata=h.createFeature({geometryType:"esriGeometryPolygon",hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:"aggregateId"},fieldsIndex:new o(e.fields).toJSON(),globalIdField:null,spatialReference:i.metadata.spatialReference,outSpatialReference:i.metadata.outSpatialReference,attributeSpatialReference:null,subtypeField:null,subtypes:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null}),this._getIndex=this._createGetIndex()}requiresInvalidation(t){for(const e of this._sendStates.values())if(!e.done)return!0;const s=new Set;for(const e of t)s.add(e.chunkId);return!e(s,this._handled)&&(this._handled=s,!0)}invalidate(){this._invalidated=!0}createState(e){return new y(e,this._attributeStore)}async applyOverrideUpdate(e){return null}displayMap(e,t,s){const a=new Map(e.map(e=>[t(e),e])),r=[];for(const i of this._sendStates.values())for(const e of i.featuresWorldSpace()){const{objectId:t,displayId:i}=e,o=a.get(t);if(null!=o){const e=s(i,o,t);r.push(e),a.delete(t)}}return r}getDisplayFeatures(e){const t=new Set(e),a=new Set,r=[];for(const i of this._sendStates.values())for(const e of i.featuresWorldSpace())t.has(e.displayId)&&!a.has(e.objectId)&&(e.geometry&&r.push({...s(e,this._metadata.geometryType,!1,!1),displayId:e.displayId}),a.add(e.objectId));return{features:[],aggregates:r,tracks:[]}}getFeatureObjectIdsForAggregate(e){for(const t of this._sendStates.values())for(const s of t.bins.values())if(s.id===e){const e=[];for(const t of s.containedObjectIds)for(const s of t.values())e.push(s);return e}return[]}async updateChunks(e,t){if(!this._invalidated)return null;this._invalidated=!1;const s=new d;for(const a of this._sendStates.values())s.messages.push(this._update(a,e,t));return s}forEachAggregateWorldSpace(e){const t=new Set;for(const s of this._sendStates.values())for(const a of s.featuresWorldSpace())t.has(a.objectId)||(e(a),t.add(a.objectId))}_createGetIndex(){return(e,t)=>{switch(this._schema.index.type){case"geohash":return e.getGeohashIndex(new g({type:"geohash",fields:this.aggregateFields,featureFilter:this._featureFilter,geohashLevel:this._schema.index.fixBinLevel,spatialReference:this.spatialReference,arcadeContextInfo:this._arcadeContextInfo,scale:t.scale,sqlOptions:this._sqlOptions}));case"grid":{const s=this._schema.index.fixedBinLevel,a=null!=s?t.tileInfoView.getLODInfoAt(s).scale:t.scale;return e.getGridIndex(new g({type:"grid",fields:this.aggregateFields,cellSize:this._schema.index.size,featureFilter:this._featureFilter,spatialReference:this.spatialReference,arcadeContextInfo:this._arcadeContextInfo,scale:a,sqlOptions:this._sqlOptions}))}}}}_update(e,t,s){const{subscription:a}=e,i=e.take(),{bins:o,featureCache:n}=e,l=a.tile,d=new Set;for(const r of t){this._getIndex(r,l).putBounded(o,d,e.tile.extent,e.tile.resolution)}const c=[],f=a.tile.transform,p=a.tile.key.level;for(const u of o.values()){const e=u.getGeometry(this.spatialReference,f),t=new r(e,u.getAttributes(),null,u.id);e||(t.centroid=u.getGeometricCentroid(this.spatialReference,f)),t.displayId=this._attributeStore.createDisplayIdForObjectId(`${t.objectId}.${p}`),n.set(u.id,t),c.push(t)}this.events.emit("changed"),e.done||=!s;const h=m.fromOptimizedFeatures(c,this._metadata,f),g=h.getCursor(),y=e.subscription.tile.createArcadeEvaluationOptions(this._arcadeContextInfo);for(;g.next();)this._attributeStore.setAttributeData(g.getDisplayId(),g,y,this._sqlOptions);const I=new u(e.subscription,h,[],e.done,{});for(const r of i.featureCache.keys())this._attributeStore.releaseDisplayIdForObjectId(`${r}.${p}`);return I}}export{y as BinningState,I as BinningStrategy};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"../../../../../core/has.js";import{convertToFeature as e}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as t}from"../../../../../layers/graphics/OptimizedFeature.js";import s from"../../../../../layers/graphics/OptimizedGeometry.js";import i from"../../../../../layers/support/FieldsIndex.js";import{tileSize as r}from"../../../engine/webgl/definitions.js";import{ComputedAggregateField as a}from"../aggregation/ComputedAggregateField.js";import{GridCell as n}from"../aggregation/GridCell.js";import{pixelsPerMapUnit as l}from"../aggregation/GridSpatialIndex.js";import{AAggregateStrategy as o}from"./AAggregateStrategy.js";import{LevelReplaceBatch as d,ASendState as u}from"./AProcessorStrategy.js";import{WithDisplayId as c}from"./support/WithDisplayId.js";import{FeatureTileAppendMessage as p}from"../sources/FeatureSourceMessage.js";import{ComputedAttributeStorage as f}from"../support/ComputedAttributeStorage.js";import h from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as g}from"../support/FeatureMetadata.js";import{FeatureSetReaderJSON as m}from"../support/FeatureSetReaderJSON.js";import{Hashed as _}from"../support/Hashed.js";const y=128;class I extends u{constructor(e){super(e),this.didSend=!1,this.done=!1}}class x{constructor(e,t,s,i,r){this.level=e,this._scale=t,this._indexOptions=s,this._clusterRadius=i,this._store=r,this._statistics=new Map,this._handledChunks=new Set,this._handledIds=new Set,this._cells=new Map,this._clusters=new Map}destroy(){this._clearClusters()}_clearClusters(){for(const e of this._clusters.values())this._store.releaseDisplayIdForObjectId(e.inner.id);this._clusters.clear()}invalidate(){this._cells.clear(),this._handledChunks.clear(),this._handledIds.clear()}*aggregatesWorldSpace(){for(const e of this._clusters.values()){const s=e.inner.getCentroid(null),i=new t(s,e.inner.getAttributes(),null,e.inner.id,e.displayId);yield i}}clusters(){return this._clusters.values()}update(e,t){let s=!1;const i=new _({...this._indexOptions,scale:this._scale});for(const l of e){if(this._handledChunks.has(l.normalizedChunkId))continue;if(this._handledChunks.add(l.normalizedChunkId),null!=l.lodInfo&&l.lodInfo.level!==this.level)continue;l.getGridIndex(i).put(this._cells,this._handledIds),s=!0}const r=l(this._indexOptions.spatialReference,this._scale),a=this._indexOptions.cellSize,n={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};for(const{subscription:l}of t){const e=l.tile.bounds,t=Math.floor(e[0]*r/a),s=Math.floor(e[1]*r/a),i=Math.ceil(e[2]*r/a),o=Math.ceil(e[3]*r/a);n.xMin=Math.min(n.xMin,t),n.yMin=Math.min(n.yMin,s),n.xMax=Math.max(n.xMax,i),n.yMax=Math.max(n.yMax,o)}return null!=this._lastCellBounds&&n.xMin===this._lastCellBounds.xMin&&n.xMax===this._lastCellBounds.xMax&&n.yMin===this._lastCellBounds.yMin&&n.yMax===this._lastCellBounds.yMax||(this._lastCellBounds=n,s=!0),s&&this._clusterCells(n),s}_clusterCells(e){const t=this._clusters;this._clusters=new Map;const s=this._clusterRadius*(1/l(this._indexOptions.spatialReference,this._scale));let i=Array.from(this._cells.values());i=i.sort((e,t)=>t.count-e.count);const r=new Set;for(const a of i){if(r.has(a.id))continue;if(a.gridX<e.xMin||a.gridX>e.xMax||a.gridY<e.yMin||a.gridY>e.yMax)continue;const t=1+this._clusterRadius/this._indexOptions.cellSize,i=this._store.createDisplayIdForObjectId(a.id),l=new c(a.clone(),i);r.add(a.id),this._clusters.set(a.id,l);const o=a.centroidXWorld,d=a.centroidYWorld;for(let e=a.gridY-t;e<=a.gridY+t;e++)for(let i=a.gridX-t;i<=a.gridX+t;i++){if(e===a.gridY&&i===a.gridX)continue;const t=this._cells.get(n.createId(i,e));if(!t||r.has(t.id))continue;const u=Math.abs(t.centroidXWorld-o),c=Math.abs(t.centroidYWorld-d);u<s&&c<s&&(l.inner.merge(t),r.add(t.id))}}for(const a of t.values())this._store.releaseDisplayIdForObjectId(a.inner.id)}async updateStatistics(e){let t=!1;for(const s of this._clusters.values())s.inner.count>1&&(t=this._updateAggregateStatistics(this._statistics,s.inner)||t);if(t){const t=Array.from(this._statistics.entries()).map(([e,t])=>({fieldName:e,minValue:t.minValue,maxValue:t.maxValue}));await e.container.updateStatistics(this.level,t)}}createAggregateFeatures(e,i){const a=e.subscription,n=[],l=a.tile.transform,o=Array.from(this._clusters.values()),d=o.length;for(const c of o){const e=c.inner.getCentroidX(l),i=c.inner.getCentroidY(l),a=1===c.inner.count?c.inner.firstObjectId:c.inner.id,o=c.displayId;if(e<r+y&&e>=-y&&i<r+y&&i>=-y){const r=new s([],[e,i]),l=new t(r,c.inner.getAttributes(),null,a,o);n.push(l)}}const u=m.fromOptimizedFeatures(n,i,a.tile.transform);return has("esri-2d-update-debug")&&console.debug(`Tile[${e.subscription.tile.id}] ClusterStrategy.createAggregateFeatures`,{clusters:u,levelClusterCount:d}),u}_updateAggregateStatistics(e,t){let s=!1;for(const i of t.statistics.values()){if("esriFieldTypeString"===i.field.type)continue;const t=i.value,r=i.field,a=e.get(r.name);if(a){const{minValue:e,maxValue:i}=a,r=Math.min(a.minValue,t),n=Math.max(a.maxValue,t);e===r&&i===n||(a.minValue=r,a.maxValue=n,s=!0);continue}e.set(r.name,{minValue:t,maxValue:t}),s=!0}return s}}class
|
|
2
|
+
import has from"../../../../../core/has.js";import{convertToFeature as e}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as t}from"../../../../../layers/graphics/OptimizedFeature.js";import s from"../../../../../layers/graphics/OptimizedGeometry.js";import i from"../../../../../layers/support/FieldsIndex.js";import{tileSize as r}from"../../../engine/webgl/definitions.js";import{ComputedAggregateField as a}from"../aggregation/ComputedAggregateField.js";import{GridCell as n}from"../aggregation/GridCell.js";import{pixelsPerMapUnit as l}from"../aggregation/GridSpatialIndex.js";import{AAggregateStrategy as o}from"./AAggregateStrategy.js";import{LevelReplaceBatch as d,ASendState as u}from"./AProcessorStrategy.js";import{WithDisplayId as c}from"./support/WithDisplayId.js";import{FeatureTileAppendMessage as p}from"../sources/FeatureSourceMessage.js";import{ComputedAttributeStorage as f}from"../support/ComputedAttributeStorage.js";import h from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as g}from"../support/FeatureMetadata.js";import{FeatureSetReaderJSON as m}from"../support/FeatureSetReaderJSON.js";import{Hashed as _}from"../support/Hashed.js";const y=128;class I extends u{constructor(e){super(e),this.didSend=!1,this.done=!1}}class x{constructor(e,t,s,i,r){this.level=e,this._scale=t,this._indexOptions=s,this._clusterRadius=i,this._store=r,this._statistics=new Map,this._handledChunks=new Set,this._handledIds=new Set,this._cells=new Map,this._clusters=new Map}destroy(){this._clearClusters()}_clearClusters(){for(const e of this._clusters.values())this._store.releaseDisplayIdForObjectId(e.inner.id);this._clusters.clear()}invalidate(){this._cells.clear(),this._handledChunks.clear(),this._handledIds.clear()}*aggregatesWorldSpace(){for(const e of this._clusters.values()){const s=e.inner.getCentroid(null),i=new t(s,e.inner.getAttributes(),null,e.inner.id,e.displayId);yield i}}clusters(){return this._clusters.values()}update(e,t){let s=!1;const i=new _({...this._indexOptions,scale:this._scale});for(const l of e){if(this._handledChunks.has(l.normalizedChunkId))continue;if(this._handledChunks.add(l.normalizedChunkId),null!=l.lodInfo&&l.lodInfo.level!==this.level)continue;l.getGridIndex(i).put(this._cells,this._handledIds),s=!0}const r=l(this._indexOptions.spatialReference,this._scale),a=this._indexOptions.cellSize,n={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};for(const{subscription:l}of t){const e=l.tile.bounds,t=Math.floor(e[0]*r/a),s=Math.floor(e[1]*r/a),i=Math.ceil(e[2]*r/a),o=Math.ceil(e[3]*r/a);n.xMin=Math.min(n.xMin,t),n.yMin=Math.min(n.yMin,s),n.xMax=Math.max(n.xMax,i),n.yMax=Math.max(n.yMax,o)}return null!=this._lastCellBounds&&n.xMin===this._lastCellBounds.xMin&&n.xMax===this._lastCellBounds.xMax&&n.yMin===this._lastCellBounds.yMin&&n.yMax===this._lastCellBounds.yMax||(this._lastCellBounds=n,s=!0),s&&this._clusterCells(n),s}_clusterCells(e){const t=this._clusters;this._clusters=new Map;const s=this._clusterRadius*(1/l(this._indexOptions.spatialReference,this._scale));let i=Array.from(this._cells.values());i=i.sort((e,t)=>t.count-e.count);const r=new Set;for(const a of i){if(r.has(a.id))continue;if(a.gridX<e.xMin||a.gridX>e.xMax||a.gridY<e.yMin||a.gridY>e.yMax)continue;const t=1+this._clusterRadius/this._indexOptions.cellSize,i=this._store.createDisplayIdForObjectId(a.id),l=new c(a.clone(),i);r.add(a.id),this._clusters.set(a.id,l);const o=a.centroidXWorld,d=a.centroidYWorld;for(let e=a.gridY-t;e<=a.gridY+t;e++)for(let i=a.gridX-t;i<=a.gridX+t;i++){if(e===a.gridY&&i===a.gridX)continue;const t=this._cells.get(n.createId(i,e));if(!t||r.has(t.id))continue;const u=Math.abs(t.centroidXWorld-o),c=Math.abs(t.centroidYWorld-d);u<s&&c<s&&(l.inner.merge(t),r.add(t.id))}}for(const a of t.values())this._store.releaseDisplayIdForObjectId(a.inner.id)}async updateStatistics(e){let t=!1;for(const s of this._clusters.values())s.inner.count>1&&(t=this._updateAggregateStatistics(this._statistics,s.inner)||t);if(t){const t=Array.from(this._statistics.entries()).map(([e,t])=>({fieldName:e,minValue:t.minValue,maxValue:t.maxValue}));await e.container.updateStatistics(this.level,t)}}createAggregateFeatures(e,i){const a=e.subscription,n=[],l=a.tile.transform,o=Array.from(this._clusters.values()),d=o.length;for(const c of o){const e=c.inner.getCentroidX(l),i=c.inner.getCentroidY(l),a=1===c.inner.count?c.inner.firstObjectId:c.inner.id,o=c.displayId;if(e<r+y&&e>=-y&&i<r+y&&i>=-y){const r=new s([],[e,i]),l=new t(r,c.inner.getAttributes(),null,a,o);n.push(l)}}const u=m.fromOptimizedFeatures(n,i,a.tile.transform);return has("esri-2d-update-debug")&&console.debug(`Tile[${e.subscription.tile.id}] ClusterStrategy.createAggregateFeatures`,{clusters:u,levelClusterCount:d}),u}_updateAggregateStatistics(e,t){let s=!1;for(const i of t.statistics.values()){if("esriFieldTypeString"===i.field.type)continue;const t=i.value,r=i.field,a=e.get(r.name);if(a){const{minValue:e,maxValue:i}=a,r=Math.min(a.minValue,t),n=Math.max(a.maxValue,t);e===r&&i===n||(a.minValue=r,a.maxValue=n,s=!0);continue}e.set(r.name,{minValue:t,maxValue:t}),s=!0}return s}}class S extends o{static async create(e,t,s,i,r,n){const l=s.metadata.outSpatialReference,o=new f({spatialReference:l}),d={type:"grid",fields:await Promise.all(t.fields.map(async e=>a.create(o,e))),spatialReference:l,featureFilter:t.featureFilter?await h.create({geometryType:s.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:s.metadata.timeInfo,fieldsIndex:s.metadata.fieldsIndex,spatialReference:l,filterJSON:t.featureFilter}):null,cellSize:t.clusterRadius/4,arcadeContextInfo:r,sqlOptions:n};return new S(e,t.clusterRadius,d,t.fields,s,i,n)}constructor(e,t,s,r,a,n,l){super(a,n,s.spatialReference,s.fields,l),this._connection=e,this._clusterRadius=t,this._indexOptions=s,this._cellsPerLevel=new Map,this._metadata=g.createFeature({geometryType:"esriGeometryPoint",hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:"aggregateId"},fieldsIndex:new i([...r,...this._source.metadata.fieldsIndex.fields,{name:"aggregateId",alias:"aggregateId",type:"esriFieldTypeOID"}]).toJSON(),globalIdField:null,spatialReference:a.metadata.spatialReference,outSpatialReference:a.metadata.outSpatialReference,attributeSpatialReference:null,subtypeField:null,subtypes:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null})}get enablePixelBuffering(){return!0}onSubscribe(e){super.onSubscribe(e);const{scale:t,level:s}=e.tile;this._lastSubscribedLodInfo={level:s,scale:t}}requiresInvalidation(e){return!1}invalidate(){for(const e of this._cellsPerLevel.values())e.invalidate()}createState(e){return new I(e)}async applyOverrideUpdate(e){for(const t of this._cellsPerLevel.values())t.invalidate();return null}displayMap(e,t,s){const i=new Map(e.map(e=>[t(e),e])),r=[],a=this._getActiveClusterState();if(a)for(const n of a.clusters()){const e=i.get(n.inner.id);if(null!=e){const t=s(n.displayId,e,n.inner.id);r.push(t),i.delete(n.inner.id);continue}if(1===n.inner.count){const{firstObjectId:e}=n.inner,t=e?i.get(e):null;if(null!=t){const a=s(n.displayId,t,e);r.push(a),i.delete(e)}}}return r}getDisplayFeatures(t){const s=new Set(t),i=new Set,r=[],a=[],n=this._getActiveClusterState();if(n)for(const l of n.aggregatesWorldSpace())if(s.has(l.displayId)&&!i.has(l.displayId)){const t=e(l,this._metadata.geometryType,!1,!1);if(i.add(l.displayId),1===t.attributes.cluster_count){r.push({...t,displayId:l.displayId});continue}a.push({...t,displayId:l.displayId})}return{features:r,aggregates:a,tracks:[]}}getFeatureObjectIdsForAggregate(e){const t=this._getActiveClusterState();if(t)for(const s of t.clusters())if(s.inner.id===e){const e=[];for(const t of s.inner.containedObjectIds)for(const s of t.values())e.push(s);return e}return[]}async updateChunks(e,t){const s=this._lastSubscribedLodInfo;if(!s)return null;const i=this._getOrCreateClusterState(s),r=Array.from(this._sendStates.values()).filter(e=>e.subscription.tile.level===s.level);i.update(e,r);const a=new d(s.level);for(const n of r)a.messages.push(this._update(n,i,t));return await i.updateStatistics(this._connection),a}forEachAggregateWorldSpace(e){const t=this._getActiveClusterState();if(t)for(const s of t.aggregatesWorldSpace())e(s)}_getActiveClusterState(){return this._lastSubscribedLodInfo?this._cellsPerLevel.get(this._lastSubscribedLodInfo.level):null}_getOrCreateClusterState(e){if(null==e.level)throw new Error("InternalError: Level and scale must be defined");let t=this._cellsPerLevel.get(e.level);return t||(t=new x(e.level,e.scale,this._indexOptions,this._clusterRadius,this._attributeStore),this._cellsPerLevel.set(e.level,t)),t}_update(e,t,s){const i=t.createAggregateFeatures(e,this._metadata);this.events.emit("changed"),e.done=e.done||!s;const r=i.getCursor(),a=e.subscription.tile.createArcadeEvaluationOptions(this._indexOptions.arcadeContextInfo);for(;r.next();)this._attributeStore.setAttributeData(r.getDisplayId(),r,a,this._sqlOptions);return has("esri-2d-update-debug")&&console.debug(`Tile[${e.subscription.tile.id}] ClusterStrategy._update`,{done:e.done}),new p(e.subscription,i,e.done,{})}}export{I as ClusterSendState,S as ClusterStrategy};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{isSome as t}from"../../../../../core/arrayUtils.js";import e from"../../../../../core/Logger.js";import{assertIsSome as s}from"../../../../../core/maybe.js";import{isLoaded as r,load as a,execute as i}from"../../../../../geometry/operators/gx/operatorGeodeticDensify.js";import{geodeticCurveType as o}from"../../../../../geometry/operators/support/geodeticCurveType.js";import{intersectsWithMargin as n,fromValues as l,intersects as c,empty as u,expandPointInPlace as d}from"../../../../../geometry/support/aaBoundingRect.js";import{getClosestDenormalizedXToReference as h}from"../../../../../geometry/support/normalizeUtils.js";import{normalizeCentralMeridianForDisplay as p}from"../../../../../geometry/support/normalizeUtilsSync.js";import{quantizeOptimizedGeometry as m,convertToGeometry as f,convertFromPolyline as _}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as g}from"../../../../../layers/graphics/OptimizedFeature.js";import b from"../../../../../layers/graphics/OptimizedGeometry.js";import{internalTrackPartField as y,externalTrackLineOidPrefix as I,internalTimeReceivedField as v}from"../../../../../layers/support/streamLayerUtils.js";import{tileSize as k}from"../../../engine/webgl/definitions.js";import{AccumulatedStatistics as F}from"../aggregation/AccumulatedStatistics.js";import{ComputedAggregateField as O}from"../aggregation/ComputedAggregateField.js";import{AAggregateStrategy as j}from"./AAggregateStrategy.js";import{AppendBatch as x,ASendState as S}from"./AProcessorStrategy.js";import{FeatureTileAppendMessage as T}from"../sources/FeatureSourceMessage.js";import{createArcadeEvaluationOptions as R}from"../support/arcadeUtils.js";import{ComputedAttributeStorage as w}from"../support/ComputedAttributeStorage.js";import D from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as L}from"../support/FeatureMetadata.js";import{FeatureSetReaderIndirect as A}from"../support/FeatureSetReaderIndirect.js";import{FeatureSetReaderJSON as C}from"../support/FeatureSetReaderJSON.js";let G;const P=()=>e.getLogger("esri.views.2d.layers.features.processor.TrackStrategy"),M=32;class W{constructor(t,e,s,r,a){this.chunkIndex=t,this.featureIndex=e,this.objectId=s,this.displayId=r,this.time=a}}class z{static getOid(t){return I+t}constructor(t,e,s,r,a,i,o,n){this._schema=t,this.trackId=e,this.objectId=s,this.displayId=r,this._fields=a,this._spatialReference=i,this._metadata=o,this._isStream=n,this._maxDisplayDuration=this._schema.maxDisplayDuration>0?this._schema.maxDisplayDuration:1/0,this._maxDisplayObservationsPerTrack=this._schema.maxDisplayObservationsPerTrack>=1?this._schema.maxDisplayObservationsPerTrack:1/0,this._observationRecords=[],this._nextObservationRecords=[],this._trackLinePath=[],this._bounds=[],this._trackLineGeometry=new b}get _trackLineAttributes(){const t={...this._latestObservationFeature?.attributes,aggregateId:this.objectId,[y]:0};if(null!=this._statistics)for(const e of this._statistics.values())t[e.field.name]=e.value;return t}get _startTimeField(){return this._metadata.timeInfo?.startTimeField}get length(){return this._observationRecords.length}*observations(){yield*this._observationRecords}*previousObservations(){for(let t=0;t<this._observationRecords.length-1;t++)yield this._observationRecords[t]}get latestObservationFeature(){return this._latestObservationFeature}get latestObservationRecord(){return this._latestObservationRecord}stageObservation(t,e){this._nextObservationRecords.push(new W(t,e.getIndex(),e.getObjectId(),e.getDisplayId(),null!=this._startTimeField?e.readAttributeAsTimestamp(this._startTimeField):null))}commitObservations(t,e,r){const a=new Set(this._nextObservationRecords.map(t=>t.objectId)),i=this._observationRecords.filter(t=>!a.has(t.objectId)).map(t=>t.objectId);let o,n;switch(this._observationRecords=[],this._trackLinePath=[],this._isStream||null==this._startTimeField||this._nextObservationRecords.sort((t,e)=>{const s=t.time,r=e.time;return null!=s&&null!=r?s-r:0}),this._schema.timeField){case"startTimeField":o=this._metadata.timeInfo?.startTimeField;break;case"endTimeField":o=this._metadata.timeInfo?.endTimeField;break;case"timeReceived":o=this._isStream?v:null}n=this._isStream?r?.end??Date.now():r?.end??-1/0;const l=e.map(t=>t.reader.getCursor());let c;for(let u=this._nextObservationRecords.length-1;u>=0&&!(this._observationRecords.length>=this._maxDisplayObservationsPerTrack);u--){const t=this._nextObservationRecords[u],e=l[t.chunkIndex];s(e),e.setIndex(t.featureIndex);const r=null!=o?e.readAttributeAsTimestamp(o):null;(null!=r?n-r:0)>=this._maxDisplayDuration||(this._commitObservation(t,e),c??=t)}if(null!=c){const{chunkIndex:e,featureIndex:r}=c,a=`${c.objectId}.latest`,o=t.createDisplayIdForObjectId(a),n=l[e];s(n),n.setIndex(r);const u=new g(n.readGeometryWorldSpace(),{...n.readAttributes(),[y]:1},null,a,o);this._latestObservationFeature&&i.push(this._latestObservationFeature.objectId),this._latestObservationFeature=u,this._latestObservationRecord=c}else this._latestObservationFeature=null;return this._trackLineGeometry=Z(this._trackLinePath,this._spatialReference),this._bounds=N(this._trackLineGeometry),this._nextObservationRecords=[],i}updateStatistics(t,e){this._statistics=F.create(this._fields);const r=t.map(t=>t.reader.getCursor());for(const{chunkIndex:a,featureIndex:i}of this._observationRecords){const t=r[a];s(t),t.setIndex(i),this._statistics.insert(t,e)}}overlapsTile(t){for(const e of this._bounds)if(n(e,t.bounds,M))return!0;return!1}getLatestObservationFeatureForTile(t){if(null==this._latestObservationFeature)return null;const{objectId:e,displayId:s,geometry:r,attributes:a}=this._latestObservationFeature,i=m(r,this._metadata.geometryType,t.subscription.tile.transform)??new b,o=l(1/0,1/0,-1/0,-1/0);E(i,(t,e)=>d(o,[t,e]));if(!c(o,l(0,0,k,k)))return null;return new g(i,a,null,e,s)}getTrackLineFeatureForTile(t){const e=m(this._trackLineGeometry,"esriGeometryPolyline",t.subscription.tile.transform)??new b;return new g(e,this._trackLineAttributes,null,this.objectId,this.displayId)}getTrackLineOptimizedFeature(){return new g(this._trackLineGeometry,this._trackLineAttributes,null,this.objectId,this.displayId)}getTrackLineDisplayFeature(){const{_trackLineGeometry:t,_trackLineAttributes:e,displayId:s}=this;return{geometry:f(t,"esriGeometryPolyline",!1,!1),attributes:e,displayId:s}}_commitObservation(t,e){const s=e.readCentroidWorldSpace();let r=s?.coords[0],a=s?.coords[1];null==s&&(r=e.readXWorldSpace(),a=e.readYWorldSpace()),null!=r&&null!=a&&(this._observationRecords.unshift(t),this._trackLinePath.unshift([r,a]))}}class U extends S{constructor(t){super(t),this.done=!1}}class q extends j{static async create(t,e,s,i,o){const n=e.metadata.outSpatialReference,l=new w({spatialReference:n}),c=await Promise.all(t.fields.map(async t=>O.create(l,t))),u=t.featureFilter?await D.create({geometryType:e.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:e.metadata.timeInfo,fieldsIndex:e.metadata.fieldsIndex,spatialReference:n,filterJSON:t.featureFilter}):null;return n.isWrappable||r()||await Promise.all([import("../../../../../geometry/operators/support/apiConverter.js"),import("../../../../../geometry/operators/support/jsonConverter.js"),a()]).then(([t,e,s])=>{G={fromGeometryToGXGeometry:e.fromGeometryToGXGeometry,toGeometry:e.toGeometry,fromSpatialReference:t.fromSpatialReference}}),new q(t,e,s,n,c,u,i,o)}constructor(t,e,s,r,a,i,o,n){super(e,s,r,a,n),this._schema=t,this._featureFilter=i,this._arcadeContextInfo=o,this._tracks=new Map,this._handledChunks=new Set,this._metadata=e.metadata.weakCloneWithAdditionalFields([{name:y,alias:"trackPart",type:"esriFieldTypeSmallInteger"}]),this._trackLineMetadata=L.createFeature({geometryType:"esriGeometryPolyline",featureIdInfo:{type:"object-id",fieldName:"aggregateId"},fieldsIndex:{fields:[...this._source.metadata.fieldsIndex.fields,...this.aggregateFields,{name:y,alias:"trackPart",type:"esriFieldTypeSmallInteger"},{name:"aggregateId",alias:"aggregateId",type:"esriFieldTypeOID"}],timeZoneByFieldName:null},globalIdField:null,spatialReference:e.metadata.spatialReference,outSpatialReference:e.metadata.outSpatialReference,subtypeField:null,subtypes:null,timeInfo:e.metadata.timeInfo,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null,hasZ:!1,hasM:!1})}destroy(){super.destroy(),this._clear()}get _isStream(){return this._source.isStream}get enablePixelBuffering(){return!0}get isAggregate(){return!1}requiresInvalidation(){return!0}invalidate(){super.invalidate(),this._clear()}createState(t){return new U(t)}async applyOverrideUpdate(t){return P().error("Applying override to tracks is not supported"),null}displayMap(t,e,s){const r=new Map(t.map(t=>[e(t),t])),a=[];for(const i of this._tracks.values()){const t=r.get(i.objectId);if(null!=t){const e=s(i.displayId,t,i.objectId);a.push(e),r.delete(i.objectId);continue}const e=i.latestObservationFeature;if(e?.objectId){const t=r.get(e.objectId);if(null!=t){const i=s(e.displayId,t,e.objectId);a.push(i),r.delete(e.objectId);continue}}for(const o of i.observations()){const t=r.get(o.objectId);if(null!=t){const e=s(o.displayId,t,o.objectId);a.push(e),r.delete(o.objectId)}}}return a}getDisplayFeatures(t){const e=new Set(t),s=[],r=[],a=this._source.chunks().map(t=>t.reader.getCursor());for(const i of this._tracks.values()){if(e.has(i.displayId)&&r.push(i.getTrackLineDisplayFeature()),null!=i.latestObservationFeature&&e.has(i.latestObservationFeature.displayId)){const{displayId:t,chunkIndex:e,featureIndex:r}=i.latestObservationRecord,o=a[e];o.setIndex(r),s.push({displayId:t,...o.readLegacyFeatureWorldSpace()})}for(const{displayId:t,chunkIndex:r,featureIndex:o}of i.observations())if(e.has(t)){const e=a[r];e.setIndex(o),s.push({displayId:t,...e.readLegacyFeatureWorldSpace()})}}return{features:s,aggregates:[],tracks:r}}getFeatureObjectIdsForAggregate(t){for(const e of this._tracks.values())if(e.objectId===t)return Array.from(e.observations(),t=>t.objectId);return[]}async updateChunks(){0===this._handledChunks.size&&this._rebuildTracks();const t=new x;for(const e of this._sendStates.values())this._update(t,e);return t}forEachAggregateWorldSpace(t){for(const e of this._tracks.values())t(e.getTrackLineOptimizedFeature())}_clear(){for(const t of this._source.chunks())if(this._handledChunks.has(t.chunkId)){const e=t.reader.getCursor();for(;e.next();){const t=e.getObjectId();this._attributeStore.releaseDisplayIdForObjectId(t)}}this._handledChunks.clear();for(const t of this._tracks.values())this._removeTrack(t);this._tracks.clear()}_rebuildTracks(){const t=this._source.chunks();if(!t.length)return;const e=this._metadata.timeInfo?.trackIdField;if(null==e)return;const s=new Set;for(let r=0;r<t.length;r++){const a=t[r];if(this._handledChunks.has(a.chunkId))continue;this._handledChunks.add(a.chunkId);const i=a.reader.getCursor();for(;i.next();){const t=i.getObjectId();i.setDisplayId(this._attributeStore.createDisplayIdForObjectId(t));const a=i.readAttribute(e);if(null!=a&&null!=t&&(null===this._featureFilter||this._featureFilter.check(i,this._sqlOptions))){if(!this._tracks.has(a)){const t=z.getOid(a),e=this._attributeStore.createDisplayIdForObjectId(t),s=new z(this._schema,a,t,e,this.aggregateFields,this.spatialReference,this._source.metadata,this._isStream);this._tracks.set(a,s)}this._tracks.get(a).stageObservation(r,i),s.add(a)}}}for(const r of this._tracks.values())if(s.has(r.trackId)){const e=r.commitObservations(this._attributeStore,t,this._featureFilter?.timeExtent);for(const t of e)this._attributeStore.releaseDisplayIdForObjectId(t);r.updateStatistics(t,R(1,this._arcadeContextInfo))}else this._removeTrack(r)}_removeTrack(t){this._tracks.delete(t.trackId),this._attributeStore.releaseDisplayIdForObjectId(t.objectId),null!=t.latestObservationFeature&&this._attributeStore.releaseDisplayIdForObjectId(t.latestObservationFeature.objectId)}_update(e,s){if(s.done)return;s.done=!this._source.updateTracking.updating;const r=[],a=[];for(const t of this._tracks.values())if(t.length>0){if(this._schema.showLatestObservation){const e=t.getLatestObservationFeatureForTile(s);null!=e&&r.push(e)}this._schema.showTrackLine&&t.overlapsTile(s.subscription.tile)&&a.push(t.getTrackLineFeatureForTile(s))}const i=C.fromOptimizedFeatures(r,this._metadata,s.subscription.tile.transform),o=C.fromOptimizedFeatures(a,this._trackLineMetadata,s.subscription.tile.transform);let n=[];if(this._schema.showPreviousObservations){const e=this._source.chunks().map(()=>[]);for(const t of this._tracks.values())for(const{chunkIndex:s,featureIndex:r}of t.previousObservations())e[s].push(r);n=this._source.chunks().map((t,r)=>{const a=t.getTileReader(s.subscription.tile);if(null==a)return null;const i=A.from(a,e[r]);return i.setProcessorAttributes({[y]:2}),"esriGeometryPoint"!==i.geometryType&&null!=i.getInTransform()||i.setTransformForDisplay(s.subscription.tile.transform),i}).filter(t)}this.events.emit("changed");const l=s.subscription.tile.createArcadeEvaluationOptions(this._arcadeContextInfo),c=o.getCursor();for(;c.next();)this._attributeStore.setAttributeData(c.getDisplayId(),c,l,this._sqlOptions);for(const t of n){const e=t.getCursor();for(;e.next();)this._attributeStore.setAttributeData(e.getDisplayId(),e,l,this._sqlOptions)}const u=i.getCursor();for(;u.next();)this._attributeStore.setAttributeData(u.getDisplayId(),u,l,this._sqlOptions);e.messages.push(new T(s.subscription,o,!1,{}));for(const t of n)e.messages.push(new T(s.subscription,t,!1,{}));e.messages.push(new T(s.subscription,i,s.done,{}))}}function Z(t,e){if(t.length<2)return _({paths:[t]},!1,!1);if(e.isWrappable){let s=!1;for(let r=1;r<t.length;r++){const a=t[r][0],i=h(a,t[r-1][0],e);a!==i&&(t[r][0]=i,s=!0)}if(s){const s=p({paths:[t],spatialReference:e});if(null!=s)return _({paths:s.paths},!1,!1)}return _({paths:[t]},!1,!1)}const s=G.fromGeometryToGXGeometry({hasM:!1,hasZ:!1,paths:[t]}),r=G.fromSpatialReference(e);if(null!=r){const t=i(s,1e6,r,o.geodesic);if(null!=t){const e=G.toGeometry(t,r);if(null!=e&&"paths"in e)return _({paths:e.paths},!1,!1)}}return _({paths:[t]},!1,!1)}function E(t,e){const s=2,{coords:r,lengths:a}=t;if(!a.length)return void e(r[0],r[1]);let i=0;for(let o=0;o<a.length;o++){const t=a[o];let n=0,l=0;for(let a=0;a<t;a++)n+=r[s*(a+i)],l+=r[s*(a+i)+1],e(n,l);i+=t}}function N(t){const{lengths:e,coords:s}=t,r=2;if(!e.length)return[u()];const a=[];let i=0;for(let o=0;o<e.length;o++){const t=e[o],n=u();a.push(n);for(let e=0;e<t;e++){const t=s[r*(e+i)],a=s[r*(e+i)+1];d(n,[t,a])}i+=t}return a}export{q as TrackStrategy};
|
|
2
|
+
import{isSome as t}from"../../../../../core/arrayUtils.js";import e from"../../../../../core/Logger.js";import{assertIsSome as s}from"../../../../../core/maybe.js";import{isLoaded as r,load as a,execute as i}from"../../../../../geometry/operators/gx/operatorGeodeticDensify.js";import{geodeticCurveType as o}from"../../../../../geometry/operators/support/geodeticCurveType.js";import{intersectsWithMargin as n,fromValues as l,intersects as c,empty as u,expandPointInPlace as d}from"../../../../../geometry/support/aaBoundingRect.js";import{getClosestDenormalizedXToReference as h}from"../../../../../geometry/support/normalizeUtils.js";import{normalizeCentralMeridianForDisplay as p}from"../../../../../geometry/support/normalizeUtilsSync.js";import{quantizeOptimizedGeometry as m,convertToGeometry as f,convertFromPolyline as _}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as g}from"../../../../../layers/graphics/OptimizedFeature.js";import b from"../../../../../layers/graphics/OptimizedGeometry.js";import{internalTrackPartField as y,externalTrackLineOidPrefix as I,internalTimeReceivedField as v}from"../../../../../layers/support/streamLayerUtils.js";import{tileSize as k}from"../../../engine/webgl/definitions.js";import{AccumulatedStatistics as F}from"../aggregation/AccumulatedStatistics.js";import{ComputedAggregateField as O}from"../aggregation/ComputedAggregateField.js";import{AAggregateStrategy as j}from"./AAggregateStrategy.js";import{AppendBatch as x,ASendState as S}from"./AProcessorStrategy.js";import{FeatureTileAppendMessage as T}from"../sources/FeatureSourceMessage.js";import{createArcadeEvaluationOptions as R}from"../support/arcadeUtils.js";import{ComputedAttributeStorage as w}from"../support/ComputedAttributeStorage.js";import D from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as L}from"../support/FeatureMetadata.js";import{FeatureSetReaderIndirect as A}from"../support/FeatureSetReaderIndirect.js";import{FeatureSetReaderJSON as C}from"../support/FeatureSetReaderJSON.js";let G;const P=()=>e.getLogger("esri.views.2d.layers.features.processor.TrackStrategy"),M=32;class W{constructor(t,e,s,r,a){this.chunkIndex=t,this.featureIndex=e,this.objectId=s,this.displayId=r,this.time=a}}class z{static getOid(t){return I+t}constructor(t,e,s,r,a,i,o,n){this._schema=t,this.trackId=e,this.objectId=s,this.displayId=r,this._fields=a,this._spatialReference=i,this._metadata=o,this._isStream=n,this._maxDisplayDuration=this._schema.maxDisplayDuration>0?this._schema.maxDisplayDuration:1/0,this._maxDisplayObservationsPerTrack=this._schema.maxDisplayObservationsPerTrack>=1?this._schema.maxDisplayObservationsPerTrack:1/0,this._observationRecords=[],this._nextObservationRecords=[],this._trackLinePath=[],this._bounds=[],this._trackLineGeometry=new b}get _trackLineAttributes(){const t={...this._latestObservationFeature?.attributes,aggregateId:this.objectId,[y]:0};if(null!=this._statistics)for(const e of this._statistics.values())t[e.field.name]=e.value;return t}get _startTimeField(){return this._metadata.timeInfo?.startTimeField}get length(){return this._observationRecords.length}*observations(){yield*this._observationRecords}*previousObservations(){for(let t=0;t<this._observationRecords.length-1;t++)yield this._observationRecords[t]}get latestObservationFeature(){return this._latestObservationFeature}get latestObservationRecord(){return this._latestObservationRecord}stageObservation(t,e){this._nextObservationRecords.push(new W(t,e.getIndex(),e.getObjectId(),e.getDisplayId(),null!=this._startTimeField?e.readAttributeAsTimestamp(this._startTimeField):null))}commitObservations(t,e,r){const a=new Set(this._nextObservationRecords.map(t=>t.objectId)),i=this._observationRecords.filter(t=>!a.has(t.objectId)).map(t=>t.objectId);let o,n;switch(this._observationRecords=[],this._trackLinePath=[],this._isStream||null==this._startTimeField||this._nextObservationRecords.sort((t,e)=>{const s=t.time,r=e.time;return null!=s&&null!=r?s-r:0}),this._schema.timeField){case"startTimeField":o=this._metadata.timeInfo?.startTimeField;break;case"endTimeField":o=this._metadata.timeInfo?.endTimeField;break;case"timeReceived":o=this._isStream?v:null}n=this._isStream?r?.end??Date.now():r?.end??-1/0;const l=e.map(t=>t.reader.getCursor());let c;for(let u=this._nextObservationRecords.length-1;u>=0&&!(this._observationRecords.length>=this._maxDisplayObservationsPerTrack);u--){const t=this._nextObservationRecords[u],e=l[t.chunkIndex];s(e),e.setIndex(t.featureIndex);const r=null!=o?e.readAttributeAsTimestamp(o):null;(null!=r?n-r:0)>=this._maxDisplayDuration||(this._commitObservation(t,e),c??=t)}if(null!=c){const{chunkIndex:e,featureIndex:r}=c,a=`${c.objectId}.latest`,o=t.createDisplayIdForObjectId(a),n=l[e];s(n),n.setIndex(r);const u=new g(n.readGeometryWorldSpace(),{...n.readAttributes(),[y]:1},null,a,o);this._latestObservationFeature&&i.push(this._latestObservationFeature.objectId),this._latestObservationFeature=u,this._latestObservationRecord=c}else this._latestObservationFeature=null;return this._trackLineGeometry=Z(this._trackLinePath,this._spatialReference),this._bounds=N(this._trackLineGeometry),this._nextObservationRecords=[],i}updateStatistics(t,e){this._statistics=F.create(this._fields);const r=t.map(t=>t.reader.getCursor());for(const{chunkIndex:a,featureIndex:i}of this._observationRecords){const t=r[a];s(t),t.setIndex(i),this._statistics.insert(t,e)}}overlapsTile(t){for(const e of this._bounds)if(n(e,t.bounds,M))return!0;return!1}getLatestObservationFeatureForTile(t){if(null==this._latestObservationFeature)return null;const{objectId:e,displayId:s,geometry:r,attributes:a}=this._latestObservationFeature,i=m(r,this._metadata.geometryType,t.subscription.tile.transform)??new b,o=l(1/0,1/0,-1/0,-1/0);E(i,(t,e)=>d(o,[t,e]));if(!c(o,l(0,0,k,k)))return null;return new g(i,a,null,e,s)}getTrackLineFeatureForTile(t){const e=m(this._trackLineGeometry,"esriGeometryPolyline",t.subscription.tile.transform)??new b;return new g(e,this._trackLineAttributes,null,this.objectId,this.displayId)}getTrackLineOptimizedFeature(){return new g(this._trackLineGeometry,this._trackLineAttributes,null,this.objectId,this.displayId)}getTrackLineDisplayFeature(){const{_trackLineGeometry:t,_trackLineAttributes:e,displayId:s}=this;return{geometry:f(t,"esriGeometryPolyline",!1,!1),attributes:e,displayId:s}}_commitObservation(t,e){const s=e.readCentroidWorldSpace();let r=s?.coords[0],a=s?.coords[1];null==s&&(r=e.readXWorldSpace(),a=e.readYWorldSpace()),null!=r&&null!=a&&(this._observationRecords.unshift(t),this._trackLinePath.unshift([r,a]))}}class U extends S{constructor(t){super(t),this.done=!1}}class q extends j{static async create(t,e,s,i,o){const n=e.metadata.outSpatialReference,l=new w({spatialReference:n}),c=await Promise.all(t.fields.map(async t=>O.create(l,t))),u=t.featureFilter?await D.create({geometryType:e.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:e.metadata.timeInfo,fieldsIndex:e.metadata.fieldsIndex,spatialReference:n,filterJSON:t.featureFilter}):null;return n.isWrappable||r()||await Promise.all([import("../../../../../geometry/operators/support/apiConverter.js"),import("../../../../../geometry/operators/support/jsonConverter.js"),a()]).then(([t,e,s])=>{G={fromGeometryToGXGeometry:e.fromGeometryToGXGeometry,toGeometry:e.toGeometry,fromSpatialReference:t.fromSpatialReference}}),new q(t,e,s,n,c,u,i,o)}constructor(t,e,s,r,a,i,o,n){super(e,s,r,a,n),this._schema=t,this._featureFilter=i,this._arcadeContextInfo=o,this._tracks=new Map,this._handledChunks=new Set,this._metadata=e.metadata.weakCloneWithAdditionalFields([{name:y,alias:"trackPart",type:"esriFieldTypeSmallInteger"}]),this._trackLineMetadata=L.createFeature({geometryType:"esriGeometryPolyline",featureIdInfo:{type:"object-id",fieldName:"aggregateId"},fieldsIndex:{fields:[...this._source.metadata.fieldsIndex.fields,...this.aggregateFields,{name:y,alias:"trackPart",type:"esriFieldTypeSmallInteger"},{name:"aggregateId",alias:"aggregateId",type:"esriFieldTypeOID"}],timeZoneByFieldName:null},globalIdField:null,spatialReference:e.metadata.spatialReference,outSpatialReference:e.metadata.outSpatialReference,attributeSpatialReference:null,subtypeField:null,subtypes:null,timeInfo:e.metadata.timeInfo,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null,hasZ:!1,hasM:!1})}destroy(){super.destroy(),this._clear()}get _isStream(){return this._source.isStream}get enablePixelBuffering(){return!0}get isAggregate(){return!1}requiresInvalidation(){return!0}invalidate(){super.invalidate(),this._clear()}createState(t){return new U(t)}async applyOverrideUpdate(t){return P().error("Applying override to tracks is not supported"),null}displayMap(t,e,s){const r=new Map(t.map(t=>[e(t),t])),a=[];for(const i of this._tracks.values()){const t=r.get(i.objectId);if(null!=t){const e=s(i.displayId,t,i.objectId);a.push(e),r.delete(i.objectId);continue}const e=i.latestObservationFeature;if(e?.objectId){const t=r.get(e.objectId);if(null!=t){const i=s(e.displayId,t,e.objectId);a.push(i),r.delete(e.objectId);continue}}for(const o of i.observations()){const t=r.get(o.objectId);if(null!=t){const e=s(o.displayId,t,o.objectId);a.push(e),r.delete(o.objectId)}}}return a}getDisplayFeatures(t){const e=new Set(t),s=[],r=[],a=this._source.chunks().map(t=>t.reader.getCursor());for(const i of this._tracks.values()){if(e.has(i.displayId)&&r.push(i.getTrackLineDisplayFeature()),null!=i.latestObservationFeature&&e.has(i.latestObservationFeature.displayId)){const{displayId:t,chunkIndex:e,featureIndex:r}=i.latestObservationRecord,o=a[e];o.setIndex(r),s.push({displayId:t,...o.readLegacyFeatureWorldSpace()})}for(const{displayId:t,chunkIndex:r,featureIndex:o}of i.observations())if(e.has(t)){const e=a[r];e.setIndex(o),s.push({displayId:t,...e.readLegacyFeatureWorldSpace()})}}return{features:s,aggregates:[],tracks:r}}getFeatureObjectIdsForAggregate(t){for(const e of this._tracks.values())if(e.objectId===t)return Array.from(e.observations(),t=>t.objectId);return[]}async updateChunks(){0===this._handledChunks.size&&this._rebuildTracks();const t=new x;for(const e of this._sendStates.values())this._update(t,e);return t}forEachAggregateWorldSpace(t){for(const e of this._tracks.values())t(e.getTrackLineOptimizedFeature())}_clear(){for(const t of this._source.chunks())if(this._handledChunks.has(t.chunkId)){const e=t.reader.getCursor();for(;e.next();){const t=e.getObjectId();this._attributeStore.releaseDisplayIdForObjectId(t)}}this._handledChunks.clear();for(const t of this._tracks.values())this._removeTrack(t);this._tracks.clear()}_rebuildTracks(){const t=this._source.chunks();if(!t.length)return;const e=this._metadata.timeInfo?.trackIdField;if(null==e)return;const s=new Set;for(let r=0;r<t.length;r++){const a=t[r];if(this._handledChunks.has(a.chunkId))continue;this._handledChunks.add(a.chunkId);const i=a.reader.getCursor();for(;i.next();){const t=i.getObjectId();i.setDisplayId(this._attributeStore.createDisplayIdForObjectId(t));const a=i.readAttribute(e);if(null!=a&&null!=t&&(null===this._featureFilter||this._featureFilter.check(i,this._sqlOptions))){if(!this._tracks.has(a)){const t=z.getOid(a),e=this._attributeStore.createDisplayIdForObjectId(t),s=new z(this._schema,a,t,e,this.aggregateFields,this.spatialReference,this._source.metadata,this._isStream);this._tracks.set(a,s)}this._tracks.get(a).stageObservation(r,i),s.add(a)}}}for(const r of this._tracks.values())if(s.has(r.trackId)){const e=r.commitObservations(this._attributeStore,t,this._featureFilter?.timeExtent);for(const t of e)this._attributeStore.releaseDisplayIdForObjectId(t);r.updateStatistics(t,R(1,this._arcadeContextInfo))}else this._removeTrack(r)}_removeTrack(t){this._tracks.delete(t.trackId),this._attributeStore.releaseDisplayIdForObjectId(t.objectId),null!=t.latestObservationFeature&&this._attributeStore.releaseDisplayIdForObjectId(t.latestObservationFeature.objectId)}_update(e,s){if(s.done)return;s.done=!this._source.updateTracking.updating;const r=[],a=[];for(const t of this._tracks.values())if(t.length>0){if(this._schema.showLatestObservation){const e=t.getLatestObservationFeatureForTile(s);null!=e&&r.push(e)}this._schema.showTrackLine&&t.overlapsTile(s.subscription.tile)&&a.push(t.getTrackLineFeatureForTile(s))}const i=C.fromOptimizedFeatures(r,this._metadata,s.subscription.tile.transform),o=C.fromOptimizedFeatures(a,this._trackLineMetadata,s.subscription.tile.transform);let n=[];if(this._schema.showPreviousObservations){const e=this._source.chunks().map(()=>[]);for(const t of this._tracks.values())for(const{chunkIndex:s,featureIndex:r}of t.previousObservations())e[s].push(r);n=this._source.chunks().map((t,r)=>{const a=t.getTileReader(s.subscription.tile);if(null==a)return null;const i=A.from(a,e[r]);return i.setProcessorAttributes({[y]:2}),"esriGeometryPoint"!==i.geometryType&&null!=i.getInTransform()||i.setTransformForDisplay(s.subscription.tile.transform),i}).filter(t)}this.events.emit("changed");const l=s.subscription.tile.createArcadeEvaluationOptions(this._arcadeContextInfo),c=o.getCursor();for(;c.next();)this._attributeStore.setAttributeData(c.getDisplayId(),c,l,this._sqlOptions);for(const t of n){const e=t.getCursor();for(;e.next();)this._attributeStore.setAttributeData(e.getDisplayId(),e,l,this._sqlOptions)}const u=i.getCursor();for(;u.next();)this._attributeStore.setAttributeData(u.getDisplayId(),u,l,this._sqlOptions);e.messages.push(new T(s.subscription,o,!1,{}));for(const t of n)e.messages.push(new T(s.subscription,t,!1,{}));e.messages.push(new T(s.subscription,i,s.done,{}))}}function Z(t,e){if(t.length<2)return _({paths:[t]},!1,!1);if(e.isWrappable){let s=!1;for(let r=1;r<t.length;r++){const a=t[r][0],i=h(a,t[r-1][0],e);a!==i&&(t[r][0]=i,s=!0)}if(s){const s=p({paths:[t],spatialReference:e});if(null!=s)return _({paths:s.paths},!1,!1)}return _({paths:[t]},!1,!1)}const s=G.fromGeometryToGXGeometry({hasM:!1,hasZ:!1,paths:[t]}),r=G.fromSpatialReference(e);if(null!=r){const t=i(s,1e6,r,o.geodesic);if(null!=t){const e=G.toGeometry(t,r);if(null!=e&&"paths"in e)return _({paths:e.paths},!1,!1)}}return _({paths:[t]},!1,!1)}function E(t,e){const s=2,{coords:r,lengths:a}=t;if(!a.length)return void e(r[0],r[1]);let i=0;for(let o=0;o<a.length;o++){const t=a[o];let n=0,l=0;for(let a=0;a<t;a++)n+=r[s*(a+i)],l+=r[s*(a+i)+1],e(n,l);i+=t}}function N(t){const{lengths:e,coords:s}=t,r=2;if(!e.length)return[u()];const a=[];let i=0;for(let o=0;o<e.length;o++){const t=e[o],n=u();a.push(n);for(let e=0;e<t;e++){const t=s[r*(e+i)],a=s[r*(e+i)+1];d(n,[t,a])}i+=t}return a}export{q as TrackStrategy};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../../../../../request.js";import t from"../../../../../../../core/Error.js";import has from"../../../../../../../core/has.js";import
|
|
2
|
+
import e from"../../../../../../../request.js";import t from"../../../../../../../core/Error.js";import has from"../../../../../../../core/has.js";import r from"../../../../../../../core/workers/Connection.js";import{toQuantizationTransform as a}from"../../../../../../../geometry/support/quantizationUtils.js";import{equals as s}from"../../../../../../../geometry/support/spatialReferenceUtils.js";import{convertFromFeatureSet as o,quantizeOptimizedFeatureSet as i}from"../../../../../../../layers/graphics/featureConversionUtils.js";import{queryOptimizedFeatureSet as n}from"../../../../../../../layers/ogc/ogcFeatureUtils.js";import{executeQueryPBFBuffer as u,getQueryParameters as c,executeQuery as m}from"../../../../../../../rest/query/operations/query.js";import{FeatureSetReaderJSON as l}from"../../../support/FeatureSetReaderJSON.js";import{FeatureSetReaderPBF as p}from"../../../support/FeatureSetReaderPBF.js";class f{constructor(e,t){this.service=e,this._metadata=t}destroy(){}}function y(e,t,r){switch(e.type){case"memory":return new h(e,t,r);case"ogc":return new q(e,t);case"feature-service":return e.queryMetadata.supportsFormatPBF&&has("featurelayer-pbf")?new w(e,t):new _(e,t)}}async function d(e){const t=new r;return await t.open(e,{}),t}class h extends f{constructor(e,t,r){super(e,t),this._ports=[],this._loaded=this._load(r)}destroy(){this._loaded.finally(()=>{this._client.close(),this._client=null;for(const e of this._ports)e.close()}).catch(()=>{})}async _load(e){this._ports=await e.layerView.openMemoryPorts(),this._client=await d(this._ports)}async executeQuery(e,t){await this._loaded;const r=await this._client.invoke("queryFeatures",e.toJSON(),t);let a=this._metadata;return s(e.outSpatialReference,r.spatialReference)&&(a=a.weakCloneWithResolvedSpatialReference()),l.fromFeatureSet(r,a)}}class w extends f{async executeQuery(r,a){const s=await u(this.service.source,r,a),o=!r.quantizationParameters;try{return p.fromBuffer(s,this._metadata,o)}catch(i){const s=await c(this.service.source,r,"pbf",a??{}),{data:{url:o}}=await e(s.url,{responseType:"native-request-init",...s.options});throw new t("featurelayer:query","Failed to parse response",{url:o,error:i,query:r.toJSON()})}}}class _ extends f{async executeQuery(e,t){const{source:r,queryMetadata:s}=this.service,n=null;if(null!=e.quantizationParameters&&!s.supportsQuantization){const s=e.clone(),u=a(s.quantizationParameters);s.quantizationParameters=null;const c=await m(r,s,n,t),p=o(c,this._metadata.featureIdInfo);return i(u,p),l.fromOptimizedFeatureSet(p,this._metadata)}const u=await m(r,e,n,t);return"esriGeometryPoint"===this._metadata.geometryType&&(u.features=u.features?.filter(e=>{if(null!=e.geometry){const t=e.geometry;return Number.isFinite(t.x)&&Number.isFinite(t.y)}return!0})),l.fromFeatureSet(u,this._metadata)}}class q extends f{async executeQuery(e,t){if(e.quantizationParameters&&!this.service.queryMetadata.supportsQuantization){const r=e.clone(),s=a(r.quantizationParameters);r.quantizationParameters=null;const o=await n(this.service.source,e,t);return i(s,o),l.fromOptimizedFeatureSet(o,this._metadata)}const r=await n(this.service.source,e,t);return l.fromOptimizedFeatureSet(r,this._metadata)}}export{f as SourceAdapter,y as createQueryAdapter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../../../geometry/SpatialReference.js";import t from"../../../../../layers/support/FieldsIndex.js";class i{static minimal(e,n,s=[],l=!1,
|
|
2
|
+
import e from"../../../../../geometry/SpatialReference.js";import t from"../../../../../layers/support/FieldsIndex.js";class i{static minimal(e,n,s=[],l=!1,a=!1){return new i({geometryType:e,hasZ:l,hasM:a,fieldsIndex:new t(s).toJSON(),featureIdInfo:{type:"object-id",fieldName:n},subtypes:null,subtypeField:null,types:null,globalIdField:null,spatialReference:null,outSpatialReference:null,attributeSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,layerType:void 0})}static createFeature(e){return new i(e)}constructor(i){let n;this._options=i,this._fieldsIndex=t.fromJSON(i.fieldsIndex),i.spatialReference&&(i.spatialReference instanceof e?this._spatialReference=i.spatialReference:this._spatialReference=e.fromJSON(i.spatialReference)),i.outSpatialReference&&(i.outSpatialReference instanceof e?this._outSpatialReference=i.outSpatialReference:this._outSpatialReference=e.fromJSON(i.outSpatialReference)),i.attributeSpatialReference&&(i.attributeSpatialReference instanceof e?this._attributeSpatialReference=i.attributeSpatialReference:this._attributeSpatialReference=e.fromJSON(i.attributeSpatialReference)),"object-id"===i.featureIdInfo.type&&(n=i.featureIdInfo.fieldName),this._arcadeSchema={fields:this.fieldsIndex.fields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,objectIdField:n,globalIdField:this._options.globalIdField,spatialReference:this._spatialReference,timeInfo:this._options.timeInfo,typeIdField:this._options.typeIdField??void 0,types:this._options.types??void 0,subtypeField:this._options.subtypeField,subtypes:this._options.subtypes??void 0,datesInUnknownTimezone:this._options.timeReferenceUnknownClient??void 0,dateFieldsTimeZone:this._options.dateFieldsTimeZone??void 0}}get fieldsIndex(){return this._fieldsIndex}get geometryType(){return"esriGeometryMultiPatch"===this._options.geometryType?"esriGeometryPolygon":this._options.geometryType}get hasZ(){return this._options.hasZ}get hasM(){return this._options.hasM}get serviceGeometryType(){return this._options.geometryType}get subtypeField(){return this._options.subtypeField}get timeInfo(){return this._options.timeInfo}get featureIdInfo(){return this._options.featureIdInfo}get globalIdField(){return this._options.globalIdField}get arcadeSchema(){return this._arcadeSchema}get spatialReference(){return this._spatialReference}get outSpatialReference(){return this._outSpatialReference}get attributeSpatialReference(){return this._attributeSpatialReference}get timeReferenceUnknownClient(){return this._options.timeReferenceUnknownClient}get layerType(){return this._options.layerType}weakCloneWithAdditionalFields(e){return new i({fieldsIndex:{fields:[...this._fieldsIndex.fields,...e],timeZoneByFieldName:null},geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM,globalIdField:this.globalIdField,featureIdInfo:this.featureIdInfo,spatialReference:this.spatialReference,attributeSpatialReference:this.attributeSpatialReference,outSpatialReference:this.outSpatialReference,subtypeField:this.subtypeField,subtypes:this._options.subtypes,timeInfo:this.timeInfo,timeReferenceUnknownClient:this.timeReferenceUnknownClient,dateFieldsTimeZone:this._options.dateFieldsTimeZone,typeIdField:this._options.typeIdField,types:this._options.types,layerType:this._options.layerType})}weakCloneWithResolvedSpatialReference(){return new i({fieldsIndex:{fields:this._fieldsIndex.fields,timeZoneByFieldName:null},geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM,globalIdField:this.globalIdField,featureIdInfo:this.featureIdInfo,spatialReference:this.outSpatialReference,outSpatialReference:this.outSpatialReference,attributeSpatialReference:this.attributeSpatialReference,subtypeField:this.subtypeField,subtypes:this._options.subtypes,timeInfo:this.timeInfo,timeReferenceUnknownClient:this.timeReferenceUnknownClient,dateFieldsTimeZone:this._options.dateFieldsTimeZone,typeIdField:this._options.typeIdField,types:this._options.types,layerType:this._options.layerType})}}class n extends i{static createGraphics(e){return new n({fieldsIndex:(new t).toJSON(),featureIdInfo:{type:"object-id",fieldName:"uid"},geometryType:null,hasZ:!1,hasM:!1,spatialReference:e,outSpatialReference:e,attributeSpatialReference:null,globalIdField:null,subtypeField:null,subtypes:null,timeInfo:null,typeIdField:null,types:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,layerType:null})}}export{i as FeatureMetadata,n as GraphicsMetadata};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{ArcadeDate as e}from"../../../../../arcade/ArcadeDate.js";import has from"../../../../../core/has.js";import{estimateNumberArrayMemory as t}from"../../../../../core/memoryEstimations.js";import{DateOnly as r}from"../../../../../core/sql/DateOnly.js";import{TimeOnly as s}from"../../../../../core/sql/TimeOnly.js";import{GeometryCursor as i}from"../../../../../geometry/GeometryCursor.js";import{fromRectValues as o}from"../../../../../geometry/support/aaBoundingBox.js";import{fromJSON as a}from"../../../../../geometry/support/jsonUtils.js";import{getLabelPoint as n}from"../../../../../geometry/support/labelPoint.js";import{quantizeX as d,quantizeY as u}from"../../../../../geometry/support/quantizationUtils.js";import{zScale as c}from"../../../../../geometry/support/zscale.js";import{getCentroidOptimizedGeometry as h}from"../../../../../layers/graphics/centroid.js";import{convertToGeometry as l,generalizeOptimizedGeometry as m,quantizeOptimizedGeometry as y,unquantizeOptimizedGeometryInPlace as f}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as p}from"../../../../../layers/graphics/OptimizedFeature.js";import g from"../../../../../layers/graphics/OptimizedGeometry.js";import{system as _,unknown as b}from"../../../../../time/constants.js";import{FeatureSetCache as x}from"./FeatureSetCache.js";const T=has("featurelayer-simplify-thresholds")??[.5,.5,.5,.5],D=T[0],F=T[1],I=T[2],S=T[3],A=has("featurelayer-simplify-payload-size-factors")??[1,2,4],j=A[0],B=A[1],C=A[2],G=has("featurelayer-simplify-mobile-factor")??2,M=has("esri-mobile"),v=4294967295;function O(e,t,r){if(!(e.length>t))for(;e.length<=t;)e.push(r)}class w{constructor(e){this.metadata=e,this.type="FeatureSetReader",this._overrides=null,this._postQueryFilteredIds=new Set,this._joined=[],this._objectIdToIndex=null,this._boundsBuffer=[],this._deleted=new Set,this._caches=new Map,this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}destroy(){}[Symbol.dispose](){this.destroy()}getAreaSimplificationThreshold(e,t){let r=1;const s=M?G:1;t>4e6?r=C*s:t>1e6?r=B*s:t>5e5?r=j*s:t>1e5&&(r=s);let i=0;return e>4e3?i=S*r:e>2e3?i=I*r:e>100?i=F:e>15&&(i=D),i}getBounds(e){O(this._boundsBuffer,4*this.getIndex()+4,0);const t=this.getBoundsXMin();if(t===v||!isFinite(t))return!1;if(0===this.getBoundsXMin()){const t=this.readGeometryWorldSpace();if(t?.isPoint&&0===t.coords[0]&&0===t.coords[1])return o(e,0,0,0,0),!0;if(!t)return this.setBoundsXMin(v),!1;let r=1/0,s=1/0,i=-1/0,a=-1/0;return t.forEachVertex((e,t)=>{r=Math.min(r,e),s=Math.min(s,t),i=Math.max(i,e),a=Math.max(a,t)}),this.setBoundsXMin(r),this.setBoundsYMin(s),this.setBoundsXMax(i),this.setBoundsYMax(a),o(e,r,s,i,a),!0}const r=this.getBoundsXMin(),s=this.getBoundsYMin(),i=this.getBoundsXMax(),a=this.getBoundsYMax();return o(e,r,s,i,a),!0}getBoundsXMin(){return this._boundsBuffer[4*this.getIndex()]}setBoundsXMin(e){this._boundsBuffer[4*this.getIndex()]=e}getBoundsYMin(){return this._boundsBuffer[4*this.getIndex()+1]}setBoundsYMin(e){this._boundsBuffer[4*this.getIndex()+1]=e}getBoundsXMax(){return this._boundsBuffer[4*this.getIndex()+2]}setBoundsXMax(e){this._boundsBuffer[4*this.getIndex()+2]=e}getBoundsYMax(){return this._boundsBuffer[4*this.getIndex()+3]}setBoundsYMax(e){this._boundsBuffer[4*this.getIndex()+3]=e}readAttributeAsTimestamp(e){const t=this.readAttribute(e);return"string"==typeof t?new Date(t).getTime():"number"==typeof t||null==t?t:null}readAttribute(e,t=!1){const r=this._readAttribute(e,t);if(void 0!==r)return r;for(const s of this._joined){s.setIndex(this.getIndex());const r=s._readAttribute(e,t);if(void 0!==r)return r}}readAttributes(){const e=this._readAttributes();for(const t of this._joined){t.setIndex(this.getIndex());const r=t._readAttributes();for(const t of Object.keys(r))e[t]=r[t]}return e}joinAttributes(e){this._joined.push(e)}registerOverrides(e){this._overrides=e}withoutOverrides(){const e=this.copy();return e._overrides=null,e}readOptimizedFeatureWorldSpace(){const e=this.readGeometryWorldSpace(),t=this.readAttributes(),r=this.readCentroidWorldSpace();return new p(e,t,r,this.getObjectId(),this.getDisplayId())}readLegacyFeatureForDisplay(){const e=this.readCentroidForDisplay();return{attributes:this.readAttributes(),geometry:this.readLegacyGeometryForDisplay(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyFeatureWorldSpace(){const e=this.readCentroidWorldSpace();return{attributes:this.readAttributes(),geometry:this._readLegacyGeometryWorldSpace(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyGeometryForDisplay(){const e=this.readGeometryForDisplay();return l(e,this.geometryType,!1,!1)}readXForDisplay(){return this._readX()}readYForDisplay(){return this._readY()}readXWorldSpace(){const e=this._readX(),t=this.getInTransform();return null==t?e:e*t.scale[0]+t.translate[0]}readYWorldSpace(){const e=this._readY(),t=this.getInTransform();return null==t?e:t.translate[1]-e*t.scale[1]}readGeometryForDisplay(){const e=this._readGeometryDeltaDecoded(!0);if(!e){const e=this._createDeltaQuantizedGeometryFromServerCentroid();return e?e.deltaDecode():null}return e}readGeometryForDisplayTransformed(e){let t=this.readGeometryForDisplay();if(t&&"esriGeometryPolyline"===this.metadata.geometryType&&(t=m(t,this.metadata.geometryType,e.scale[0])),t&&(t=y(t,this.metadata.geometryType,e,t.hasZ,t.hasM,!0)),!t){const t=this.readCentroidForDisplay();if(!t)return null;const r=d(e,t.coords[0]),s=u(e,t.coords[1]);return this._createDeltaQuantizedExtrudedGeometry(r,s).deltaDecode()}return t}_transformToWorldSpace(e){if(!e)return null;e=e.clone();const t=this.getInTransform();t&&f(e,t);const r=c(this.metadata.spatialReference,this.metadata.outSpatialReference);if(e.hasZ&&1!==r){const{stride:t,coords:s}=e;for(let e=2;e<s.length;e+=t)s[e]*=r}return e}readGeometryWorldSpace(){let e=this._readGeometry();return e||(e=this._createDeltaQuantizedGeometryFromServerCentroid()),this._transformToWorldSpace(e)}readCentroidForDisplay(){const e=this.readGeometryForDisplay();return e?this._computeDisplayCentroid(e):this._readServerCentroid()}readCentroidWorldSpace(){const e=this.readGeometryForDisplay(),t=e?this._computeDisplayCentroid(e):this._readServerCentroid();return this._transformToWorldSpace(t)}setCache(e){let t=this._caches.get(e);null==t&&(t=new x(this.getSize()),this._caches.set(e,t)),this._activeCache=t}setCachedValue(e){this._activeCache.set(this.getIndex(),e)}hasCachedValue(){return this._activeCache.has(this.getIndex())}getCachedValue(){return this._activeCache.get(this.getIndex())}delete(){this._deleted.add(this.getObjectId())}getByReferenceVertexCount(){return null}get underlyingMemory(){let e=0;e+=t(this._boundsBuffer);for(const t of this._caches.values())e+=t.usedMemory;return e}_readGeometryDeltaDecoded(e){const t=this._readGeometry(e);if("esriGeometryPoint"===this.geometryType||!t)return t;const r=this.getInTransform();if(!t||!r)return t;const s=r.scale[2]??1,i=r.translate[2]??0,o=r.scale[3]??1,a=r.translate[3]??0,{hasZ:n,hasM:d,stride:u,size:c,coords:h}=t,l=n&&(1!==s||0!==i),m=d&&(1!==o||0!==a);if(l||m){const e=2,t=n?3:2;for(let r=0,n=u*c;r<n;r+=u)l&&(h[r+e]=s*h[r+e]+i),m&&(h[r+t]=o*h[r+t]+a)}return t.deltaDecode()}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this.fields.has(e)||this._joined.some(t=>t.hasField(e))}geometry(){const e=this.readGeometryWorldSpace(),t=l(e,this.geometryType,this.hasZ,this.hasM),r=a(t);if(r){if(!this.metadata.outSpatialReference)throw new Error("InternalError: Expected spatial reference to be defined");r.spatialReference=this.metadata.outSpatialReference}return r}autocastArcadeDate(t,r){return r&&r instanceof Date?this.isUnknownDateTimeField(t)?e.unknownDateJSToArcadeDate(r):e.dateJSAndZoneToArcadeDate(r,this.contextTimeZone??_):r}isUnknownDateTimeField(e){return this.metadata.fieldsIndex.getTimeZone(e)===b}field(t){let i=this.fields.get(t);if(i)switch(i.type){case"date-only":case"esriFieldTypeDateOnly":return r.fromReader(this.readAttribute(t,!1));case"time-only":case"esriFieldTypeTimeOnly":return s.fromReader(this.readAttribute(t,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return e.fromReaderAsTimeStampOffset(this.readAttribute(t,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(t,this.readAttribute(t,!0));default:return this.readAttribute(t,!1)}for(const o of this._joined)if(o.setIndex(this.getIndex()),i=o.fields.get(t),i)switch(i.type){case"date-only":case"esriFieldTypeDateOnly":return r.fromReader(o._readAttribute(t,!1));case"time-only":case"esriFieldTypeTimeOnly":return s.fromReader(o._readAttribute(t,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return e.fromReaderAsTimeStampOffset(o._readAttribute(t,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(t,o._readAttribute(t,!0));default:return this.readAttribute(t,!1)}throw new Error(`Field ${t} does not exist`)}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this.fields.fields.map(e=>e.name)}isEmpty(){return this.fields.fields.length<=0&&null==this.geometry()}castToText(e=!1){if(!e)return JSON.stringify(this.readLegacyFeatureForDisplay());const t=this.readLegacyFeatureForDisplay();if(!t)return JSON.stringify(null);const r={geometry:t.geometry,attributes:{...t.attributes}};for(const s in r.attributes){const e=r.attributes[s];e instanceof Date&&(r.attributes[s]=e.getTime())}return JSON.stringify(r)}gdbVersion(){return null}fullSchema(){return this.metadata.arcadeSchema}castAsJson(e=null){return{attributes:this._readAttributes(),geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}applyPostQueryFilter(e){if(this._postQueryFilteredIds.clear(),!e)return;const t=this.getCursor();for(;t.next();){e.check(t,{currentUser:null})||this._postQueryFilteredIds.add(t.getObjectId())}}_getExists(){if(this._overrides){const e=this.getObjectId();return!this._overrides.hasOverride(e)}const e=this.getObjectId();return this._deleted.has(e)||!this._postQueryFilteredIds.has(e)}_computeDisplayCentroid(e){if(null==this.getInTransform())return h(e);const t=i.fromOptimized(e,this.geometryType);t.yFactor*=-1;const r=n(t);return r?isNaN(r[0])||isNaN(r[1])?h(e):(r[1]*=-1,new g([],r)):null}copyInto(e){e._joined=this._joined,e._overrides=this._overrides,e._objectIdToIndex=this._objectIdToIndex,e._boundsBuffer=this._boundsBuffer,e._activeCache=this._activeCache,e._caches=this._caches,e._contextTimeZone=this._contextTimeZone,e._postQueryFilteredIds=this._postQueryFilteredIds,e._deleted=this._deleted}_readLegacyGeometryWorldSpace(){const e=this.readGeometryWorldSpace();return l(e,this.geometryType,!1,!1)}_createDeltaQuantizedGeometryFromServerCentroid(){const e=this._readServerCentroid();if(!e)return null;const[t,r]=e.coords;return this._createDeltaQuantizedExtrudedGeometry(t,r)}_createDeltaQuantizedExtrudedGeometry(e,t){return"esriGeometryPolyline"===this.geometryType?this._createDeltaQuantizedExtrudedLine(e,t):this._createDeltaQuantizedExtrudedQuad(e,t)}_createDeltaQuantizedExtrudedQuad(e,t){return new g([5],[e-1,t,1,-1,1,1,-1,1,-1,-1])}_createDeltaQuantizedExtrudedLine(e,t){return new g([2],[e-1,t+1,1,-1])}}export{w as FeatureSetReader};
|
|
2
|
+
import{ArcadeDate as e}from"../../../../../arcade/ArcadeDate.js";import has from"../../../../../core/has.js";import{estimateNumberArrayMemory as t}from"../../../../../core/memoryEstimations.js";import{DateOnly as r}from"../../../../../core/sql/DateOnly.js";import{TimeOnly as s}from"../../../../../core/sql/TimeOnly.js";import{GeometryCursor as i}from"../../../../../geometry/GeometryCursor.js";import{fromRectValues as o}from"../../../../../geometry/support/aaBoundingBox.js";import{fromJSON as a}from"../../../../../geometry/support/jsonUtils.js";import{getLabelPoint as n}from"../../../../../geometry/support/labelPoint.js";import{quantizeX as d,quantizeY as u}from"../../../../../geometry/support/quantizationUtils.js";import{zScale as c}from"../../../../../geometry/support/zscale.js";import{getCentroidOptimizedGeometry as h}from"../../../../../layers/graphics/centroid.js";import{convertToGeometry as l,generalizeOptimizedGeometry as m,quantizeOptimizedGeometry as y,unquantizeOptimizedGeometryInPlace as f}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as p}from"../../../../../layers/graphics/OptimizedFeature.js";import g from"../../../../../layers/graphics/OptimizedGeometry.js";import{system as _,unknown as b}from"../../../../../time/constants.js";import{FeatureSetCache as x}from"./FeatureSetCache.js";const D=has("featurelayer-simplify-thresholds")??[.5,.5,.5,.5],T=D[0],F=D[1],I=D[2],S=D[3],A=has("featurelayer-simplify-payload-size-factors")??[1,2,4],j=A[0],B=A[1],C=A[2],G=has("featurelayer-simplify-mobile-factor")??2,M=has("esri-mobile"),v=4294967295;function O(e,t,r){if(!(e.length>t))for(;e.length<=t;)e.push(r)}class w{constructor(e){this.metadata=e,this.type="FeatureSetReader",this._overrides=null,this._postQueryFilteredIds=new Set,this._joined=[],this._objectIdToIndex=null,this._boundsBuffer=[],this._deleted=new Set,this._caches=new Map,this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}destroy(){}[Symbol.dispose](){this.destroy()}getAreaSimplificationThreshold(e,t){let r=1;const s=M?G:1;t>4e6?r=C*s:t>1e6?r=B*s:t>5e5?r=j*s:t>1e5&&(r=s);let i=0;return e>4e3?i=S*r:e>2e3?i=I*r:e>100?i=F:e>15&&(i=T),i}getBounds(e){O(this._boundsBuffer,4*this.getIndex()+4,0);const t=this.getBoundsXMin();if(t===v||!isFinite(t))return!1;if(0===this.getBoundsXMin()){const t=this.readGeometryWorldSpace();if(t?.isPoint&&0===t.coords[0]&&0===t.coords[1])return o(e,0,0,0,0),!0;if(!t)return this.setBoundsXMin(v),!1;let r=1/0,s=1/0,i=-1/0,a=-1/0;return t.forEachVertex((e,t)=>{r=Math.min(r,e),s=Math.min(s,t),i=Math.max(i,e),a=Math.max(a,t)}),this.setBoundsXMin(r),this.setBoundsYMin(s),this.setBoundsXMax(i),this.setBoundsYMax(a),o(e,r,s,i,a),!0}const r=this.getBoundsXMin(),s=this.getBoundsYMin(),i=this.getBoundsXMax(),a=this.getBoundsYMax();return o(e,r,s,i,a),!0}getBoundsXMin(){return this._boundsBuffer[4*this.getIndex()]}setBoundsXMin(e){this._boundsBuffer[4*this.getIndex()]=e}getBoundsYMin(){return this._boundsBuffer[4*this.getIndex()+1]}setBoundsYMin(e){this._boundsBuffer[4*this.getIndex()+1]=e}getBoundsXMax(){return this._boundsBuffer[4*this.getIndex()+2]}setBoundsXMax(e){this._boundsBuffer[4*this.getIndex()+2]=e}getBoundsYMax(){return this._boundsBuffer[4*this.getIndex()+3]}setBoundsYMax(e){this._boundsBuffer[4*this.getIndex()+3]=e}readAttributeAsTimestamp(e){const t=this.readAttribute(e);return"string"==typeof t?new Date(t).getTime():"number"==typeof t||null==t?t:null}readAttribute(e,t=!1){const r=this._readAttribute(e,t);if(void 0!==r)return r;for(const s of this._joined){s.setIndex(this.getIndex());const r=s._readAttribute(e,t);if(void 0!==r)return r}}readAttributes(){const e=this._readAttributes();for(const t of this._joined){t.setIndex(this.getIndex());const r=t._readAttributes();for(const t of Object.keys(r))e[t]=r[t]}return e}joinAttributes(e){this._joined.push(e)}registerOverrides(e){this._overrides=e}withoutOverrides(){const e=this.copy();return e._overrides=null,e}readOptimizedFeatureWorldSpace(){const e=this.readGeometryWorldSpace(),t=this.readAttributes(),r=this.readCentroidWorldSpace();return new p(e,t,r,this.getObjectId(),this.getDisplayId())}readLegacyFeatureForDisplay(){const e=this.readCentroidForDisplay();return{attributes:this.readAttributes(),geometry:this.readLegacyGeometryForDisplay(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyFeatureWorldSpace(){const e=this.readCentroidWorldSpace();return{attributes:this.readAttributes(),geometry:this._readLegacyGeometryWorldSpace(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyGeometryForDisplay(){const e=this.readGeometryForDisplay();return l(e,this.geometryType,!1,!1)}readXForDisplay(){return this._readX()}readYForDisplay(){return this._readY()}readXWorldSpace(){const e=this._readX(),t=this.getInTransform();return null==t?e:e*t.scale[0]+t.translate[0]}readYWorldSpace(){const e=this._readY(),t=this.getInTransform();return null==t?e:t.translate[1]-e*t.scale[1]}readGeometryForDisplay(){const e=this._readGeometryDeltaDecoded(!0);if(!e){const e=this._createDeltaQuantizedGeometryFromServerCentroid();return e?e.deltaDecode():null}return e}readGeometryForDisplayTransformed(e){let t=this.readGeometryForDisplay();if(t&&"esriGeometryPolyline"===this.metadata.geometryType&&(t=m(t,this.metadata.geometryType,e.scale[0])),t&&(t=y(t,this.metadata.geometryType,e,t.hasZ,t.hasM,!0)),!t){const t=this.readCentroidForDisplay();if(!t)return null;const r=d(e,t.coords[0]),s=u(e,t.coords[1]);return this._createDeltaQuantizedExtrudedGeometry(r,s).deltaDecode()}return t}_transformToWorldSpace(e){if(!e)return null;e=e.clone();const t=this.getInTransform();t&&f(e,t);const r=c(this.metadata.spatialReference,this.metadata.outSpatialReference);if(e.hasZ&&1!==r){const{stride:t,coords:s}=e;for(let e=2;e<s.length;e+=t)s[e]*=r}return e}readGeometryWorldSpace(){let e=this._readGeometry();return e||(e=this._createDeltaQuantizedGeometryFromServerCentroid()),this._transformToWorldSpace(e)}readCentroidForDisplay(){const e=this.readGeometryForDisplay();return e?this._computeDisplayCentroid(e):this._readServerCentroid()}readCentroidWorldSpace(){const e=this.readGeometryForDisplay(),t=e?this._computeDisplayCentroid(e):this._readServerCentroid();return this._transformToWorldSpace(t)}setCache(e){let t=this._caches.get(e);null==t&&(t=new x(this.getSize()),this._caches.set(e,t)),this._activeCache=t}setCachedValue(e){this._activeCache.set(this.getIndex(),e)}hasCachedValue(){return this._activeCache.has(this.getIndex())}getCachedValue(){return this._activeCache.get(this.getIndex())}delete(){this._deleted.add(this.getObjectId())}getByReferenceVertexCount(){return null}get underlyingMemory(){let e=0;e+=t(this._boundsBuffer);for(const t of this._caches.values())e+=t.usedMemory;return e}getDisplayTransform(){return null}_readGeometryDeltaDecoded(e){const t=this._readGeometry(e);if("esriGeometryPoint"===this.geometryType||!t)return t;const r=this.getInTransform();if(!t||!r)return t;const s=r.scale[2]??1,i=r.translate[2]??0,o=r.scale[3]??1,a=r.translate[3]??0,{hasZ:n,hasM:d,stride:u,size:c,coords:h}=t,l=n&&(1!==s||0!==i),m=d&&(1!==o||0!==a);if(l||m){const e=2,t=n?3:2;for(let r=0,n=u*c;r<n;r+=u)l&&(h[r+e]=s*h[r+e]+i),m&&(h[r+t]=o*h[r+t]+a)}return t.deltaDecode()}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this.fields.has(e)||this._joined.some(t=>t.hasField(e))}geometry(){const e=this.readGeometryWorldSpace(),t=l(e,this.geometryType,this.hasZ,this.hasM),r=a(t);if(r){if(!this.metadata.outSpatialReference)throw new Error("InternalError: Expected spatial reference to be defined");r.spatialReference=this.metadata.outSpatialReference}return r}autocastArcadeDate(t,r){return r&&r instanceof Date?this.isUnknownDateTimeField(t)?e.unknownDateJSToArcadeDate(r):e.dateJSAndZoneToArcadeDate(r,this.contextTimeZone??_):r}isUnknownDateTimeField(e){return this.metadata.fieldsIndex.getTimeZone(e)===b}field(t){let i=this.fields.get(t);if(i)switch(i.type){case"date-only":case"esriFieldTypeDateOnly":return r.fromReader(this.readAttribute(t,!1));case"time-only":case"esriFieldTypeTimeOnly":return s.fromReader(this.readAttribute(t,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return e.fromReaderAsTimeStampOffset(this.readAttribute(t,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(t,this.readAttribute(t,!0));default:return this.readAttribute(t,!1)}for(const o of this._joined)if(o.setIndex(this.getIndex()),i=o.fields.get(t),i)switch(i.type){case"date-only":case"esriFieldTypeDateOnly":return r.fromReader(o._readAttribute(t,!1));case"time-only":case"esriFieldTypeTimeOnly":return s.fromReader(o._readAttribute(t,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return e.fromReaderAsTimeStampOffset(o._readAttribute(t,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(t,o._readAttribute(t,!0));default:return this.readAttribute(t,!1)}throw new Error(`Field ${t} does not exist`)}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this.fields.fields.map(e=>e.name)}isEmpty(){return this.fields.fields.length<=0&&null==this.geometry()}castToText(e=!1){if(!e)return JSON.stringify(this.readLegacyFeatureForDisplay());const t=this.readLegacyFeatureForDisplay();if(!t)return JSON.stringify(null);const r={geometry:t.geometry,attributes:{...t.attributes}};for(const s in r.attributes){const e=r.attributes[s];e instanceof Date&&(r.attributes[s]=e.getTime())}return JSON.stringify(r)}gdbVersion(){return null}fullSchema(){return this.metadata.arcadeSchema}castAsJson(){return{attributes:this._readAttributes(),geometry:this.geometry()?.toJSON()??null}}castAsJsonAsync(){return Promise.resolve(this.castAsJson())}applyPostQueryFilter(e){if(this._postQueryFilteredIds.clear(),!e)return;const t=this.getCursor();for(;t.next();){e.check(t,{currentUser:null})||this._postQueryFilteredIds.add(t.getObjectId())}}_getExists(){if(this._overrides){const e=this.getObjectId();return!this._overrides.hasOverride(e)}const e=this.getObjectId();return this._deleted.has(e)||!this._postQueryFilteredIds.has(e)}_computeDisplayCentroid(e){if(null==this.getInTransform())return h(e);const t=i.fromOptimized(e,this.geometryType);t.yFactor*=-1;const r=n(t);return r?isNaN(r[0])||isNaN(r[1])?h(e):(r[1]*=-1,new g([],r)):null}copyInto(e){e._joined=this._joined,e._overrides=this._overrides,e._objectIdToIndex=this._objectIdToIndex,e._boundsBuffer=this._boundsBuffer,e._activeCache=this._activeCache,e._caches=this._caches,e._contextTimeZone=this._contextTimeZone,e._postQueryFilteredIds=this._postQueryFilteredIds,e._deleted=this._deleted}_readLegacyGeometryWorldSpace(){const e=this.readGeometryWorldSpace();return l(e,this.geometryType,!1,!1)}_createDeltaQuantizedGeometryFromServerCentroid(){const e=this._readServerCentroid();if(!e)return null;const[t,r]=e.coords;return this._createDeltaQuantizedExtrudedGeometry(t,r)}_createDeltaQuantizedExtrudedGeometry(e,t){return"esriGeometryPolyline"===this.geometryType?this._createDeltaQuantizedExtrudedLine(e,t):this._createDeltaQuantizedExtrudedQuad(e,t)}_createDeltaQuantizedExtrudedQuad(e,t){return new g([5],[e-1,t,1,-1,1,1,-1,1,-1,-1])}_createDeltaQuantizedExtrudedLine(e,t){return new g([2],[e-1,t+1,1,-1])}}export{w as FeatureSetReader};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{baseObjectMemory as
|
|
2
|
+
import{baseObjectMemory as r}from"../../../../../core/memoryEstimations.js";import{normalizeTransform as e,quantizeX as t,quantizeY as s}from"../../../../../geometry/support/quantizationUtils.js";import{convertToGeometry as a}from"../../../../../layers/graphics/featureConversionUtils.js";import{FeatureSetReader as i}from"./FeatureSetReader.js";class d extends i{static from(r,e){if(r instanceof this){const t=new Set(e),s=r._indices.filter(r=>t.has(r));return new d(r._reader,s)}return new d(r.copy(),e)}constructor(r,e){super(r.metadata),this._currentIndex=-1,this._displayTransform=null,this._reader=r,this._indices=e}setTransformForDisplay(r){const t=this._reader.getInTransform();if(null==t)return void(this._displayTransform=e(r));const s=e(t),a=e(r),[i,d]=s.scale,[n,o]=s.translate,[h,u]=a.scale,[_,l]=a.translate,y=i/h,c=d/u,p=(n-_)/h,m=(o-l)/u;this._displayTransform={originPosition:"lowerLeft",scale:[1/y,1/c,1,1],translate:[-p/y,-m/c,0,0]}}getInTransform(){return this._reader.getInTransform()}getDisplayTransform(){return this._displayTransform}get fields(){return this._reader.fields}get hasNext(){return this._currentIndex+1<this._indices.length}getSize(){return this._indices.length}getCursor(){return this.copy()}copy(){const r=new d(this._reader.copy(),this._indices);return r._currentIndex=this._currentIndex,r._displayTransform=this._displayTransform,r._processorAttributes=this._processorAttributes,r}get contextTimeZone(){return this._reader.contextTimeZone}set contextTimeZone(r){this._reader.contextTimeZone=r}get usedMemory(){return r+this._reader.usedMemory}setProcessorAttributes(r){this._processorAttributes=Object.assign(this._processorAttributes??{},r)}_nextIndex(){return++this._currentIndex<this._indices.length&&(this._reader.setIndex(this._indices[this._currentIndex]),!0)}next(){for(;this._nextIndex()&&!this._reader._getExists(););return this._currentIndex<this._indices.length}readXForDisplay(){return this._displayTransform?t(this._displayTransform,this._reader.readXForDisplay()):this._reader.readXForDisplay()}readYForDisplay(){return this._displayTransform?s(this._displayTransform,this._reader.readYForDisplay()):this._reader.readYForDisplay()}readGeometryForDisplay(){return this._displayTransform?this._reader.readGeometryForDisplayTransformed(this._displayTransform):this._reader.readGeometryForDisplay()}readCentroidForDisplay(){const r=this._reader.readCentroidForDisplay()?.clone();if(r){const[e,a]=r.coords;this._displayTransform&&(r.coords[0]=t(this._displayTransform,e),r.coords[1]=s(this._displayTransform,a))}return r}get geometryType(){return this._reader.geometryType}get hasFeatures(){return this._reader.hasFeatures}get exceededTransferLimit(){return this._reader.exceededTransferLimit}get hasZ(){return this._reader.hasZ}get hasM(){return this._reader.hasM}readAttribute(r,e=!1){const t=this._reader.readAttribute(r,e);return null==t&&this._processorAttributes?this._processorAttributes[r]:t}readAttributes(){return{...this._processorAttributes,...this._reader.readAttributes()}}joinAttributes(r){return this._reader.joinAttributes(r)}getBounds(r){return this._reader.getBounds(r)}getAttributeHash(){return this._reader.getAttributeHash()}getObjectId(){return this._reader.getObjectId()}getDisplayId(){return this._reader.getDisplayId()}setDisplayId(r){return this._reader.setDisplayId(r)}setIndex(r){return this._reader.setIndex(r)}getIndex(){return this._reader.getIndex()}readXWorldSpace(){return this._reader.readXWorldSpace()}readYWorldSpace(){return this._reader.readYWorldSpace()}_readX(){return this._reader.readXForDisplay()}_readY(){return this._reader.readYForDisplay()}_readServerCentroid(){return this._reader._readServerCentroid()}readLegacyFeatureForDisplay(){const r=this.readCentroidForDisplay();return{attributes:this.readAttributes(),geometry:this.readLegacyGeometryForDisplay(),centroid:(r&&{x:r.coords[0],y:r.coords[1]})??null}}readLegacyGeometryForDisplay(){const r=this.readGeometryForDisplay();return a(r,this.geometryType,!1,!1)}readGeometryArea(){return this._displayTransform?this._reader.readGeometryForDisplayTransformed(this._displayTransform)?.area()??0:this._reader.readGeometryArea()}readGeometryWorldSpace(){return this._reader.readGeometryWorldSpace()}_readGeometry(){return this._reader._readGeometry()}_readAttribute(r,e){throw new Error("Error: Should not be called. Underlying _reader should be used instead")}_readAttributes(){throw new Error("Error: Should not be called. Underlying _reader should be used instead")}readArcadeFeature(){return this._reader.readArcadeFeature()}geometry(){return this._reader.geometry()}field(r){return this._reader.field(r)}hasField(r){return this._reader.hasField(r)}setField(r,e){return this._reader.setField(r,e)}keys(){return this._reader.keys()}castToText(r=!1){return this._reader.castToText(r)}}export{d as FeatureSetReaderIndirect};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import i from"../../../../../core/Error.js";import{deg2rad as t,rad2deg as n}from"../../../../../core/mathUtils.js";import{dist as e,set as s,equals as o,subtract as r,len as h,scale as l}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as m,create as _}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{isPolygon as a}from"../../../../../geometry/support/jsonTypeUtils.js";import d from"../../../../../layers/support/FieldsIndex.js";import{createRendererExpression as u}from"../../../../../support/ArcadeExpression.js";import{fromCIMHorizontalAlignment as g,fromCIMVerticalAlignment as c,fromCIMFontDecoration as x}from"../../../../../symbols/cim/utils.js";import P from"../../../arcade/callExpressionWithFeature.js";import{glyphSize as b,magicLabelLineHeight as f}from"../../../engine/webgl/definitions.js";import p from"../../../engine/webgl/Rect.js";import{shapeGlyphs as y}from"../../../engine/webgl/mesh/templates/shapingUtils.js";import{queryPointOnLine as D,angleFromXAxis as S,intersectRaysByPointsAndAngles as L}from"../../features/support/FeatureSetReaderDimensionJSON.js";import{roundPtToWholePixel as M,getLineWidth as E}from"../../graphics/graphicsUtils.js";import{DimensionRealFieldName as T}from"./dimensionUtils.js";import{getAttributeValue as w}from"./utils.js";class k{static async create(i,t,n,e){const s=e(i.textSymbol),o=new k(i,s);return await o.initialize(t,n),o}constructor(i,t){if(this._dimensionStyle=i,this._mosaicItems=t,this._textString=null,this._displayExtLines=!0,this._systemLength=0,this._dimensionAngleRad=0,this._dimensionLength=0,this._dimensionDirection=null,this._textSize=null,this._extAngleRad=Math.PI/2,this._compiledExpression=null,this._fieldsIndex=null,this._beginBaselinePoint=null,this._endBaselinePoint=null,this._dimensionLinePoint=null,this._beginDimensionPoint=null,this._endDimensionPoint=null,this._beginMarkerRect=null,this._endMarkerRect=null,this._textRect=null,this._textPoint=null,this._dimensionPolyline=null,this._dimensionExtensionLines=null,this._hasTextPoint=!1,this._doMarkersFit=!0,this._dimensionIsEvaluated=!1,null==i)throw new Error("dimension syle must be defined!")}async initialize(t,n){if(!this._dimensionStyle)return;const{attributes:e}=t;if("Expression"===(this._dimensionStyle.textOption??"None")){const{expression:e,expressionParserName:s}=this._dimensionStyle;if(e&&s){if(s&&"arcade"!==s.toLocaleLowerCase())throw new i("dimension-layer",`Unsupported expression parser (${s}) for dimension text.`);this._compiledExpression=await u(e,n),this._fieldsIndex=N(t)}}const s=Number(w(T.extAngle,e));this._extAngleRad=isNaN(s)?Math.PI/2:s,this._systemLength=Number(w("__SYSTEM_LENGTH__",e));const{geometry:o}=t;if(o&&!a(o))throw new i("dimension-layer","processed geometry must be a valid 'polygon'.");const r=o?.rings[0];if(!r||r.length<3)throw new i("dimension-layer","processed geometry must have at least 3 points.");this._hasTextPoint=0!==r[3][0]&&0!==r[3][1]&&void 0!==r[3][0]&&void 0!==r[3][1],this._hasTextPoint&&(this._textPoint=r[3]);const h=this._dimensionStyle.textSymbol;e.__DIMENSION_ANGLE__+=h?.angle??0}getTextString(i){return null==this._textString&&(this._textString=this._getDimensionText(i)),this._textString}get textSymbol(){return this._dimensionStyle.textSymbol??null}get beginBaselinePoint(){return this._beginBaselinePoint}get endBaselinePoint(){return this._endBaselinePoint}get beginDimensionPoint(){return this._beginDimensionPoint}get endDimensionPoint(){return this._endDimensionPoint}get textPoint(){return this._textPoint}get dimensionLine(){return this._dimensionPolyline}get extensionLines(){return this._displayExtLines?this._dimensionExtensionLines:null}evaluateWithGeometry(i,t){this._dimensionIsEvaluated||(this._computeDimensionLineInfo(i,t),this._evaluateDefaultPlacement(t),this._updateExtensionLines(t),this._updateTextPoint(t),this._offsetTextPoint(t),this._dimensionIsEvaluated=!0)}_updateTextPoint(i){if(this._hasTextPoint)return;const{textFit:t}=this._dimensionStyle;let n=!0;if(!this._doMarkersFit){if(this._hasTextPoint)return;if("None"===t||!this._beginMarkerRect||!this._endMarkerRect||!this._textRect)return void(n=!0);if((B(this._beginMarkerRect,this._textRect)||B(this._endMarkerRect,this._textRect))&&(n=!1),!n){const n=i*(this._textRect.width/2);"MoveBegin"===t?this._textPoint=D(this._beginDimensionPoint,this._endDimensionPoint,-n):"MoveEnd"===t&&(this._textPoint=D(this._endDimensionPoint,this._beginDimensionPoint,-n))}}}_offsetTextPoint(i){if(this._hasTextPoint)return;const t=this._textPoint;if(!t)return;const n=.5*this._textSize*i,e=-n*this._dimensionDirection[1],s=n*this._dimensionDirection[0];t[0]+=e,t[1]+=s}_updateExtensionLines(i){if(!(this._displayExtLines&&this._beginDimensionPoint&&this._dimensionLinePoint&&this._endDimensionPoint))return;const{extensionLineOvershot:t,extensionLineOffset:n}=this._dimensionStyle;let s=this._dimensionLinePoint,o=this._endDimensionPoint;null==t||isNaN(t)||0===t||(s=D(this._dimensionLinePoint,this._beginBaselinePoint,-t*i),o=D(this._endDimensionPoint,this._endBaselinePoint,-t*i));let r=this._beginBaselinePoint,h=this._endBaselinePoint;if(null!=n&&!isNaN(n)&&0!==n){const i=e(s,this._beginBaselinePoint),t=e(o,this._endBaselinePoint);r=D(s,this._beginBaselinePoint,i-n),h=D(o,this._endBaselinePoint,t-n)}this._dimensionExtensionLines=[[s,r],[o,h]]}_computeDimensionLineInfo(e,d){if(!e||!a(e)||e.rings[0].length<3)throw new i("DimensionLayerView: bad geometry","Dimension cann't be applied to an empty geometry!");const u=e.rings[0],g=m(u[0][0],u[0][1]),c=m(u[1][0],u[1][1]),x=m(u[2][0],u[2][1]);this._beginBaselinePoint=s(_(),g[0],g[1]),this._endBaselinePoint=s(_(),c[0],c[1]),this._dimensionLinePoint=x;let P=this._extAngleRad;if(o(g,x))this._beginDimensionPoint=s(_(),g[0],g[1]),this._endDimensionPoint=s(_(),c[0],c[1]),this._displayExtLines=!1;else{const e=S([c[0]-g[0],c[1]-g[1]]),o=n(P);o>=-1&&o<=1?P+=t(1):o>=179&&o<=181&&(P-=t(1));const r=L(x,e,c,e+P);if(!r)throw new i("DimensionLayerView: bad geometry","Failed to construct dimension extension lines!");this._beginDimensionPoint=s(_(),x[0],x[1]),this._endDimensionPoint=s(_(),r[0],r[1])}this._dimensionDirection=r(_(),this._endDimensionPoint,this._beginDimensionPoint),this._dimensionLength=h(this._dimensionDirection),this._dimensionDirection=l(this._dimensionDirection,this._dimensionDirection,1/this._dimensionLength),this._hasTextPoint||(this._textPoint=D(this._beginDimensionPoint,this._endDimensionPoint,this._dimensionLength/2))}_evaluateDefaultPlacement(i){const{beginMarkerSymbol:t,endMarkerSymbol:n}=this._dimensionStyle,e=this._measureMarkerSymbolSize(t,this._beginDimensionPoint,this._dimensionAngleRad,i),s=this._measureMarkerSymbolSize(n,this._endDimensionPoint,this._dimensionAngleRad+Math.PI,i),o=this._measureDimensionText(this._textString||"",this._textPoint,i);this._textRect=o;const r=i*((e?.width??0)/2),h=i*((s?.width??0)/2);if(e&&this._beginDimensionPoint&&(e.x+=this._beginDimensionPoint[0],e.y+=this._beginDimensionPoint[1]),s&&this._endDimensionPoint&&(s.x+=this._endDimensionPoint[0],s.y+=this._endDimensionPoint[1]),this._beginMarkerRect=e,this._endMarkerRect=s,this._doMarkersFit=this._checkMarkerFit(e,s,o,i),this._doMarkersFit){const i=D(this._beginDimensionPoint,this._endDimensionPoint,this._dimensionLength/2);this._dimensionPolyline=[[i,this._beginDimensionPoint],[i,this._endDimensionPoint]]}else{const i=D(this._beginDimensionPoint,this._endDimensionPoint,-4*r),t=D(this._beginDimensionPoint,this._endDimensionPoint,this._dimensionLength+4*h);this._dimensionPolyline=[[i,this._beginDimensionPoint],[t,this._endDimensionPoint]]}}_checkMarkerFit(i,t,n,e){if(!i||!t)return!1;const{markerFit:s,markerOption:o,markerFitTolerance:r}=this._dimensionStyle;if("None"===s)return!0;let h=!0;if("Tolerance"===s)r*e>=this._dimensionLength&&(h=!1);else{if(this._hasTextPoint&&"Both"!==o)return!0;this._hasTextPoint&&"Both"===o?B(i,t)&&(h=!1):(B(i,t)&&(h=!1),h&&n&&(B(n,i)||B(n,t))&&(h=!1))}return h}_measureDimensionText(i,t,n){if(null==this._textString||null==t||null==this._mosaicItems)return null;const e=[];for(const g of i)g.codePointAt(0),e.push(this._mosaicItems.glyphs[g.codePointAt(0)]);const s=this._dimensionStyle.textSymbol;if(!s)return null;const o=g(s.horizontalAlignment),r=c(s.verticalAlignment),h=x(s),l=M(s.height||10);this._textSize=l;const m=!0,_=s.angle||0,a=l/b,d=E(s.lineWidth),u=f*Math.max(.25,Math.min(l||1,4)),P={...this._mosaicItems,glyphs:e.filter(i=>null!=i)},D=y(P,{scale:a,angle:_,xOffset:0,yOffset:0,horizontalAlignment:o,verticalAlignment:r,decoration:h,lineHeight:u,useCIMAngleBehavior:m,maxLineWidth:d,hasBackground:!1}),S=t;if(!S)return null;const L=n,T=[D.bounds.blX,D.bounds.trY],w=[D.bounds.trX,D.bounds.trY],k=[D.bounds.blX,D.bounds.blY],N=[D.bounds.trX,D.bounds.blY];return T[0]-=D.bounds.x,T[1]-=D.bounds.y,w[0]-=D.bounds.x,w[1]-=D.bounds.y,k[0]-=D.bounds.x,k[1]-=D.bounds.y,N[0]-=D.bounds.x,N[1]-=D.bounds.y,T[0]*=L,T[1]*=L,w[0]*=L,w[1]*=L,k[0]*=L,k[1]*=L,N[0]*=L,N[1]*=L,T[0]+=S[0],T[1]+=S[1],w[0]+=S[0],w[1]+=S[1],k[0]+=S[0],k[1]+=S[1],N[0]+=S[0],N[1]+=S[1],new p(w[0],w[1],1.1*Math.abs(T[0]-w[0]),1.1*Math.abs(N[1]-w[1]))}_measureMarkerSymbolSize(i,t,n,e){return i?new p(-16,-16,32,32):null}_getDimensionText(i){const{attributes:t}=i;let n=null;const e=1===Number(w(T.useCustomLength,t));n=Number(w(e?T.customLength:T.dimLength,t)),(0===n||isNaN(n)||null==n)&&(n=this._systemLength);let s=this._getDimensionString(n,i);return"number"==typeof s&&(s=s.toString()),t.__COMPUTED_TEXT_STRING__=s,s||""}_getDimensionString(i,t){const{convertUnits:n,displayUnits:e,displayPrecision:s,prefix:o,suffix:r,textOption:h}=this._dimensionStyle;if("None"===h)return null;if("Expression"===h&&this._compiledExpression&&t)return P(this._compiledExpression,t,{},"esriGeometryPolyline",this._fieldsIndex);let l=(i=null==s||isNaN(s)?parseFloat(i.toString()):parseFloat(i.toFixed(s))).toString();return"Suffix"===h&&(o&&(l=`${o} ${l}`),r&&(l=`${l} ${r}`)),l}}function N(i){const{attributes:t}=i,n=Object.keys(T).map(i=>({name:i,alias:i,type:"string"==typeof t[i]?"esriFieldTypeString":"esriFieldTypeDouble"}));return new d(n)}function R(i){return{left:i.x,right:i.x+i.width,top:i.y+i.height,bottom:i.y}}function B(i,t){const n=R(i),e=R(t),s=n.left<=e.right&&e.left<=n.right,o=n.bottom<=e.top&&e.bottom<=n.top;return s&&o}export{k as default};
|
|
2
|
+
import i from"../../../../../core/Error.js";import{deg2rad as t,rad2deg as n}from"../../../../../core/mathUtils.js";import{dist as e,set as s,equals as o,subtract as r,len as h,scale as l}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as m,create as _}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{isPolygon as a}from"../../../../../geometry/support/jsonTypeUtils.js";import d from"../../../../../layers/support/FieldsIndex.js";import{createRendererExpression as u}from"../../../../../support/ArcadeExpression.js";import{fromCIMHorizontalAlignment as g,fromCIMVerticalAlignment as c,fromCIMFontDecoration as x}from"../../../../../symbols/cim/utils.js";import P from"../../../arcade/callExpressionWithFeature.js";import{glyphSize as b,magicLabelLineHeight as f}from"../../../engine/webgl/definitions.js";import p from"../../../engine/webgl/Rect.js";import{shapeGlyphs as y}from"../../../engine/webgl/mesh/templates/shapingUtils.js";import{roundPtToWholePixel as D,getLineWidth as S}from"../../graphics/graphicsUtils.js";import{initializeDimensionStyleDefaults as L}from"./dimensionStyleDefaults.js";import{DimensionRealFieldName as M,queryPointOnLine as w,angleFromXAxis as E,intersectRaysByPointsAndAngles as T}from"./dimensionUtils.js";import{getAttributeValue as k}from"./utils.js";class N{static async create(i,t,n,e){const s=e(i.textSymbol),o=new N(i,s);return await o.initialize(t,n),o}constructor(i,t){if(this._dimensionStyle=i,this._mosaicItems=t,this._textString=null,this._displayExtLines=!0,this._systemLength=0,this._dimensionAngleRad=0,this._dimensionLength=0,this._dimensionDirection=null,this._textSize=null,this._extAngleRad=Math.PI/2,this._compiledExpression=null,this._fieldsIndex=null,this._beginBaselinePoint=null,this._endBaselinePoint=null,this._dimensionLinePoint=null,this._beginDimensionPoint=null,this._endDimensionPoint=null,this._beginMarkerRect=null,this._endMarkerRect=null,this._textRect=null,this._textPoint=null,this._dimensionPolyline=null,this._dimensionExtensionLines=null,this._hasTextPoint=!1,this._doMarkersFit=!0,this._dimensionIsEvaluated=!1,null==i)throw new Error("dimension syle must be defined!");L(i)}async initialize(t,n){if(!this._dimensionStyle)return;const{attributes:e}=t;if("Expression"===(this._dimensionStyle.textOption??"None")){const{expression:e,expressionParserName:s}=this._dimensionStyle;if(e&&s){if(s&&"arcade"!==s.toLocaleLowerCase())throw new i("dimension-layer",`Unsupported expression parser (${s}) for dimension text.`);this._compiledExpression=await u(e,n),this._fieldsIndex=R(t)}}const s=Number(k(M.extAngle,e));this._extAngleRad=isNaN(s)?Math.PI/2:s,this._systemLength=Number(k("__SYSTEM_LENGTH__",e));const{geometry:o}=t;if(o&&!a(o))throw new i("dimension-layer","processed geometry must be a valid 'polygon'.");const r=o?.rings[0];if(!r||r.length<3)throw new i("dimension-layer","processed geometry must have at least 3 points.");this._hasTextPoint=0!==r[3][0]&&0!==r[3][1]&&void 0!==r[3][0]&&void 0!==r[3][1],this._hasTextPoint&&(this._textPoint=r[3]);const h=this._dimensionStyle.textSymbol;e.__DIMENSION_ANGLE__+=h?.angle??0}getTextString(i){return null==this._textString&&(this._textString=this._getDimensionText(i)),this._textString}get textSymbol(){return this._dimensionStyle.textSymbol??null}get beginBaselinePoint(){return this._beginBaselinePoint}get endBaselinePoint(){return this._endBaselinePoint}get beginDimensionPoint(){return this._beginDimensionPoint}get endDimensionPoint(){return this._endDimensionPoint}get textPoint(){return this._textPoint}get dimensionLine(){return this._dimensionPolyline}get extensionLines(){return this._displayExtLines?this._dimensionExtensionLines:null}evaluateWithGeometry(i,t){this._dimensionIsEvaluated||(this._computeDimensionLineInfo(i,t),this._evaluateDefaultPlacement(t),this._updateExtensionLines(t),this._updateTextPoint(t),this._offsetTextPoint(t),this._dimensionIsEvaluated=!0)}_updateTextPoint(i){if(this._hasTextPoint)return;const{textFit:t}=this._dimensionStyle;let n=!0;if(!this._doMarkersFit){if(this._hasTextPoint)return;if("None"===t||!this._beginMarkerRect||!this._endMarkerRect||!this._textRect)return void(n=!0);if((v(this._beginMarkerRect,this._textRect)||v(this._endMarkerRect,this._textRect))&&(n=!1),!n){const n=this._textRect.width/2,e=this._beginMarkerRect.width/2*i,s=this._endMarkerRect.width/2*i;"MoveBegin"===t?this._textPoint=w(this._beginDimensionPoint,this._endDimensionPoint,-(n+e)):"MoveEnd"===t&&(this._textPoint=w(this._endDimensionPoint,this._beginDimensionPoint,-(n+s)))}}}_offsetTextPoint(i){if(this._hasTextPoint)return;const t=this._textPoint;if(!t)return;const n=.5*this._textSize*i,e=-n*this._dimensionDirection[1],s=n*this._dimensionDirection[0];t[0]+=e,t[1]+=s}_updateExtensionLines(i){if(!(this._displayExtLines&&this._beginDimensionPoint&&this._dimensionLinePoint&&this._endDimensionPoint))return;const{extensionLineOvershot:t,extensionLineOffset:n}=this._dimensionStyle;let s=this._dimensionLinePoint,o=this._endDimensionPoint;null==t||isNaN(t)||0===t||(s=w(this._dimensionLinePoint,this._beginBaselinePoint,-t*i),o=w(this._endDimensionPoint,this._endBaselinePoint,-t*i));let r=this._beginBaselinePoint,h=this._endBaselinePoint;if(null!=n&&!isNaN(n)&&0!==n){const i=e(s,this._beginBaselinePoint),t=e(o,this._endBaselinePoint);r=w(s,this._beginBaselinePoint,i-n),h=w(o,this._endBaselinePoint,t-n)}this._dimensionExtensionLines=[[s,r],[o,h]]}_computeDimensionLineInfo(e,d){if(!e||!a(e)||e.rings[0].length<3)throw new i("DimensionLayerView: bad geometry","Dimension cann't be applied to an empty geometry!");const u=e.rings[0],g=m(u[0][0],u[0][1]),c=m(u[1][0],u[1][1]),x=m(u[2][0],u[2][1]);this._beginBaselinePoint=s(_(),g[0],g[1]),this._endBaselinePoint=s(_(),c[0],c[1]),this._dimensionLinePoint=x;let P=this._extAngleRad;if(o(g,x))this._beginDimensionPoint=s(_(),g[0],g[1]),this._endDimensionPoint=s(_(),c[0],c[1]),this._displayExtLines=!1;else{const e=E([c[0]-g[0],c[1]-g[1]]),o=n(P);o>=-1&&o<=1?P+=t(1):o>=179&&o<=181&&(P-=t(1));const r=T(x,e,c,e+P);if(!r)throw new i("DimensionLayerView: bad geometry","Failed to construct dimension extension lines!");this._beginDimensionPoint=s(_(),x[0],x[1]),this._endDimensionPoint=s(_(),r[0],r[1])}this._dimensionDirection=r(_(),this._endDimensionPoint,this._beginDimensionPoint),this._dimensionLength=h(this._dimensionDirection),this._dimensionDirection=l(this._dimensionDirection,this._dimensionDirection,1/this._dimensionLength),this._hasTextPoint||(this._textPoint=w(this._beginDimensionPoint,this._endDimensionPoint,this._dimensionLength/2))}_evaluateDefaultPlacement(i){const{beginMarkerSymbol:t,endMarkerSymbol:n}=this._dimensionStyle,e=this._measureMarkerSymbolSize(t,this._beginDimensionPoint,this._dimensionAngleRad,i),s=this._measureMarkerSymbolSize(n,this._endDimensionPoint,this._dimensionAngleRad+Math.PI,i),o=this._measureDimensionText(this._textString||"",this._textPoint,i);this._textRect=o;const r=i*((e?.width??0)/2),h=i*((s?.width??0)/2);if(e&&this._beginDimensionPoint&&(e.x+=this._beginDimensionPoint[0],e.y+=this._beginDimensionPoint[1]),s&&this._endDimensionPoint&&(s.x+=this._endDimensionPoint[0],s.y+=this._endDimensionPoint[1]),this._beginMarkerRect=e,this._endMarkerRect=s,this._doMarkersFit=this._checkMarkerFit(e,s,o,i),this._doMarkersFit){const i=w(this._beginDimensionPoint,this._endDimensionPoint,this._dimensionLength/2);this._dimensionPolyline=[[i,this._beginDimensionPoint],[i,this._endDimensionPoint]]}else{const i=w(this._beginDimensionPoint,this._endDimensionPoint,-4*r),t=w(this._beginDimensionPoint,this._endDimensionPoint,this._dimensionLength+4*h);this._dimensionPolyline=[[i,this._beginDimensionPoint],[t,this._endDimensionPoint]]}}_checkMarkerFit(i,t,n,e){if(!i||!t)return!1;const{markerFit:s,markerOption:o,markerFitTolerance:r}=this._dimensionStyle;if("None"===s)return!0;let h=!0;if("Tolerance"===s)r*e>=this._dimensionLength&&(h=!1);else{if(this._hasTextPoint&&"Both"!==o)return!0;this._hasTextPoint&&"Both"===o?v(i,t)&&(h=!1):(v(i,t)&&(h=!1),h&&n&&(v(n,i)||v(n,t))&&(h=!1))}return h}_measureDimensionText(i,t,n){if(null==this._textString||null==t||null==this._mosaicItems)return null;const e=[];for(const g of i)g.codePointAt(0),e.push(this._mosaicItems.glyphs[g.codePointAt(0)]);const s=this._dimensionStyle.textSymbol;if(!s)return null;const o=g(s.horizontalAlignment),r=c(s.verticalAlignment),h=x(s),l=D(s.height||10);this._textSize=l;const m=!0,_=s.angle||0,a=l/b,d=S(s.lineWidth),u=f*Math.max(.25,Math.min(l||1,4)),P={...this._mosaicItems,glyphs:e.filter(i=>null!=i)},L=y(P,{scale:a,angle:_,xOffset:0,yOffset:0,horizontalAlignment:o,verticalAlignment:r,decoration:h,lineHeight:u,useCIMAngleBehavior:m,maxLineWidth:d,hasBackground:!1}),M=t;if(!M)return null;const w=n,E=[L.bounds.blX,L.bounds.trY],T=[L.bounds.trX,L.bounds.trY],k=[L.bounds.blX,L.bounds.blY],N=[L.bounds.trX,L.bounds.blY];return E[0]-=L.bounds.x,E[1]-=L.bounds.y,T[0]-=L.bounds.x,T[1]-=L.bounds.y,k[0]-=L.bounds.x,k[1]-=L.bounds.y,N[0]-=L.bounds.x,N[1]-=L.bounds.y,E[0]*=w,E[1]*=w,T[0]*=w,T[1]*=w,k[0]*=w,k[1]*=w,N[0]*=w,N[1]*=w,E[0]+=M[0],E[1]+=M[1],T[0]+=M[0],T[1]+=M[1],k[0]+=M[0],k[1]+=M[1],N[0]+=M[0],N[1]+=M[1],new p(T[0],T[1],1.1*Math.abs(E[0]-T[0]),1.1*Math.abs(N[1]-T[1]))}_measureMarkerSymbolSize(i,t,n,e){return i?new p(-16,-16,32,32):null}_getDimensionText(i){const{attributes:t}=i;let n=null;const e=1===Number(k(M.useCustomLength,t));n=Number(k(e?M.customLength:M.dimLength,t)),(0===n||isNaN(n)||null==n)&&(n=this._systemLength);let s=this._getDimensionString(n,i);return"number"==typeof s&&(s=s.toString()),t.__COMPUTED_TEXT_STRING__=s,s||""}_getDimensionString(i,t){const{convertUnits:n,displayUnits:e,displayPrecision:s,prefix:o,suffix:r,textOption:h}=this._dimensionStyle;if("None"===h)return null;if("Expression"===h&&this._compiledExpression&&t)return P(this._compiledExpression,t,{},"esriGeometryPolyline",this._fieldsIndex);let l=(i=null==s||isNaN(s)?parseFloat(i.toString()):parseFloat(i.toFixed(s))).toString();return"Suffix"===h&&(o&&(l=`${o} ${l}`),r&&(l=`${l} ${r}`)),l}}function R(i){const{attributes:t}=i,n=Object.keys(M).map(i=>({name:i,alias:i,type:"string"==typeof t[i]?"esriFieldTypeString":"esriFieldTypeDouble"}));return new d(n)}function B(i){return{left:i.x,right:i.x+i.width,top:i.y+i.height,bottom:i.y}}function v(i,t){const n=B(i),e=B(t),s=n.left<=e.right&&e.left<=n.right,o=n.bottom<=e.top&&e.bottom<=n.top;return s&&o}export{N as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import e from"../../../../../core/Logger.js";import{rad2deg as t}from"../../../../../core/mathUtils.js";import r from"../../../../../geometry/Point.js";import{normalizeTransform as o,quantizeY as n,quantizeX as i}from"../../../../../geometry/support/quantizationUtils.js";import{convertToGeometry as a}from"../../../../../layers/graphics/featureConversionUtils.js";import m from"../../../../../layers/graphics/OptimizedGeometry.js";import{project as s}from"../../../../../layers/graphics/data/projectionSupport.js";import{DimensionRealFieldName as p}from"./dimensionUtils.js";import{getAttributeValue as y,parseElement as u,reprojectAndQuantize as l}from"./utils.js";import{featureFields as g}from"./virtualFields.js";function f(t){const r=t.readAttribute("element");if(!r)return null;const n=t.getInTransform()??t.getDisplayTransform();if(!n)throw new Error("Quantization transform is required to read annotation features.");const i=t.geometryType;if(!i)return null;const a=t.metadata.outSpatialReference,m=t.metadata.attributeSpatialReference??t.metadata.spatialReference??a,s=o(n),p=t.getObjectId(),y=u(r,p),f=y.geometry||y.graphic?.geometry;if(!f)return e.getLogger("esri.layers.AnnotationFeatureLayer").warn("No geometry found on annotation graphic.",{element:y,objectId:p}),null;const c=l(f,m,a,s);if(!c)return null;const d={},h={annotationGeometryType:b(y),annotationGraphic:y,attributes:d,geometryOverride:{geometry:c,geometryType:i}};for(const e of g)e.addToFeature(h,y);return h}function c(e){const a=e.getInTransform()??e.getDisplayTransform();if(!a)throw new Error("Quantization transform is required to read dimension features.");const u=e.geometryType;if(!u)return null;const l={...e.readAttributes()},g=e.metadata.outSpatialReference,f=e.metadata.attributeSpatialReference??e.metadata.spatialReference??g,c=o(a),d={x:Number(y(p.beginX,l)),y:Number(y(p.beginY,l)),spatialReference:f},b={x:Number(y(p.endX,l)),y:Number(y(p.endY,l)),spatialReference:f},h={x:Number(y(p.dimX,l)),y:Number(y(p.dimY,l)),spatialReference:f};if(isNaN(d.x)||isNaN(d.y)||isNaN(b.x)||isNaN(b.y))return console.error(`Feature with ${p.objectId}=${y(p.objectId,l)} is missing valid begin, end, or dimension points and will be skipped.`),null;(isNaN(h.x)||isNaN(h.y))&&(h.x=d.x,h.y=d.y);const N=s(new r(d),f,g),w=s(new r(b),f,g),x=[N,w,s(new r(h),f,g)],j=Math.sqrt((w.x-N.x)*(w.x-N.x)+(w.y-N.y)*(w.y-N.y)),T=w.x-N.x,E=w.y-N.y;let I=Math.PI/2;0!==T?I=Math.atan2(E,T):E<0&&(I=-Math.PI/2);const R=y(p.textX,l),_=y(p.textY,l);if(null!=R&&null!=_){const e=new r({x:Number(R),y:Number(_),spatialReference:f}),t=s(e,f,g);x.push(t)}const S=x.map(e=>({x:i(c,e.x),y:n(c,e.y)})).flatMap(e=>[e.x,e.y]);return l.__SYSTEM_LENGTH__=j,l.__DIMENSION_ANGLE__=360-t(I),{attributes:l,geometryOverride:{geometry:new m([S.length],S),geometryType:u}}}function d(e,t){const{geometry:r,geometryType:o}=t.geometryOverride,n=a(r,o,!1,!1);return n?{attributes:{...e.readAttributes(),...t.attributes},centroid:null,geometry:n}:null}function b(e){if(e.geometry){if("custom-two-point"===e.geometry.type)return"line";if("custom-multipoint"===e.geometry.type)return"multipoint";if("geometry-bag"===e.geometry.type){if("custom-multipoint"===e.geometry.geometries[0].type)return"multipoint";throw new Error("Unable to determine geometry type from annotation graphic")}if("custom-point"===e.geometry.type)return"point";if("polyline"===e.geometry.type)return"line";if("point"===e.geometry.type)return"point";throw new Error("Unable to determine geometry type from annotation graphic")}if(e.graphic){if("polyline"===e.graphic.geometry.type)return"line";if("point"===e.graphic.geometry.type)return"point";if("multipoint"===e.graphic.geometry.type)return"multipoint";throw new Error("Unable to determine geometry type from annotation graphic")}throw new Error("Unable to determine geometry type from annotation graphic")}export{f as createAnnotationMatcherFeatureInfo,c as createDimensionMatcherFeatureInfo,b as getAnnotationGeometryType,d as mixFeature};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as e}from"../../../../../geometry/GeometryCursor.js";class
|
|
2
|
+
import{GeometryCursor as e}from"../../../../../geometry/GeometryCursor.js";import{createTileObjectId as t}from"./TileObjectId.js";class n{static{this.instance=null}static local(){return null===n.instance&&(n.instance=new n),n.instance}execute(e,t,n){return new i(e,t,n)}}class i{constructor(e,t,n){this._cursor=e,this._effect=t,this._context=n}next(){const t=this._cursor.next();if(t&&t.totalSize>0){const n=t.asJSON(),i=u[this._effect.part](n,{...this._effect,target:this._context.target,scaleFactor:this._context.scaleFactor,matcher:this._context.matcher,tileKey:this._context.tileKey,geomUnitsPerPoint:this._context.geomUnitsPerPoint});return i?e.fromJSONCIM(i):null}return null}}function s(e,n){const i=n.matcher,s=n.target.getObjectId(),r=t(n.tileKey,s),o=i.getAnalyzedGraphic(r);return o?(o.evaluateWithGeometry(e,n.geomUnitsPerPoint*n.scaleFactor),o):null}function r(e,t){const n=s(e,t);if(!n||!n.textPoint)return e;return{x:n.textPoint[0],y:n.textPoint[1],spatialReference:e.spatialReference}}function o(e,t){const n=s(e,t);if(!n||!n.dimensionLine)return e;const i=n.dimensionLine[0],r=i[1][0],o=i[1][1],c=i[0][0],a=i[0][1];return{spatialReference:e.spatialReference,paths:[[[r,o],[c,a]]]}}function c(e,t){const n=s(e,t);if(!n||!n.dimensionLine)return e;const i=n.dimensionLine[1],r=i[1][0],o=i[1][1],c=i[0][0],a=i[0][1];return{spatialReference:e.spatialReference,paths:[[[r,o],[c,a]]]}}function a(e,t){const n=s(e,t);if(!n||!n.extensionLines)return e;const i=n.extensionLines[0],r=i[0][0],o=i[0][1],c=i[1][0],a=i[1][1];return{spatialReference:e.spatialReference,paths:[[[r,o],[c,a]]]}}function l(e,t){const n=s(e,t);if(!n||!n.extensionLines)return e;const i=n.extensionLines[1],r=i[0][0],o=i[0][1],c=i[1][0],a=i[1][1];return{spatialReference:e.spatialReference,paths:[[[r,o],[c,a]]]}}const u={textPoint:r,beginDimensionLine:o,endDimensionLine:c,beginExtensionLine:a,endExtensionLine:l},f="beginMarker",x="endMarker",m="textPoint",h="beginDimensionLine",p="endDimensionLine",L="beginExtensionLine",g="endExtensionLine";export{n as PrivateDimensionEffect,h as beginDimensionLineName,L as beginExtensionLineName,f as beginMarkerName,p as endDimensionLineName,g as endExtensionLineName,x as endMarkerName,s as getDimensionInfo,m as textPointName};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{GeometryCursor as t}from"../../../../../geometry/GeometryCursor.js";import{createTileObjectId as e}from"./TileObjectId.js";class r{static{this.instance=null}static local(){return null===r.instance&&(r.instance=new r),r.instance}execute(t,e,r){return new n(t,r)}}class n{constructor(t,e){this._cursor=t,this._context=e}next(){const r=this._cursor.next();if(!r||0===r.totalSize)return null;const{matcher:n,target:c,tileKey:o}=this._context,s=n&&c&&null!=o?n.getMatcherGeometryOverride(e(o,c.getObjectId())):null;if(!s)return r;const i=t.fromOptimizedCIM(s.geometry.clone(),s.geometryType);return i.invertY(),i}}export{r as PrivateMatcherGeometryOverrideEffect};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../../../core/pbf.js";import{fromJSON as
|
|
2
|
+
import e from"../../../../../core/Logger.js";import t from"../../../../../core/pbf.js";import{fromJSON as a}from"../../../../../geometry/support/jsonUtils.js";import{base64ToArrayBuffer as r}from"../../../../../support/base64Utils.js";function o(a,o){const s={leader:[],anchorPoint:[],fontVariations:[]},c=r(a.toString()),l=new t(new Uint8Array(c),new DataView(c));for(;l.next();)switch(l.tag()){case 1:s.version=n(l);break;case 2:s.bloated=l.getBool();break;case 3:s.graphic=i(n(l));break;case 4:s.geometryStorageType=l.getEnum();break;case 5:s.geometry=p(n(l),s.geometryStorageType);break;case 6:s.text=n(l);break;case 7:s.bloated?l.skip():s.symbolID=l.getUInt32();break;case 8:s.textAngle=l.getDouble();break;case 9:s.xOffset=l.getDouble();break;case 10:s.yOffset=l.getDouble();break;case 11:s.horizontalAlignment=l.getEnum();break;case 12:s.verticalAlignment=l.getEnum();break;case 13:s.flipAngle=l.getDouble();break;case 14:l.skip(),s.leader=[];break;case 15:l.skip(),s.anchorPoint=[];break;case 16:s.size=l.getDouble();break;case 17:s.color=n(l);break;case 18:s.characterSpacing=l.getDouble();break;case 19:s.characterWidth=l.getDouble();break;case 20:s.wordSpacing=l.getDouble();break;case 21:s.leading=l.getDouble();break;case 22:s.fontFamilyName=n(l);break;case 23:s.fontStyleName=n(l);break;case 24:s.underline=l.getBool();break;case 25:s.callout=n(l);break;case 26:l.skip(),s.fontVariations=[];break;default:l.skip()}const g=s.graphic?.type;return"CIMTextGraphic"===g&&e.getLogger("esri.layers.AnnotationFeatureLayer").warn(`Unsupported annotation with "${g}" graphic.`,{element:s,objectId:o}),s}function n(e){return s(e.getString()||"")}function s(e){return e.replaceAll(/\p{Cc}/gu,"")}function i(e){return e?JSON.parse(e):null}function c(e){if(e?.ga){const t=e?.ga?.map(e=>c(e)).filter(e=>e);return{type:"geometry-bag",geometries:t}}const t=e?.g?.points;if(t)return{type:"custom-multipoint",points:t};const r=a(e);return r&&("point"===r.type||"polyline"===r.type)?r:void 0}function p(e,t){if(!e||null==t)return;if(1===t){const t=e.split(",").map(e=>parseFloat(e));return{type:"custom-point",x:t[0],y:t[1]}}if(2===t){const t=e.split(";").map(e=>e.split(",").map(e=>parseFloat(e)));return{type:"custom-two-point",from:[t[0][0],t[0][1]],to:[t[1][0],t[1][1]]}}if(3===t){return{type:"custom-multipoint",points:e.split(";").map(e=>e.split(",").map(e=>parseFloat(e)))}}return c(JSON.parse(e))}export{p as parseAnnotationGeometry,c as parseAnnotationGeometryJson,o as parseAnnotationGraphic,i as parseAnnotationInnerGraphic};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
const e={type:"CIMSolidStroke",enable:!0,color:[255,0,0,255],width:1.5};async function o(e,o,n){const r=t(n);if(!r)return[];const s=await o.fetchMeshResourceImmediate({type:"mesh-request",symbolReference:r});return e.createMeshWriters(s?.meshes||[])}function t(e){return"esriGeometryPolygon"!==e?(e&&console.error(`Annotation/dimension debug overlay expects polygon footprint geometry, but received ${e}.`),null):{type:"CIMSymbolReference",symbol:n()}}function n(){return{type:"CIMPolygonSymbol",symbolLayers:[{...e}]}}export{o as createDebugWriters};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
function n(n){return null==n.align&&(n.align=!1),null==n.baselineHeight&&(n.baselineHeight=0),null==n.convertUnits&&(n.convertUnits=!1),null==n.displayPrecision&&(n.displayPrecision=0),null==n.drawLineOnFit&&(n.drawLineOnFit=!1),null==n.extendLineOnFit&&(n.extendLineOnFit=!1),null==n.extensionLineOffset&&(n.extensionLineOffset=0),null==n.extensionLineOvershot&&(n.extensionLineOvershot=0),null==n.iD&&(n.iD=0),null==n.markerFitTolerance&&(n.markerFitTolerance=0),n}export{n as initializeDimensionStyleDefaults};
|