@arcgis/core 6.0.0-next.34 → 6.0.0-next.36
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/Basemap.d.ts +2 -2
- package/analysis/ShadowCastAnalysis.d.ts +11 -5
- package/arcgisGlobal.d.ts +1 -0
- 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/01f55004d64309f8538b.js +1 -0
- package/assets/esri/core/workers/chunks/0202eb8c2b2865f99981.js +1 -0
- package/assets/esri/core/workers/chunks/{67e533748435253aaba6.js → 0284f608d25c654fcc11.js} +1 -1
- package/assets/esri/core/workers/chunks/{7810586c35dfe1437516.js → 06102715e9a8f218e07c.js} +1 -1
- package/assets/esri/core/workers/chunks/{6029773458ab98600f67.js → 07e5482e1fc69be5de09.js} +1 -1
- package/assets/esri/core/workers/chunks/08140725277de5d2e41a.js +1 -0
- package/assets/esri/core/workers/chunks/{2d9a1f23ec6ce90723ac.js → 0d99bfb75dcb9fa29080.js} +1 -1
- package/assets/esri/core/workers/chunks/10ad7b35b6800d40444e.js +1 -0
- package/assets/esri/core/workers/chunks/1132e28aaa5825b10b6e.js +1 -0
- package/assets/esri/core/workers/chunks/{dd30b02c5978c1c5f511.js → 155861fbd0e5fc2db80c.js} +1 -1
- package/assets/esri/core/workers/chunks/165ca7a97b611c8f26c4.js +1 -0
- package/assets/esri/core/workers/chunks/1ae0c9345626e70affd3.js +2 -0
- package/assets/esri/core/workers/chunks/{cd355baab983033c3ef0.js → 1ec772eaa63eb6937231.js} +1 -1
- package/assets/esri/core/workers/chunks/{5c04835b0b52461183cd.js → 1fd82fcba2758741996a.js} +1 -1
- package/assets/esri/core/workers/chunks/21e1d423ee33f916547e.js +1 -0
- package/assets/esri/core/workers/chunks/{e8e54faf947a582b4cf7.js → 247617c0dbae2386ab3b.js} +1 -1
- package/assets/esri/core/workers/chunks/{97ec46605f16333144b7.js → 26ea39dfdf887f357fce.js} +1 -1
- package/assets/esri/core/workers/chunks/{85de980c5b296ec69323.js → 279089a6a3f08022c678.js} +1 -1
- package/assets/esri/core/workers/chunks/{b657363113f4a37e634b.js → 3223f9fbc76ba9ef8d13.js} +1 -1
- package/assets/esri/core/workers/chunks/322b22a5d54e404bebd5.js +1 -0
- package/assets/esri/core/workers/chunks/{122e75b21699a4e83b15.js → 338d800d4efcc91cead1.js} +1 -1
- package/assets/esri/core/workers/chunks/3537fe95b83a13b156cc.js +1 -0
- package/assets/esri/core/workers/chunks/{f09bc86cd52224febfcb.js → 3b380e64566a6cce59e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{a1e8209d00809c9520a0.js → 3fe4c89acd325d36618d.js} +1 -1
- package/assets/esri/core/workers/chunks/449a2dee17b54946f245.js +1 -0
- package/assets/esri/core/workers/chunks/{311e4969f19df63451dd.js → 4e5405134d079bdf9b7a.js} +1 -1
- package/assets/esri/core/workers/chunks/{d070fcb73ce274ab80e4.js → 5504ec9bd9ee4d10af07.js} +1 -1
- package/assets/esri/core/workers/chunks/552c36b40e5a5ec117fb.js +1 -0
- package/assets/esri/core/workers/chunks/5622f3faa59434772857.js +1 -0
- package/assets/esri/core/workers/chunks/59a1b637d2c107504a04.js +1 -0
- package/assets/esri/core/workers/chunks/59a88dd53f8806bbec06.js +1 -0
- package/assets/esri/core/workers/chunks/5c2fe67527c9d7b4dba3.js +1 -0
- package/assets/esri/core/workers/chunks/5d781c2c6204cffffd0d.js +1 -0
- package/assets/esri/core/workers/chunks/61d36730564c5ac5edab.js +1 -0
- package/assets/esri/core/workers/chunks/6604272ef6fe85279032.js +1 -0
- package/assets/esri/core/workers/chunks/{90c1d10eae7ae71889b0.js → 7400b8c454b47ee4fb3c.js} +1 -1
- package/assets/esri/core/workers/chunks/796c6195b6bf59dcc9bd.js +1 -0
- package/assets/esri/core/workers/chunks/7b45ac83e279fe9516a5.js +1 -0
- package/assets/esri/core/workers/chunks/{2de077c7b971f2c215a6.js → 7ddbde8fdd1cf3c53f50.js} +1 -1
- package/assets/esri/core/workers/chunks/804606b194dc9e71d088.js +1 -0
- package/assets/esri/core/workers/chunks/8102f0bf5707c3be3310.js +1 -0
- package/assets/esri/core/workers/chunks/{676c8c0329d68f9f3ac4.js → 81bcc495e6eaf2cf7474.js} +1 -1
- package/assets/esri/core/workers/chunks/{d1d6154b4af1c9cc497b.js → 934e1f2153e6fad6ed23.js} +1 -1
- package/assets/esri/core/workers/chunks/{e096c1d9d53af74d3207.js → 990e96139b5a1dccb061.js} +1 -1
- package/assets/esri/core/workers/chunks/{f28b63c1179366dac8a2.js → 9e2c30b67bab5795306e.js} +1 -1
- package/assets/esri/core/workers/chunks/{9184c947cdefe06bf551.js → a18c3cbe505a19d29569.js} +1 -1
- package/assets/esri/core/workers/chunks/aa6ee2aa4ff6e6d41efb.js +1 -0
- package/assets/esri/core/workers/chunks/{3fd5c3cd8457ddc68798.js → aa779896fd9e5c341349.js} +1 -1
- package/assets/esri/core/workers/chunks/ac10c7d2c4829a150037.js +1 -0
- package/assets/esri/core/workers/chunks/{e0a7a75709121a26f255.js → afc8a9847f31bb66b13b.js} +1 -1
- package/assets/esri/core/workers/chunks/c7adb7b77721c75891f4.js +1 -0
- package/assets/esri/core/workers/chunks/{bead830a677690eeb6fb.js → ce8ef2eec290e1df6b2a.js} +1 -1
- package/assets/esri/core/workers/chunks/d3369ffed19f4c264dcd.js +1 -0
- package/assets/esri/core/workers/chunks/d3412518a7b518860fbb.js +1 -0
- package/assets/esri/core/workers/chunks/{3048e74e6246324ce6fc.js → d5916500514a41a4758f.js} +1 -1
- package/assets/esri/core/workers/chunks/{c034c30e577d620b8e28.js → dac69c0047488fdf986d.js} +1 -1
- package/assets/esri/core/workers/chunks/dcc782e4bf9e8a8202f9.js +1 -0
- package/assets/esri/core/workers/chunks/dcdf837a452dc0cac582.js +1 -0
- package/assets/esri/core/workers/chunks/{19a4fa965b70fc6f78f6.js → e209cb1f3f14bf576ebe.js} +1 -1
- package/assets/esri/core/workers/chunks/e67ea2f1714e5abeae44.js +1 -0
- package/assets/esri/core/workers/chunks/e8fb2ba7b7a4f0916325.js +1 -0
- package/assets/esri/core/workers/chunks/efcd38aad9aa667001b2.js +1 -0
- package/assets/esri/core/workers/chunks/{3aafdb905c697bc9b1ad.js → f372f4eb5527238c46f5.js} +1 -1
- package/assets/esri/core/workers/chunks/f497968055af459c5da4.js +1 -0
- package/assets/esri/core/workers/chunks/f7123ba1286f64e13e91.js +1 -0
- package/assets/esri/core/workers/chunks/fcb4707c2e95099b9f30.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/chunks/BlurEmission.glsl.js +9 -4
- package/chunks/RibbonLine.glsl.js +158 -84
- package/chunks/Terrain.glsl.js +9 -9
- package/chunks/libtess-f32.js +1 -1
- package/chunks/libtess-f64.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +2 -2
- package/config.d.ts +3 -3
- package/config.js +1 -1
- package/core/mathUtils.js +1 -1
- package/form/FormTemplate.d.ts +1 -1
- package/geometry/libtess.js +1 -1
- package/geometry/projection/projectors.js +1 -1
- package/identity/Credential.d.ts +1 -1
- package/identity/IdentityManager.d.ts +1 -1
- package/identity/OAuthInfo.d.ts +1 -1
- package/identity/ServerInfo.d.ts +1 -1
- package/kernel.js +1 -1
- package/layers/CSVLayer.js +1 -1
- package/layers/GaussianSplatLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/VectorTileLayer.d.ts +2 -2
- package/layers/VideoLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/sources/CSVSource.js +1 -1
- package/layers/graphics/sources/GeoJSONSource.js +1 -1
- package/layers/graphics/sources/MemorySource.js +2 -2
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/graphics/sources/support/QueryTask.js +1 -1
- package/layers/graphics/sources/support/timeQueryUtils.js +2 -0
- package/layers/mixins/APIKeyMixin.d.ts +1 -1
- package/layers/ogc/types.d.ts +1 -1
- package/layers/support/TelemetryData.d.ts +28 -4
- package/layers/support/TimeInformation.js +1 -1
- package/layers/support/tiles3DUtils.js +1 -1
- package/layers/support/timeInfoUtils.js +2 -0
- package/layers/video/videoUtils.js +1 -1
- package/package.json +2 -2
- package/rest/query/executeAttributeBinsQuery.js +1 -1
- package/rest/query/executeForExtent.js +1 -1
- package/rest/query/executeForTopCount.js +1 -1
- package/rest/query/executeForTopExtents.js +1 -1
- package/rest/query/executeForTopIds.js +1 -1
- package/rest/query/executeTopFeaturesQuery.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/query/operations/queryAttributeBins.js +1 -1
- package/rest/query/operations/queryTopFeatures.js +1 -1
- package/rest/support/timeUtils.js +1 -1
- package/support/timeUtils.js +1 -1
- package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/GlyphWorker.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/materialKeyUtils.js +2 -0
- package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/placementUtils.js +1 -1
- package/views/3d/analysis/ShadowCast/ShadowCastError.d.ts +40 -0
- package/views/3d/analysis/ShadowCast/ShadowCastError.js +2 -0
- package/views/3d/analysis/ShadowCast/sunlightUtils.js +2 -0
- package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +16 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
- package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/originGeometryVisualElementUtils.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/Lyr3DWorker.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/layers/support/FeatureMemory.js +1 -1
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/Tiles3DBVH.js +1 -1
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/navigation/modes/GroundNavigationMode3D.js +1 -1
- package/views/3d/state/Constraints.js +1 -1
- package/views/3d/state/NearFarHeuristic.js +1 -1
- package/views/3d/state/utils/groundNavigationUtils.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/support/pointsOfInterest/SurfaceGeometryUpdates.js +1 -1
- package/views/3d/support/sphereExtentUtils.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/terrain/tileUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl.d.ts +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/widgets/Directions.d.ts +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +2 -2
- package/assets/esri/core/workers/chunks/0f6c0d42100c21367e5c.js +0 -1
- package/assets/esri/core/workers/chunks/176d0a06ebff5a29dedf.js +0 -1
- package/assets/esri/core/workers/chunks/18776a130d96879a68b1.js +0 -1
- package/assets/esri/core/workers/chunks/20a698709c3c11ff2c16.js +0 -1
- package/assets/esri/core/workers/chunks/24ada9511b074dc5ae27.js +0 -1
- package/assets/esri/core/workers/chunks/277263466837e1673f56.js +0 -1
- package/assets/esri/core/workers/chunks/2c8ca43563c4f3e94535.js +0 -1
- package/assets/esri/core/workers/chunks/379ef56f6b32494832a6.js +0 -1
- package/assets/esri/core/workers/chunks/38d852676677e5697864.js +0 -1
- package/assets/esri/core/workers/chunks/38df7b1d58c4bcf693d0.js +0 -1
- package/assets/esri/core/workers/chunks/507ecc3692e6d0700958.js +0 -1
- package/assets/esri/core/workers/chunks/5a9b7eb26f936f03d02e.js +0 -1
- package/assets/esri/core/workers/chunks/5f07f52bb8b7721f08d3.js +0 -1
- package/assets/esri/core/workers/chunks/661847f1b7044f21600f.js +0 -1
- package/assets/esri/core/workers/chunks/6b5c073dddd89d06ed80.js +0 -1
- package/assets/esri/core/workers/chunks/6ddc29a144640acb1192.js +0 -1
- package/assets/esri/core/workers/chunks/6ebe73f69ae822053b70.js +0 -1
- package/assets/esri/core/workers/chunks/6f6d1873753a9c6994aa.js +0 -1
- package/assets/esri/core/workers/chunks/7582654a0fc70910731c.js +0 -1
- package/assets/esri/core/workers/chunks/7e211d8a8ad6c6a7cf3e.js +0 -1
- package/assets/esri/core/workers/chunks/849f446c718e892f39ce.js +0 -1
- package/assets/esri/core/workers/chunks/8517d96fc8ba7b21d845.js +0 -2
- package/assets/esri/core/workers/chunks/a107f16cd004626b5018.js +0 -1
- package/assets/esri/core/workers/chunks/a65951f1d5702cfd996e.js +0 -1
- package/assets/esri/core/workers/chunks/bf62be00f3040f91aaee.js +0 -1
- package/assets/esri/core/workers/chunks/c570b90995c65bbb2e14.js +0 -1
- package/assets/esri/core/workers/chunks/c576bef77e34920af188.js +0 -1
- package/assets/esri/core/workers/chunks/caad4f475d6eb01c2850.js +0 -1
- package/assets/esri/core/workers/chunks/cf1ec61eb2ad147bb931.js +0 -1
- package/assets/esri/core/workers/chunks/daae21cf77864f3293ef.js +0 -1
- package/assets/esri/core/workers/chunks/dc2f93453dfa40f623ab.js +0 -1
- package/assets/esri/core/workers/chunks/e81173724e8de8c1e65b.js +0 -1
- package/assets/esri/core/workers/chunks/e83f9abee611c5b80009.js +0 -1
- package/assets/esri/core/workers/chunks/ec8b7476eac4718eb0ac.js +0 -1
- package/assets/esri/core/workers/chunks/f45064066e1ab041a0b2.js +0 -1
- package/assets/esri/core/workers/chunks/ffe49d9e7df081bef4a5.js +0 -1
- package/views/2d/engine/webgl/hashMosaic.js +0 -2
- package/views/3d/webgl-engine/lib/GaussianSplatPrepassDepthRenderer.js +0 -2
- /package/assets/esri/core/workers/chunks/{8517d96fc8ba7b21d845.js.LICENSE.txt → 1ae0c9345626e70affd3.js.LICENSE.txt} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import n from"../../../core/Collection.js";import r from"../../../core/Error.js";import has from"../../../core/has.js";import{LoadableMixin as i}from"../../../core/Loadable.js";import a from"../../../core/Logger.js";import{EsriPromiseMixin as o}from"../../../core/Promise.js";import{isAborted as s,createAbortError as c}from"../../../core/promiseUtils.js";import{open as l}from"../../../core/workers.js";import{property as u,subclass as d}from"../../../core/accessorSupport/decorators.js";import{ensureType as f}from"../../../core/accessorSupport/ensureType.js";import p from"../../../geometry/Extent.js";import m from"../../../geometry/Polygon.js";import{typeKebabDictionary as h}from"../../../geometry/support/typeUtils.js";import{createFeatureIdFromLayer as g}from"../data/createFeatureId.js";import{
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import n from"../../../core/Collection.js";import r from"../../../core/Error.js";import has from"../../../core/has.js";import{LoadableMixin as i}from"../../../core/Loadable.js";import a from"../../../core/Logger.js";import{EsriPromiseMixin as o}from"../../../core/Promise.js";import{isAborted as s,createAbortError as c}from"../../../core/promiseUtils.js";import{open as l}from"../../../core/workers.js";import{property as u,subclass as d}from"../../../core/accessorSupport/decorators.js";import{ensureType as f}from"../../../core/accessorSupport/ensureType.js";import p from"../../../geometry/Extent.js";import m from"../../../geometry/Polygon.js";import{typeKebabDictionary as h}from"../../../geometry/support/typeUtils.js";import{createFeatureIdFromLayer as g}from"../data/createFeatureId.js";import{applyTimeExtentToQuery as _}from"./support/timeQueryUtils.js";import{unapplyEditsZUnitScaling as v}from"../../../rest/query/operations/editsZScale.js";import y from"../../../rest/support/FeatureSet.js";import{shared as b}from"../../../core/accessorSupport/decorators/shared.js";let x=0,S=class extends i(o(n)){constructor(e){super(e),this._idToClientGeometry=null,this.type=`memory`}load(e){let t=e==null?null:e.signal;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){let e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?`polygon`:e:null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}async queryFeatures(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();let n=_(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex),r=await this._connection.invoke(`queryFeatures`,n.toJSON(),t),i=y.fromJSON(r);if(!this._requiresClientGraphicMapping()||!this._idToClientGeometry)return i;let a=this.layer.objectIdField;for(let e of i.features){let t=e.attributes[a],n=this._idToClientGeometry.get(t);n!==void 0&&(e.geometry=n)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new r(`query-features-json:unsupported`,`Cannot query in JSON format for client only geometry types (mesh and extent)`);if(await this.load(t),s(t)||this._connection==null)throw c();let n=_(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return await this._connection.invoke(`queryFeatures`,n.toJSON(),t)}async queryFeatureCount(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();let n=_(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return this._connection.invoke(`queryFeatureCount`,n.toJSON(),t)}async queryObjectIds(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();let n=_(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return this._connection.invoke(`queryObjectIds`,n.toJSON(),t)}async queryExtent(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();let n=_(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex),r=await this._connection.invoke(`queryExtent`,n.toJSON(),t);return{count:r.count,extent:p.fromJSON(r.extent)}}async querySnapping(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();return this._connection.invoke(`querySnapping`,e,t)}async queryAttributeBins(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();let n=_(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex),r=await this._connection.invoke(`queryAttributeBins`,n.toJSON(),t);return(await import(`../../../rest/support/AttributeBinsFeatureSet.js`)).default.fromJSON(r)}async _applyEdits(e){if(!this._connection)throw new r(`feature-layer-source:edit-failure`,`Memory source not loaded`);let t=this.layer.objectIdField,n=this.layer.uniqueIdFields,i=null,a=[],o=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);let s=e=>n?.length&&`attributes`in e?g(e,this.layer):`objectId`in e&&e.objectId!=null?e.objectId:`attributes`in e&&e.attributes[t]!=null?e.attributes[t]:null;if(e.addFeatures&&(i=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(let t of e.deleteFeatures){let e=s(t);e!=null&&a.push(e)}let c=e.updateFeatures&&this._idToClientGeometry?new Map:null;if(e.updateFeatures){for(let t of e.updateFeatures)if(o.push(this._serializeFeature(t)),c&&t.geometry!=null){let e=s(t);e!=null&&c.set(e,t)}}v(i?i.features:null,o,this.layer.spatialReference);let{fullExtent:l,featureEditResults:u}=await this._connection.invoke(`applyEdits`,{adds:i?i.features:[],updates:o,deletes:a});return this.fullExtent=l,i&&i.finish(u.uidToObjectId),this._updateIdToClientGeometries(c,u),this._createEditsResult(u)}async _prepareClientMapping(e,t){if(this._layerOrSourceGeometryType!==`mesh`||e==null)return;let n=[];for(let{geometry:r}of e)r!=null&&r.type===`mesh`&&!r.hasExtent&&!r.loaded&&n.push(r.load({signal:t}));n.length&&await Promise.all(n)}_updateIdToClientGeometries(e,t){if(this._idToClientGeometry){if(e)for(let n of t.updateResults){if(!n.success)continue;let t=e.get(n.objectId);t!=null&&this._addIdToClientGeometry(t)}for(let e of t.deleteResults)e.success&&this._idToClientGeometry.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){let t=e.success===!0?null:e.error||{code:void 0,description:``};return{objectId:e.objectId,globalId:e.globalId,error:t?new r(`feature-layer-source:edit-failure`,t.description,{code:t.code}):null}}_prepareAddFeatures(e){let t=new Map,n=Array(e.length),r=null;for(let i=0;i<e.length;i++){let a=e[i],o=this._serializeFeature(a);!r&&a.geometry!=null&&(r=a.geometry.type),n[i]=o,t.set(`${o.uid}`,a)}let i=this;return{features:n,inferredGeometryType:r,finish(e){let n=i.sourceJSON.objectIdField;for(let r in e){let a=e[r],o=t.get(r);o&&(o.attributes||={},a===-1?delete o.attributes[n]:o.attributes[n]=a,i._addIdToClientGeometry(o))}}}}_addIdToClientGeometry(e){if(!this._idToClientGeometry)return;let t=this.sourceJSON.objectIdField,n=e.attributes?.[t];n!=null&&this._idToClientGeometry.set(n,e.geometry??null)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return e===`mesh`||e===`multipatch`||e===`extent`}_serializeFeature(e){let{attributes:t}=e,n=this._geometryForSerialization(e),r=(x++).toString();return n?{uid:r,geometry:n.toJSON(),attributes:t}:{uid:r,attributes:t}}_geometryForSerialization(e){let{geometry:t}=e;return t==null?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?m.fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await l(`MemorySourceWorker`,{strategy:has(`feature-layers-workers`)?`dedicated`:`local`,signal:e,registryTarget:this});let{fields:t,spatialReference:n,objectIdField:r,hasM:i,hasZ:o,timeInfo:s,dateFieldsTimeZone:c}=this.layer,u=this.layer.originOf(`spatialReference`)===`defaults`;await this._prepareClientMapping(this.items,e);let d=this._prepareAddFeatures(this.items);this.addHandles(this.on(`before-changes`,e=>{a.getLogger(this).error(`Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead`),e.preventDefault()}));let{uniqueIdFields:f}=this.layer,p=f?.length?{type:f.length>1?`composite`:`simple`,fields:f.slice(),OIDFieldContainsHashValue:f?.length!==1||f.at(0)!==this.layer.objectIdField}:void 0,m={features:d.features,fields:t?.map(e=>e.toJSON()),geometryType:h.toJSON(this._workerGeometryType),hasM:this._layerOrSourceGeometryType!==`mesh`&&i,hasZ:this._layerOrSourceGeometryType===`mesh`||o,objectIdField:r,spatialReference:u?null:n&&n.toJSON(),timeInfo:s?.toJSON()??null,dateFieldsTimeZone:c,uniqueIdInfo:p},g=await this._connection.invoke(`load`,m,{signal:e});for(let e of g.warnings)a.getLogger(this.layer).warn(`#load()`,`${e.message} (title: '${this.layer.title||`no title`}', id: '${this.layer.id??`no id`}')`,{warning:e});g.featureErrors.length&&a.getLogger(this.layer).error(`#load()`,`Failed to load ${g.featureErrors.length} features due to errors. (title: '${this.layer.title||`no title`}', id: '${this.layer.id??`no id`}').`,g.featureErrors.map(e=>`
|
|
3
3
|
|
|
4
|
-
- `+e.error.description).join(``));let _=g.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(d.inferredGeometryType)&&(_.geometryType=h.toJSON(d.inferredGeometryType)),this.sourceJSON=_,this._requiresClientGraphicMapping()&&(this._idToClientGeometry=new Map),d.finish(g.assignedObjectIds)}};e([
|
|
4
|
+
- `+e.error.description).join(``));let _=g.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(d.inferredGeometryType)&&(_.geometryType=h.toJSON(d.inferredGeometryType)),this.sourceJSON=_,this._requiresClientGraphicMapping()&&(this._idToClientGeometry=new Map),d.finish(g.assignedObjectIds)}};e([b({Type:t,ensureType:f(t)})],S.prototype,`itemType`,void 0),e([u()],S.prototype,`type`,void 0),e([u({constructOnly:!0})],S.prototype,`layer`,void 0),e([u({readOnly:!0})],S.prototype,`_workerGeometryType`,null),e([u()],S.prototype,`sourceJSON`,void 0),S=e([d(`esri.layers.graphics.sources.MemorySource`)],S);export{S as MemorySource};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__addDisposableResource as e,__disposeResources as t}from"tslib";import{toConst as n}from"../../../../core/compilerUtils.js";import r from"../../../../core/Error.js";import i from"../../../../core/Handles.js";import has from"../../../../core/has.js";import a from"../../../../core/Logger.js";import{onAbortOrThrow as o,throwIfAborted as s}from"../../../../core/promiseUtils.js";import{QueueProcessor as c}from"../../../../core/QueueProcessor.js";import{parseWhereClause as l}from"../../../../core/sql.js";import{getMetersPerUnitForSR as u}from"../../../../core/units.js";import d from"../../../../geometry/SpatialReference.js";import{set as f,create as p,expandWithAABB as m,expandWithRect as ee,negativeInfinity as h}from"../../../../geometry/support/aaBoundingBox.js";import{copy as te,create as g,expandWithRect as ne,negativeInfinity as re}from"../../../../geometry/support/aaBoundingRect.js";import{isWebMercator as _,isWGS84 as v}from"../../../../geometry/support/spatialReferenceUtils.js";import{normalizeColumnPath as y,readParquetFileAttribute as b}from"../../../parquet.js";import{convertToGeometry as x}from"../../featureConversionUtils.js";import{getFieldNamesFromStatistics as S}from"../../data/attributeSupport.js";import{getQueryResultExtent as C,getQueryBoundingRects as w,QueryEngine as T}from"../../data/QueryEngine.js";import{queryCapabilities as ie}from"../../data/QueryEngineCapabilities.js";import{QueryEngineResult as E}from"../../data/QueryEngineResult.js";import{normalizeQueryLike as D}from"../../data/queryUtils.js";import{createFileProvider as O}from"../parquet/createFileProvider.js";import{readFieldStatistic as k}from"../parquet/ParquetFileStatistics.js";import{createDrawingInfo as ae}from"./clientSideDefaults.js";import{getParquetFileId as oe,getParquetRowId as se,getParquetObjectId as ce}from"./parquetIdUtils.js";import A from"../../../support/Field.js";import j from"../../../support/FieldsIndex.js";import{isNumericField as M}from"../../../support/fieldUtils.js";import{fromParquetGeometryEncodingJSON as N}from"../../../support/parquetEncodingUtils.js";import{completeParquetLayerInfo as P,fromParquetJSONGeometryType as F,toParquetJSONGeometryType as I}from"../../../support/parquetUtils.js";import{loadParquetModule as L}from"../../../../libs/librust-parquet/loadParquetModule.js";import{utc as R}from"../../../../time/constants.js";import{FeatureStoreQueryAdapter as z}from"../../../../views/2d/layers/features/FeatureStoreQueryAdapter.js";import{FeatureSnapshotSourceChunk as B}from"../../../../views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js";import{FeatureSourceChunkStore as V}from"../../../../views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js";import{FeatureMetadata as H}from"../../../../views/2d/layers/features/support/FeatureMetadata.js";import{FeatureSetReaderParquet as U}from"../../../../views/2d/layers/features/support/FeatureSetReaderParquet.js";const W=new z,G=`__OBJECTID`,K=8e3;class le{constructor(e,t){this._files=e,this._createFileStream=t,this._fileIndex=0,this._streamIndex=0,this._streams=[],this._pending=new Set,this._resolvedCount=0}async next(e){for(await this._fill(e);this._pending.size>0;){s(e),await this._fill(e);let t=await ue(this._pending);if(this._pending.delete(t.read),this._resolvedCount++,t.chunk!=null)return t.chunk}return null}async _fill(e){for(this._removeDone();this._pending.size<8;){let t=this._getOrCreateNextStream(e);if(t==null)return;this._pending.add(t.read(e))}}_getOrCreateNextStream(e){let t=this._resolvedCount>=8?8:2;if(this._fileIndex<this._files.length&&this._streams.length<t){let t=this._files[this._fileIndex++],n=new de(t.id,this._createFileStream(t,e));return this._streams.push(n),n}return this._getNextStream()}_getNextStream(){let e=this._streams.length;for(let t=0;t<e;t++){let n=(this._streamIndex+t)%e,r=this._streams[n];if(r.canRead)return this._streamIndex=(n+1)%e,r}return null}_removeDone(){let e=this._streamIndex;for(let t=this._streams.length-1;t>=0;t--)this._streams[t].done&&(this._streams.splice(t,1),t<e&&e--);this._streamIndex=this._streams.length>0?e%this._streams.length:0}}function ue(e){return Promise.race(Array.from(e,async e=>({read:e,chunk:await e})))}class de{constructor(e,t){this._fileId=e,this._stream=t,this._readCount=0,this._reachedEnd=!1}get canRead(){return!this._reachedEnd}get done(){return this._reachedEnd&&this._readCount===0}async read(e){this._readCount++;try{let t=await(await this._stream).next(e);return t==null?(this._reachedEnd=!0,null):{fileId:this._fileId,chunk:t}}finally{this._readCount--}}}class fe{constructor(){this._hasZ=!1,this._hasM=!1,this._queue=new c({concurrency:4,process:(e,t)=>this._executeQuery(e,t)}),this._streams=new Map,this._streamIdCounter=0,this._indexMap={},this._handles=new i}async load(e){let t=e.spatialReference?d.fromJSON(e.spatialReference):void 0;if(t&&!t.isWGS84&&!t.isWebMercator)throw new r(`parquet:unsupported-projection`,`Only WGS84 and Web Mercator are supported`);this._customParameters=e.customParameters,this._loadParameters=e,await this._updateProvider(O(e.provider,null,()=>this._customParameters));let n=await this._provider.getMetadata(),i=await P(n,{fields:e.fields?.map(e=>A.fromJSON(e)),geometryEncoding:e.geometryEncoding?N(e.geometryEncoding):null,geometryType:e.geometryType?F(e.geometryType):null,displayOptimization:e.displayOptimization,spatialReference:t});if(this._hasZ=!!n?.hasZ,this._hasM=!!n?.hasM,!i.fields)throw new r(`parquet:unsupported`,`Fields must be defined`);let o;if(i.spatialReference&&i.geometryType){if(!i.spatialReference)throw new r(`parquet:unsupported`,`SpatialReference must be defined`);if(!i.spatialReference.isGeographic&&!i.spatialReference.isWebMercator)throw new r(`parquet:unsupported-projection`,`Only WGS84 and Web Mercator are supported`);i.spatialReference.isGeographic&&!i.spatialReference.isWGS84&&(a.getLogger(`parquet:unsupported-projection`).warn(`Found a geographic projection that is not WGS84. Handling as WGS84.`,{spatialReference:i.spatialReference}),i.spatialReference=d.WGS84),o={geometry:i.geometryEncoding?{geometryType:I(i.geometryType),spatialReference:i.spatialReference.toJSON(),encoding:i.geometryEncoding.toJSON()}:null,displayOptimization:i.displayOptimization}}this.setCustomParameters(e.customParameters),this._displayOptimization=i.displayOptimization,await this._provider.updateGeometryInfo(o),this._capabilities=$(await this._getFileStatistics(),this._hasZ,this._hasM);let s=await this._provider.getFiles();if(!s.length)return{layerDefinition:{},capabilities:$(null,this._hasZ,this._hasM)};let c=await s[0].file;i.file=c;let{fields:l}=i;if(l==null)throw new r(`parquet-layer:missing-metadata`,`Unable to create parquet source: cannot infer fields`,l);l.push(new A({name:G,type:`oid`,alias:G}));for(let e of l){let t=c.getColumnId(e.name);t!=null&&(this._indexMap[e.name]=t)}let u=j.fromLayerJSON({fields:l.map(e=>e.toJSON()),dateFieldsTimeReference:{timeZoneIANA:`UTC`}});this._fieldsIndex=u;let f=I(i.geometryType??`point`);return this._metadata=H.createFeature({fieldsIndex:u.toJSON(),geometryType:f,hasZ:this._hasZ,hasM:this._hasM,featureIdInfo:{type:`object-id`,fieldName:G},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:i.spatialReference,outSpatialReference:null,attributeSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:R}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:f,featureIdInfo:{type:`object-id`,fieldName:G},hasM:this._hasM,hasZ:this._hasZ,spatialReference:i.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},this._fullExtent=n?.extent?n.extent:await this._tryDeriveParquetFullExtent(i),{capabilities:this._capabilities,layerDefinition:{fields:i.fields?.map(e=>e.toJSON()),drawingInfo:ae(f),extent:this._fullExtent??void 0,geometryType:f,hasZ:this._hasZ,hasM:this._hasM,geometryEncoding:i.geometryEncoding?.toJSON(),displayOptimization:i.displayOptimization}}}destroy(){this._provider.destroy(),this._queue.destroy();for(let{handle:e}of this._streams.values())e.remove();this._streams.clear(),this._indexMap={},this._handles.removeAll()}async reload(e){this.destroy(),await this.load(e)}set remoteClient(e){this._source=e.createInvokeProxy(``)}setCustomParameters(e){this._customParameters=e}getIndexMap(){return this._indexMap}async updateFileProvider(e){this._loadParameters={...this._loadParameters,provider:e};let t=O(e,this._provider.getGeometryInfo(),()=>this._customParameters);await this._updateProvider(t)}async getDiagnosticsSnapshot(){let e=await this._provider.getFiles();return{files:await Promise.all(e.map(e=>e.getDiagnosticsSnapshot()))}}async getColumnIndex(e){return(await this._getFileInfoById(e.fileId)).getColumnIndex(e.rowGroupIndex,e.columnIndex)}async getOffsetIndex(e){return(await this._getFileInfoById(e.fileId)).getOffsetIndex(e.rowGroupIndex,e.columnIndex)}async queryFeatures(e,t){let n=await D(e,null,this._queryEngineParams.spatialReference);return this._validateQuery(n),we(n)||(n.resultRecordCount=n.resultRecordCount?Math.min(n.resultRecordCount,K):K,n.resultOffset=n.resultOffset??0),n.outStatistics?this._queryStatistics(n,t):(n.returnDistinctValues&&(n.returnGeometry=void 0),(await this._enqueueQuery(n,t)).createQueryResponse())}async queryFeatureCount(e,t){let n=await D(e,null,this._queryEngineParams.spatialReference);return this._validateQuery(n),!q(n)&&!n.returnDistinctValues&&!n.groupByFieldsForStatistics?.length&&!n.outStatistics?.length?this._getFeatureCount():(n.returnDistinctValues||(n.outFields=void 0),n.returnGeometry=void 0,(await this._enqueueQuery(n,t)).createQueryResponseForCount())}async queryObjectIds(e,t){let n=await D(e,null,this._queryEngineParams.spatialReference);return this._validateQuery(n),q(n)?(n.resultRecordCount=n.resultRecordCount?Math.min(n.resultRecordCount,8e3):8e3,n.resultOffset=n.resultOffset??0,n.returnGeometry=void 0,n.outFields=void 0,n.returnDistinctValues=void 0,(await this._enqueueQuery(n,t)).items.map(e=>e.getObjectId())):Array.from({length:await this._getFeatureCount()},(e,t)=>t)}async queryAttributeBins(e,t={}){throw new r(`parquet:unsupported`,`queryAttributeBins not supported.`)}async queryExtent(e,t){let r=await D(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(r),this._fullExtent&&!q(r))return{count:await this._getFeatureCount(),extent:this._fullExtent};let i=n(this._metadata.spatialReference);r.returnGeometry=!0,r.outFields=void 0;let a=f(p(),h),o=p(),s=await this._enqueueQuery(r,t),c=0;for(let e of s.items)e.getBounds(o)&&(m(a,o),c+=1);let l=C(a,i,r.outSR?n(r.outSR):i.toJSON(),i,!1);return{count:c,extent:l}}async queryStream(e,t){if(!t.signal)throw Error(`InternalError: AbortSignal must be passed`);let n=await this._getCandidateFiles(e),r=new le(n,async(t,n)=>{let r=await t.file,i=await this._createParquetDisplayQuery(r,t.id,e);return r.executeQuery(i,K,n)}),i=this._streamIdCounter++,a=o(t.signal,e=>{let t=this._streams.get(i);t!=null&&(t.handle.remove(),this._streams.delete(i))});return this._streams.set(i,{stream:r,handle:a}),i}async getStreamNext(e,t){if(!t.signal)throw Error(`InternalError: AbortSignal must be passed`);let n=this._streams.get(e);if(!n)return{result:null};let r=await n.stream.next(t.signal);if(r==null)return n.handle.remove(),this._streams.delete(e),{result:null};let i=r.chunk.serialize().buffer,a={fileId:r.fileId,buffer:i};return i instanceof ArrayBuffer?{result:a,transferList:[i]}:{result:a}}async getStreamNextFeatures(e,t){let{result:n}=await this.getStreamNext(e,t);if(n==null)return null;let r=(await L()).ParquetChunk.deserialize(new Uint8Array(n.buffer)),i=new U(this._metadata,this._indexMap,r,n.fileId),a=[];for(;i.next();){let e=x(i.readGeometryWorldSpace(),i.geometryType,i.hasZ,i.hasM),t=i.readAttributes();a.push({attributes:t,geometry:e})}return{features:a}}async createPatch(e,t,n,r,i){if(!i.signal)throw Error(`InternalError: AbortSignal must be passed`);return(await(await(await this._getFileInfoById(e)).file).createChunkPatch(t,n,r,i.signal)).serialize().buffer}async _updateProvider(e){let t=this._provider;this._handles.removeAll(),this._provider=e,this._handles.add([e.events.on(`rangeRead`,e=>{this._source.onRangeRead(e)}),e.events.on(`sourceChanged`,async()=>{await this.reload(this._loadParameters),await this._source.onSourceChange()})]),await t?.destroy()}async _getCandidateFiles(e){let t=await this._provider.getFiles(),n=await this._getSpatialFilePruning(e);if(n==null)return t;let r=t.filter(e=>this._mayIncludeFileForSpatialPruning(e,n));return n.type===`xz`?Ce(r,n):r}async _queryStatistics(e,t){let n=await D({...e},null,this._queryEngineParams.spatialReference);if(n.returnGeometry=void 0,ve(n,this._fieldsIndex)){let e=await this._getStatisticsFromFiles(n);if(e)return e}return(await this._enqueueQuery(n,t)).createQueryResponse()}async _getStatisticsFromFiles(e){let t=await this._provider.getFiles(),n={},r=[];for(let i of e.outStatistics??[]){let e=xe(i,t);if(!e.available)return null;n[i.outStatisticFieldName]=e.value,r.push(be(i,this._fieldsIndex))}return{fields:r,features:[{attributes:n}]}}async _getSpatialFilePruning(e){if(e.type!==`tile`&&(e.type!==`arcade`||e.extent==null))return null;let t=this._displayOptimization?.index;if(t==null)return null;let n=e.outSpatialReference.wkid;if(t.wkid==null||n==null)return null;let r=t.wkid,i=await L();switch(t.type){case`xz`:return{type:`xz`,fieldName:y(t.code),intersects:(a,o)=>i.queryIntersectsXZStatistics(t.fullExtent,e.extent,n,r,t.maxLevel,a,o)};case`z`:return{type:`xy`,xFieldName:y(t.xColumn),yFieldName:y(t.yColumn),intersects:(t,a,o,s)=>i.queryIntersectsXYStatistics(e.extent,n,r,t,a,o,s)}}}_mayIncludeFileForSpatialPruning(e,t){switch(t.type){case`xz`:{let n=Z(e,t);return n?.type===`null-only`?!1:n?.type!==`bounds`||t.intersects(n.minValue,n.maxValue)}case`xy`:{let n=e.statistics.statistics.get(t.xFieldName),r=e.statistics.statistics.get(t.yFieldName);return n?.type===`null-only`||r?.type===`null-only`?!1:n?.type!==`bounds`||r?.type!==`bounds`||t.intersects(n.minValue,n.maxValue,r.minValue,r.maxValue)}}}async _tryDeriveParquetFullExtent(n){if(!n.spatialReference)return null;if(this._fullExtent==null&&n.geometryEncoding?.type===`location`){let r=await this._provider.getFiles(),{xField:i,yField:a}=n.geometryEncoding,o=f(p(),h),s=!1;for(let n of r){let r=await n.file;for(let n of r.rowGroups()){let r={stack:[],error:void 0,hasError:!1};try{let t=e(r,n.columnDescriptorForAttribute(i),!1),c=e(r,n.columnDescriptorForAttribute(a),!1),l=k(t),u=k(c);if(l?.type===`bounds`&&u?.type===`bounds`){let e=[l.minValue,u.minValue,l.maxValue,u.maxValue];ee(o,e),s=!0}n.free()}catch(e){r.error=e,r.hasError=!0}finally{t(r)}}}return s?{xmin:o[0],ymin:o[1],xmax:o[3],ymax:o[4],spatialReference:n.spatialReference?.toJSON()}:null}return null}async _getFileInfoById(e){let t=await this._provider.getFiles();for(let n of t)if(n.id===e)return n;throw Error(`InternalError: File ${e} does not exist`)}async _getFileStatistics(){return{featureCount:await this._getFeatureCount(),byteLength:await this._getByteLength()}}async _getFile(e){return(await this._getFileInfoById(e)).file}async _createParquetQuery(e,t,n,r,i){let a=(await L()).Query.new();n!=null&&a.setPreFilterStart(n),r!=null&&a.setPreFilterCount(r),i!=null&&a.setPostFilterCount(i);let o=await this._getRequiredFields(e);a.setOutFields(o),(e.geometry||e.returnGeometry)&&a.setReturnGeometry(!0),a.setReturnZ(!!e.returnZ),a.setReturnM(!!e.returnM);let s=this._tryGetGeneralizedGeometryResolution(e);s!=null&&a.setSourceResolution(s);let c=e.geometry?.spatialReference??this._queryEngineParams.spatialReference,l=c.wkid;if(e.geometry&&(_(c)||v(c))){let t=te(g(),re);for(let n of w(e.geometry))ne(t,n);a.setOutSpatialReference(l),a.setExtent({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]})}if(e.where){let{id:n,file:r}=t;await this._setWhereClause(a,await r,n,e.where)}return a}async _createParquetDisplayQuery(e,t,n){let r=(await L()).Query.new();if(n.type===`tile`){r.setExtent(n.extent),r.setQuantizationTransform(n.transform);let e=this._sourceResolution(n.resolution,n.outSpatialReference);e!=null&&r.setSourceResolution(e)}else n.type===`arcade`&&n.extent!=null&&r.setExtent(n.extent);return r.setOutFields(n.outFields.filter(e=>this._indexMap[e]!=null)),r.setOutSpatialReference(n.outSpatialReference.wkid),r.setReturnGeometry(n.returnGeometry),r.setReturnZ(n.returnZ),r.setReturnM(n.returnM),n.where&&await this._setWhereClause(r,e,t,n.where),r}async _getFeatureCount(){return(await this._provider.getFiles()).map(e=>e.statistics.rowCount).reduce((e,t)=>e+t,0)}async _getByteLength(){return(await this._provider.getFiles()).map(e=>e.statistics.byteSize).reduce((e,t)=>e+t,0)}_validateQuery(e){if(!this._capabilities.query.supportsStatistics&&e.outStatistics)throw new r(`parquet:unsupported`,`Statistics queries are not supported`,{query:e});if(!this._capabilities.query.supportsOrderBy&&e.orderByFields?.length)throw new r(`parquet:unsupported`,`Queries using orderBy are not supported`,{query:e});if(!this._capabilities.query.supportsDistinct&&e.returnDistinctValues)throw new r(`parquet:unsupported`,`Queries using returnDistinctValues are not supported`,{query:e})}async _setWhereClause(e,t,n,i){let a=this._indexMap,o=this._fieldsIndex,s={getAttribute(e,r){let i=a[r];if(i==null){if(o.get(r)?.name===`__OBJECTID`){let t=e.row+e.rowGroupStart;return ce(n,t)}return null}let s=o.get(r);return b(t,e.rowGroup,e.row,i,s.type)}},c=await l(i,this._fieldsIndex);if(!c.isStandardized)throw new r(`sql-parse-error`,`expression is not standardized`);let u=(e,t,n)=>c.testFeatureCompiled({rowGroup:e,row:t,rowGroupStart:n},s,null),d=c.fieldNames.map(e=>o.get(e)).filter(e=>e&&this._indexMap[e?.name]!=null);e.setWhere(i),e.setWhereEvaluator(u),e.setWhereFields(d.map(e=>e.name))}async*_streamFeatures(e,t,n,r,i){let a=await this._provider.getFiles(),o=0;for(let s of a){let a=o,c=o+s.statistics.rowCount;if(o+=s.statistics.rowCount,t!=null&&t>=c)continue;let l=t==null?null:Math.max(t-a,0),u=n;if(n!=null){let e=t??0,r=e+n;u=Math.max(Math.min(r,c)-Math.max(e,a),0)}if(u===0)continue;let d=await this._createParquetQuery(e,s,l,u,r),f=await(await s.file).executeQuery(d,K),p=async()=>{let e=await f.next(i);if(!e)return null;let t=new U(this._metadata,this._indexMap,e,s.id);return X([new B(t,null,0,!1)],this._queryEngineParams)},m=await p();for(;m!=null;)yield m,m=await p()}}async _queryFeaturesWithQueryEnginePagination(e,t){let n=[],r=this._streamFeatures(e,null,null,null,t),i=await r.next();for(;!i.done;){let a=await i.value.executeQueryForOpaqueFeatures({...e,where:void 0},t);for(let e of a)n.push(e);i=await r.next()}return n}async _queryFeaturesWithUpfrontPagination(e,t){let n=e.resultOffset??0,r=e.resultRecordCount??K,i,a,o;ge(e)?_e(e)||(o=n+r):(n&&=(i=n,0),a=e.resultRecordCount);let s=[],c=this._streamFeatures(e,i,a,o,t),l=await c.next();for(;!l.done&&r>0;){let i=await l.value.executeQueryForOpaqueFeatures({...e,where:void 0},t);for(let e of i)if(n>0)n--;else if(s.push(e),--r<=0)return s;l=await c.next()}return s}_enqueueQuery(e,t){return this._queue.push(e,t)}async _executeQuery(e,t){if(e.objectIds?.length){let n=new Map;for(let t of e.objectIds){let e=oe(t),r=se(t),i=n.get(e);i||(i=[],n.set(e,i)),i.push(r)}let r=[];for(let[i,a]of n.entries()){let n=await this._executeFileIdQuery(e,i,a,t);for(let e of n)r.push(e)}return new E(r,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:this._hasM,hasZ:this._hasZ,featureAdapter:W,featureIdInfo:this._queryEngineParams.featureIdInfo})}if(e.where===`1=1`&&(e.where=null),e.resultOffset??=0,e.resultRecordCount??=await this._getFeatureCount(),e.resultRecordCount>2e7&&!(this._displayOptimization&&e.geometry))throw new r(`parquet:cannot-execute-query`,`Unable to execute query, dataset is too large.`);let n=!!e.orderByFields?.length||!!e.outStatistics?.length||!!e.returnDistinctValues,i=n?await this._queryFeaturesWithQueryEnginePagination(e,t):await this._queryFeaturesWithUpfrontPagination(e,t);return n||(e.resultOffset=0),new E(i,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:this._hasM,hasZ:this._hasZ,featureAdapter:W,featureIdInfo:this._queryEngineParams.featureIdInfo})}async _executeFileIdQuery(e,t,n,r){let i=new Set(await this._getRequiredFields(e));if(e.where){let t=await l(e.where,this._fieldsIndex);for(let e of t.fieldNames){let t=this._fieldsIndex.get(e);t&&this._indexMap[t.name]!=null&&i.add(t.name)}}let a=(await L()).Query.new();a.setOutFields(Array.from(i)),a.setReturnGeometry(!!e.returnGeometry),a.setReturnZ(!!e.returnZ),a.setReturnM(!!e.returnM),a.setIds(new Uint32Array(n));let o=await(await this._getFile(t)).executeQuery(a,K,r),s=await o.next(r),c=0,u=[];for(;s!=null;){let e=new U(this._metadata,this._indexMap,s,t),n=new B(e,null,c++,!1);u.push(n),s=await o.next(r)}return X(u,this._queryEngineParams).executeQueryForOpaqueFeatures(e,r)}async _getRequiredFields(e){let t=new Set;if(e.outStatistics)for(let n of S(this._fieldsIndex,e.outStatistics,e.groupByFieldsForStatistics))t.add(n);else if(e.outFields)for(let n of e.outFields)t.add(n);return(t.has(`*`)?this._fieldsIndex.fields.map(e=>e.name):Array.from(t)).filter(e=>this._indexMap[e]!=null)}_tryGetGeneralizedGeometryResolution(e){if(!this._displayOptimization)return null;let t=e.outSR??this._queryEngineParams.spatialReference;if(!_(t)&&!v(t))return null;let n=e.quantizationParameters?.tolerance??e.maxAllowableOffset;return n?this._sourceResolution(n,t):null}_sourceResolution(e,t){let n=this._queryEngineParams.spatialReference,r=u(t)/u(n)*e;return!Number.isFinite(r)||r<=0?null:r}}function pe(e){switch(e){case`fullText`:case`having`:case`timeExtent`:case`historicMoment`:case`aggregateIds`:case`uniqueIds`:case`gdbVersion`:case`objectIds`:case`where`:case`geometry`:case`resultOffset`:case`resultRecordCount`:return!0;default:return!1}}function me(e){switch(e){case`fullText`:case`having`:case`timeExtent`:case`historicMoment`:case`aggregateIds`:case`uniqueIds`:case`gdbVersion`:case`objectIds`:case`where`:case`geometry`:return!0;default:return!1}}function he(e){switch(e){case`fullText`:case`having`:case`timeExtent`:return!0;case`historicMoment`:case`aggregateIds`:case`uniqueIds`:case`gdbVersion`:return!1;case`objectIds`:case`where`:case`resultOffset`:case`geometry`:case`resultRecordCount`:return!1}return!1}function q(e){for(let t in e){let n=t;if(pe(n)&&e[n]!==null)return!0}return!1}function ge(e){for(let t in e){let n=t;if(me(n)&&e[n]!==null)return!0}return!1}function _e(e){for(let t in e){let n=t;if(he(n)&&e[n]!==null)return!0}return!1}function ve(e,t){return!!e.outStatistics?.length&&!q(e)&&!e.groupByFieldsForStatistics?.length&&!e.orderByFields?.length&&!e.returnDistinctValues&&!e.returnAggIds&&e.outStatistics.every(e=>ye(e,t))}function ye(e,t){switch(e.statisticType){case`count`:return e.onStatisticField===`1`||t.get(e.onStatisticField)!=null;case`min`:case`max`:{let n=t.get(e.onStatisticField);return n!=null&&M(n)}default:return!1}}function be(e,t){let n=e.statisticType===`exceedslimit`?null:t.get(e.onStatisticField),r=(e.statisticType===`min`||e.statisticType===`max`)&&n?.type===`esriFieldTypeDate`?n.type:`esriFieldTypeDouble`;return{name:e.outStatisticFieldName,alias:e.outStatisticFieldName,type:r}}function xe(e,t){switch(e.statisticType){case`count`:return J(e,t);case`min`:return Y(e,t,Math.min);case`max`:return Y(e,t,Math.max);default:return{available:!1,value:null}}}function J(e,t){if(e.statisticType!==`count`)return{available:!1,value:null};if(e.onStatisticField===`1`)return{available:!0,value:t.reduce((e,t)=>e+t.statistics.rowCount,0)};let n=0;for(let r of t){let t=r.statistics.statistics.get(e.onStatisticField);if(t==null||t.nullCount==null)return{available:!1,value:null};n+=r.statistics.rowCount-t.nullCount}return{available:!0,value:n}}function Y(e,t,n){if(e.statisticType!==`min`&&e.statisticType!==`max`)return{available:!1,value:null};let r=null,i=e.statisticType===`min`?`minValue`:`maxValue`;for(let a of t){let t=a.statistics.statistics.get(e.onStatisticField);if(t==null)return{available:!1,value:null};switch(t.type){case`null-only`:continue;case`unknown`:return{available:!1,value:null};case`bounds`:{let e=Se(t[i]);if(e==null)return{available:!1,value:null};r=r==null?e:n(r,e);break}}}return{available:!0,value:r}}function Se(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function X(e,t){let n=new V;for(let t of e)n.insert(t);return new T({...t,featureStore:n})}function Z(e,t){return e.statistics.statistics.get(t.fieldName)??null}function Ce(e,t){return e.slice().sort((e,n)=>{let r=Q(e,t),i=Q(n,t);return r===i?0:r<i?-1:1})}function Q(e,t){let n=Z(e,t);return n?.type===`bounds`?n.maxValue-n.minValue:1/0}function $(e,t,n){let r=e?.featureCount,i=!1;return r!=null&&r<has(`parquetlayer-full-query-feature-count`)&&(i=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:n,supportsTrueCurve:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{...ie,maxRecordCount:K,supportsOrderBy:i,supportsDistinct:!0,supportsStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1}},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}function we(e){return!!e.objectIds?.length||!!e.outStatistics||!!e.orderByFields?.length||!!e.returnDistinctValues}export{fe as default};
|
|
2
|
+
import{__addDisposableResource as e,__disposeResources as t}from"tslib";import n from"../../../../core/Error.js";import r from"../../../../core/Handles.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{onAbortOrThrow as a,throwIfAborted as o}from"../../../../core/promiseUtils.js";import{QueueProcessor as s}from"../../../../core/QueueProcessor.js";import{parseWhereClause as c}from"../../../../core/sql.js";import{getMetersPerUnitForSR as l}from"../../../../core/units.js";import{initializeProjection as u}from"../../../../geometry/projectionUtils.js";import d from"../../../../geometry/SpatialReference.js";import{set as f,create as p,expandWithAABB as m,expandWithRect as h,negativeInfinity as g}from"../../../../geometry/support/aaBoundingBox.js";import{copy as _,create as v,expandWithRect as ee,negativeInfinity as te}from"../../../../geometry/support/aaBoundingRect.js";import{isWebMercator as y,isWGS84 as b}from"../../../../geometry/support/spatialReferenceUtils.js";import{normalizeColumnPath as x,readParquetFileAttribute as ne}from"../../../parquet.js";import{convertToGeometry as S}from"../../featureConversionUtils.js";import{getFieldNamesFromStatistics as re}from"../../data/attributeSupport.js";import{project as ie}from"../../data/projectionSupport.js";import{getQueryResultExtent as ae,getQueryBoundingRects as C,QueryEngine as w}from"../../data/QueryEngine.js";import{queryCapabilities as T}from"../../data/QueryEngineCapabilities.js";import{QueryEngineResult as E}from"../../data/QueryEngineResult.js";import{normalizeQueryLike as D}from"../../data/queryUtils.js";import{createFileProvider as O}from"../parquet/createFileProvider.js";import{readFieldStatistic as k}from"../parquet/ParquetFileStatistics.js";import{createDrawingInfo as oe}from"./clientSideDefaults.js";import{getParquetFileId as se,getParquetRowId as ce,getParquetObjectId as A}from"./parquetIdUtils.js";import j from"../../../support/Field.js";import M from"../../../support/FieldsIndex.js";import{isNumericField as N}from"../../../support/fieldUtils.js";import{fromParquetGeometryEncodingJSON as P}from"../../../support/parquetEncodingUtils.js";import{completeParquetLayerInfo as F,fromParquetJSONGeometryType as I,toParquetJSONGeometryType as L}from"../../../support/parquetUtils.js";import{loadParquetModule as R}from"../../../../libs/librust-parquet/loadParquetModule.js";import{utc as z}from"../../../../time/constants.js";import{FeatureStoreQueryAdapter as B}from"../../../../views/2d/layers/features/FeatureStoreQueryAdapter.js";import{FeatureSnapshotSourceChunk as V}from"../../../../views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js";import{FeatureSourceChunkStore as H}from"../../../../views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js";import{FeatureMetadata as U}from"../../../../views/2d/layers/features/support/FeatureMetadata.js";import{FeatureSetReaderParquet as W}from"../../../../views/2d/layers/features/support/FeatureSetReaderParquet.js";const G=new B,K=`__OBJECTID`,q=8e3;class le{constructor(e,t){this._files=e,this._createFileStream=t,this._fileIndex=0,this._streamIndex=0,this._streams=[],this._pending=new Set,this._resolvedCount=0}async next(e){for(await this._fill(e);this._pending.size>0;){o(e),await this._fill(e);let t=await ue(this._pending);if(this._pending.delete(t.read),this._resolvedCount++,t.chunk!=null)return t.chunk}return null}async _fill(e){for(this._removeDone();this._pending.size<8;){let t=this._getOrCreateNextStream(e);if(t==null)return;this._pending.add(t.read(e))}}_getOrCreateNextStream(e){let t=this._resolvedCount>=8?8:2;if(this._fileIndex<this._files.length&&this._streams.length<t){let t=this._files[this._fileIndex++],n=new de(t.id,this._createFileStream(t,e));return this._streams.push(n),n}return this._getNextStream()}_getNextStream(){let e=this._streams.length;for(let t=0;t<e;t++){let n=(this._streamIndex+t)%e,r=this._streams[n];if(r.canRead)return this._streamIndex=(n+1)%e,r}return null}_removeDone(){let e=this._streamIndex;for(let t=this._streams.length-1;t>=0;t--)this._streams[t].done&&(this._streams.splice(t,1),t<e&&e--);this._streamIndex=this._streams.length>0?e%this._streams.length:0}}function ue(e){return Promise.race(Array.from(e,async e=>({read:e,chunk:await e})))}class de{constructor(e,t){this._fileId=e,this._stream=t,this._readCount=0,this._reachedEnd=!1}get canRead(){return!this._reachedEnd}get done(){return this._reachedEnd&&this._readCount===0}async read(e){this._readCount++;try{let t=await(await this._stream).next(e);return t==null?(this._reachedEnd=!0,null):{fileId:this._fileId,chunk:t}}finally{this._readCount--}}}class fe{constructor(){this._hasZ=!1,this._hasM=!1,this._queue=new s({concurrency:4,process:(e,t)=>this._executeQuery(e,t)}),this._streams=new Map,this._streamIdCounter=0,this._indexMap={},this._handles=new r}async load(e){let t=e.spatialReference?d.fromJSON(e.spatialReference):void 0;if(t&&!t.isWGS84&&!t.isWebMercator)throw new n(`parquet:unsupported-projection`,`Only WGS84 and Web Mercator are supported`);this._customParameters=e.customParameters,this._loadParameters=e,await this._updateProvider(O(e.provider,null,()=>this._customParameters));let r=await this._provider.getMetadata(),a=await F(r,{fields:e.fields?.map(e=>j.fromJSON(e)),geometryEncoding:e.geometryEncoding?P(e.geometryEncoding):null,geometryType:e.geometryType?I(e.geometryType):null,displayOptimization:e.displayOptimization,spatialReference:t});if(this._hasZ=!!r?.hasZ,this._hasM=!!r?.hasM,!a.fields)throw new n(`parquet:unsupported`,`Fields must be defined`);let o;if(a.spatialReference&&a.geometryType){if(!a.spatialReference)throw new n(`parquet:unsupported`,`SpatialReference must be defined`);if(!a.spatialReference.isGeographic&&!a.spatialReference.isWebMercator)throw new n(`parquet:unsupported-projection`,`Only WGS84 and Web Mercator are supported`);a.spatialReference.isGeographic&&!a.spatialReference.isWGS84&&(i.getLogger(`parquet:unsupported-projection`).warn(`Found a geographic projection that is not WGS84. Handling as WGS84.`,{spatialReference:a.spatialReference}),a.spatialReference=d.WGS84),o={geometry:a.geometryEncoding?{geometryType:L(a.geometryType),spatialReference:a.spatialReference.toJSON(),encoding:a.geometryEncoding.toJSON()}:null,displayOptimization:a.displayOptimization}}this.setCustomParameters(e.customParameters),this._displayOptimization=a.displayOptimization,await this._provider.updateGeometryInfo(o),this._capabilities=$(await this._getFileStatistics(),this._hasZ,this._hasM);let s=await this._provider.getFiles();if(!s.length)return{layerDefinition:{},capabilities:$(null,this._hasZ,this._hasM)};let c=await s[0].file;a.file=c;let{fields:l}=a;if(l==null)throw new n(`parquet-layer:missing-metadata`,`Unable to create parquet source: cannot infer fields`,l);l.push(new j({name:K,type:`oid`,alias:K}));for(let e of l){let t=c.getColumnId(e.name);t!=null&&(this._indexMap[e.name]=t)}let u=M.fromLayerJSON({fields:l.map(e=>e.toJSON()),dateFieldsTimeReference:{timeZoneIANA:`UTC`}});this._fieldsIndex=u;let f=L(a.geometryType??`point`);return this._metadata=U.createFeature({fieldsIndex:u.toJSON(),geometryType:f,hasZ:this._hasZ,hasM:this._hasM,featureIdInfo:{type:`object-id`,fieldName:K},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:a.spatialReference,outSpatialReference:null,attributeSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:z}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:f,featureIdInfo:{type:`object-id`,fieldName:K},hasM:this._hasM,hasZ:this._hasZ,spatialReference:a.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},this._fullExtent=r?.extent?r.extent:await this._tryDeriveParquetFullExtent(a),{capabilities:this._capabilities,layerDefinition:{fields:a.fields?.map(e=>e.toJSON()),drawingInfo:oe(f),extent:this._fullExtent??void 0,geometryType:f,hasZ:this._hasZ,hasM:this._hasM,geometryEncoding:a.geometryEncoding?.toJSON(),displayOptimization:a.displayOptimization}}}destroy(){this._provider.destroy(),this._queue.destroy();for(let{handle:e}of this._streams.values())e.remove();this._streams.clear(),this._indexMap={},this._handles.removeAll()}async reload(e){this.destroy(),await this.load(e)}set remoteClient(e){this._source=e.createInvokeProxy(``)}setCustomParameters(e){this._customParameters=e}getIndexMap(){return this._indexMap}async updateFileProvider(e){this._loadParameters={...this._loadParameters,provider:e};let t=O(e,this._provider.getGeometryInfo(),()=>this._customParameters);await this._updateProvider(t)}async getDiagnosticsSnapshot(){let e=await this._provider.getFiles();return{files:await Promise.all(e.map(e=>e.getDiagnosticsSnapshot()))}}async getColumnIndex(e){return(await this._getFileInfoById(e.fileId)).getColumnIndex(e.rowGroupIndex,e.columnIndex)}async getOffsetIndex(e){return(await this._getFileInfoById(e.fileId)).getOffsetIndex(e.rowGroupIndex,e.columnIndex)}async queryFeatures(e,t){let n=await D(e,null,this._queryEngineParams.spatialReference);return this._validateQuery(n),Te(n)||(n.resultRecordCount=n.resultRecordCount?Math.min(n.resultRecordCount,q):q,n.resultOffset=n.resultOffset??0),n.outStatistics?this._queryStatistics(n,t):(n.returnDistinctValues&&(n.returnGeometry=void 0),(await this._enqueueQuery(n,t)).createQueryResponse())}async queryFeatureCount(e,t){let n=await D(e,null,this._queryEngineParams.spatialReference);return this._validateQuery(n),!J(n)&&!n.returnDistinctValues&&!n.groupByFieldsForStatistics?.length&&!n.outStatistics?.length?this._getFeatureCount():(n.returnDistinctValues||(n.outFields=void 0),n.returnGeometry=void 0,(await this._enqueueQuery(n,t)).createQueryResponseForCount())}async queryObjectIds(e,t){let n=await D(e,null,this._queryEngineParams.spatialReference);return this._validateQuery(n),J(n)?(n.resultRecordCount=n.resultRecordCount?Math.min(n.resultRecordCount,8e3):8e3,n.resultOffset=n.resultOffset??0,n.returnGeometry=void 0,n.outFields=void 0,n.returnDistinctValues=void 0,(await this._enqueueQuery(n,t)).items.map(e=>e.getObjectId())):Array.from({length:await this._getFeatureCount()},(e,t)=>t)}async queryAttributeBins(e,t={}){throw new n(`parquet:unsupported`,`queryAttributeBins not supported.`)}async queryExtent(e,t){let n=await D(e,null,this._queryEngineParams.spatialReference);this._validateQuery(n);let r=n.outSR??this._queryEngineParams.spatialReference;if(this._fullExtent&&!J(n)){let e=this._fullExtent;return await u(e.spatialReference,n.outSR),{count:await this._getFeatureCount(),extent:n.outSR?ie(e,n.outSR):e}}n.returnGeometry=!0,n.outFields=void 0;let i=f(p(),g),a=p(),o=await this._enqueueQuery(n,t),s=0;for(let e of o.items)e.getBounds(a)&&(m(i,a),s+=1);let c=ae(i,r,r,r,!1);return{count:s,extent:c}}async queryStream(e,t){if(!t.signal)throw Error(`InternalError: AbortSignal must be passed`);let n=await this._getCandidateFiles(e),r=new le(n,async(t,n)=>{let r=await t.file,i=await this._createParquetDisplayQuery(r,t.id,e);return r.executeQuery(i,q,n)}),i=this._streamIdCounter++,o=a(t.signal,e=>{let t=this._streams.get(i);t!=null&&(t.handle.remove(),this._streams.delete(i))});return this._streams.set(i,{stream:r,handle:o}),i}async getStreamNext(e,t){if(!t.signal)throw Error(`InternalError: AbortSignal must be passed`);let n=this._streams.get(e);if(!n)return{result:null};let r=await n.stream.next(t.signal);if(r==null)return n.handle.remove(),this._streams.delete(e),{result:null};let i=r.chunk.serialize().buffer,a={fileId:r.fileId,buffer:i};return i instanceof ArrayBuffer?{result:a,transferList:[i]}:{result:a}}async getStreamNextFeatures(e,t){let{result:n}=await this.getStreamNext(e,t);if(n==null)return null;let r=(await R()).ParquetChunk.deserialize(new Uint8Array(n.buffer)),i=new W(this._metadata,this._indexMap,r,n.fileId),a=[];for(;i.next();){let e=S(i.readGeometryWorldSpace(),i.geometryType,i.hasZ,i.hasM),t=i.readAttributes();a.push({attributes:t,geometry:e})}return{features:a}}async createPatch(e,t,n,r,i){if(!i.signal)throw Error(`InternalError: AbortSignal must be passed`);return(await(await(await this._getFileInfoById(e)).file).createChunkPatch(t,n,r,i.signal)).serialize().buffer}async _updateProvider(e){let t=this._provider;this._handles.removeAll(),this._provider=e,this._handles.add([e.events.on(`rangeRead`,e=>{this._source.onRangeRead(e)}),e.events.on(`sourceChanged`,async()=>{await this.reload(this._loadParameters),await this._source.onSourceChange()})]),await t?.destroy()}async _getCandidateFiles(e){let t=await this._provider.getFiles(),n=await this._getSpatialFilePruning(e);if(n==null)return t;let r=t.filter(e=>this._mayIncludeFileForSpatialPruning(e,n));return n.type===`xz`?we(r,n):r}async _queryStatistics(e,t){let n=await D({...e},null,this._queryEngineParams.spatialReference);if(n.returnGeometry=void 0,ve(n,this._fieldsIndex)){let e=await this._getStatisticsFromFiles(n);if(e)return e}return(await this._enqueueQuery(n,t)).createQueryResponse()}async _getStatisticsFromFiles(e){let t=await this._provider.getFiles(),n={},r=[];for(let i of e.outStatistics??[]){let e=xe(i,t);if(!e.available)return null;n[i.outStatisticFieldName]=e.value,r.push(be(i,this._fieldsIndex))}return{fields:r,features:[{attributes:n}]}}async _getSpatialFilePruning(e){if(e.type!==`tile`&&(e.type!==`arcade`||e.extent==null))return null;let t=this._displayOptimization?.index;if(t==null)return null;let n=e.outSpatialReference.wkid;if(t.wkid==null||n==null)return null;let r=t.wkid,i=await R();switch(t.type){case`xz`:return{type:`xz`,fieldName:x(t.code),intersects:(a,o)=>i.queryIntersectsXZStatistics(t.fullExtent,e.extent,n,r,t.maxLevel,a,o)};case`z`:return{type:`xy`,xFieldName:x(t.xColumn),yFieldName:x(t.yColumn),intersects:(t,a,o,s)=>i.queryIntersectsXYStatistics(e.extent,n,r,t,a,o,s)}}}_mayIncludeFileForSpatialPruning(e,t){switch(t.type){case`xz`:{let n=Z(e,t);return n?.type===`null-only`?!1:n?.type!==`bounds`||t.intersects(n.minValue,n.maxValue)}case`xy`:{let n=e.statistics.statistics.get(t.xFieldName),r=e.statistics.statistics.get(t.yFieldName);return n?.type===`null-only`||r?.type===`null-only`?!1:n?.type!==`bounds`||r?.type!==`bounds`||t.intersects(n.minValue,n.maxValue,r.minValue,r.maxValue)}}}async _tryDeriveParquetFullExtent(n){if(!n.spatialReference)return null;if(this._fullExtent==null&&n.geometryEncoding?.type===`location`){let r=await this._provider.getFiles(),{xField:i,yField:a}=n.geometryEncoding,o=f(p(),g),s=!1;for(let n of r){let r=await n.file;for(let n of r.rowGroups()){let r={stack:[],error:void 0,hasError:!1};try{let t=e(r,n.columnDescriptorForAttribute(i),!1),c=e(r,n.columnDescriptorForAttribute(a),!1),l=k(t),u=k(c);if(l?.type===`bounds`&&u?.type===`bounds`){let e=[l.minValue,u.minValue,l.maxValue,u.maxValue];h(o,e),s=!0}n.free()}catch(e){r.error=e,r.hasError=!0}finally{t(r)}}}return s?{xmin:o[0],ymin:o[1],xmax:o[3],ymax:o[4],spatialReference:n.spatialReference?.toJSON()}:null}return null}async _getFileInfoById(e){let t=await this._provider.getFiles();for(let n of t)if(n.id===e)return n;throw Error(`InternalError: File ${e} does not exist`)}async _getFileStatistics(){return{featureCount:await this._getFeatureCount(),byteLength:await this._getByteLength()}}async _getFile(e){return(await this._getFileInfoById(e)).file}async _createParquetQuery(e,t,n,r,i){let a=(await R()).Query.new();n!=null&&a.setPreFilterStart(n),r!=null&&a.setPreFilterCount(r),i!=null&&a.setPostFilterCount(i);let o=await this._getRequiredFields(e);a.setOutFields(o),(e.geometry||e.returnGeometry)&&a.setReturnGeometry(!0),a.setReturnZ(!!e.returnZ),a.setReturnM(!!e.returnM);let s=this._tryGetGeneralizedGeometryResolution(e);s!=null&&a.setSourceResolution(s);let c=e.geometry?.spatialReference??this._queryEngineParams.spatialReference,l=c.wkid;if(e.geometry&&(y(c)||b(c))){let t=_(v(),te);for(let n of C(e.geometry))ee(t,n);a.setOutSpatialReference(l),a.setExtent({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]})}if(e.where){let{id:n,file:r}=t;await this._setWhereClause(a,await r,n,e.where)}return a}async _createParquetDisplayQuery(e,t,n){let r=(await R()).Query.new();if(n.type===`tile`){r.setExtent(n.extent),r.setQuantizationTransform(n.transform);let e=this._sourceResolution(n.resolution,n.outSpatialReference);e!=null&&r.setSourceResolution(e)}else n.type===`arcade`&&n.extent!=null&&r.setExtent(n.extent);return r.setOutFields(n.outFields.filter(e=>this._indexMap[e]!=null)),r.setOutSpatialReference(n.outSpatialReference.wkid),r.setReturnGeometry(n.returnGeometry),r.setReturnZ(n.returnZ),r.setReturnM(n.returnM),n.where&&await this._setWhereClause(r,e,t,n.where),r}async _getFeatureCount(){return(await this._provider.getFiles()).map(e=>e.statistics.rowCount).reduce((e,t)=>e+t,0)}async _getByteLength(){return(await this._provider.getFiles()).map(e=>e.statistics.byteSize).reduce((e,t)=>e+t,0)}_validateQuery(e){if(!this._capabilities.query.supportsStatistics&&e.outStatistics)throw new n(`parquet:unsupported`,`Statistics queries are not supported`,{query:e});if(!this._capabilities.query.supportsOrderBy&&e.orderByFields?.length)throw new n(`parquet:unsupported`,`Queries using orderBy are not supported`,{query:e});if(!this._capabilities.query.supportsDistinct&&e.returnDistinctValues)throw new n(`parquet:unsupported`,`Queries using returnDistinctValues are not supported`,{query:e})}async _setWhereClause(e,t,r,i){let a=this._indexMap,o=this._fieldsIndex,s={getAttribute(e,n){let i=a[n];if(i==null){if(o.get(n)?.name===`__OBJECTID`){let t=e.row+e.rowGroupStart;return A(r,t)}return null}let s=o.get(n);return ne(t,e.rowGroup,e.row,i,s.type)}},l=await c(i,this._fieldsIndex);if(!l.isStandardized)throw new n(`sql-parse-error`,`expression is not standardized`);let u=(e,t,n)=>l.testFeatureCompiled({rowGroup:e,row:t,rowGroupStart:n},s,null),d=l.fieldNames.map(e=>o.get(e)).filter(e=>e&&this._indexMap[e?.name]!=null);e.setWhere(i),e.setWhereEvaluator(u),e.setWhereFields(d.map(e=>e.name))}async*_streamFeatures(e,t,n,r,i){let a=await this._provider.getFiles(),o=0;for(let s of a){let a=o,c=o+s.statistics.rowCount;if(o+=s.statistics.rowCount,t!=null&&t>=c)continue;let l=t==null?null:Math.max(t-a,0),u=n;if(n!=null){let e=t??0,r=e+n;u=Math.max(Math.min(r,c)-Math.max(e,a),0)}if(u===0)continue;let d=await this._createParquetQuery(e,s,l,u,r),f=await(await s.file).executeQuery(d,q),p=async()=>{let e=await f.next(i);if(!e)return null;let t=new W(this._metadata,this._indexMap,e,s.id);return X([new V(t,null,0,!1)],this._queryEngineParams)},m=await p();for(;m!=null;)yield m,m=await p()}}async _queryFeaturesWithQueryEnginePagination(e,t){let n=[],r=this._streamFeatures(e,null,null,null,t),i=await r.next();for(;!i.done;){let a=await i.value.executeQueryForOpaqueFeatures({...e,where:void 0},t);for(let e of a)n.push(e);i=await r.next()}return n}async _queryFeaturesWithUpfrontPagination(e,t){let n=e.resultOffset??0,r=e.resultRecordCount??q,i,a,o;ge(e)?_e(e)||(o=n+r):(n&&=(i=n,0),a=e.resultRecordCount);let s=[],c=this._streamFeatures(e,i,a,o,t),l=await c.next();for(;!l.done&&r>0;){let i=await l.value.executeQueryForOpaqueFeatures({...e,where:void 0},t);for(let e of i)if(n>0)n--;else if(s.push(e),--r<=0)return s;l=await c.next()}return s}_enqueueQuery(e,t){return this._queue.push(e,t)}async _executeQuery(e,t){if(e.objectIds?.length){let n=new Map;for(let t of e.objectIds){let e=se(t),r=ce(t),i=n.get(e);i||(i=[],n.set(e,i)),i.push(r)}let r=[];for(let[i,a]of n.entries()){let n=await this._executeFileIdQuery(e,i,a,t);for(let e of n)r.push(e)}return new E(r,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:this._hasM,hasZ:this._hasZ,featureAdapter:G,featureIdInfo:this._queryEngineParams.featureIdInfo})}if(e.where===`1=1`&&(e.where=null),e.resultOffset??=0,e.resultRecordCount??=await this._getFeatureCount(),e.resultRecordCount>2e7&&!(this._displayOptimization&&e.geometry))throw new n(`parquet:cannot-execute-query`,`Unable to execute query, dataset is too large.`);let r=!!e.orderByFields?.length||!!e.outStatistics?.length||!!e.returnDistinctValues,i=r?await this._queryFeaturesWithQueryEnginePagination(e,t):await this._queryFeaturesWithUpfrontPagination(e,t);return r||(e.resultOffset=0),new E(i,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:this._hasM,hasZ:this._hasZ,featureAdapter:G,featureIdInfo:this._queryEngineParams.featureIdInfo})}async _executeFileIdQuery(e,t,n,r){let i=new Set(await this._getRequiredFields(e));if(e.where){let t=await c(e.where,this._fieldsIndex);for(let e of t.fieldNames){let t=this._fieldsIndex.get(e);t&&this._indexMap[t.name]!=null&&i.add(t.name)}}let a=(await R()).Query.new();a.setOutFields(Array.from(i)),a.setReturnGeometry(!!e.returnGeometry),a.setReturnZ(!!e.returnZ),a.setReturnM(!!e.returnM),a.setIds(new Uint32Array(n));let o=await(await this._getFile(t)).executeQuery(a,q,r),s=await o.next(r),l=0,u=[];for(;s!=null;){let e=new W(this._metadata,this._indexMap,s,t),n=new V(e,null,l++,!1);u.push(n),s=await o.next(r)}return X(u,this._queryEngineParams).executeQueryForOpaqueFeatures(e,r)}async _getRequiredFields(e){let t=new Set;if(e.outStatistics)for(let n of re(this._fieldsIndex,e.outStatistics,e.groupByFieldsForStatistics))t.add(n);else if(e.outFields)for(let n of e.outFields)t.add(n);return(t.has(`*`)?this._fieldsIndex.fields.map(e=>e.name):Array.from(t)).filter(e=>this._indexMap[e]!=null)}_tryGetGeneralizedGeometryResolution(e){if(!this._displayOptimization)return null;let t=e.outSR??this._queryEngineParams.spatialReference;if(!y(t)&&!b(t))return null;let n=e.quantizationParameters?.tolerance??e.maxAllowableOffset;return n?this._sourceResolution(n,t):null}_sourceResolution(e,t){let n=this._queryEngineParams.spatialReference,r=l(t)/l(n)*e;return!Number.isFinite(r)||r<=0?null:r}}function pe(e){switch(e){case`fullText`:case`having`:case`timeExtent`:case`historicMoment`:case`aggregateIds`:case`uniqueIds`:case`gdbVersion`:case`objectIds`:case`where`:case`geometry`:case`resultOffset`:case`resultRecordCount`:return!0;default:return!1}}function me(e){switch(e){case`fullText`:case`having`:case`timeExtent`:case`historicMoment`:case`aggregateIds`:case`uniqueIds`:case`gdbVersion`:case`objectIds`:case`where`:case`geometry`:return!0;default:return!1}}function he(e){switch(e){case`fullText`:case`having`:case`timeExtent`:return!0;case`historicMoment`:case`aggregateIds`:case`uniqueIds`:case`gdbVersion`:return!1;case`objectIds`:case`where`:case`resultOffset`:case`geometry`:case`resultRecordCount`:return!1}return!1}function J(e){for(let t in e){let n=t;if(pe(n)&&e[n]!==null)return!0}return!1}function ge(e){for(let t in e){let n=t;if(me(n)&&e[n]!==null)return!0}return!1}function _e(e){for(let t in e){let n=t;if(he(n)&&e[n]!==null)return!0}return!1}function ve(e,t){return!!e.outStatistics?.length&&!J(e)&&!e.groupByFieldsForStatistics?.length&&!e.orderByFields?.length&&!e.returnDistinctValues&&!e.returnAggIds&&e.outStatistics.every(e=>ye(e,t))}function ye(e,t){switch(e.statisticType){case`count`:return e.onStatisticField===`1`||t.get(e.onStatisticField)!=null;case`min`:case`max`:{let n=t.get(e.onStatisticField);return n!=null&&N(n)}default:return!1}}function be(e,t){let n=e.statisticType===`exceedslimit`?null:t.get(e.onStatisticField),r=(e.statisticType===`min`||e.statisticType===`max`)&&n?.type===`esriFieldTypeDate`?n.type:`esriFieldTypeDouble`;return{name:e.outStatisticFieldName,alias:e.outStatisticFieldName,type:r}}function xe(e,t){switch(e.statisticType){case`count`:return Se(e,t);case`min`:return Y(e,t,Math.min);case`max`:return Y(e,t,Math.max);default:return{available:!1,value:null}}}function Se(e,t){if(e.statisticType!==`count`)return{available:!1,value:null};if(e.onStatisticField===`1`)return{available:!0,value:t.reduce((e,t)=>e+t.statistics.rowCount,0)};let n=0;for(let r of t){let t=r.statistics.statistics.get(e.onStatisticField);if(t==null||t.nullCount==null)return{available:!1,value:null};n+=r.statistics.rowCount-t.nullCount}return{available:!0,value:n}}function Y(e,t,n){if(e.statisticType!==`min`&&e.statisticType!==`max`)return{available:!1,value:null};let r=null,i=e.statisticType===`min`?`minValue`:`maxValue`;for(let a of t){let t=a.statistics.statistics.get(e.onStatisticField);if(t==null)return{available:!1,value:null};switch(t.type){case`null-only`:continue;case`unknown`:return{available:!1,value:null};case`bounds`:{let e=Ce(t[i]);if(e==null)return{available:!1,value:null};r=r==null?e:n(r,e);break}}}return{available:!0,value:r}}function Ce(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function X(e,t){let n=new H;for(let t of e)n.insert(t);return new w({...t,featureStore:n})}function Z(e,t){return e.statistics.statistics.get(t.fieldName)??null}function we(e,t){return e.slice().sort((e,n)=>{let r=Q(e,t),i=Q(n,t);return r===i?0:r<i?-1:1})}function Q(e,t){let n=Z(e,t);return n?.type===`bounds`?n.maxValue-n.minValue:1/0}function $(e,t,n){let r=e?.featureCount,i=!1;return r!=null&&r<has(`parquetlayer-full-query-feature-count`)&&(i=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:n,supportsTrueCurve:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{...T,maxRecordCount:q,supportsOrderBy:i,supportsDistinct:!0,supportsStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1}},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}function Te(e){return!!e.objectIds?.length||!!e.outStatistics||!!e.orderByFields?.length||!!e.returnDistinctValues}export{fe as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import n from"../../../../core/Error.js";import has from"../../../../core/has.js";import{whenOrAbort as r}from"../../../../core/promiseUtils.js";import{urlToObject as i}from"../../../../core/urlUtils.js";import{property as a,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{equals as s}from"../../../../geometry/support/spatialReferenceUtils.js";import{getGltfQueryFormat as c}from"../../../support/infoFor3D.js";import{parseUrl as l}from"../../../../rest/utils.js";import{dynamicDataSourceTypes as u}from"../../../../rest/layerSources/typeUtils.js";import{executeForCount as d}from"../../../../rest/query/executeForCount.js";import{executeForExtent as f}from"../../../../rest/query/executeForExtent.js";import{executeForIds as p}from"../../../../rest/query/executeForIds.js";import{executeRawQueryJSON as m}from"../../../../rest/query/executeQueryJSON.js";import{executeRawQueryPBF as h}from"../../../../rest/query/executeQueryPBF.js";import g from"../../../../rest/support/FeatureSet.js";import _ from"../../../../rest/support/Query.js";let v=class extends t{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.pbfSupportedWithCurves=!1,this.queryAttachmentsSupported=!1,this.relativeTimeBinWindow=0,this.sourceSpatialReference=null,this.timeInformation=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return i(this.url)}async execute(e,t){let n=await this.executeJSON(e,t);return this.featureSetFromJSON(e,n,t)}async executeJSON(e,t){let n=this._normalizeQuery(e),r=e.outStatistics?.[0]!=null,i=has(`featurelayer-pbf-statistics`),a=this.pbfSupported&&(!r||i)&&(!e.returnTrueCurves||this.pbfSupportedWithCurves),o;if(a)try{o=await h(this.url,n,t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}catch(e){if(e.name===`query:parsing-pbf`)this.pbfSupported=!1;else throw e}return o??=await m(this.url,n,t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(o.fields),o}async featureSetFromJSON(e,t,n){if(!this._queryGet3DObjectFormat(e)||this.infoFor3D==null||!t.features)return g.fromJSON(t);let{meshFeatureSetFromJSON:i}=await r(import(`../../../../rest/support/meshFeatureSet.js`),n);return i(e,this.infoFor3D,t)}executeForCount(e,t){return d(this.url,this._normalizeQuery(e),t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}executeForExtent(e,t){return f(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return p(this.url,this._normalizeQuery(e),t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(e,t){let[{default:n},{executeRelationshipQuery:i}]=await r(Promise.all([import(`../../../../rest/support/RelationshipQuery.js`),import(`../../../../rest/query/executeRelationshipQuery.js`)]),t),a=n.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(a=a.clone(),a.gdbVersion=a.gdbVersion||this.gdbVersion,a.dynamicDataSource=a.dynamicDataSource||this.dynamicDataSource),i(this.url,a,t)}async executeRelationshipQueryForCount(e,t){let[{default:n},{executeRelationshipQueryForCount:i}]=await r(Promise.all([import(`../../../../rest/support/RelationshipQuery.js`),import(`../../../../rest/query/executeRelationshipQuery.js`)]),t),a=n.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(a=a.clone(),a.gdbVersion=a.gdbVersion||this.gdbVersion,a.dynamicDataSource=a.dynamicDataSource||this.dynamicDataSource),i(this.url,a,t)}async executeAttachmentQuery(e,t){let{executeAttachmentQuery:n,fetchAttachments:i,processAttachmentQueryResult:a}=await r(import(`../../../../rest/query/operations/queryAttachments.js`),t),o=l(this.url);return a(o,await(this.queryAttachmentsSupported?n(o,e,t):i(o,e,t)))}async executeAttributeBinsQuery(e,t){let{executeAttributeBinsQuery:n}=await r(import(`../../../../rest/query/executeAttributeBinsQuery.js`),t);return n(this.parsedUrl,e,t)}async executePivotQuery(e,t){let{executePivotQuery:n}=await r(import(`../../../../rest/query/executePivotQuery.js`),t);return n(this.parsedUrl,e,t)}async executeTopFeaturesQuery(e,t){let{executeTopFeaturesQuery:n}=await r(import(`../../../../rest/query/executeTopFeaturesQuery.js`),t);return n(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){let{executeForTopIds:n}=await r(import(`../../../../rest/query/executeForTopIds.js`),t);return n(this.parsedUrl,e,t)}async executeForTopExtents(e,t){let{executeForTopExtents:n}=await r(import(`../../../../rest/query/executeForTopExtents.js`),t);return n(this.parsedUrl,e,t)}async executeForTopCount(e,t){let{executeForTopCount:n}=await r(import(`../../../../rest/query/executeForTopCount.js`),t);return n(this.parsedUrl,e,t)}_normalizeQuery(e){let t=_.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource);let{infoFor3D:r}=this,i=this._queryGet3DObjectFormat(e);if(r!=null&&i){if(t=t===e?t.clone():t,t.formatOf3DObjects=i,t.outSpatialReference&&!s(t.outSpatialReference,this.sourceSpatialReference))throw new n(`query:unsupported-out-spatial-reference`,`3D object feature services do not support projection of geometries`);if(t.outFields==null||!t.outFields.includes(`*`)){t=t===e?t.clone():t,t.outFields??(t.outFields=[]);let{originX:n,originY:i,originZ:a,translationX:o,translationY:s,translationZ:c,scaleX:l,scaleY:u,scaleZ:d,rotationX:f,rotationY:p,rotationZ:m,rotationDeg:h}=r.transformFieldRoles;t.outFields.push(n,i,a,o,s,c,l,u,d,f,p,m,h)}}return t}_normalizeFields(e){if(this.fieldsIndex!=null&&e!=null)for(let t of e){let e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryGet3DObjectFormat({returnGeometry:e,multipatchOption:t,outStatistics:n}){return e===!0&&t!==`xyFootprint`&&!n?c(this.infoFor3D):null}};e([a({types:u})],v.prototype,`dynamicDataSource`,void 0),e([a()],v.prototype,`fieldsIndex`,void 0),e([a()],v.prototype,`gdbVersion`,void 0),e([a()],v.prototype,`infoFor3D`,void 0),e([a({readOnly:!0})],v.prototype,`parsedUrl`,null),e([a()],v.prototype,`pbfSupported`,void 0),e([a()],v.prototype,`pbfSupportedWithCurves`,void 0),e([a()],v.prototype,`queryAttachmentsSupported`,void 0),e([a()],v.prototype,`relativeTimeBinWindow`,void 0),e([a()],v.prototype,`sourceSpatialReference`,void 0),e([a()],v.prototype,`timeInformation`,void 0),e([a()],v.prototype,`uniqueIdFields`,void 0),e([a({type:String})],v.prototype,`url`,void 0),v=e([o(`esri.layers.graphics.sources.support.QueryTask`)],v);export{v as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import n from"../../../../core/Error.js";import has from"../../../../core/has.js";import{whenOrAbort as r}from"../../../../core/promiseUtils.js";import{urlToObject as i}from"../../../../core/urlUtils.js";import{property as a,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{equals as s}from"../../../../geometry/support/spatialReferenceUtils.js";import{getGltfQueryFormat as c}from"../../../support/infoFor3D.js";import{parseUrl as l}from"../../../../rest/utils.js";import{dynamicDataSourceTypes as u}from"../../../../rest/layerSources/typeUtils.js";import{executeForCount as d}from"../../../../rest/query/executeForCount.js";import{executeForExtent as f}from"../../../../rest/query/executeForExtent.js";import{executeForIds as p}from"../../../../rest/query/executeForIds.js";import{executeRawQueryJSON as m}from"../../../../rest/query/executeQueryJSON.js";import{executeRawQueryPBF as h}from"../../../../rest/query/executeQueryPBF.js";import g from"../../../../rest/support/FeatureSet.js";import _ from"../../../../rest/support/Query.js";let v=class extends t{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.pbfSupportedWithCurves=!1,this.queryAttachmentsSupported=!1,this.relativeTimeBinWindow=0,this.sourceSpatialReference=null,this.timeInformation=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return i(this.url)}async execute(e,t){let n=await this.executeJSON(e,t);return this.featureSetFromJSON(e,n,t)}async executeJSON(e,t){let n=this._normalizeQuery(e),r=e.outStatistics?.[0]!=null,i=has(`featurelayer-pbf-statistics`),a=this.pbfSupported&&(!r||i)&&(!e.returnTrueCurves||this.pbfSupportedWithCurves),o;if(a)try{o=await h(this.url,n,t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}catch(e){if(e.name===`query:parsing-pbf`)this.pbfSupported=!1;else throw e}return o??=await m(this.url,n,t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(o.fields),o}async featureSetFromJSON(e,t,n){if(!this._queryGet3DObjectFormat(e)||this.infoFor3D==null||!t.features)return g.fromJSON(t);let{meshFeatureSetFromJSON:i}=await r(import(`../../../../rest/support/meshFeatureSet.js`),n);return i(e,this.infoFor3D,t)}executeForCount(e,t){return d(this.url,this._normalizeQuery(e),t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}executeForExtent(e,t){return f(this.url,this._normalizeQuery(e),t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}executeForIds(e,t){return p(this.url,this._normalizeQuery(e),t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(e,t){let[{default:n},{executeRelationshipQuery:i}]=await r(Promise.all([import(`../../../../rest/support/RelationshipQuery.js`),import(`../../../../rest/query/executeRelationshipQuery.js`)]),t),a=n.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(a=a.clone(),a.gdbVersion=a.gdbVersion||this.gdbVersion,a.dynamicDataSource=a.dynamicDataSource||this.dynamicDataSource),i(this.url,a,t)}async executeRelationshipQueryForCount(e,t){let[{default:n},{executeRelationshipQueryForCount:i}]=await r(Promise.all([import(`../../../../rest/support/RelationshipQuery.js`),import(`../../../../rest/query/executeRelationshipQuery.js`)]),t),a=n.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(a=a.clone(),a.gdbVersion=a.gdbVersion||this.gdbVersion,a.dynamicDataSource=a.dynamicDataSource||this.dynamicDataSource),i(this.url,a,t)}async executeAttachmentQuery(e,t){let{executeAttachmentQuery:n,fetchAttachments:i,processAttachmentQueryResult:a}=await r(import(`../../../../rest/query/operations/queryAttachments.js`),t),o=l(this.url);return a(o,await(this.queryAttachmentsSupported?n(o,e,t):i(o,e,t)))}async executeAttributeBinsQuery(e,t){let{executeAttributeBinsQuery:n}=await r(import(`../../../../rest/query/executeAttributeBinsQuery.js`),t);return n(this.parsedUrl,e,t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}async executePivotQuery(e,t){let{executePivotQuery:n}=await r(import(`../../../../rest/query/executePivotQuery.js`),t);return n(this.parsedUrl,e,t)}async executeTopFeaturesQuery(e,t){let{executeTopFeaturesQuery:n}=await r(import(`../../../../rest/query/executeTopFeaturesQuery.js`),t);return n(this.parsedUrl,e,this.sourceSpatialReference,t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}async executeForTopIds(e,t){let{executeForTopIds:n}=await r(import(`../../../../rest/query/executeForTopIds.js`),t);return n(this.parsedUrl,e,t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}async executeForTopExtents(e,t){let{executeForTopExtents:n}=await r(import(`../../../../rest/query/executeForTopExtents.js`),t);return n(this.parsedUrl,e,t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}async executeForTopCount(e,t){let{executeForTopCount:n}=await r(import(`../../../../rest/query/executeForTopCount.js`),t);return n(this.parsedUrl,e,t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}_normalizeQuery(e){let t=_.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource);let{infoFor3D:r}=this,i=this._queryGet3DObjectFormat(e);if(r!=null&&i){if(t=t===e?t.clone():t,t.formatOf3DObjects=i,t.outSpatialReference&&!s(t.outSpatialReference,this.sourceSpatialReference))throw new n(`query:unsupported-out-spatial-reference`,`3D object feature services do not support projection of geometries`);if(t.outFields==null||!t.outFields.includes(`*`)){t=t===e?t.clone():t,t.outFields??(t.outFields=[]);let{originX:n,originY:i,originZ:a,translationX:o,translationY:s,translationZ:c,scaleX:l,scaleY:u,scaleZ:d,rotationX:f,rotationY:p,rotationZ:m,rotationDeg:h}=r.transformFieldRoles;t.outFields.push(n,i,a,o,s,c,l,u,d,f,p,m,h)}}return t}_normalizeFields(e){if(this.fieldsIndex!=null&&e!=null)for(let t of e){let e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryGet3DObjectFormat({returnGeometry:e,multipatchOption:t,outStatistics:n}){return e===!0&&t!==`xyFootprint`&&!n?c(this.infoFor3D):null}};e([a({types:u})],v.prototype,`dynamicDataSource`,void 0),e([a()],v.prototype,`fieldsIndex`,void 0),e([a()],v.prototype,`gdbVersion`,void 0),e([a()],v.prototype,`infoFor3D`,void 0),e([a({readOnly:!0})],v.prototype,`parsedUrl`,null),e([a()],v.prototype,`pbfSupported`,void 0),e([a()],v.prototype,`pbfSupportedWithCurves`,void 0),e([a()],v.prototype,`queryAttachmentsSupported`,void 0),e([a()],v.prototype,`relativeTimeBinWindow`,void 0),e([a()],v.prototype,`sourceSpatialReference`,void 0),e([a()],v.prototype,`timeInformation`,void 0),e([a()],v.prototype,`uniqueIdFields`,void 0),e([a({type:String})],v.prototype,`url`,void 0),v=e([o(`esri.layers.graphics.sources.support.QueryTask`)],v);export{v as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import e from"../../../support/TimeInfo.js";import{hasSameTimeFields as t}from"../../../support/timeInfoUtils.js";import{timeExtentToSQL as n}from"../../../../rest/support/timeUtils.js";function r(r,i,a,o){if(!r.timeExtent||!i&&!a)return r;let s=r.clone();if(i&&a){if(!t(i,e.fromJSON(a))){let e=n(r.timeExtent,i,o,r.where);e&&(s.where=e,s.timeExtent=void 0)}return s}return!i&&a?(s.timeExtent=void 0,s):(i&&!a&&(s.where=n(r.timeExtent,i,o,r.where),s.timeExtent=void 0),s)}export{r as applyTimeExtentToQuery};
|
|
@@ -18,7 +18,7 @@ export abstract class APIKeyMixin {
|
|
|
18
18
|
*
|
|
19
19
|
* @since 4.20
|
|
20
20
|
* @see [Item access privileges](https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/api-key-credentials/#item-access-privileges)
|
|
21
|
-
* @see [
|
|
21
|
+
* @see [Authentication and access tokens](https://developers.arcgis.com/javascript/latest/authentication/access-tokens/#api-keys)
|
|
22
22
|
* @example
|
|
23
23
|
* // set the api key to access a protected service
|
|
24
24
|
* const layer = new FeatureLayer({
|
package/layers/ogc/types.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ export interface QueryParameters {
|
|
|
87
87
|
*
|
|
88
88
|
* @since 5.0
|
|
89
89
|
* @see [Item access privileges](https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/api-key-credentials/#item-access-privileges)
|
|
90
|
-
* @see [
|
|
90
|
+
* @see [Authentication and access tokens](https://developers.arcgis.com/javascript/latest/authentication/access-tokens/#api-keys)
|
|
91
91
|
* @example
|
|
92
92
|
* // set the api key to access a protected service
|
|
93
93
|
* const layer = new FeatureLayer({
|
|
@@ -16,9 +16,21 @@ export interface TelemetryDataProperties {
|
|
|
16
16
|
lineOfSight?: PolylineProperties | null;
|
|
17
17
|
/** The location of the sensor. */
|
|
18
18
|
sensorLocation?: PointProperties | null;
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* The path that the moving sensor follows through the duration of the video collection.
|
|
21
|
+
* When coverage data is available, this is the remaining route the sensor will travel. If
|
|
22
|
+
* coverage data is unavailable on the layer, this polyline is not hydrated. Vertex M values
|
|
23
|
+
* represent video offset time in milliseconds. The path starts at the current sensor location,
|
|
24
|
+
* or at a time-interpolated route position when the sensor location is unavailable.
|
|
25
|
+
*/
|
|
20
26
|
sensorPath?: PolylineProperties | null;
|
|
21
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* The trail of the sensor. This polyline is created by vertex points from available coverage
|
|
29
|
+
* data up to the current playback offset. When coverage data is unavailable, the vertices of
|
|
30
|
+
* this polyline feature are built from the playback cue changes that contain sensor location
|
|
31
|
+
* values. Vertex M values represent video offset time in milliseconds. The trail ends at the
|
|
32
|
+
* same current position where the remaining sensor path starts.
|
|
33
|
+
*/
|
|
22
34
|
sensorTrail?: PolylineProperties | null;
|
|
23
35
|
}
|
|
24
36
|
|
|
@@ -43,10 +55,22 @@ export default class TelemetryData extends TelemetryDataSuperclass {
|
|
|
43
55
|
/** The location of the sensor. */
|
|
44
56
|
get sensorLocation(): Point | null | undefined;
|
|
45
57
|
set sensorLocation(value: PointProperties | null | undefined);
|
|
46
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* The path that the moving sensor follows through the duration of the video collection.
|
|
60
|
+
* When coverage data is available, this is the remaining route the sensor will travel. If
|
|
61
|
+
* coverage data is unavailable on the layer, this polyline is not hydrated. Vertex M values
|
|
62
|
+
* represent video offset time in milliseconds. The path starts at the current sensor location,
|
|
63
|
+
* or at a time-interpolated route position when the sensor location is unavailable.
|
|
64
|
+
*/
|
|
47
65
|
get sensorPath(): Polyline | null | undefined;
|
|
48
66
|
set sensorPath(value: PolylineProperties | null | undefined);
|
|
49
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* The trail of the sensor. This polyline is created by vertex points from available coverage
|
|
69
|
+
* data up to the current playback offset. When coverage data is unavailable, the vertices of
|
|
70
|
+
* this polyline feature are built from the playback cue changes that contain sensor location
|
|
71
|
+
* values. Vertex M values represent video offset time in milliseconds. The trail ends at the
|
|
72
|
+
* same current position where the remaining sensor path starts.
|
|
73
|
+
*/
|
|
50
74
|
get sensorTrail(): Polyline | null | undefined;
|
|
51
75
|
set sensorTrail(value: PolylineProperties | null | undefined);
|
|
52
76
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{isMultiOriginJSONMixin as n}from"../../core/multiOriginJSONSupportUtils.js";import{
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{isMultiOriginJSONMixin as n}from"../../core/multiOriginJSONSupportUtils.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{hasSameTimeFields as a}from"./timeInfoUtils.js";import{timeExtentToSQL as o,timeExtentToQueryParameter as s}from"../../rest/support/timeUtils.js";let c=class extends t{constructor(e){super(e),this.fieldsIndex=null,this.layer=null}getExpression(e){let{layer:t}=this;if(!t)return;let r=t.timeInfo;if(!n(t))return{type:`where`,value:o(e,r,this.fieldsIndex)};let i=t.getAtOrigin(`timeInfo`,`service`);if(i)return r?r===i||a(r,i)?{type:`time`,value:s(e)}:{type:`where`,value:o(e,r,this.fieldsIndex)}:void 0;if(r)return{type:`where`,value:o(e,r,this.fieldsIndex)}}};e([r({constructOnly:!0})],c.prototype,`fieldsIndex`,void 0),e([r({constructOnly:!0})],c.prototype,`layer`,void 0),c=e([i(`esri.layers.support.TimeInformation`)],c);export{c as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{rad2deg as e}from"../../core/mathUtils.js";import{subtract as
|
|
2
|
+
import{rad2deg as e}from"../../core/mathUtils.js";import{identity as t}from"../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{subtract as r,add as i,transformMat4 as a,copy as o,min as s,max as c,sub as l}from"../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as u,create as d}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{WGS84ECEFSpatialReferenceLike as f}from"../../geometry/ellipsoidUtils.js";import p from"../../geometry/Extent.js";import m from"../../geometry/HeightModelInfo.js";import h from"../../geometry/SpatialReference.js";import{projectBuffer as g}from"../../geometry/projection/projectBuffer.js";import{nullId as _}from"../ILyr3DWasmPerSceneView.js";const v=new h({wkid:4326,vcsWkid:115700}),y=new p(-180,-90,180,90,v);function b(e,t){if(!Array.isArray(e)||e.length<t)return!1;for(let t of e)if(typeof t!=`number`)return!1;return!0}const x=7645211,S={xmin:-180,ymin:-90,zmin:-450,xmax:180,ymax:90,zmax:8850},C=new Map([[5773,new m({heightModel:`gravity-related-height`,heightUnit:`meters`,vertCRS:`EGM96_Geoid`})],[3855,new m({heightModel:`gravity-related-height`,heightUnit:`meters`,vertCRS:`EGM2008_Geoid`})],[115700,new m({heightModel:`ellipsoidal`,heightUnit:`meters`,vertCRS:`WGS_1984`})],[115701,new m({heightModel:`ellipsoidal`,heightUnit:`meters`,vertCRS:`ETRS_1989`})],[6360,new m({heightModel:`gravity-related-height`,heightUnit:`us-feet`,vertCRS:`NAVD88_height_(ftUS)`})],[7837,new m({heightModel:`gravity-related-height`,heightUnit:`meters`,vertCRS:`DHHN2016_(height)`})],[5709,new m({heightModel:`gravity-related-height`,heightUnit:`meters`,vertCRS:`NAP`})]]);function w(e){let t=null;return e&&C.forEach((n,r)=>{!t&&n.vertCRS===e.vertCRS&&n.heightUnit===e.heightUnit&&(t=r)}),t}function T(e){if(!e)return null;let t=e.vcsWkid||e.latestVcsWkid;return t?C.get(t):null}function E(e){return!!(e.extensions?.ESRI_crs?.wkid||e.extensions?.ESRI_crs?.latestWkid||e.extensions?.ESRI_crs?.wkt||e.extensions?.ESRI_crs?.wkt2)}const D=n(),O=t(D);function k(t,n=!1){let m=new h({wkid:4326,vcsWkid:115700}),_=t.root?.boundingVolume,v=!1,C=t?.root?.transform;if(n&&E(t)&&(v=!0,m=new h(t.extensions?.ESRI_crs),(t.root?.extensions?.ESRI_crs?.boundingVolume?.box||t.root?.extensions?.ESRI_crs?.boundingVolume?.sphere)&&(_=t.root?.extensions?.ESRI_crs?.boundingVolume),C=t.root?.extensions?.ESRI_crs?.transform?t.root?.extensions?.ESRI_crs?.transform:O),!_)return y;if(_.box){let e=_?.box;if(e[3]>x&&e[7]>x&&e[11]>x)return new p({...S,spatialReference:m})}let w=d();if(!v&&_.region&&b(_.region,6)){let t=_.region,n=e(t[0]),r=e(t[1]),i=t[4],a=e(t[2]),o=e(t[3]),s=t[5];return new p({xmin:n,ymin:r,zmin:i,xmax:a,ymax:o,zmax:s,spatialReference:m})}if(_.sphere&&b(_.sphere,4)){let e=_.sphere,t=u(e[0],e[1],e[2]),n=e[3]/Math.sqrt(3),l=d();r(l,t,u(n,n,n));let y=d();if(i(y,t,u(n,n,n)),C&&b(C,16)){let e=C;a(w,l,e),o(l,w),a(w,y,e),o(y,w)}v||(g(l,f,0,l,h.WGS84,0),g(y,f,0,y,h.WGS84,0));let x=d(),S=d();return s(x,l,y),c(S,l,y),new p({xmin:x[0],ymin:x[1],zmin:x[2],xmax:S[0],ymax:S[1],zmax:S[2],spatialReference:m})}if(_.box&&b(_.box,12)){let e=_.box,t=u(e[0],e[1],e[2]),n=u(e[3],e[4],e[5]),r=u(e[6],e[7],e[8]),o=u(e[9],e[10],e[11]),y=[];for(let e=0;e<8;++e)y.push(d());if(i(y[0],t,n),i(y[0],y[0],r),i(y[0],y[0],o),l(y[1],t,n),i(y[1],y[1],r),i(y[1],y[1],o),i(y[2],t,n),l(y[2],y[2],r),i(y[2],y[2],o),l(y[3],t,n),l(y[3],y[3],r),i(y[3],y[3],o),i(y[4],t,n),i(y[4],y[4],r),l(y[4],y[4],o),l(y[5],t,n),i(y[5],y[5],r),l(y[5],y[5],o),i(y[6],t,n),l(y[6],y[6],r),l(y[6],y[6],o),l(y[7],t,n),l(y[7],y[7],r),l(y[7],y[7],o),C&&b(C,16)){let e=C;for(let t=0;t<8;++t)a(y[t],y[t],e)}let x=u(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),S=u(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let e=0;e<8;++e)v||g(y[e],f,0,y[e],h.WGS84,0),s(S,S,y[e]),c(x,x,y[e]);return new p({xmin:S[0],ymin:S[1],zmin:S[2],xmax:x[0],ymax:x[1],zmax:x[2],spatialReference:m})}return y}function A(e){typeof e.desc==`string`&&(e.desc=JSON.parse(e.desc));let t=e.desc?.geometry?.prims.length;return e.desc!=null&&e.desc.obb!=null&&t!=null&&e.validPrimitiveIndices.length>0&&e.validPrimitiveIndices.every(e=>Number.isInteger(e)&&e>=0&&e<t)}function j(e){return`${e}`}function M(e){return e!=null&&e!==_}export{y as default3DTilesFullExtent,v as default3DTilesSpatialReference,T as getHeightModelInfoFromVCS,w as getVCSFromHeightModelInfo,E as hasEsriCrs,k as initFullExtent,M as isValidHandle,j as makeCacheKey,A as validateEntity3D,b as verifyArray};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e from"../../geometry/Point.js";import t from"../../geometry/Polygon.js";import n from"../../geometry/Polyline.js";import r from"../../geometry/SpatialReference.js";import{projectExecute as i}from"../../geometry/operators/projectOperator.js";import a from"../support/TelemetryData.js";import o from"../support/VideoTimeExtent.js";import{applyCIMSymbolColor as s}from"../../symbols/support/cimSymbolUtils.js";import{applyColorToSymbol as c}from"../../symbols/support/utils.js";const l=`application/x-mpegURL`,u={UASDatalinkLocalSet:1e4,PrecisionTimeStamp:10002,MissionId:10003,PlatformTailNumber:10004,PlatformHeadingAngle:10005,PlatformPitchAngle:10006,PlatformRollAngle:10007,PlatformTrueAirspeed:10008,PlatformIndicatedAirspeed:10009,PlatformDesignation:10010,ImageSourceSensor:10011,ImageCoordinateSystem:10012,SensorLatitude:10013,SensorLongitude:10014,SensorTrueAltitude:10015,SensorHorizontalFOV:10016,SensorVerticalFOV:10017,SensorAzimuthAngle:10018,SensorElevationAngle:10019,SensorRollAngle:10020,PlatformSlantRange:10021,TargetWidth:10022,FrameCenterLatitude:10023,FrameCenterLongitude:10024,FrameCenterElevation:10025,OffsetCorner1Latitude:10026,OffsetCorner1Longitude:10027,OffsetCorner2Latitude:10028,OffsetCorner2Longitude:10029,OffsetCorner3Latitude:10030,OffsetCorner3Longitude:10031,OffsetCorner4Latitude:10032,OffsetCorner4Longitude:10033,TargetLocationLatitude:10040,TargetLocationLongitude:10041,TargetLocationElevation:10042,TargetTrackGateWidth:10043,TargetTrackGateHeight:10044,TargetErrorEstimateHorizontal:10045,TargetErrorEstimateLateral:10046,GenericFlagData:10047,PlatformGroundSpeed:10056,PlatformGroundRange:10057,PlatformRemainingFuel:10058,PlatformCallSign:10059,SensorFOVName:10063,PlatformMagneticHeading:10064,LDSVersionNumber:10065,AlternatePlatformName:10070,EventStartTimeUTC:10072,VMTIDataSet:10074,SensorEllipsoidHeight:10075,OperationalMode:10077,FrameCenterAboveEllipsoid:10078,CornerLatitudePoint1:10082,CornerLongitudePoint1:10083,CornerLatitudePoint2:10084,CornerLongitudePoint2:10085,CornerLatitudePoint3:10086,CornerLongitudePoint3:10087,CornerLatitudePoint4:10088,CornerLongitudePoint4:10089,SARMotionImageryMetadata:10095,SecurityClassification:20001,SecurityClassifyingAuthority:20002,SecurityClassifyingCountry:20003,SecuritySCI:20004,SecurityCaveats:20005,SecurityReleaseInstructions:20006,SecurityLDSVersion:20022,EsriVideoWidth:90001,EsriVideoHeight:90002,EsriFrameCenterLatitude:90050,EsriFrameCenterLongitude:90051,EsriCornerLatitudePt1:90052,EsriCornerLongitudePt1:90053,EsriCornerLatitudePt2:90054,EsriCornerLongitudePt2:90055,EsriCornerLatitudePt3:90056,EsriCornerLongitudePt3:90057,EsriCornerLatitudePt4:90058,EsriCornerLongitudePt4:90059,EsriFrameOutline:90060,EsriSensorPosition:90061,EsriHorizonPixelPack:90063,EsriGroundControlPoints:90064};function d(e,t=1e4){if(!e||!e.length)return[];let n=[],r=[];for(let t=0;t<e.length;t++){let r=e[t],i=r?.text?JSON.parse(r.text):null;i?.source===`EsriVideoServer`&&(n=[...i.data])}let i=n.find(e=>e.tagId===t);return Array.isArray(i?.value)&&(r=[...i.value]),r}function f(e){let{duration:t,end:n,start:r,timezone:i=`UTC`}=e||{};return[t,n,r].some(e=>typeof e!=`number`||e<0)?null:new o({duration:t||null,end:new Date(Number(n)),start:new Date(Number(r)),timezone:i})}function p(e,t){let
|
|
2
|
+
import e from"../../geometry/Point.js";import t from"../../geometry/Polygon.js";import n from"../../geometry/Polyline.js";import r from"../../geometry/SpatialReference.js";import{projectExecute as i}from"../../geometry/operators/projectOperator.js";import a from"../support/TelemetryData.js";import o from"../support/VideoTimeExtent.js";import{applyCIMSymbolColor as s}from"../../symbols/support/cimSymbolUtils.js";import{applyColorToSymbol as c}from"../../symbols/support/utils.js";const l=`application/x-mpegURL`,u={UASDatalinkLocalSet:1e4,PrecisionTimeStamp:10002,MissionId:10003,PlatformTailNumber:10004,PlatformHeadingAngle:10005,PlatformPitchAngle:10006,PlatformRollAngle:10007,PlatformTrueAirspeed:10008,PlatformIndicatedAirspeed:10009,PlatformDesignation:10010,ImageSourceSensor:10011,ImageCoordinateSystem:10012,SensorLatitude:10013,SensorLongitude:10014,SensorTrueAltitude:10015,SensorHorizontalFOV:10016,SensorVerticalFOV:10017,SensorAzimuthAngle:10018,SensorElevationAngle:10019,SensorRollAngle:10020,PlatformSlantRange:10021,TargetWidth:10022,FrameCenterLatitude:10023,FrameCenterLongitude:10024,FrameCenterElevation:10025,OffsetCorner1Latitude:10026,OffsetCorner1Longitude:10027,OffsetCorner2Latitude:10028,OffsetCorner2Longitude:10029,OffsetCorner3Latitude:10030,OffsetCorner3Longitude:10031,OffsetCorner4Latitude:10032,OffsetCorner4Longitude:10033,TargetLocationLatitude:10040,TargetLocationLongitude:10041,TargetLocationElevation:10042,TargetTrackGateWidth:10043,TargetTrackGateHeight:10044,TargetErrorEstimateHorizontal:10045,TargetErrorEstimateLateral:10046,GenericFlagData:10047,PlatformGroundSpeed:10056,PlatformGroundRange:10057,PlatformRemainingFuel:10058,PlatformCallSign:10059,SensorFOVName:10063,PlatformMagneticHeading:10064,LDSVersionNumber:10065,AlternatePlatformName:10070,EventStartTimeUTC:10072,VMTIDataSet:10074,SensorEllipsoidHeight:10075,OperationalMode:10077,FrameCenterAboveEllipsoid:10078,CornerLatitudePoint1:10082,CornerLongitudePoint1:10083,CornerLatitudePoint2:10084,CornerLongitudePoint2:10085,CornerLatitudePoint3:10086,CornerLongitudePoint3:10087,CornerLatitudePoint4:10088,CornerLongitudePoint4:10089,SARMotionImageryMetadata:10095,SecurityClassification:20001,SecurityClassifyingAuthority:20002,SecurityClassifyingCountry:20003,SecuritySCI:20004,SecurityCaveats:20005,SecurityReleaseInstructions:20006,SecurityLDSVersion:20022,EsriVideoWidth:90001,EsriVideoHeight:90002,EsriFrameCenterLatitude:90050,EsriFrameCenterLongitude:90051,EsriCornerLatitudePt1:90052,EsriCornerLongitudePt1:90053,EsriCornerLatitudePt2:90054,EsriCornerLongitudePt2:90055,EsriCornerLatitudePt3:90056,EsriCornerLongitudePt3:90057,EsriCornerLatitudePt4:90058,EsriCornerLongitudePt4:90059,EsriFrameOutline:90060,EsriSensorPosition:90061,EsriHorizonPixelPack:90063,EsriGroundControlPoints:90064};function d(e,t=1e4){if(!e||!e.length)return[];let n=[],r=[];for(let t=0;t<e.length;t++){let r=e[t],i=r?.text?JSON.parse(r.text):null;i?.source===`EsriVideoServer`&&(n=[...i.data])}let i=n.find(e=>e.tagId===t);return Array.isArray(i?.value)&&(r=[...i.value]),r}function f(e){let{duration:t,end:n,start:r,timezone:i=`UTC`}=e||{};return[t,n,r].some(e=>typeof e!=`number`||e<0)?null:new o({duration:t||null,end:new Date(Number(n)),start:new Date(Number(r)),timezone:i})}function p(e,t,n){let r=e.clone();r.m=n;let i=t.findIndex(e=>e.m>=n),a=i===-1?[...t]:t.slice(0,i);return a.push(r),a}function m(e){if(!e?.size)return new a;let t=k(e),n=_(e),r=T(e),i=O(t,n);return new a({frameCenter:n,frameOutline:r,lineOfSight:i,sensorLocation:t})}function h(e){return e?.size?e.get(u.EsriGroundControlPoints)?.value??null??null:null}function g(e){return e?.size?e.get(u.EsriHorizonPixelPack)?.value??null:null}function _(e){return C(e)??w(e)}function v(e){if(!e)return l;let t=e.match(/\.(\w{3,4})(?:$|\?)/i);if(!t)return l;switch(t[1].toLowerCase()){case`mp4`:return`video/mp4`;case`webm`:return`video/webm`;default:return l}}function y(e){let t=e?.layers;return t?.length?t.map(e=>({layerId:e.id,posterUrl:e.poster,sourceType:e.serviceType,title:e.name,type:e.type||`Video Layer`})):[]}function b(e,t,n){if(!e)return null;let r=e.clone();switch(r.type){case`simple-fill`:c(r,n),r.outline.color=t;break;case`simple-line`:c(r,t);break;case`simple-marker`:c(r,t),r?.outline?.color&&(r.outline.color=t);break;case`cim`:s(r,t)}return r}function x(e){let{cameraAzimuth:t,platformHeading:n,source:r=null,symbolOffset:i=0}=e||{},a=0;if(!r)return a;a=r===`platformHeading`?n+i:n+t+i;let o=a>360?a-360:a;return Math.round(Math.abs(o))}function S(t,n,a){if(!n||n.length<3)return null;let o=[...n].sort((e,t)=>e.y===t.y?e.x-t.x:e.y-t.y),s=Array.from(new Set(o.map(e=>e.x))).sort((e,t)=>e-t),c=Array.from(new Set(o.map(e=>e.y))),l=-1;for(let e=s.length-2;e>=0;e--)if(t.x>=s[e]&&t.x<=s[e+1]){l=e;break}let u=-1;for(let e=c.length-2;e>=0;e--)if(t.y>=c[e]&&t.y<=c[e+1]){u=e;break}if(l<0||u<0||l>=s.length-1||u>=c.length-1)return null;let d=s[l],f=s[l+1],p=c[u],m=c[u+1],h=(e,t)=>{let r=n.find(n=>n.x===e&&n.y===t);if(!r)throw Error(`Control point not found for x: ${e}, y: ${t}`);return r},g=h(d,p),_=h(f,p),v=h(d,m),y=h(f,m),b=t.x,x=t.y,S,C;if(A(g.x,g.y,_.x,_.y,y.x,y.y,b,x)){let t=new e(g.lon,g.lat,r.WGS84),n=new e(_.lon,_.lat,r.WGS84),o=new e(y.lon,y.lat,r.WGS84),s=i(t,a),c=i(n,a),l=i(o,a);C=[g,_,y],S=[s,c,l]}else if(A(g.x,g.y,y.x,y.y,v.x,v.y,b,x)){let t=new e(g.lon,g.lat,r.WGS84),n=new e(y.lon,y.lat,r.WGS84),o=new e(v.lon,v.lat,r.WGS84),s=i(t,a),c=i(n,a),l=i(o,a);C=[g,y,v],S=[s,c,l]}else return null;let[w,T,E]=C,[D,O,k]=S,j=(T.y-E.y)*(w.x-E.x)+(E.x-T.x)*(w.y-E.y),M=((T.y-E.y)*(b-E.x)+(E.x-T.x)*(x-E.y))/j,N=((E.y-w.y)*(b-E.x)+(w.x-E.x)*(x-E.y))/j,P=1-M-N;return[M*D.x+N*O.x+P*k.x,M*D.y+N*O.y+P*k.y]}function C(t){return!t||!t.has(u.EsriFrameCenterLatitude)||!t.has(u.EsriFrameCenterLongitude)?null:new e({x:t.get(u.EsriFrameCenterLongitude).value,y:t.get(u.EsriFrameCenterLatitude).value,z:t.get(u.FrameCenterAboveEllipsoid)?.value??t.get(u.FrameCenterElevation)?.value})}function w(t){return!t||!t.has(u.FrameCenterLatitude)||!t.has(u.FrameCenterLongitude)?null:new e({x:t.get(u.FrameCenterLongitude)?.value,y:t.get(u.FrameCenterLatitude)?.value,z:t.get(u.FrameCenterElevation)?.value})}function T(e){if(!e)return null;let n=e.get(u.EsriFrameOutline)?.value;return n?t.fromJSON(n.geometry):E(e)??D(e)}function E(e){if(!e.has(u.EsriCornerLatitudePt1)||!e.has(u.EsriCornerLongitudePt1)||!e.has(u.EsriCornerLatitudePt2)||!e.has(u.EsriCornerLongitudePt2)||!e.has(u.EsriCornerLatitudePt3)||!e.has(u.EsriCornerLongitudePt3)||!e.has(u.EsriCornerLatitudePt4)||!e.has(u.EsriCornerLongitudePt4))return null;let n=[e.get(u.EsriCornerLongitudePt1)?.value,e.get(u.EsriCornerLatitudePt1)?.value],r=[e.get(u.EsriCornerLongitudePt2)?.value,e.get(u.EsriCornerLatitudePt2)?.value],i=[e.get(u.EsriCornerLongitudePt3)?.value,e.get(u.EsriCornerLatitudePt3)?.value],a=[e.get(u.EsriCornerLongitudePt4)?.value,e.get(u.EsriCornerLatitudePt4)?.value];return new t({rings:[[n,r,i,a]]})}function D(e){if(!e.has(u.OffsetCorner1Latitude)||!e.has(u.OffsetCorner1Longitude)||!e.has(u.OffsetCorner2Latitude)||!e.has(u.OffsetCorner2Longitude)||!e.has(u.OffsetCorner3Latitude)||!e.has(u.OffsetCorner3Longitude)||!e.has(u.OffsetCorner4Latitude)||!e.has(u.OffsetCorner4Longitude)||!e.has(u.FrameCenterLatitude)||!e.has(u.FrameCenterLongitude))return null;let n=e.get(u.FrameCenterLatitude)?.value,r=e.get(u.FrameCenterLongitude)?.value,i=n+e.get(u.OffsetCorner1Latitude)?.value,a=r+e.get(u.OffsetCorner1Longitude)?.value,o=n+e.get(u.OffsetCorner2Latitude)?.value,s=r+e.get(u.OffsetCorner2Longitude)?.value,c=n+e.get(u.OffsetCorner3Latitude)?.value,l=r+e.get(u.OffsetCorner3Longitude)?.value,d=n+e.get(u.OffsetCorner4Latitude)?.value,f=r+e.get(u.OffsetCorner4Longitude)?.value;return new t({rings:[[[a,i],[s,o],[l,c],[f,d]]]})}function O(e,t){if(!e||!t)return null;let r=[e.x,e.y,e.z??0],i=[t.x,t.y,t.z??0];return new n({hasZ:!0,hasM:!1,paths:[[r,i]]})}function k(t){if(!t?.size)return null;if(t.has(u.EsriSensorPosition)){let n=t.get(u.EsriSensorPosition)?.value;if(n)return e.fromJSON(n.geometry)}return t.has(u.SensorLongitude)&&t.has(u.SensorLatitude)?new e({x:t.get(u.SensorLongitude)?.value,y:t.get(u.SensorLatitude)?.value,z:t.get(u.SensorTrueAltitude)?.value}):null}function A(e,t,n,r,i,a,o,s){return(i-o)*(t-s)-(e-o)*(a-s)>=0&&(e-o)*(r-s)-(n-o)*(t-s)>=0&&(n-o)*(a-s)-(i-o)*(r-s)>=0}export{S as computeVideoToMapBaricentric,_ as getFrameCenter,g as getFrameHorizonPoints,h as getGroundControlPoints,O as getLineOfSight,p as getSensorTrailPoints,y as getServiceLayersInfo,b as getStyledTelemetrySymbol,x as getSymbolDisplayAngle,m as getTelemetryData,d as getVideoMetadataFromCueList,v as getVideoMimeType,f as readVideoTimeExtent,u as videoMetadataEntryId};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "6.0.0-next.
|
|
3
|
+
"version": "6.0.0-next.36",
|
|
4
4
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@amcharts/amcharts5": "~5.21.5",
|
|
23
|
-
"@arcgis/toolkit": "6.0.0-next.
|
|
23
|
+
"@arcgis/toolkit": "6.0.0-next.36",
|
|
24
24
|
"@esri/arcgis-html-sanitizer": "~4.2.0",
|
|
25
25
|
"@esri/calcite-components": "^5.2.1",
|
|
26
26
|
"@vaadin/grid": "~25.3.5",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{parseUrl as e}from"../utils.js";import{executeAttributeBinsQuery as t}from"./operations/queryAttributeBins.js";import n from"../support/AttributeBinsFeatureSet.js";import r from"../support/AttributeBinsQuery.js";async function i(i,a,o){let{data:
|
|
2
|
+
import{parseUrl as e}from"../utils.js";import{executeAttributeBinsQuery as t}from"./operations/queryAttributeBins.js";import n from"../support/AttributeBinsFeatureSet.js";import r from"../support/AttributeBinsQuery.js";async function i(i,a,o,s){let{data:c}=await t(e(i),r.from(a),o,s);return n.fromJSON(c)}export{i as executeAttributeBinsQuery};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e from"../../geometry/Extent.js";import{parseUrl as t}from"../utils.js";import{executeQueryForExtent as n}from"./operations/query.js";import r from"../support/Query.js";async function i(i,a,o){let
|
|
2
|
+
import e from"../../geometry/Extent.js";import{parseUrl as t}from"../utils.js";import{executeQueryForExtent as n}from"./operations/query.js";import r from"../support/Query.js";async function i(i,a,o,s){let c=t(i),l=await n(c,r.from(a),{...o},s),u=l.extent;return!u||isNaN(u.xmin)||isNaN(u.ymin)||isNaN(u.xmax)||isNaN(u.ymax)?{count:l.count,extent:null}:{count:l.count,extent:e.fromJSON(u)}}export{i as executeForExtent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{parseUrl as e}from"../utils.js";import{executeQueryForTopCount as t}from"./operations/queryTopFeatures.js";import n from"../support/TopFeaturesQuery.js";async function r(r,i,a){let
|
|
2
|
+
import{parseUrl as e}from"../utils.js";import{executeQueryForTopCount as t}from"./operations/queryTopFeatures.js";import n from"../support/TopFeaturesQuery.js";async function r(r,i,a,o){let s=e(r);return(await t(s,n.from(i),{...a},o)).data.count}export{r as executeForTopCount};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e from"../../geometry/Extent.js";import{parseUrl as t}from"../utils.js";import{executeQueryForTopExtents as n}from"./operations/queryTopFeatures.js";import r from"../support/TopFeaturesQuery.js";async function i(i,a,o){let
|
|
2
|
+
import e from"../../geometry/Extent.js";import{parseUrl as t}from"../utils.js";import{executeQueryForTopExtents as n}from"./operations/queryTopFeatures.js";import r from"../support/TopFeaturesQuery.js";async function i(i,a,o,s){let c=t(i),l=await n(c,r.from(a),{...o},s),u=l.data.extent;return!u||isNaN(u.xmin)||isNaN(u.ymin)||isNaN(u.xmax)||isNaN(u.ymax)?{count:l.data.count,extent:null}:{count:l.data.count,extent:e.fromJSON(u)}}export{i as executeForTopExtents};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{parseUrl as e}from"../utils.js";import{executeQueryForTopIds as t}from"./operations/queryTopFeatures.js";import n from"../support/TopFeaturesQuery.js";async function r(r,i,a){let
|
|
2
|
+
import{parseUrl as e}from"../utils.js";import{executeQueryForTopIds as t}from"./operations/queryTopFeatures.js";import n from"../support/TopFeaturesQuery.js";async function r(r,i,a,o){let s=e(r);return(await t(s,n.from(i),{...a},o)).data.objectIds}export{r as executeForTopIds};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{parseUrl as e}from"../utils.js";import{executeTopFeaturesQuery as t}from"./operations/queryTopFeatures.js";import n from"../support/FeatureSet.js";import r from"../support/TopFeaturesQuery.js";async function i(i,a,o,s){let
|
|
2
|
+
import{parseUrl as e}from"../utils.js";import{executeTopFeaturesQuery as t}from"./operations/queryTopFeatures.js";import n from"../support/FeatureSet.js";import r from"../support/TopFeaturesQuery.js";async function i(i,a,o,s,c){let l=e(i),u={...s},{data:d}=await t(l,r.from(a),o,u,c);return n.fromJSON(d)}export{i as executeTopFeaturesQuery};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e from"../../../request.js";import{urlToObject as t,join as n}from"../../../core/urlUtils.js";import{normalizeCentralMeridian as r}from"../../../geometry/support/normalizeUtils.js";import{mapParameters as i}from"../../operations/urlUtils.js";import{parsePBFFeatureQuery as a}from"./pbfQueryUtils.js";import{safeExtentResultFormat as o,queryLikeToQueryStringParameters as s}from"./queryUtils.js";import{applyFeatureSetZUnitScaling as c}from"./queryZScale.js";function l(e,t,n){return s(e,t,n)}async function u(e,t,n,r,i){let a=t.timeExtent?.isEmpty?{features:[]}:await _(e,t,`json`,r,void 0,i);return a.features??=[],c(t,n,a),a}async function d(e,t,n,r,i){if(t.timeExtent?.isEmpty)return n.featureSet;let o=await f(e,t,r,i);return a(o,n)}function f(e,t,n,r){return _(e,t,`pbf`,n,void 0,r)}function p(e,t,n,r){return t.timeExtent?.isEmpty?Promise.resolve({objectIds:[]}):_(e,t,`json`,n,{returnIdsOnly:!0},r)}async function m(e,t,n,r){return t.timeExtent?.isEmpty?0:(await _(e,t,`json`,n,{returnCountOnly:!0},r)).count}async function h(e,t,n){if(t.timeExtent?.isEmpty)return{count:0,extent:null};let
|
|
2
|
+
import e from"../../../request.js";import{urlToObject as t,join as n}from"../../../core/urlUtils.js";import{normalizeCentralMeridian as r}from"../../../geometry/support/normalizeUtils.js";import{mapParameters as i}from"../../operations/urlUtils.js";import{parsePBFFeatureQuery as a}from"./pbfQueryUtils.js";import{safeExtentResultFormat as o,queryLikeToQueryStringParameters as s}from"./queryUtils.js";import{applyFeatureSetZUnitScaling as c}from"./queryZScale.js";function l(e,t,n){return s(e,t,n)}async function u(e,t,n,r,i){let a=t.timeExtent?.isEmpty?{features:[]}:await _(e,t,`json`,r,void 0,i);return a.features??=[],c(t,n,a),a}async function d(e,t,n,r,i){if(t.timeExtent?.isEmpty)return n.featureSet;let o=await f(e,t,r,i);return a(o,n)}function f(e,t,n,r){return _(e,t,`pbf`,n,void 0,r)}function p(e,t,n,r){return t.timeExtent?.isEmpty?Promise.resolve({objectIds:[]}):_(e,t,`json`,n,{returnIdsOnly:!0},r)}async function m(e,t,n,r){return t.timeExtent?.isEmpty?0:(await _(e,t,`json`,n,{returnCountOnly:!0},r)).count}async function h(e,t,n,r){if(t.timeExtent?.isEmpty)return{count:0,extent:null};let i=await _(e,t,o,n,{returnExtentOnly:!0,returnCountOnly:!0},r);if(i.hasOwnProperty(`extent`))return i;let a=typeof e==`string`?e:e.path;if(/\/imageserver\/?$/i.test(a)&&i.hasOwnProperty(`count`)){let a=await _(e,t,o,n,{returnExtentOnly:!0},r);return{count:i.count,extent:a.extent}}if(i.features||i.hasOwnProperty(`count`))throw Error(`Layer does not support extent calculation.`);return i}function g(e,t){if(!e.returnIdsOnly||!t.uniqueIdFields)return e;let n={...e,returnUniqueIdsOnly:!0};return delete n.returnIdsOnly,n}async function _(t,n,r,i={},a={},o={}){let s=await v(t,n,r,i,a,o),c=r===`json`?`json`:`array-buffer`;return e(s.url,{responseType:c,...s.options}).then(({data:e})=>e)}async function v(e,a,o,s,c={},u={}){let d=typeof e==`string`?t(e):e,[f]=await r([a.geometry],s);if(f!=null){let e=a.clone();e.geometry=f.clone(),a=e}let p=i({...d.query,f:o,...g(c,u),...l(a,c,u)});return s={...s,query:{...p,...s.query}},new y(n(d.path,b(a,c)?`query3d`:`query`),s)}class y{constructor(e,t){this.url=e,this.options=t}}function b(e,t){return e.formatOf3DObjects!=null&&!(t.returnCountOnly||t.returnExtentOnly||t.returnIdsOnly)}export{y as RunQueryParameters,u as executeQuery,m as executeQueryForCount,h as executeQueryForExtent,p as executeQueryForIds,d as executeQueryPBF,f as executeQueryPBFBuffer,v as getQueryParameters,l as queryToQueryStringParameters,_ as runQuery};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e from"../../../request.js";import{urlToObject as
|
|
2
|
+
import e from"../../../request.js";import{sqlAnd as t}from"../../../core/sql.js";import{urlToObject as n,join as r}from"../../../core/urlUtils.js";import{getJsonType as i}from"../../../geometry/support/jsonTypeUtils.js";import{normalizeCentralMeridian as a}from"../../../geometry/support/normalizeUtils.js";import{srToRESTValue as o,equals as s}from"../../../geometry/support/spatialReferenceUtils.js";import{mapParameters as c}from"../../operations/urlUtils.js";import{timeExtentToQueryParameter as l}from"../../support/timeUtils.js";function u(e,n){let r=e.geometry,a=e.toJSON(),c=a,u,d,f;if(r!=null&&(d=r.spatialReference,f=o(d),c.geometryType=i(r),c.geometry=JSON.stringify(r),c.inSR=f),a.outSR?(c.outSR=o(a.outSR),u=e.outSpatialReference):r&&(c.outSR=c.inSR,u=d),c.bin&&=JSON.stringify(c.bin),c.quantizationParameters&&=JSON.stringify(c.quantizationParameters),c.outStatistics&&=JSON.stringify(c.outStatistics),c.outTimeReference&&=JSON.stringify(c.outTimeReference),e.timeExtent){let r=n?.timeInformation;if(r){let n=r.getExpression(e.timeExtent);switch(n?.type){case`time`:c.time=n.value;break;case`where`:n.value&&(c.where=t(c.where,n.value))}}else c.time=l(e.timeExtent);delete a.timeExtent}return e.defaultSpatialReference&&s(d,u)&&(c.defaultSR=c.inSR,delete c.inSR,delete c.outSR),c}async function d(e,t,n,r){return t.timeExtent!=null&&t.timeExtent.isEmpty?{data:{features:[]}}:await f(e,t,n,r)}async function f(t,i,o={},s={}){let l=typeof t==`string`?n(t):t,[d]=await a([i.geometry],o);d!=null&&(i=i.clone(),i.geometry=d);let f=c({...l.query,f:`json`,...u(i,s)});return e(r(l.path,`queryBins`),{...o,query:{...f,...o.query}})}export{d as executeAttributeBinsQuery,u as queryToQueryStringParameters};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e from"../../../request.js";import{urlToObject as
|
|
2
|
+
import e from"../../../request.js";import{sqlAnd as t}from"../../../core/sql.js";import{urlToObject as n,join as r}from"../../../core/urlUtils.js";import{getJsonType as i}from"../../../geometry/support/jsonTypeUtils.js";import{normalizeCentralMeridian as a}from"../../../geometry/support/normalizeUtils.js";import{srToRESTValue as o}from"../../../geometry/support/spatialReferenceUtils.js";import{mapParameters as s}from"../../operations/urlUtils.js";import{safeExtentResultFormat as c}from"./queryUtils.js";import{applyFeatureSetZUnitScaling as l}from"./queryZScale.js";import{timeExtentToQueryParameter as u}from"../../support/timeUtils.js";function d(e,n,r){let a=e.geometry,s=e.toJSON(),c=s;if(a!=null&&(c.geometry=JSON.stringify(a),c.geometryType=i(a),c.inSR=o(a.spatialReference)),s.topFilter?.groupByFields&&(c.topFilter.groupByFields=s.topFilter.groupByFields.join(`,`)),s.topFilter?.orderByFields&&(c.topFilter.orderByFields=s.topFilter.orderByFields.join(`,`)),s.topFilter&&(c.topFilter=JSON.stringify(c.topFilter)),s.objectIds)switch(r?.uniqueIdFields?.length){case void 0:c.objectIds=s.objectIds.join(`,`);break;case 1:c.uniqueIds=JSON.stringify(s.objectIds),delete c.objectIds;break;default:c.uniqueIds=JSON.stringify(s.objectIds.map(e=>JSON.parse(e))),delete c.objectIds}if(s.orderByFields&&(c.orderByFields=s.orderByFields.join(`,`)),s.outFields&&!(n?.returnCountOnly||n?.returnExtentOnly||n?.returnIdsOnly)?c.outFields=s.outFields.includes(`*`)?`*`:s.outFields.join(`,`):delete c.outFields,s.outSR?c.outSR=o(s.outSR):a&&s.returnGeometry&&(c.outSR=c.inSR),s.returnGeometry&&delete s.returnGeometry,e.timeExtent){let n=r?.timeInformation;if(n){let r=n.getExpression(e.timeExtent);switch(r?.type){case`time`:c.time=r.value;break;case`where`:r.value&&(c.where=t(c.where,r.value))}}else c.time=u(e.timeExtent);delete s.timeExtent}return c}async function f(e,t,n,r,i){let a=await _(e,t,`json`,r,void 0,i);return l(t,n,a.data),a}async function p(e,t,n,r){return t.timeExtent!=null&&t.timeExtent.isEmpty?{data:{objectIds:[]}}:_(e,t,`json`,n,{returnIdsOnly:!0},r)}async function m(e,t,n,r){return t.timeExtent!=null&&t.timeExtent.isEmpty?{data:{count:0,extent:null}}:_(e,t,c,n,{returnExtentOnly:!0,returnCountOnly:!0},r).then(e=>{let t=e.data;if(t.hasOwnProperty(`extent`))return e;if(t.features||t.hasOwnProperty(`count`))throw Error(`Layer does not support extent calculation.`);return e})}function h(e,t,n,r){return t.timeExtent!=null&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):_(e,t,`json`,n,{returnIdsOnly:!0,returnCountOnly:!0},r)}function g(e,t){if(!e.returnIdsOnly||!t.uniqueIdFields)return e;let n={...e,returnUniqueIdsOnly:!0};return delete n.returnIdsOnly,n}async function _(t,i,o,c={},l={},u={}){let f=typeof t==`string`?n(t):t,p=i.geometry?[i.geometry]:[];c.responseType=`json`;let[m]=await a(p,c);m!=null&&(i=i.clone(),i.geometry=m);let h=s({...f.query,f:o,...g(l,u),...d(i,l,u)});return e(r(f.path,`queryTopFeatures`),{...c,query:{...h,...c.query}})}export{h as executeQueryForTopCount,m as executeQueryForTopExtents,p as executeQueryForTopIds,f as executeTopFeaturesQuery,d as queryToQueryStringParameters};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
function e(e){let{start:t,end:n}=e;if(t||n){if(!t&&n)return`null,${n.getTime()}`;if(!n&&t)return`${t.getTime()},null`;if(n&&t)return t.getTime()===n.getTime()?`${t.getTime()}`:`${t.getTime()},${n.getTime()}`}}export{
|
|
2
|
+
import{sqlAnd as e,sqlName as t,sqlLiteral as n}from"../../core/sql.js";const r={equals:`=`,greaterThanOrEqual:`>=`,lessThanOrEqual:`<=`};function i(e,r,i,a){let o=a.get(e)?.type,s=a.getTimeZone(e);return`${t(e)} ${r} ${n(i,{type:`date`},{type:o,timeZone:s})}`}function a(t,n,a,o){if(!n||!a)return;let{startField:s,endField:c}=n,{start:l,end:u}=t;if(!l&&!u||!s&&!c)return;let d=s??c,f=c??s;if(d&&f){if(l&&u){if(l.getTime()===u.getTime())return e(o,i(d,r.equals,l,a));if(!s||!c){let t=i(d,r.greaterThanOrEqual,l,a),n=i(d,r.lessThanOrEqual,u,a);return e(o,e(t,n))}let t=i(s,r.greaterThanOrEqual,l,a),n=i(c,r.lessThanOrEqual,u,a);return e(o,e(t,n))}if(l)return e(o,i(d,r.greaterThanOrEqual,l,a));if(u)return e(o,i(f,r.lessThanOrEqual,u,a))}}function o(e){let{start:t,end:n}=e;if(t||n){if(!t&&n)return`null,${n.getTime()}`;if(!n&&t)return`${t.getTime()},null`;if(n&&t)return t.getTime()===n.getTime()?`${t.getTime()}`:`${t.getTime()},${n.getTime()}`}}export{i as constructSQLExpression,o as timeExtentToQueryParameter,a as timeExtentToSQL};
|
package/support/timeUtils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{isSome as e}from"../core/arrayUtils.js";import{clone as t}from"../core/lang.js";import{offsetDate as n}from"../core/timeUtils.js";import r from"../rest/support/StatisticDefinition.js";import i from"../time/TimeExtent.js";import{isWebMap as a}from"../webmap/utils.js";import{isWebScene as o}from"../webscene/utils.js";function s(e){return e.timeInfo!==void 0}async function c(t,n){if(!t.timeInfo||!t.timeInfo.startField&&!t.timeInfo.endField)return null;let{startField:a,endField:o}=t.timeInfo,s=t.createQuery();s.outStatistics=[],a&&s.outStatistics.push(new r({onStatisticField:a,outStatisticFieldName:`minStart`,statisticType:`min`}),new r({onStatisticField:a,outStatisticFieldName:`maxStart`,statisticType:`max`})),o&&s.outStatistics.push(new r({onStatisticField:o,outStatisticFieldName:`minEnd`,statisticType:`min`}),new r({onStatisticField:o,outStatisticFieldName:`maxEnd`,statisticType:`max`}));let{features:c}=await t.queryFeatures(s,{signal:n}),l=c.at(0),u=[l?.getAttribute(`minStart`),l?.getAttribute(`maxStart`),l?.getAttribute(`minEnd`),l?.getAttribute(`maxEnd`)].filter(e).map(e=>typeof e==`string`?Date.parse(e):e);if(!u.length)return null;let d=new Date(Math.min(...u)),f=new Date(Math.max(...u)),p=new i({start:d,end:f}),{visibilityTimeExtent:m}=t;return p?.intersection(m)??m}async function l(e,t){return e.widgets?.timeSlider?.fullTimeExtent??f(e.allLayers,t)}function u(e){let t=e.numThumbs??2,n=e.currentTimeExtent;if(n){let{start:e,end:r}=n;return e!=null&&r!=null&&e.getTime()===r.getTime()?`instant`:t===2?`time-window`:e==null||e.getTime()===0?`cumulative-from-start`:`cumulative-from-end`}return t===2?`time-window`:`cumulative-from-start`}function d(e){let{numStops:n,stopInterval:r,stops:i}=e;return i?{dates:t(i)}:r?{interval:r.clone()}:{count:n??5}}async function f(t,n){if(t.length===0)return i.allTime;await Promise.all(t.map(e=>e.load({signal:n})));let r=t.filter(s),a=t.filter(e=>!s(e)&&e.visibilityTimeExtent!=null);if(r.length===0&&a.length===0)return i.allTime;let o=[],l=[],u=[];for(let e of r)e.type===`feature
|
|
2
|
+
import{isSome as e}from"../core/arrayUtils.js";import{clone as t}from"../core/lang.js";import{offsetDate as n}from"../core/timeUtils.js";import r from"../rest/support/StatisticDefinition.js";import i from"../time/TimeExtent.js";import{isWebMap as a}from"../webmap/utils.js";import{isWebScene as o}from"../webscene/utils.js";function s(e){return e.timeInfo!==void 0}async function c(t,n){if(!t.timeInfo||!t.timeInfo.startField&&!t.timeInfo.endField)return null;let{startField:a,endField:o}=t.timeInfo,s=t.createQuery();s.outStatistics=[],a&&s.outStatistics.push(new r({onStatisticField:a,outStatisticFieldName:`minStart`,statisticType:`min`}),new r({onStatisticField:a,outStatisticFieldName:`maxStart`,statisticType:`max`})),o&&s.outStatistics.push(new r({onStatisticField:o,outStatisticFieldName:`minEnd`,statisticType:`min`}),new r({onStatisticField:o,outStatisticFieldName:`maxEnd`,statisticType:`max`}));let{features:c}=await t.queryFeatures(s,{signal:n}),l=c.at(0),u=[l?.getAttribute(`minStart`),l?.getAttribute(`maxStart`),l?.getAttribute(`minEnd`),l?.getAttribute(`maxEnd`)].filter(e).map(e=>typeof e==`string`?Date.parse(e):e);if(!u.length)return null;let d=new Date(Math.min(...u)),f=new Date(Math.max(...u)),p=new i({start:d,end:f}),{visibilityTimeExtent:m}=t;return p?.intersection(m)??m}async function l(e,t){return e.widgets?.timeSlider?.fullTimeExtent??f(e.allLayers,t)}function u(e){let t=e.numThumbs??2,n=e.currentTimeExtent;if(n){let{start:e,end:r}=n;return e!=null&&r!=null&&e.getTime()===r.getTime()?`instant`:t===2?`time-window`:e==null||e.getTime()===0?`cumulative-from-start`:`cumulative-from-end`}return t===2?`time-window`:`cumulative-from-start`}function d(e){let{numStops:n,stopInterval:r,stops:i}=e;return i?{dates:t(i)}:r?{interval:r.clone()}:{count:n??5}}async function f(t,n){if(t.length===0)return i.allTime;await Promise.all(t.map(e=>e.load({signal:n})));let r=t.filter(s),a=t.filter(e=>!s(e)&&e.visibilityTimeExtent!=null);if(r.length===0&&a.length===0)return i.allTime;let o=[],l=[],u=[];for(let e of r)(e.type===`feature`||e.type===`scene`)&&h(e)?o.push(e):(e.type===`feature`||e.type===`map-image`)&&e.timeInfo?.hasLiveData?l.push(e):u.push(e);let d=e=>e==null||e.isAllTime,f=[...u.map(e=>{let t=e.timeInfo?.fullTimeExtent,{visibilityTimeExtent:n}=e;return t?.intersection(n)??n}),...a.map(e=>e.visibilityTimeExtent)];if(f.some(d))return i.allTime;let p=l.map(async e=>{let t=(await e.fetchRecomputedExtents({signal:n}))?.timeExtent??e.timeInfo?.fullTimeExtent,{visibilityTimeExtent:r}=e;return t?.intersection(r)??r}),m=(await Promise.allSettled(p)).map(e=>e.status===`fulfilled`?e.value:null);if(m.some(d))return i.allTime;let g=o.map(e=>c(e,n)),_=(await Promise.allSettled(g)).filter(e=>e.status===`fulfilled`).map(e=>e.value),v=[...m,...f,..._].filter(e);return v.length===0?i.allTime:v.reduce((e,t)=>e.union(t))}function p(e,t){let n=e.currentTimeExtent;if(!n)return null;let{start:r,end:a}=n,o=r??a??null;switch(t){case`time-window`:return new i({start:r,end:a});case`cumulative-from-start`:return new i({start:null,end:o});case`cumulative-from-end`:return new i({start:o,end:null});case`instant`:return new i({start:o,end:o})}}async function m(e,t){if(!(a(e)||o(e)))return null;await e.load({signal:t});let n=e?.widgets?.timeSlider;if(!n)return null;let r=await l(e,t),{loop:i}=n,s=u(n);return{fullTimeExtent:r,loop:i,mode:s,playRate:n.stopDelay??2e3,stops:d(n),timeExtent:p(n,s)}}function h(e){if(!e.url)return!1;let t=e.timeInfo,n=e.getAtOrigin(`timeInfo`,`service`);return n?!(!t||t===n||(t.startField===n.startField||!t.startField&&!n.startField)&&(t.endField===n.endField||!t.endField&&!n.endField)):!!t}function g(e){if(!e)return e;let{start:t,end:r}=e;return new i({start:t==null?t:n(t,-t.getTimezoneOffset(),`minutes`),end:r==null?r:n(r,-r.getTimezoneOffset(),`minutes`)})}function _(e){if(!e)return e;let{start:t,end:r}=e;return new i({start:t==null?t:n(t,t.getTimezoneOffset(),`minutes`),end:r==null?r:n(r,r.getTimezoneOffset(),`minutes`)})}export{c as fetchTimeExtent,f as getTimeExtentFromLayers,m as getTimeSliderSettingsFromWebDocument,h as requireFetchTimeExtent,_ as toLocalTimeExtent,g as toUTCTimeExtent};
|