@agrotools1/at-components 0.3.5 → 0.3.6
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/dist/AGraphicContainer-b156cbdc.js +109 -0
- package/dist/APIKeyMixin-ee07543b.js +19 -0
- package/dist/Analysis-ffcdf49e.js +31 -0
- package/dist/ArcGISCachedService-a878c30c.js +47 -0
- package/dist/ArcGISService-16ef592c.js +25 -0
- package/dist/AreaMeasurement2D-b47a8818.js +405 -0
- package/dist/AreaMeasurement3D-fdbc23e0.js +488 -0
- package/dist/AttachmentInfo-3b5fda52.js +34 -0
- package/dist/AttachmentQuery-14f4ec29.js +18 -0
- package/dist/AttributeStore-47a878e7.js +1707 -0
- package/dist/BaseDynamicLayerView2D-4bd57982.js +63 -0
- package/dist/BingMapsLayer-ec619dfa.js +112 -0
- package/dist/Bitmap-45982a38.js +128 -0
- package/dist/BitmapContainer-ae676ce9.js +23 -0
- package/dist/BlendLayer-f24275a8.js +13 -0
- package/dist/BoundsStore-da6873f3.js +63 -0
- package/dist/BufferObject-0c76346f.js +100 -0
- package/dist/BufferView-96849449.js +683 -0
- package/dist/BuildingSceneLayer-67b40855.js +535 -0
- package/dist/Button-348f9ac0.js +36 -0
- package/dist/CSVLayer-dae4e00d.js +208 -0
- package/dist/CSVSourceWorker-6de8b609.js +367 -0
- package/dist/CatalogDynamicGroupLayerView2D-7622a0af.js +66 -0
- package/dist/CatalogFootprintLayerView2D-eff667d9.js +76 -0
- package/dist/CatalogLayer-b0e4980c.js +262 -0
- package/dist/CatalogLayerView2D-fa22e5e2.js +52 -0
- package/dist/ClassBreaksDefinition-a4abcf50.js +18 -0
- package/dist/ColorMaterial.glsl-570e4f94.js +64 -0
- package/dist/ColorSet-7f5c7694.js +45 -0
- package/dist/ColorStop-6fd09765.js +29 -0
- package/dist/Container-d699fcb8.js +521 -0
- package/dist/CustomParametersMixin-949de3be.js +12 -0
- package/dist/DataTable/Column/Column.d.ts +1 -1
- package/dist/DataTable/DataTable.d.ts +3 -0
- package/dist/DataTable/index.d.ts +4 -1
- package/dist/DefaultMaterial.glsl-7c844647.js +42 -0
- package/dist/DefaultMaterial_COLOR_GAMMA-f7a6e76d.js +653 -0
- package/dist/DefaultTheme-dc710295.js +130 -0
- package/dist/DeleteForwardEditsParameters-06390e9e.js +18 -0
- package/dist/DimensionLayer-be08b167.js +129 -0
- package/dist/DirectLineMeasurement3D-78fa3435.js +449 -0
- package/dist/DistanceMeasurement2D-0716339a.js +303 -0
- package/dist/DoubleArray-2f0f416a.js +25 -0
- package/dist/EdgeProcessingWorker-ed705ff7.js +63 -0
- package/dist/EditBusLayer-b3dc1330.js +107 -0
- package/dist/ElevationInfo-c194d5f5.js +56 -0
- package/dist/ElevationLayer-36b1e319.js +129 -0
- package/dist/ElevationQuery-39727e18.js +598 -0
- package/dist/ElevationSamplerWorker-04b18fdf.js +62 -0
- package/dist/ExportImageParameters-5167798e.js +66 -0
- package/dist/ExportStrategy-2d347cef.js +93 -0
- package/dist/ExportWMSImageParameters-a26d34ed.js +33 -0
- package/dist/External-b021ff2c.js +110 -0
- package/dist/FeatureCollectionSnappingSource-66979cda.js +130 -0
- package/dist/FeatureCommandQueue-d3930db2.js +1244 -0
- package/dist/FeatureEffect-c51c2425.js +39 -0
- package/dist/FeatureEffectLayer-bdca70b7.js +13 -0
- package/dist/FeatureFilter-9a11227d.js +27 -0
- package/dist/FeatureLayer-f1a17cbb.js +693 -0
- package/dist/FeatureLayerBase-85c25451.js +148 -0
- package/dist/FeatureLayerSource-8d9419ca.js +444 -0
- package/dist/FeatureLayerView2D-523f4651.js +1967 -0
- package/dist/FeaturePipelineWorker-bd8ec8e1.js +3633 -0
- package/dist/FeatureReductionLayer-949cfff9.js +225 -0
- package/dist/FeatureReductionSelection-2b7de4bb.js +22 -0
- package/dist/FeatureServiceSnappingSource-29f6326c.js +481 -0
- package/dist/FeatureServiceSnappingSourceWorker-3071cc93.js +747 -0
- package/dist/FeatureSet-a2d35655.js +188 -0
- package/dist/FeatureStore-29d58f30.js +131 -0
- package/dist/FeatureTemplate-33f1511c.js +12 -0
- package/dist/FeatureType-03d8bfc6.js +25 -0
- package/dist/FieldsIndex-cddb2b35.js +109 -0
- package/dist/FormTemplate-8281e66a.js +350 -0
- package/dist/GeoJSONLayer-d1cf041d.js +236 -0
- package/dist/GeoJSONSourceWorker-b3fb8a97.js +247 -0
- package/dist/GeoRSSLayer-1bd11f40.js +73 -0
- package/dist/GeoRSSLayerView2D-8f661d18.js +140 -0
- package/dist/GeometryUtils-5c77f1b0.js +403 -0
- package/dist/GraphicContainer-8f518c24.js +26 -0
- package/dist/GraphicManipulator-48fa5ffd.js +1499 -0
- package/dist/GraphicsLayer-5e14eb47.js +38 -0
- package/dist/GraphicsLayerView2D-187a02e9.js +114 -0
- package/dist/GraphicsSnappingSource-779de954.js +273 -0
- package/dist/GraphicsView2D-4786cec0.js +620 -0
- package/dist/GroupLayer-f742bd3e.js +147 -0
- package/dist/GroupLayerView2D-46afecb6.js +98 -0
- package/dist/HUDMaterial.glsl-aed28bd1.js +65 -0
- package/dist/HighlightCounter-3ed84eb2.js +41 -0
- package/dist/HighlightGraphicContainer-24fff1f1.js +18 -0
- package/dist/I3SBinaryReader-dc3251f3.js +310 -0
- package/dist/I3SLayerDefinitions-75469971.js +55 -0
- package/dist/I3SUtil-b4dac74e.js +59 -0
- package/dist/IdentityManager-ece2841b.js +899 -0
- package/dist/ImageHistogramParameters-f0a6a74c.js +905 -0
- package/dist/ImageryLayer-c5d0331a.js +1799 -0
- package/dist/ImageryLayerView2D-2439ac05.js +352 -0
- package/dist/ImageryTileLayer-7c19b5c4.js +2157 -0
- package/dist/ImageryTileLayerView2D-b6bab66e.js +1110 -0
- package/dist/Indices-868b778f.js +67 -0
- package/dist/IntegratedMesh3DTilesLayer-8353bdaf.js +112 -0
- package/dist/IntegratedMeshLayer-e761aa10.js +141 -0
- package/dist/InteractiveAnalysisViewModel-d0e82ea6.js +7397 -0
- package/dist/InterleavedLayout-c4731d7d.js +163 -0
- package/dist/KMLLayer-bc47cd3d.js +162 -0
- package/dist/KMLLayerView2D-f2b1d389.js +253 -0
- package/dist/KnowledgeGraphLayerView2D-372e6484.js +43 -0
- package/dist/LRUCache-7a6c25d0.js +32 -0
- package/dist/LabelClass-fd78b96b.js +135 -0
- package/dist/LabelMetric-a5c60841.js +400 -0
- package/dist/LaserlinePath.glsl-6d8ad607.js +64 -0
- package/dist/Laserlines.glsl-1084f18e.js +65 -0
- package/dist/LayerFloorInfo-43dec126.js +15 -0
- package/dist/LayerView-3582efbb.js +206 -0
- package/dist/LercWorker-e30ab7c8.js +157 -0
- package/dist/LineOfSightLayer-9701cc6b.js +147 -0
- package/dist/LinkChartLayer-8762fd4a.js +1027 -0
- package/dist/Lyr3DWorker-4c128301.js +82 -0
- package/dist/MagnifierPrograms-4026fcfa.js +806 -0
- package/dist/MapImageLayer-da0d3310.js +169 -0
- package/dist/MapImageLayerView2D-071c4157.js +146 -0
- package/dist/MapNotesLayer-56a40838.js +283 -0
- package/dist/MapNotesLayerView2D-8899725c.js +161 -0
- package/dist/MapServiceLayerViewHelper-75da68f4.js +288 -0
- package/dist/MeasurementWidgetContent-8176953b.js +2642 -0
- package/dist/MediaLayer-c9bb6f41.js +523 -0
- package/dist/MediaLayerView2D-46029604.js +332 -0
- package/dist/MemCache-cfd09d4d.js +227 -0
- package/dist/MemorySourceWorker-b097af39.js +222 -0
- package/dist/Mesh-e5a3753f.js +980 -0
- package/dist/MeshLocalVertexSpace-46569676.js +19 -0
- package/dist/MultiOriginJSONSupport-66a73b5d.js +158 -0
- package/dist/OGCFeatureLayer-3a40db83.js +211 -0
- package/dist/OGCFeatureLayerView2D-b8b32964.js +82 -0
- package/dist/ObjectStack-ba8b9286.js +21 -0
- package/dist/Octree-ec06f6ac.js +495 -0
- package/dist/OpenStreetMapLayer-37428a2a.js +30 -0
- package/dist/OperationalLayer-2e935984.js +44 -0
- package/dist/OrderByInfo-b7d114ac.js +16 -0
- package/dist/OrderedLayer-63abe7dc.js +26 -0
- package/dist/OrientedImageryLayer-66424cd5.js +216 -0
- package/dist/OverlayCompositing.glsl-7358bee6.js +65 -0
- package/dist/OverrideHelper-212a5126.js +242 -0
- package/dist/PBFDecoderWorker-f2ab98a5.js +213 -0
- package/dist/PointCloudLayer-fed28318.js +197 -0
- package/dist/PointCloudUniqueValueRenderer-8fd8d64d.js +115 -0
- package/dist/PointCloudWorker-a23b7173.js +212 -0
- package/dist/PooledRBush-20fefa83.js +272 -0
- package/dist/Popup-8f89a4b0.js +3990 -0
- package/dist/PortalLayer-15420854.js +126 -0
- package/dist/Program-b10e4f81.js +694 -0
- package/dist/ProgramTemplate-e7665148.js +35 -0
- package/dist/QueryEngine-238072cd.js +896 -0
- package/dist/QueryTask-edf87068.js +119 -0
- package/dist/RasterSymbolizer-f981d3ba.js +3024 -0
- package/dist/RasterVFDisplayObject-e88aa01c.js +581 -0
- package/dist/RasterWorker-fc9be81c.js +78 -0
- package/dist/RawBlockCache-f74df003.js +185 -0
- package/dist/RealisticTree.glsl-3c15f4f4.js +42 -0
- package/dist/RefreshableLayer-f99ea584.js +80 -0
- package/dist/RefreshableLayerView-a78847ef.js +16 -0
- package/dist/Relationship-1b08c6d9.js +64 -0
- package/dist/RelationshipQuery-292ab835.js +22 -0
- package/dist/RenderingContext-010afb99.js +889 -0
- package/dist/RibbonLine.glsl-96dd8904.js +65 -0
- package/dist/RouteLayer-93ccdc64.js +786 -0
- package/dist/RouteLayerView2D-036ca001.js +195 -0
- package/dist/SDFHelper-474b4359.js +140 -0
- package/dist/SSAO.glsl-597bfb5a.js +43 -0
- package/dist/SSAOBlur.glsl-ee744d7c.js +42 -0
- package/dist/ScaleRangeLayer-6b36cfd2.js +21 -0
- package/dist/SceneLayer-a142d8c1.js +542 -0
- package/dist/SceneLayerSnappingSource-203b8842.js +218 -0
- package/dist/SceneLayerSnappingSourceWorker-67162926.js +112 -0
- package/dist/SceneLayerWorker-e925341d.js +164 -0
- package/dist/SceneService-3215551f.js +215 -0
- package/dist/Scheduler-202e661b.js +373 -0
- package/dist/ShadedColorMaterial.glsl-4c7b1e1c.js +64 -0
- package/dist/SnappingOperation-cb1044d4.js +48 -0
- package/dist/SourceLayerData-cd5f50cf.js +116 -0
- package/dist/SpatialFilter-aa7af35b.js +1701 -0
- package/dist/Stop-afd9fe95.js +281 -0
- package/dist/StreamLayer-1db3fd83.js +188 -0
- package/dist/StreamLayerView2D-2a13f0ad.js +164 -0
- package/dist/StyleRepository-2c73077a.js +2212 -0
- package/dist/SublayersOwner-dc253313.js +545 -0
- package/dist/SubtypeGroupLayer-19d730fa.js +514 -0
- package/dist/SubtypeGroupLayerView2D-104bd70d.js +84 -0
- package/dist/TechniqueInstance-34decb51.js +233 -0
- package/dist/TemporalLayer-52d34fa2.js +23 -0
- package/dist/Texture-cb75240c.js +501 -0
- package/dist/TextureOnly.glsl-a2ddac26.js +65 -0
- package/dist/Theme-b6e00d80.js +3426 -0
- package/dist/Tick-01633bcc.js +723 -0
- package/dist/TileContainer-456a6c78.js +31 -0
- package/dist/TileInfoTilemapCache-42af3194.js +38 -0
- package/dist/TileLayer-3185a118.js +194 -0
- package/dist/TileLayerView2D-c1a9ab1f.js +187 -0
- package/dist/TilemapCache-ae840560.js +189 -0
- package/dist/TimeInfo-8ce5e779.js +42 -0
- package/dist/TimeOnly-e45c6726.js +706 -0
- package/dist/Tooltip-900796b3.js +138 -0
- package/dist/TopFeaturesQuery-92ff83cb.js +32 -0
- package/dist/TurboLine-b4edfa68.js +565 -0
- package/dist/UniqueValueRenderer-cc2c9298.js +1039 -0
- package/dist/UnknownLayer-b54c2634.js +30 -0
- package/dist/UnknownTimeZone-6d259a58.js +15 -0
- package/dist/UnsupportedLayer-13022461.js +31 -0
- package/dist/UpdateTracking2D-f77879d5.js +8566 -0
- package/dist/Util-04115b51.js +57 -0
- package/dist/VectorTileLayer-f381cd0e.js +544 -0
- package/dist/VectorTileLayerView2D-39783058.js +2108 -0
- package/dist/Version-df01af53.js +33 -0
- package/dist/VertexArrayObject-4a28edd2.js +73 -0
- package/dist/VertexColor.glsl-bf92e50b.js +2683 -0
- package/dist/VertexSnappingCandidate-bb220191.js +13 -0
- package/dist/VideoLayerView2D-be563c2e.js +124 -0
- package/dist/VoxelLayer-9ef1de09.js +631 -0
- package/dist/WFSLayer-43b50b88.js +221 -0
- package/dist/WFSSourceWorker-3861ffe8.js +157 -0
- package/dist/WGLContainer-ba3d390b.js +5426 -0
- package/dist/WMSLayer-2c3e8bbb.js +536 -0
- package/dist/WMSLayerView2D-872ec260.js +117 -0
- package/dist/WMTSLayer-21f9aa9e.js +531 -0
- package/dist/WMTSLayerView2D-8c8c9c3d.js +142 -0
- package/dist/WebTileLayer-1bda1985.js +110 -0
- package/dist/WhereClause-51a4f26b.js +2766 -0
- package/dist/WorkerHandle-0d66bca5.js +47 -0
- package/dist/WorkerTileHandler-91c9d75f.js +1539 -0
- package/dist/action-6ef64f0d.js +198 -0
- package/dist/action-group-f7db2cb8.js +145 -0
- package/dist/action-menu-1c23d797.js +1759 -0
- package/dist/apng-505b988a.js +392 -0
- package/dist/arcade-4936d297.js +229 -0
- package/dist/arcadeAsyncRuntime-c1474281.js +943 -0
- package/dist/arcadeUtils-8a31964e.js +8741 -0
- package/dist/arcgis-knowledge-client-core-f86c91f8.js +1218 -0
- package/dist/arcgis-knowledge-client-core-simd-e02ddd33.js +1218 -0
- package/dist/arcgisLayers-5d572cf0.js +152 -0
- package/dist/associatedFeatureServiceUtils-20128e0c.js +92 -0
- package/dist/axisAngleDegrees-d983c0e6.js +49 -0
- package/dist/basis_transcoder-f72923c9.js +1248 -0
- package/dist/calcite-action-6b65bde9.js +22 -0
- package/dist/calcite-action-bar-602b20a2.js +303 -0
- package/dist/calcite-action-group-f80af24c.js +28 -0
- package/dist/calcite-button-38c49d10.js +228 -0
- package/dist/calcite-flow-043c21dc.js +128 -0
- package/dist/calcite-flow-item-2ea7fbc3.js +499 -0
- package/dist/calcite-icon-51a0aaf4.js +16 -0
- package/dist/calcite-input-d890b898.js +24 -0
- package/dist/calcite-label-e7ddaa7b.js +79 -0
- package/dist/calcite-list-32132747.js +2135 -0
- package/dist/calcite-list-item-1a0ebafe.js +576 -0
- package/dist/calcite-list-item-group-2a10423e.js +71 -0
- package/dist/calcite-loader-805f803d.js +14 -0
- package/dist/calcite-modal-c3c4c180.js +333 -0
- package/dist/calcite-notice-3c41230b.js +181 -0
- package/dist/calcite-option-771f300b.js +94 -0
- package/dist/calcite-scrim-69d80539.js +18 -0
- package/dist/calcite-select-0b7bcde9.js +231 -0
- package/dist/capabilities-db596b9a.js +50 -0
- package/dist/chartCommon-12c51a22.js +256 -0
- package/dist/chartUtilsAm5-bc078bfd.js +2954 -0
- package/dist/clientSideDefaults-d761554e.js +39 -0
- package/dist/colorRamps-fedcdeb0.js +38 -0
- package/dist/colorUtils-b3dcdea1.js +164 -0
- package/dist/commonProperties-c36fc1b2.js +60 -0
- package/dist/computeTranslationToOriginAndRotation-204021f3.js +60 -0
- package/dist/conditionalSlot-a3e31520.js +27 -0
- package/dist/createConnection-3faeec81.js +299 -0
- package/dist/dataUtils-cb1ddea6.js +1421 -0
- package/dist/deduplicate-8f04f299.js +89 -0
- package/dist/defaults-9d551b4c.js +31 -0
- package/dist/deleteForwardEdits-8ee7ac83.js +13 -0
- package/dist/diffUtils-f967bb01.js +90 -0
- package/dist/drapedUtils-228e1846.js +75 -0
- package/dist/earcut-ae826f5c.js +292 -0
- package/dist/edgeProcessing-34e7c554.js +252 -0
- package/dist/editingSupport-b2834350.js +203 -0
- package/dist/editsZScale-adebaa6e.js +37 -0
- package/dist/elevationInfoUtils-f7fb37da.js +126 -0
- package/dist/executeForIds-56bf8e1c.js +14 -0
- package/dist/executeForTopCount-b8ad20e2.js +17 -0
- package/dist/executeForTopExtents-976e5375.js +17 -0
- package/dist/executeForTopIds-42baedc4.js +17 -0
- package/dist/executeQueryJSON-61328699.js +15 -0
- package/dist/executeQueryPBF-98500b0b.js +152 -0
- package/dist/executeRelationshipQuery-61aff913.js +53 -0
- package/dist/executeTopFeaturesQuery-9a82f5f3.js +18 -0
- package/dist/featureConversionUtils-90914512.js +479 -0
- package/dist/featureLayerUtils-6fd62a19.js +142 -0
- package/dist/featureLayerUtils-f9a404fc.js +250 -0
- package/dist/featureSetUtils-41c6b2f3.js +2530 -0
- package/dist/featuresetbase-abf82e92.js +707 -0
- package/dist/featuresetgeom-640a61c3.js +99 -0
- package/dist/featuresetstats-8bc29826.js +81 -0
- package/dist/featuresetstring-cf27255d.js +95 -0
- package/dist/fetchService-bc7cad88.js +33 -0
- package/dist/fieldProperties-917b162f.js +33 -0
- package/dist/floatRGBA-d8908329.js +20 -0
- package/dist/form-607b9626.js +138 -0
- package/dist/geohashUtils-ae9fb003.js +85 -0
- package/dist/geojson-e6282c6a.js +208 -0
- package/dist/geomasync-c0ea0aa7.js +567 -0
- package/dist/geometryEngine-7390e3b3.js +192 -0
- package/dist/geometryEngineAsync-b05170d5.js +217 -0
- package/dist/geometryEngineBase-9072c29a.js +18463 -0
- package/dist/geometryEngineJSON-046aae14.js +171 -0
- package/dist/geometryEngineJSON-7d93793c.js +46 -0
- package/dist/geometryEngineWorker-df16b723.js +11 -0
- package/dist/geometryServiceUtils-1bad18fc.js +28 -0
- package/dist/georeference-eeac5784.js +291 -0
- package/dist/gif-7db917ae.js +323 -0
- package/dist/gltfexport-e3ee23db.js +705 -0
- package/dist/groupLayerUtils-67593437.js +39 -0
- package/dist/heatmapUtils-ae60011e.js +45 -0
- package/dist/highlightReasons-79f118f3.js +19 -0
- package/dist/hydrated-22569b31.js +40 -0
- package/dist/i3s-b4dc6f5b.js +809 -0
- package/dist/icon-fdee8ce8.js +127 -0
- package/dist/imageBitmapUtils-0795b2e3.js +23 -0
- package/dist/imageUtils-7c670dc9.js +69 -0
- package/dist/imageUtils-d22dd4e3.js +89 -0
- package/dist/imageryUtils-04032523.js +43 -0
- package/dist/index-4ead5b97.js +45620 -0
- package/dist/index.js +1 -1
- package/dist/input-message-fbaeb21b.js +92 -0
- package/dist/input2-2ec70595.js +575 -0
- package/dist/interactive-c1bc656f.js +80 -0
- package/dist/jsonContext-4c9c02ed.js +15 -0
- package/dist/jsonUtils-0c0893e4.js +59 -0
- package/dist/jsonUtils-2a454e30.js +86 -0
- package/dist/jsonUtils-fbd6d2d1.js +476 -0
- package/dist/kmlUtils-a32aa47a.js +112 -0
- package/dist/knowledgeGraphService-101bc4f6.js +739 -0
- package/dist/knowledgegraph-ce7c5d70.js +149 -0
- package/dist/labelUtils-31fc2428.js +61 -0
- package/dist/labelingInfo-419c11be.js +46 -0
- package/dist/layersCreator-cebbca3b.js +151 -0
- package/dist/layersLoader-5716d75b.js +197 -0
- package/dist/lazyLayerLoader-5ff9f8c9.js +10 -0
- package/dist/lclayout-d0707534.js +773 -0
- package/dist/lengthUtils-21f99608.js +5 -0
- package/dist/lerc-wasm-18fff7e7.js +325 -0
- package/dist/libtess-asm-474d4b9b.js +3673 -0
- package/dist/libtess-f1671ade.js +269 -0
- package/dist/lineSegment-d41123bf.js +76 -0
- package/dist/loadGLTFMesh-6d8a092c.js +181 -0
- package/dist/loadable-553a7b4e.js +24 -0
- package/dist/loader-99571a46.js +79 -0
- package/dist/lyr3DWorker-416274fd.js +2108 -0
- package/dist/mapViewDeps-b8386f18.js +3052 -0
- package/dist/mediaLayerUtils-1a221c09.js +35 -0
- package/dist/meshFeatureSet-224c37f2.js +126 -0
- package/dist/meshVertexSpaceUtils-e2d0f6c0.js +58 -0
- package/dist/multidimensionalUtils-8762b51c.js +290 -0
- package/dist/normalizeUtilsSync-ceab37a3.js +181 -0
- package/dist/number-5cf3efeb.js +128 -0
- package/dist/objectResourceUtils-2731784f.js +1455 -0
- package/dist/observers-260de394.js +30 -0
- package/dist/ogcFeatureUtils-ae65de93.js +206 -0
- package/dist/openCloseComponent-7bc5e135.js +37 -0
- package/dist/orientedBoundingBox-57ea94d0.js +447 -0
- package/dist/parser-bab9c2ce.js +488 -0
- package/dist/pbf-e5c31775.js +215 -0
- package/dist/pbfQueryUtils-0b522562.js +422 -0
- package/dist/pe-wasm-c515cbab.js +887 -0
- package/dist/persistable-9c618c27.js +89 -0
- package/dist/perspectiveUtils-e44e8d7d.js +42 -0
- package/dist/pieChart-a7decaf1.js +555 -0
- package/dist/plane-e6309fb6.js +160 -0
- package/dist/popupUtils-3e3652c3.js +50 -0
- package/dist/popupUtils-91a6593a.js +22 -0
- package/dist/portalItemUtils-9fe0753b.js +57 -0
- package/dist/portalLayers-c4780447.js +312 -0
- package/dist/portalUtils-dc516580.js +7 -0
- package/dist/programUtils-af41c65f.js +59 -0
- package/dist/project-5431a252.js +21 -0
- package/dist/projectPointToVector-0079622b.js +14 -0
- package/dist/projectVectorToVector-f0efb06b.js +13 -0
- package/dist/quantityUtils-de778fce.js +33 -0
- package/dist/quantizationUtils-2be4bff3.js +68 -0
- package/dist/quat-c6160033.js +104 -0
- package/dist/query-fcb1a91d.js +89 -0
- package/dist/queryAttachments-97b9756a.js +39 -0
- package/dist/queryEngineUtils-95bf7d7c.js +21 -0
- package/dist/queryTopFeatures-ce8d1ecc.js +50 -0
- package/dist/queryZScale-201978da.js +12 -0
- package/dist/rasterProjectionHelper-29c41430.js +577 -0
- package/dist/rasterUtils-9175fa83.js +122 -0
- package/dist/rasterizingUtils-83fc560b.js +46 -0
- package/dist/request-a1e40067.js +46 -0
- package/dist/requestImageUtils-176ebc00.js +8 -0
- package/dist/resourceExtension-7fe8f270.js +17 -0
- package/dist/resourceUtils-318f1fd0.js +62 -0
- package/dist/resourceUtils-bf624bf9.js +69 -0
- package/dist/resourceUtils-cba1effe.js +42 -0
- package/dist/saveAPIKeyUtils-c407e113.js +8 -0
- package/dist/saveUtils-9d95f409.js +24 -0
- package/dist/scaleUtils-0293f229.js +23 -0
- package/dist/scrim-c147b918.js +114 -0
- package/dist/serviceCapabilitiesUtils-98603a14.js +64 -0
- package/dist/sourceUtils-eec26b0e.js +71 -0
- package/dist/sphere-5e0ae541.js +199 -0
- package/dist/statsWorker-7a85b336.js +37 -0
- package/dist/streamLayerUtils-1b89041d.js +31 -0
- package/dist/style.css +1 -1
- package/dist/styleUtils-a42848e6.js +14 -0
- package/dist/styleUtils-b62393b9.js +75 -0
- package/dist/sublayerUtils-398c21ad.js +37 -0
- package/dist/substitute-011c53db.js +52 -0
- package/dist/symbolColorUtils-37d56009.js +8 -0
- package/dist/symbolLayerUtils-864ff340.js +31 -0
- package/dist/symbologySnappingCandidates-8de8e353.js +221 -0
- package/dist/t9n-d9b9c6cb.js +349 -0
- package/dist/testSVGPremultipliedAlpha-10b2acab.js +94 -0
- package/dist/timeSupport-97c324f3.js +410 -0
- package/dist/triangle-558b5e1a.js +98 -0
- package/dist/unitConversionUtils-c6c847c9.js +17 -0
- package/dist/unitFormatUtils-b34af073.js +40 -0
- package/dist/uploadAssetErrors-f4548e09.js +70 -0
- package/dist/uploadAssets-2cf4f3df.js +330 -0
- package/dist/utils-2aa1ef8c.js +34 -0
- package/dist/utils-4e8b0dcd.js +91 -0
- package/dist/utils-514bee8e.js +73 -0
- package/dist/utils-7d755f59.js +433 -0
- package/dist/utils-8b01c610.js +232 -0
- package/dist/utils-9210b64d.js +79 -0
- package/dist/utils-b1ab6c91.js +419 -0
- package/dist/utils-f5731fc4.js +2746 -0
- package/dist/utils3-f341d95b.js +75 -0
- package/dist/vec3-7da55ff1.js +81 -0
- package/dist/vec42-689e76ac.js +125 -0
- package/dist/versionUtils-d824fad7.js +161 -0
- package/dist/visualVariableUtils-88773652.js +267 -0
- package/dist/webStyleSymbolUtils-c596a4f1.js +48 -0
- package/dist/webglDeps-f821d060.js +23 -0
- package/dist/wfsUtils-bfa5d7fa.js +343 -0
- package/dist/workerHelper-b0f47acf.js +11 -0
- package/dist/xyChart-a2e4acb8.js +3335 -0
- package/package.json +1 -1
- package/dist/AGraphicContainer-b6e32ab3.js +0 -109
- package/dist/APIKeyMixin-83218bd5.js +0 -19
- package/dist/Analysis-8c5616ab.js +0 -31
- package/dist/ArcGISCachedService-8da73861.js +0 -47
- package/dist/ArcGISService-1e7483eb.js +0 -25
- package/dist/AreaMeasurement2D-ee78c5ab.js +0 -405
- package/dist/AreaMeasurement3D-098fd9ea.js +0 -488
- package/dist/AttachmentInfo-1b2ece0a.js +0 -34
- package/dist/AttachmentQuery-470d5a03.js +0 -18
- package/dist/AttributeStore-f80857be.js +0 -1707
- package/dist/BaseDynamicLayerView2D-a5f201d7.js +0 -63
- package/dist/BingMapsLayer-4c95d39c.js +0 -112
- package/dist/Bitmap-d7c41f66.js +0 -128
- package/dist/BitmapContainer-af419f59.js +0 -23
- package/dist/BlendLayer-ced1717f.js +0 -13
- package/dist/BoundsStore-030e1112.js +0 -63
- package/dist/BufferObject-6f0ccf08.js +0 -100
- package/dist/BufferView-83825b1b.js +0 -683
- package/dist/BuildingSceneLayer-67d67dd9.js +0 -535
- package/dist/Button-b96d4e96.js +0 -36
- package/dist/CSVLayer-0d54cccb.js +0 -208
- package/dist/CSVSourceWorker-00c7e147.js +0 -367
- package/dist/CatalogDynamicGroupLayerView2D-e1b747eb.js +0 -66
- package/dist/CatalogFootprintLayerView2D-4d654b8c.js +0 -76
- package/dist/CatalogLayer-fdcebf46.js +0 -262
- package/dist/CatalogLayerView2D-d872dec4.js +0 -52
- package/dist/ClassBreaksDefinition-0f6902fe.js +0 -18
- package/dist/ColorMaterial.glsl-0f79d1d3.js +0 -64
- package/dist/ColorSet-1f170190.js +0 -45
- package/dist/ColorStop-81b2ebbf.js +0 -29
- package/dist/Container-5cca9103.js +0 -521
- package/dist/CustomParametersMixin-fa9fc8f5.js +0 -12
- package/dist/DefaultMaterial.glsl-ea170d90.js +0 -42
- package/dist/DefaultMaterial_COLOR_GAMMA-e9199fb6.js +0 -653
- package/dist/DefaultTheme-e76e0ce4.js +0 -130
- package/dist/DeleteForwardEditsParameters-114413db.js +0 -18
- package/dist/DimensionLayer-5caa9d6d.js +0 -129
- package/dist/DirectLineMeasurement3D-6d3a316a.js +0 -449
- package/dist/DistanceMeasurement2D-7090d647.js +0 -303
- package/dist/DoubleArray-40bc6f82.js +0 -25
- package/dist/EdgeProcessingWorker-94aed8c4.js +0 -63
- package/dist/EditBusLayer-dcf477a3.js +0 -107
- package/dist/ElevationInfo-a456026a.js +0 -56
- package/dist/ElevationLayer-6061b8f4.js +0 -129
- package/dist/ElevationQuery-ec17e2cc.js +0 -598
- package/dist/ElevationSamplerWorker-beaaeaeb.js +0 -62
- package/dist/ExportImageParameters-56040230.js +0 -66
- package/dist/ExportStrategy-7d1b4a0c.js +0 -93
- package/dist/ExportWMSImageParameters-0b3d33ed.js +0 -33
- package/dist/External-9a57bcf0.js +0 -110
- package/dist/FeatureCollectionSnappingSource-b589f9ce.js +0 -130
- package/dist/FeatureCommandQueue-d1572e0d.js +0 -1244
- package/dist/FeatureEffect-20d94762.js +0 -39
- package/dist/FeatureEffectLayer-017997f2.js +0 -13
- package/dist/FeatureFilter-73c8c240.js +0 -27
- package/dist/FeatureLayer-ecf9f4ea.js +0 -693
- package/dist/FeatureLayerBase-1ffc64a0.js +0 -148
- package/dist/FeatureLayerSource-0acdac77.js +0 -444
- package/dist/FeatureLayerView2D-6f0d2580.js +0 -1967
- package/dist/FeaturePipelineWorker-77d06d4f.js +0 -3633
- package/dist/FeatureReductionLayer-203415cc.js +0 -225
- package/dist/FeatureReductionSelection-4ba3cfda.js +0 -22
- package/dist/FeatureServiceSnappingSource-90c5e877.js +0 -481
- package/dist/FeatureServiceSnappingSourceWorker-9f33d320.js +0 -747
- package/dist/FeatureSet-29d82bc9.js +0 -188
- package/dist/FeatureStore-9d48217b.js +0 -131
- package/dist/FeatureTemplate-79cf9cb6.js +0 -12
- package/dist/FeatureType-30eece24.js +0 -25
- package/dist/FieldsIndex-7d8f3589.js +0 -109
- package/dist/FormTemplate-18b193a8.js +0 -350
- package/dist/GeoJSONLayer-d2677013.js +0 -236
- package/dist/GeoJSONSourceWorker-4571c9d5.js +0 -247
- package/dist/GeoRSSLayer-320f17b2.js +0 -73
- package/dist/GeoRSSLayerView2D-4683eb47.js +0 -140
- package/dist/GeometryUtils-b855940e.js +0 -403
- package/dist/GraphicContainer-9bd07fb2.js +0 -26
- package/dist/GraphicManipulator-e96e9aa3.js +0 -1499
- package/dist/GraphicsLayer-964ed1f0.js +0 -38
- package/dist/GraphicsLayerView2D-83766b4b.js +0 -114
- package/dist/GraphicsSnappingSource-0bf5350b.js +0 -273
- package/dist/GraphicsView2D-3103ed12.js +0 -620
- package/dist/GroupLayer-2c099630.js +0 -147
- package/dist/GroupLayerView2D-abb8b6d5.js +0 -98
- package/dist/HUDMaterial.glsl-6e206016.js +0 -65
- package/dist/HighlightCounter-1d4774e1.js +0 -41
- package/dist/HighlightGraphicContainer-de26900b.js +0 -18
- package/dist/I3SBinaryReader-63c12e1b.js +0 -310
- package/dist/I3SLayerDefinitions-d0aa8265.js +0 -55
- package/dist/I3SUtil-277467e8.js +0 -59
- package/dist/IdentityManager-a1b54522.js +0 -899
- package/dist/ImageHistogramParameters-47cf0f1b.js +0 -905
- package/dist/ImageryLayer-89c92097.js +0 -1799
- package/dist/ImageryLayerView2D-e0c5549a.js +0 -352
- package/dist/ImageryTileLayer-c38364f3.js +0 -2157
- package/dist/ImageryTileLayerView2D-f659a87c.js +0 -1110
- package/dist/Indices-29975728.js +0 -67
- package/dist/IntegratedMesh3DTilesLayer-8b851e87.js +0 -112
- package/dist/IntegratedMeshLayer-9ed738ba.js +0 -141
- package/dist/InteractiveAnalysisViewModel-c95e13c5.js +0 -7397
- package/dist/InterleavedLayout-f5e6ee23.js +0 -163
- package/dist/KMLLayer-3662a890.js +0 -162
- package/dist/KMLLayerView2D-3d172b6a.js +0 -253
- package/dist/KnowledgeGraphLayerView2D-086160b5.js +0 -43
- package/dist/LRUCache-948c7d75.js +0 -32
- package/dist/LabelClass-c0694878.js +0 -135
- package/dist/LabelMetric-39280634.js +0 -400
- package/dist/LaserlinePath.glsl-205f0e8a.js +0 -64
- package/dist/Laserlines.glsl-6f09c43e.js +0 -65
- package/dist/LayerFloorInfo-308449b6.js +0 -15
- package/dist/LayerView-2b3b1a70.js +0 -206
- package/dist/LercWorker-b007ee29.js +0 -157
- package/dist/LineOfSightLayer-99b48ebf.js +0 -147
- package/dist/LinkChartLayer-d69e2e36.js +0 -1027
- package/dist/Lyr3DWorker-2fdd578b.js +0 -82
- package/dist/MagnifierPrograms-5042ccad.js +0 -806
- package/dist/MapImageLayer-f3e35db3.js +0 -169
- package/dist/MapImageLayerView2D-98cfaffb.js +0 -146
- package/dist/MapNotesLayer-6942570f.js +0 -283
- package/dist/MapNotesLayerView2D-b641bba4.js +0 -161
- package/dist/MapServiceLayerViewHelper-9111fb4f.js +0 -288
- package/dist/MeasurementWidgetContent-a66f382a.js +0 -2642
- package/dist/MediaLayer-585e1067.js +0 -523
- package/dist/MediaLayerView2D-74d90bf4.js +0 -332
- package/dist/MemCache-1532e921.js +0 -227
- package/dist/MemorySourceWorker-ba059303.js +0 -222
- package/dist/Mesh-43d631db.js +0 -980
- package/dist/MeshLocalVertexSpace-f9cc6881.js +0 -19
- package/dist/MultiOriginJSONSupport-ec8788e6.js +0 -158
- package/dist/OGCFeatureLayer-5e327659.js +0 -211
- package/dist/OGCFeatureLayerView2D-d0104fdc.js +0 -82
- package/dist/ObjectStack-2d389b76.js +0 -21
- package/dist/Octree-1dba17ba.js +0 -495
- package/dist/OpenStreetMapLayer-dc083119.js +0 -30
- package/dist/OperationalLayer-d43d80b1.js +0 -44
- package/dist/OrderByInfo-26301234.js +0 -16
- package/dist/OrderedLayer-36fe0e60.js +0 -26
- package/dist/OrientedImageryLayer-21689d88.js +0 -216
- package/dist/OverlayCompositing.glsl-f80836ca.js +0 -65
- package/dist/OverrideHelper-880a7e09.js +0 -242
- package/dist/PBFDecoderWorker-b5f6d890.js +0 -213
- package/dist/PointCloudLayer-899f6a49.js +0 -197
- package/dist/PointCloudUniqueValueRenderer-8a477087.js +0 -115
- package/dist/PointCloudWorker-4bea79e8.js +0 -212
- package/dist/PooledRBush-df73bc2a.js +0 -272
- package/dist/Popup-e01092b4.js +0 -3990
- package/dist/PortalLayer-daca6a23.js +0 -126
- package/dist/Program-8b1e5f48.js +0 -694
- package/dist/ProgramTemplate-e4360f44.js +0 -35
- package/dist/QueryEngine-ca1511e3.js +0 -896
- package/dist/QueryTask-c9fa71fa.js +0 -119
- package/dist/RasterSymbolizer-1644d7a7.js +0 -3024
- package/dist/RasterVFDisplayObject-7ec19876.js +0 -581
- package/dist/RasterWorker-2d320094.js +0 -78
- package/dist/RawBlockCache-86e6c5d3.js +0 -185
- package/dist/RealisticTree.glsl-65abf4e9.js +0 -42
- package/dist/RefreshableLayer-a0708abb.js +0 -80
- package/dist/RefreshableLayerView-2b6aca24.js +0 -16
- package/dist/Relationship-ef9ae528.js +0 -64
- package/dist/RelationshipQuery-8a39148b.js +0 -22
- package/dist/RenderingContext-e718bfed.js +0 -889
- package/dist/RibbonLine.glsl-e82fb3bb.js +0 -65
- package/dist/RouteLayer-06ecd24a.js +0 -786
- package/dist/RouteLayerView2D-26c96396.js +0 -195
- package/dist/SDFHelper-70cff23b.js +0 -140
- package/dist/SSAO.glsl-54f15911.js +0 -43
- package/dist/SSAOBlur.glsl-cbd829bc.js +0 -42
- package/dist/ScaleRangeLayer-dc6d9c0e.js +0 -21
- package/dist/SceneLayer-255b45af.js +0 -542
- package/dist/SceneLayerSnappingSource-8969a32e.js +0 -218
- package/dist/SceneLayerSnappingSourceWorker-17673240.js +0 -112
- package/dist/SceneLayerWorker-46a764a8.js +0 -164
- package/dist/SceneService-bbc3f4e5.js +0 -215
- package/dist/Scheduler-e3ad50f2.js +0 -373
- package/dist/ShadedColorMaterial.glsl-8e194f81.js +0 -64
- package/dist/SnappingOperation-d12c0cd0.js +0 -48
- package/dist/SourceLayerData-054d8bb6.js +0 -116
- package/dist/SpatialFilter-ba146c95.js +0 -1701
- package/dist/Stop-38c9a9d4.js +0 -281
- package/dist/StreamLayer-9d300b87.js +0 -188
- package/dist/StreamLayerView2D-d80b90e9.js +0 -164
- package/dist/StyleRepository-e8c44bab.js +0 -2212
- package/dist/SublayersOwner-469b921a.js +0 -545
- package/dist/SubtypeGroupLayer-e467307a.js +0 -514
- package/dist/SubtypeGroupLayerView2D-41ed7e6f.js +0 -84
- package/dist/TechniqueInstance-9c0d4dcf.js +0 -233
- package/dist/TemporalLayer-011ac13a.js +0 -23
- package/dist/Texture-b28260ca.js +0 -501
- package/dist/TextureOnly.glsl-87d0e898.js +0 -65
- package/dist/Theme-bf54db6d.js +0 -3426
- package/dist/Tick-5be5a637.js +0 -723
- package/dist/TileContainer-09ca940a.js +0 -31
- package/dist/TileInfoTilemapCache-26485a76.js +0 -38
- package/dist/TileLayer-b0580f1d.js +0 -194
- package/dist/TileLayerView2D-e4561937.js +0 -187
- package/dist/TilemapCache-d2163c80.js +0 -189
- package/dist/TimeInfo-68d2df8b.js +0 -42
- package/dist/TimeOnly-bb600899.js +0 -706
- package/dist/Tooltip-927072f3.js +0 -138
- package/dist/TopFeaturesQuery-77f00fe7.js +0 -32
- package/dist/TurboLine-87dd880a.js +0 -565
- package/dist/UniqueValueRenderer-56a91680.js +0 -1039
- package/dist/UnknownLayer-6b7b3c5d.js +0 -30
- package/dist/UnknownTimeZone-e62caf07.js +0 -15
- package/dist/UnsupportedLayer-16a90c0a.js +0 -31
- package/dist/UpdateTracking2D-bf4e8a89.js +0 -8566
- package/dist/Util-6762e3c9.js +0 -57
- package/dist/VectorTileLayer-3c42b01b.js +0 -544
- package/dist/VectorTileLayerView2D-3af619aa.js +0 -2108
- package/dist/Version-9c75ca2b.js +0 -33
- package/dist/VertexArrayObject-e736d4c8.js +0 -73
- package/dist/VertexColor.glsl-69e78e7a.js +0 -2683
- package/dist/VertexSnappingCandidate-10823eb3.js +0 -13
- package/dist/VideoLayerView2D-68e687b0.js +0 -124
- package/dist/VoxelLayer-76005caf.js +0 -631
- package/dist/WFSLayer-398b281f.js +0 -221
- package/dist/WFSSourceWorker-7506acff.js +0 -157
- package/dist/WGLContainer-f2c4f5da.js +0 -5426
- package/dist/WMSLayer-6fbfc745.js +0 -536
- package/dist/WMSLayerView2D-63dda194.js +0 -117
- package/dist/WMTSLayer-6492359f.js +0 -531
- package/dist/WMTSLayerView2D-5daae3fe.js +0 -142
- package/dist/WebTileLayer-5f7595df.js +0 -110
- package/dist/WhereClause-a8fc45da.js +0 -2766
- package/dist/WorkerHandle-11931750.js +0 -47
- package/dist/WorkerTileHandler-b53b5efc.js +0 -1539
- package/dist/action-b5c3b319.js +0 -198
- package/dist/action-group-01e02696.js +0 -145
- package/dist/action-menu-e0ddae4e.js +0 -1759
- package/dist/apng-9d467a98.js +0 -392
- package/dist/arcade-71dc610e.js +0 -229
- package/dist/arcadeAsyncRuntime-146d9fb6.js +0 -943
- package/dist/arcadeUtils-f7ed3399.js +0 -8741
- package/dist/arcgis-knowledge-client-core-b8fef5b0.js +0 -1218
- package/dist/arcgis-knowledge-client-core-simd-d54c7150.js +0 -1218
- package/dist/arcgisLayers-8d42568b.js +0 -152
- package/dist/associatedFeatureServiceUtils-c50f28e9.js +0 -92
- package/dist/axisAngleDegrees-ea89c136.js +0 -49
- package/dist/basis_transcoder-39fbc6ae.js +0 -1248
- package/dist/calcite-action-264e28ab.js +0 -22
- package/dist/calcite-action-bar-6ec66445.js +0 -303
- package/dist/calcite-action-group-85d021dc.js +0 -28
- package/dist/calcite-button-8a5af2ce.js +0 -228
- package/dist/calcite-flow-9b5e43fd.js +0 -128
- package/dist/calcite-flow-item-0089f891.js +0 -499
- package/dist/calcite-icon-c20a8db7.js +0 -16
- package/dist/calcite-input-24e48df5.js +0 -24
- package/dist/calcite-label-9e4dcb66.js +0 -79
- package/dist/calcite-list-711dcec1.js +0 -2135
- package/dist/calcite-list-item-1a29c5f1.js +0 -576
- package/dist/calcite-list-item-group-b69dedb8.js +0 -71
- package/dist/calcite-loader-e8b209f6.js +0 -14
- package/dist/calcite-modal-5e518e4c.js +0 -333
- package/dist/calcite-notice-25463d4d.js +0 -181
- package/dist/calcite-option-113080c1.js +0 -94
- package/dist/calcite-scrim-423337f4.js +0 -18
- package/dist/calcite-select-cd1e7e86.js +0 -231
- package/dist/capabilities-e7ea2422.js +0 -50
- package/dist/chartCommon-beb757c5.js +0 -256
- package/dist/chartUtilsAm5-6eaf385e.js +0 -2954
- package/dist/clientSideDefaults-366deb67.js +0 -39
- package/dist/colorRamps-4ea8b8f7.js +0 -38
- package/dist/colorUtils-611a3fa1.js +0 -164
- package/dist/commonProperties-3f86f534.js +0 -60
- package/dist/computeTranslationToOriginAndRotation-db6fb1b6.js +0 -60
- package/dist/conditionalSlot-4bf2837a.js +0 -27
- package/dist/createConnection-0754c362.js +0 -299
- package/dist/dataUtils-ebb55aab.js +0 -1421
- package/dist/deduplicate-af05e046.js +0 -89
- package/dist/defaults-f025f8a3.js +0 -31
- package/dist/deleteForwardEdits-0b666266.js +0 -13
- package/dist/diffUtils-b887dbbc.js +0 -90
- package/dist/drapedUtils-82fba1a5.js +0 -75
- package/dist/earcut-da8e2a55.js +0 -292
- package/dist/edgeProcessing-d7499657.js +0 -252
- package/dist/editingSupport-4b7813cf.js +0 -203
- package/dist/editsZScale-4a6ee4aa.js +0 -37
- package/dist/elevationInfoUtils-c20557cb.js +0 -126
- package/dist/executeForIds-6a55aa95.js +0 -14
- package/dist/executeForTopCount-7ffc37ac.js +0 -17
- package/dist/executeForTopExtents-191307d3.js +0 -17
- package/dist/executeForTopIds-f644d448.js +0 -17
- package/dist/executeQueryJSON-c5616d7b.js +0 -15
- package/dist/executeQueryPBF-807fb886.js +0 -152
- package/dist/executeRelationshipQuery-d5a1463b.js +0 -53
- package/dist/executeTopFeaturesQuery-6bb737a8.js +0 -18
- package/dist/featureConversionUtils-8fd0a407.js +0 -479
- package/dist/featureLayerUtils-37c96c26.js +0 -250
- package/dist/featureLayerUtils-cd009ccc.js +0 -142
- package/dist/featureSetUtils-f54946cf.js +0 -2530
- package/dist/featuresetbase-5a262736.js +0 -707
- package/dist/featuresetgeom-b772f260.js +0 -99
- package/dist/featuresetstats-fecaae94.js +0 -81
- package/dist/featuresetstring-8d32b66d.js +0 -95
- package/dist/fetchService-41c786e9.js +0 -33
- package/dist/fieldProperties-0a31a020.js +0 -33
- package/dist/floatRGBA-bcce207e.js +0 -20
- package/dist/form-8bc80cb2.js +0 -138
- package/dist/geohashUtils-5b115834.js +0 -85
- package/dist/geojson-33ba4718.js +0 -208
- package/dist/geomasync-9ccbb40e.js +0 -567
- package/dist/geometryEngine-5d1edffb.js +0 -192
- package/dist/geometryEngineAsync-65f20167.js +0 -217
- package/dist/geometryEngineBase-4107554c.js +0 -18463
- package/dist/geometryEngineJSON-96ac95b3.js +0 -46
- package/dist/geometryEngineJSON-fecd2377.js +0 -171
- package/dist/geometryEngineWorker-3cc93f48.js +0 -11
- package/dist/geometryServiceUtils-99ffac76.js +0 -28
- package/dist/georeference-597e7b2a.js +0 -291
- package/dist/gif-24ef6c2c.js +0 -323
- package/dist/gltfexport-f5557b01.js +0 -705
- package/dist/groupLayerUtils-429ce1be.js +0 -39
- package/dist/heatmapUtils-582b52e1.js +0 -45
- package/dist/highlightReasons-6f0f9ef6.js +0 -19
- package/dist/hydrated-31a838fb.js +0 -40
- package/dist/i3s-3437a8f0.js +0 -809
- package/dist/icon-6764e79e.js +0 -127
- package/dist/imageBitmapUtils-d56cd963.js +0 -23
- package/dist/imageUtils-5fc5f2e1.js +0 -69
- package/dist/imageUtils-d0a1bdd3.js +0 -89
- package/dist/imageryUtils-31c938b0.js +0 -43
- package/dist/index-a8d87ec0.js +0 -45604
- package/dist/input-message-067fbc56.js +0 -92
- package/dist/input2-d25d1697.js +0 -575
- package/dist/interactive-79c8f5d7.js +0 -80
- package/dist/jsonContext-b5489a22.js +0 -15
- package/dist/jsonUtils-34961e68.js +0 -86
- package/dist/jsonUtils-65dc6fdf.js +0 -476
- package/dist/jsonUtils-980c608d.js +0 -59
- package/dist/kmlUtils-b1b9817a.js +0 -112
- package/dist/knowledgeGraphService-53d3ffbb.js +0 -739
- package/dist/knowledgegraph-bd84abd0.js +0 -149
- package/dist/labelUtils-333abe25.js +0 -61
- package/dist/labelingInfo-6d452fa4.js +0 -46
- package/dist/layersCreator-2cc797a3.js +0 -151
- package/dist/layersLoader-028db48b.js +0 -197
- package/dist/lazyLayerLoader-2dd5721b.js +0 -10
- package/dist/lclayout-44591238.js +0 -773
- package/dist/lengthUtils-7339106c.js +0 -5
- package/dist/lerc-wasm-49e10ccb.js +0 -325
- package/dist/libtess-asm-ac16428b.js +0 -3673
- package/dist/libtess-f4e34dcf.js +0 -269
- package/dist/lineSegment-0e4aefd8.js +0 -76
- package/dist/loadGLTFMesh-4afc2514.js +0 -181
- package/dist/loadable-a2fd544f.js +0 -24
- package/dist/loader-fbae5e8f.js +0 -79
- package/dist/lyr3DWorker-1fc30357.js +0 -2108
- package/dist/mapViewDeps-59a6c6c7.js +0 -3052
- package/dist/mediaLayerUtils-642a4077.js +0 -35
- package/dist/meshFeatureSet-91312223.js +0 -126
- package/dist/meshVertexSpaceUtils-48eddc77.js +0 -58
- package/dist/multidimensionalUtils-705f0902.js +0 -290
- package/dist/normalizeUtilsSync-71d587bd.js +0 -181
- package/dist/number-063f85f4.js +0 -128
- package/dist/objectResourceUtils-0e881546.js +0 -1455
- package/dist/observers-745d564e.js +0 -30
- package/dist/ogcFeatureUtils-80329692.js +0 -206
- package/dist/openCloseComponent-1c398ac3.js +0 -37
- package/dist/orientedBoundingBox-a29567df.js +0 -447
- package/dist/parser-65ddb097.js +0 -488
- package/dist/pbf-b0a9807c.js +0 -215
- package/dist/pbfQueryUtils-3cd28b30.js +0 -422
- package/dist/pe-wasm-fe3a1187.js +0 -887
- package/dist/persistable-36a3796e.js +0 -89
- package/dist/perspectiveUtils-b75aeded.js +0 -42
- package/dist/pieChart-bc276742.js +0 -555
- package/dist/plane-79192909.js +0 -160
- package/dist/popupUtils-022834aa.js +0 -22
- package/dist/popupUtils-4b2bd688.js +0 -50
- package/dist/portalItemUtils-052627b4.js +0 -57
- package/dist/portalLayers-3be98e63.js +0 -312
- package/dist/portalUtils-b665fd61.js +0 -7
- package/dist/programUtils-00a4e18d.js +0 -59
- package/dist/project-032d84cf.js +0 -21
- package/dist/projectPointToVector-3a48d9a2.js +0 -14
- package/dist/projectVectorToVector-4c6a3902.js +0 -13
- package/dist/quantityUtils-a39f9287.js +0 -33
- package/dist/quantizationUtils-4616cce9.js +0 -68
- package/dist/quat-5e906b75.js +0 -104
- package/dist/query-2ab99d18.js +0 -89
- package/dist/queryAttachments-15a42419.js +0 -39
- package/dist/queryEngineUtils-ff4789cd.js +0 -21
- package/dist/queryTopFeatures-5eb3ccc9.js +0 -50
- package/dist/queryZScale-62422052.js +0 -12
- package/dist/rasterProjectionHelper-b605f2ee.js +0 -577
- package/dist/rasterUtils-f2036a08.js +0 -122
- package/dist/rasterizingUtils-0c9cf9ce.js +0 -46
- package/dist/request-00229175.js +0 -46
- package/dist/requestImageUtils-90da2619.js +0 -8
- package/dist/resourceExtension-eadbfa3f.js +0 -17
- package/dist/resourceUtils-28b3c1e8.js +0 -42
- package/dist/resourceUtils-4e9ccf63.js +0 -69
- package/dist/resourceUtils-666fad8a.js +0 -62
- package/dist/saveAPIKeyUtils-1a4f92e5.js +0 -8
- package/dist/saveUtils-5b62c0b1.js +0 -24
- package/dist/scaleUtils-6153583e.js +0 -23
- package/dist/scrim-6e0e08c4.js +0 -114
- package/dist/serviceCapabilitiesUtils-96f8d393.js +0 -64
- package/dist/sourceUtils-5aee3b16.js +0 -71
- package/dist/sphere-512478f6.js +0 -199
- package/dist/statsWorker-183f2d29.js +0 -37
- package/dist/streamLayerUtils-a1e8e58a.js +0 -31
- package/dist/styleUtils-49a8dabd.js +0 -14
- package/dist/styleUtils-52e000d6.js +0 -75
- package/dist/sublayerUtils-65a83d58.js +0 -37
- package/dist/substitute-0272cab6.js +0 -52
- package/dist/symbolColorUtils-261cba60.js +0 -8
- package/dist/symbolLayerUtils-e0203fd7.js +0 -31
- package/dist/symbologySnappingCandidates-eeda4ddf.js +0 -221
- package/dist/t9n-147b4f00.js +0 -349
- package/dist/testSVGPremultipliedAlpha-e3c11fd6.js +0 -94
- package/dist/timeSupport-3ddd7e4b.js +0 -410
- package/dist/triangle-28fd7dff.js +0 -98
- package/dist/unitConversionUtils-df3ffd70.js +0 -17
- package/dist/unitFormatUtils-d857519e.js +0 -40
- package/dist/uploadAssetErrors-18a6fad7.js +0 -70
- package/dist/uploadAssets-f2c89175.js +0 -330
- package/dist/utils-214b98cc.js +0 -91
- package/dist/utils-283fbef1.js +0 -34
- package/dist/utils-333b2280.js +0 -2746
- package/dist/utils-7202e24d.js +0 -232
- package/dist/utils-a7d5b733.js +0 -419
- package/dist/utils-cffde1b1.js +0 -433
- package/dist/utils-e4309923.js +0 -79
- package/dist/utils-e582955c.js +0 -73
- package/dist/utils3-d4b9a6af.js +0 -75
- package/dist/vec3-d9885b29.js +0 -81
- package/dist/vec42-d5675dd5.js +0 -125
- package/dist/versionUtils-2a4f90d3.js +0 -161
- package/dist/visualVariableUtils-d45d2e59.js +0 -267
- package/dist/webStyleSymbolUtils-5d8e6604.js +0 -48
- package/dist/webglDeps-c5e1e661.js +0 -23
- package/dist/wfsUtils-a004cee1.js +0 -343
- package/dist/workerHelper-a0956a07.js +0 -11
- package/dist/xyChart-e8a9ed1d.js +0 -3335
|
@@ -0,0 +1,2157 @@
|
|
|
1
|
+
import { hg as vt, j7 as Tt, cZ as te, c8 as ut, s as le, W as O, ex as Le, a$ as A, b3 as z, U as ht, eg as ft, bR as L, gU as _t, e as I, y as v, c as K, bx as Ft, cw as Xe, b0 as kt, c5 as Mt, fS as Ct, aH as Pt, ad as Ot, j8 as $t, dL as mt, j9 as Dt, B as Be, aO as Nt, gX as Bt, ap as Et, cT as Jt, bj as At, k as zt, bO as Lt, c6 as he, o as Ht, ea as Wt, db as Gt, w as jt, a_ as qt } from "./index-4ead5b97.js";
|
|
2
|
+
import { m as Ut } from "./MultiOriginJSONSupport-66a73b5d.js";
|
|
3
|
+
import { l as Vt } from "./ArcGISService-16ef592c.js";
|
|
4
|
+
import { n as Xt } from "./BlendLayer-f24275a8.js";
|
|
5
|
+
import { e as Yt } from "./CustomParametersMixin-949de3be.js";
|
|
6
|
+
import { c as Kt, N as Ee, l as Qt, d as Zt, a as ei, h as ti, K as Ye, B as Ke, S as ii, E as si, V as Qe, t as ni, p as ri, m as ai, b as oi } from "./ImageHistogramParameters-f0a6a74c.js";
|
|
7
|
+
import { d as pt, c as li } from "./commonProperties-c36fc1b2.js";
|
|
8
|
+
import { h as dt, D as yt, i as ci, a as ui, p as He, d as Ze, o as hi, f as et, g as fi } from "./multidimensionalUtils-8762b51c.js";
|
|
9
|
+
import { S as mi, n as ge, m as We, L as pi, r as tt, a as xe, h as di, g as Ge, P as yi, b as gi, F as xi, U as wi, N as Ii, R as bi, c as we, B as Si, d as Ri, D as vi } from "./RasterSymbolizer-f981d3ba.js";
|
|
10
|
+
import { i as it, m as st, x as nt, h as Ti, s as _i } from "./RawBlockCache-f74df003.js";
|
|
11
|
+
import { U as ke, D as gt, R as Fi, a as ki, l as Mi, c as Ci, u as Y, f as Pi, s as Oi, d as $i, E as Di, W as Ni, T as Bi } from "./dataUtils-cb1ddea6.js";
|
|
12
|
+
import { T as Je, D as Ie, j as rt, r as at, o as Ei, V as Me, J as ve, e as Ji, Z as Ai, C as zi, U as Ae } from "./rasterProjectionHelper-29c41430.js";
|
|
13
|
+
import { d as _e } from "./FeatureSet-a2d35655.js";
|
|
14
|
+
import { R as xt, f as Li, i as Hi, y as je, c as Wi, N as Gi } from "./utils-f5731fc4.js";
|
|
15
|
+
import { u as ji } from "./OperationalLayer-2e935984.js";
|
|
16
|
+
import { j as qi } from "./PortalLayer-15420854.js";
|
|
17
|
+
import { f as Ui } from "./RefreshableLayer-f99ea584.js";
|
|
18
|
+
import { t as Vi } from "./ScaleRangeLayer-6b36cfd2.js";
|
|
19
|
+
import { f as Xi } from "./TemporalLayer-52d34fa2.js";
|
|
20
|
+
import { T as Yi } from "./TilemapCache-ae840560.js";
|
|
21
|
+
import { p as Ki } from "./popupUtils-3e3652c3.js";
|
|
22
|
+
import { A as be } from "./interfaces-fac3cfda.js";
|
|
23
|
+
import "vue";
|
|
24
|
+
import "./jsonUtils-2a454e30.js";
|
|
25
|
+
import "./parser-bab9c2ce.js";
|
|
26
|
+
import "./UniqueValueRenderer-cc2c9298.js";
|
|
27
|
+
import "./ColorStop-6fd09765.js";
|
|
28
|
+
import "./diffUtils-f967bb01.js";
|
|
29
|
+
import "./colorRamps-fedcdeb0.js";
|
|
30
|
+
import "./sizeVariableUtils-a1b694d8.js";
|
|
31
|
+
import "./visualVariableUtils-88773652.js";
|
|
32
|
+
import "./lengthUtils-21f99608.js";
|
|
33
|
+
import "./jsonUtils-0c0893e4.js";
|
|
34
|
+
import "./styleUtils-b62393b9.js";
|
|
35
|
+
import "./utils-8b01c610.js";
|
|
36
|
+
import "./utils-b1ab6c91.js";
|
|
37
|
+
import "./LRUCache-7a6c25d0.js";
|
|
38
|
+
import "./MemCache-cfd09d4d.js";
|
|
39
|
+
import "./ClassBreaksDefinition-a4abcf50.js";
|
|
40
|
+
import "./ElevationInfo-c194d5f5.js";
|
|
41
|
+
import "./unitConversionUtils-c6c847c9.js";
|
|
42
|
+
import "./colorUtils-b3dcdea1.js";
|
|
43
|
+
import "./vec42-689e76ac.js";
|
|
44
|
+
import "./vec4f64-043e974c.js";
|
|
45
|
+
import "./portalItemUtils-9fe0753b.js";
|
|
46
|
+
import "./TimeInfo-8ce5e779.js";
|
|
47
|
+
import "./ByteSizeUnit-90df2840.js";
|
|
48
|
+
const ot = 8, Qi = 256;
|
|
49
|
+
let Zi = 0, G = class extends vt(Ft) {
|
|
50
|
+
constructor() {
|
|
51
|
+
super(...arguments), this._tileFetchQueue = new Tt({ concurrency: 32, process: (i, e) => this._fetchRawTile(i.pyramidLevel, i.row, i.col, { ...i.options, signal: e }) }), this.datasetName = null, this.datasetFormat = null, this.hasUniqueSourceStorageInfo = !0, this.rasterInfo = null, this.ioConfig = { sampling: "closest" };
|
|
52
|
+
}
|
|
53
|
+
async init() {
|
|
54
|
+
const i = Je();
|
|
55
|
+
this.addResolvingPromise(i), await this.when();
|
|
56
|
+
}
|
|
57
|
+
normalizeCtorArgs(i) {
|
|
58
|
+
return i != null && i.ioConfig && (i = { ...i, ioConfig: { resolution: null, bandIds: null, sampling: "closest", tileInfo: te.create(), ...i.ioConfig } }), i;
|
|
59
|
+
}
|
|
60
|
+
get _isGlobalWrappableSource() {
|
|
61
|
+
const { rasterInfo: i } = this, e = Ie(i.spatialReference);
|
|
62
|
+
return e != null && i.extent.width >= e / 2;
|
|
63
|
+
}
|
|
64
|
+
get _hasNoneOrGCSShiftTransform() {
|
|
65
|
+
const { transform: i } = this.rasterInfo;
|
|
66
|
+
return i == null || i.type === "gcs-shift";
|
|
67
|
+
}
|
|
68
|
+
set rasterJobHandler(i) {
|
|
69
|
+
var e, n;
|
|
70
|
+
this._set("rasterJobHandler", i), this.datasetFormat === "Function" && ((n = (e = this.primaryRasters) == null ? void 0 : e.rasters) == null || n.forEach((t) => t.rasterJobHandler = i));
|
|
71
|
+
}
|
|
72
|
+
get rasterId() {
|
|
73
|
+
return this.url || "rasterId-" + Zi++;
|
|
74
|
+
}
|
|
75
|
+
set url(i) {
|
|
76
|
+
this._set("url", ut(i, le.getLogger(this)));
|
|
77
|
+
}
|
|
78
|
+
async open(i) {
|
|
79
|
+
throw new O("BaseRaster:open-not-implemented", "open() is not implemented");
|
|
80
|
+
}
|
|
81
|
+
async fetchTile(i, e, n, t = {}) {
|
|
82
|
+
const s = t.tileInfo || this.rasterInfo.storageInfo.tileInfo, a = this.getTileExtentFromTileInfo(i, e, n, s);
|
|
83
|
+
return t = { noClip: !0, ...t }, this.fetchPixels(a, s.size[0], s.size[1], t);
|
|
84
|
+
}
|
|
85
|
+
async identify(i, e = {}) {
|
|
86
|
+
var M;
|
|
87
|
+
i = Le(A, i).clone().normalize();
|
|
88
|
+
const { multidimensionalDefinition: n, timeExtent: t } = e, { rasterInfo: s } = this, { hasMultidimensionalTranspose: a, multidimensionalInfo: r } = s;
|
|
89
|
+
let { transposedVariableName: o } = e;
|
|
90
|
+
const l = r != null && a && (t != null || dt(n));
|
|
91
|
+
l && !o && (o = n != null && n.length > 0 ? n[0].variableName ?? void 0 : r.variables[0].name, e = { ...e, transposedVariableName: o }), e = this._getRequestOptionsWithSliceId(e);
|
|
92
|
+
const { spatialReference: c, extent: h } = s, { datumTransformation: u } = e;
|
|
93
|
+
let m = rt(i, c, u);
|
|
94
|
+
if (!h.intersects(m))
|
|
95
|
+
return { location: m, value: null };
|
|
96
|
+
if (s.transform != null) {
|
|
97
|
+
const P = s.transform.inverseTransform(m);
|
|
98
|
+
if (!s.nativeExtent.intersects(P))
|
|
99
|
+
return { location: P, value: null };
|
|
100
|
+
m = P;
|
|
101
|
+
}
|
|
102
|
+
let f = 0;
|
|
103
|
+
const d = o != null && r != null && s.hasMultidimensionalTranspose;
|
|
104
|
+
if (this.datasetFormat === "Function") {
|
|
105
|
+
const P = this.primaryRasters.rasters[0];
|
|
106
|
+
if (d)
|
|
107
|
+
return P.identify(m, e);
|
|
108
|
+
const { pixelSize: B } = s, C = 3, $ = B.x * C / 2, D = B.y * C / 2, E = new z({ xmin: m.x - $, xmax: m.x + $, ymin: m.y - D, ymax: m.y + D, spatialReference: c }), X = { interpolation: "nearest", multidimensionalDefinition: n, sliceId: e.sliceId }, { pixelBlock: H } = await P.fetchPixels(E, C, C, X), { pixelBlock: W } = await this.fetchPixels(E, C, C, X);
|
|
109
|
+
if (H == null)
|
|
110
|
+
return { location: m, value: null };
|
|
111
|
+
const q = Math.floor(C * C * 0.5), ee = !H.mask || H.mask[q] ? H.pixels.map((N) => N[q]) : null;
|
|
112
|
+
let U;
|
|
113
|
+
return W != null && (U = !W.mask || W.mask[q] ? W.pixels.map((N) => N[q]) : void 0), { location: m, value: ee, processedValue: U, pyramidLevel: 0 };
|
|
114
|
+
}
|
|
115
|
+
if (!d) {
|
|
116
|
+
if (e.srcResolution)
|
|
117
|
+
f = at(e.srcResolution, s, this.ioConfig.sampling).pyramidLevel;
|
|
118
|
+
else if (f = await this.computeBestPyramidLevelForLocation(i, e), f == null)
|
|
119
|
+
return { location: m, value: null };
|
|
120
|
+
}
|
|
121
|
+
const g = this.identifyPixelLocation(m, f, null, d);
|
|
122
|
+
if (g === null)
|
|
123
|
+
return { location: m, value: null };
|
|
124
|
+
const { row: p, col: y, rowOffset: x, colOffset: w, blockWidth: S } = g, T = o ?? e.sliceId, b = it(this.rasterId, T), _ = `${f}/${p}/${y}`;
|
|
125
|
+
let F = st(b, null, _);
|
|
126
|
+
F == null && (F = this.fetchRawTile(f, p, y, e), nt(b, null, _, F));
|
|
127
|
+
const R = await F;
|
|
128
|
+
if (!((M = R == null ? void 0 : R.pixels) != null && M.length))
|
|
129
|
+
return { location: m, value: null };
|
|
130
|
+
const k = x * S + w;
|
|
131
|
+
return this._processIdentifyResult(R, { srcLocation: m, position: k, pyramidLevel: f, useTransposedTile: !!d, requestSomeSlices: l, identifyOptions: e });
|
|
132
|
+
}
|
|
133
|
+
async fetchPixels(i, e, n, t = {}) {
|
|
134
|
+
i = Ei(i), t = this._getRequestOptionsWithSliceId(t);
|
|
135
|
+
const { _hasNoneOrGCSShiftTransform: s } = this;
|
|
136
|
+
if (t.requestRawData && s)
|
|
137
|
+
return this._fetchPixels(i, e, n, t);
|
|
138
|
+
const a = Ie(i.spatialReference), r = Me(i);
|
|
139
|
+
if (a == null || r === 0 || r === 1 && this._isGlobalWrappableSource && s)
|
|
140
|
+
return this._fetchPixels(i, e, n, t);
|
|
141
|
+
if (r >= 3)
|
|
142
|
+
return { extent: i, pixelBlock: null };
|
|
143
|
+
const o = [], { xmin: l, xmax: c } = i, h = Math.round(a / (c - l) * e), u = h - Math.round((a / 2 - l) / (c - l) * e);
|
|
144
|
+
let m = 0;
|
|
145
|
+
const f = [];
|
|
146
|
+
for (let y = 0; y <= r; y++) {
|
|
147
|
+
const x = new z({ xmin: y === 0 ? l : -a / 2, xmax: y === r ? c - a * y : a / 2, ymin: i.ymin, ymax: i.ymax, spatialReference: i.spatialReference }), w = y === 0 ? h - u : y === r ? e - m : h;
|
|
148
|
+
m += w, f.push(w);
|
|
149
|
+
const S = t.disableWrapAround && y > 0 ? null : this._fetchPixels(x, w, n, t);
|
|
150
|
+
o.push(S);
|
|
151
|
+
}
|
|
152
|
+
const d = (await Promise.all(o)).map((y) => y == null ? void 0 : y.pixelBlock);
|
|
153
|
+
let g = null;
|
|
154
|
+
const p = { width: e, height: n };
|
|
155
|
+
return this.rasterJobHandler ? g = (await this.rasterJobHandler.mosaicAndTransform({ srcPixelBlocks: d, srcMosaicSize: p, destDimension: null, coefs: null, sampleSpacing: null, interpolation: "nearest", alignmentInfo: null, blockWidths: f }, t)).pixelBlock : g = ke(d, p, { blockWidths: f }), { extent: i, srcExtent: ve(i, this.rasterInfo.spatialReference, t.datumTransformation), pixelBlock: g };
|
|
156
|
+
}
|
|
157
|
+
async fetchRawPixels(i, e, n, t = {}) {
|
|
158
|
+
e = { x: Math.floor(e.x), y: Math.floor(e.y) };
|
|
159
|
+
const s = await this._fetchRawTiles(i, e, n, t), { nativeExtent: a, nativePixelSize: r, storageInfo: o } = this.rasterInfo, l = 2 ** i, c = r.x * l, h = r.y * l, u = new z({ xmin: a.xmin + c * e.x, xmax: a.xmin + c * (e.x + n.width - 1), ymin: a.ymax - h * (e.y + n.height - 1), ymax: a.ymax - h * e.y, spatialReference: a.spatialReference });
|
|
160
|
+
if (!s)
|
|
161
|
+
return { extent: u, srcExtent: u, pixelBlock: null };
|
|
162
|
+
const { pixelBlocks: m, mosaicSize: f } = s;
|
|
163
|
+
if (m.length === 1 && m[0] != null && m[0].width === n.width && m[0].height === n.height)
|
|
164
|
+
return { extent: u, srcExtent: u, pixelBlock: s.pixelBlocks[0] };
|
|
165
|
+
const d = i > 0 ? o.pyramidBlockWidth : o.blockWidth, g = i > 0 ? o.pyramidBlockHeight : o.blockHeight, p = { x: e.x % d, y: e.y % g };
|
|
166
|
+
let y;
|
|
167
|
+
return this.rasterJobHandler ? y = (await this.rasterJobHandler.mosaicAndTransform({ srcPixelBlocks: m, srcMosaicSize: f, destDimension: n, clipOffset: p, clipSize: n, coefs: null, sampleSpacing: null, interpolation: t.interpolation, alignmentInfo: null, blockWidths: null }, t)).pixelBlock : y = ke(m, f, { clipOffset: p, clipSize: n }), { extent: u, srcExtent: u, pixelBlock: y };
|
|
168
|
+
}
|
|
169
|
+
fetchRawTile(i, e, n, t) {
|
|
170
|
+
throw new O("BaseRaster:read-not-implemented", "fetchRawTile() is not implemented");
|
|
171
|
+
}
|
|
172
|
+
computeExtent(i) {
|
|
173
|
+
return ve(this.rasterInfo.extent, i);
|
|
174
|
+
}
|
|
175
|
+
decodePixelBlock(i, e) {
|
|
176
|
+
return !this.rasterJobHandler || e.useCanvas ? mi(i, e) : this.rasterJobHandler.decode({ data: i, options: e });
|
|
177
|
+
}
|
|
178
|
+
async request(i, e, n = 0) {
|
|
179
|
+
const { customFetchParameters: t } = this.ioConfig, { range: s, query: a, headers: r } = e;
|
|
180
|
+
n = n ?? e.retryCount ?? this.ioConfig.retryCount;
|
|
181
|
+
const o = s ? { Range: `bytes=${s.from}-${s.to}` } : null;
|
|
182
|
+
try {
|
|
183
|
+
return await ht(i, { ...e, query: { ...a, ...t }, headers: { ...r, ...o } });
|
|
184
|
+
} catch (l) {
|
|
185
|
+
if (n > 0)
|
|
186
|
+
return n--, this.request(i, e, n);
|
|
187
|
+
throw l;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
getSliceIndex(i) {
|
|
191
|
+
const { multidimensionalInfo: e } = this.rasterInfo;
|
|
192
|
+
return e == null || i == null || i.length === 0 ? null : yt(i, e);
|
|
193
|
+
}
|
|
194
|
+
getTileExtentFromTileInfo(i, e, n, t) {
|
|
195
|
+
const s = t.lodAt(i);
|
|
196
|
+
return this.getTileExtent({ x: s.resolution, y: s.resolution }, e, n, t.origin, t.spatialReference, t.size);
|
|
197
|
+
}
|
|
198
|
+
updateTileInfo() {
|
|
199
|
+
const { storageInfo: i, spatialReference: e, extent: n, pixelSize: t } = this.rasterInfo;
|
|
200
|
+
if (!i.tileInfo) {
|
|
201
|
+
const s = [], a = i.maximumPyramidLevel || 0;
|
|
202
|
+
let r = Math.max(t.x, t.y), o = 1 / 0.0254 * 96 * r;
|
|
203
|
+
for (let c = 0; c <= a; c++)
|
|
204
|
+
s.unshift(new ft({ level: a - c, resolution: r, scale: o })), r *= 2, o *= 2;
|
|
205
|
+
const l = new A({ x: n.xmin, y: n.ymax, spatialReference: e });
|
|
206
|
+
i.tileInfo = new te({ origin: l, size: [i.blockWidth, i.blockHeight], spatialReference: e, lods: s }), i.isVirtualTileInfo = !0;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
createRemoteDatasetStorageInfo(i, e = 512, n = 512, t) {
|
|
210
|
+
const { width: s, height: a, nativeExtent: r, pixelSize: o, spatialReference: l } = i, c = new A({ x: r.xmin, y: r.ymax, spatialReference: l });
|
|
211
|
+
t == null && (t = Math.max(0, Math.round(Math.log(Math.max(s, a)) / Math.LN2 - 8)));
|
|
212
|
+
const h = this.computeBlockBoundary(r, 512, 512, { x: r.xmin, y: r.ymax }, [o], t);
|
|
213
|
+
i.storageInfo = new ge({ blockWidth: e, blockHeight: n, pyramidBlockWidth: e, pyramidBlockHeight: n, origin: c, firstPyramidLevel: 1, maximumPyramidLevel: t, blockBoundary: h });
|
|
214
|
+
}
|
|
215
|
+
async computeBestPyramidLevelForLocation(i, e = {}) {
|
|
216
|
+
return 0;
|
|
217
|
+
}
|
|
218
|
+
computeBlockBoundary(i, e, n, t, s, a = 0, r = 2) {
|
|
219
|
+
if (s.length === 1 && a > 0) {
|
|
220
|
+
s = [...s];
|
|
221
|
+
let { x: h, y: u } = s[0];
|
|
222
|
+
for (let m = 0; m < a; m++)
|
|
223
|
+
h *= r, u *= r, s.push({ x: h, y: u });
|
|
224
|
+
}
|
|
225
|
+
const o = [], { x: l, y: c } = t;
|
|
226
|
+
for (let h = 0; h < s.length; h++) {
|
|
227
|
+
const { x: u, y: m } = s[h];
|
|
228
|
+
o.push({ minCol: Math.floor((i.xmin - l + 0.1 * u) / e / u), maxCol: Math.floor((i.xmax - l - 0.1 * u) / e / u), minRow: Math.floor((c - i.ymax + 0.1 * m) / n / m), maxRow: Math.floor((c - i.ymin - 0.1 * m) / n / m) });
|
|
229
|
+
}
|
|
230
|
+
return o;
|
|
231
|
+
}
|
|
232
|
+
getPyramidPixelSize(i) {
|
|
233
|
+
const { nativePixelSize: e } = this.rasterInfo, { pyramidResolutions: n, pyramidScalingFactor: t } = this.rasterInfo.storageInfo;
|
|
234
|
+
if (i === 0)
|
|
235
|
+
return e;
|
|
236
|
+
if (n != null && n.length)
|
|
237
|
+
return n[i - 1];
|
|
238
|
+
const s = t ** i;
|
|
239
|
+
return { x: e.x * s, y: e.y * s };
|
|
240
|
+
}
|
|
241
|
+
identifyPixelLocation(i, e, n, t) {
|
|
242
|
+
const { spatialReference: s, nativeExtent: a, storageInfo: r } = this.rasterInfo, { maximumPyramidLevel: o, origin: l, transposeInfo: c } = r, h = t && c != null ? c.tileSize[0] : r.blockWidth, u = t && c != null ? c.tileSize[1] : r.blockHeight, m = rt(i, s, n);
|
|
243
|
+
if (!a.intersects(m) || e < 0 || e > o)
|
|
244
|
+
return null;
|
|
245
|
+
const f = this.getPyramidPixelSize(e), { x: d, y: g } = f, p = (l.y - m.y) / g / u, y = (m.x - l.x) / d / h, x = Math.min(u - 1, Math.floor((p - Math.floor(p)) * u)), w = Math.min(h - 1, Math.floor((y - Math.floor(y)) * h));
|
|
246
|
+
return { pyramidLevel: e, row: Math.floor(p), col: Math.floor(y), rowOffset: x, colOffset: w, blockWidth: h, srcLocation: m };
|
|
247
|
+
}
|
|
248
|
+
getTileExtent(i, e, n, t, s, a) {
|
|
249
|
+
const [r, o] = a, l = t.x + n * r * i.x, c = l + r * i.x, h = t.y - e * o * i.y, u = h - o * i.y;
|
|
250
|
+
return new z({ xmin: l, xmax: c, ymin: u, ymax: h, spatialReference: s });
|
|
251
|
+
}
|
|
252
|
+
getBlockWidthHeight(i) {
|
|
253
|
+
return { blockWidth: i > 0 ? this.rasterInfo.storageInfo.pyramidBlockWidth : this.rasterInfo.storageInfo.blockWidth, blockHeight: i > 0 ? this.rasterInfo.storageInfo.pyramidBlockHeight : this.rasterInfo.storageInfo.blockHeight };
|
|
254
|
+
}
|
|
255
|
+
isBlockOutside(i, e, n) {
|
|
256
|
+
const t = this.rasterInfo.storageInfo.blockBoundary[i];
|
|
257
|
+
return !t || t.maxRow < e || t.maxCol < n || t.minRow > e || t.minCol > n;
|
|
258
|
+
}
|
|
259
|
+
updateImageSpaceRasterInfo(i) {
|
|
260
|
+
const { extent: e, pixelSize: n } = i;
|
|
261
|
+
if (e.xmin === -0.5 && e.ymax === 0.5 && n.x === 1 && n.y === 1 && i.transform == null)
|
|
262
|
+
return;
|
|
263
|
+
const { width: t, height: s } = i, a = L.WebMercator;
|
|
264
|
+
i.spatialReference = a, i.extent = i.nativeExtent = new z({ xmin: -0.5, ymax: 0.5, xmax: t - 0.5, ymin: 0.5 - s, spatialReference: a }), i.isPseudoSpatialReference = !0, i.transform = null, i.pixelSize = new A({ x: 1, y: 1, spatialReference: a });
|
|
265
|
+
const { extent: r, storageInfo: o } = i;
|
|
266
|
+
if (o) {
|
|
267
|
+
o.origin = new A({ x: r.xmin, y: r.ymax, spatialReference: a });
|
|
268
|
+
const { tileInfo: l } = o;
|
|
269
|
+
if (l) {
|
|
270
|
+
l.origin = o.origin;
|
|
271
|
+
const c = (i.nativePixelSize.x + i.nativePixelSize.y) / 2;
|
|
272
|
+
l.lods.forEach((h, u) => {
|
|
273
|
+
h.resolution = c * 2 ** u, h.scale = 96 * h.resolution / 0.0254;
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
async _fetchPixels(i, e, n, t = {}) {
|
|
279
|
+
let s = Me(i);
|
|
280
|
+
if (s >= 2)
|
|
281
|
+
return { extent: i, pixelBlock: null };
|
|
282
|
+
const a = this._getSourceDataInfo(i, e, n, t), { pyramidLevel: r, srcResolution: o, srcExtent: l, srcWidth: c, srcHeight: h, ul: u } = a;
|
|
283
|
+
if (c === 0 || h === 0)
|
|
284
|
+
return { extent: i, srcExtent: l, pixelBlock: null };
|
|
285
|
+
const { rasterInfo: m } = this, f = m.transform, d = (f == null ? void 0 : f.type) === "gcs-shift", g = Ie(i.spatialReference) != null;
|
|
286
|
+
!d && g || (s = Me(a.srcExtent, d));
|
|
287
|
+
const p = await this._fetchRawTiles(r, u, { width: c, height: h, wrapCount: s }, t);
|
|
288
|
+
if (!p)
|
|
289
|
+
return { extent: i, srcExtent: l, pixelBlock: null };
|
|
290
|
+
const y = m.storageInfo, x = r > 0 ? y.pyramidBlockWidth : y.blockWidth, w = r > 0 ? y.pyramidBlockHeight : y.blockHeight;
|
|
291
|
+
let { x: S, y: T } = m.pixelSize;
|
|
292
|
+
if (r > 0) {
|
|
293
|
+
const { pyramidResolutions: N, pyramidScalingFactor: Rt } = y;
|
|
294
|
+
if (N != null && N[r - 1])
|
|
295
|
+
({ x: S, y: T } = N[r - 1]);
|
|
296
|
+
else {
|
|
297
|
+
const Ve = Rt ** r;
|
|
298
|
+
S *= Ve, T *= Ve;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
const b = m.spatialReference, _ = new A({ x: S, y: T, spatialReference: b }), F = x === c && w === h && u.x % x == 0 && u.y % w == 0, R = new A({ x: (i.xmax - i.xmin) / e, y: (i.ymax - i.ymin) / n, spatialReference: i.spatialReference }), k = !i.spatialReference.equals(b), M = b.isGeographic ? 1e-9 : 1e-4, { datumTransformation: P } = t;
|
|
302
|
+
if (!k && F && p.pixelBlocks.length === 1 && x === e && w === n && this._isSameResolution(o, R, M))
|
|
303
|
+
return { extent: i, srcExtent: l, srcTilePixelSize: _, pixelBlock: p.pixelBlocks[0] };
|
|
304
|
+
const B = g && Ie(l.spatialReference) != null && this._hasNoneOrGCSShiftTransform, C = t.requestProjectedLocalDirections && this.rasterInfo.dataType.startsWith("vector");
|
|
305
|
+
C && !this.rasterJobHandler && await Je();
|
|
306
|
+
const $ = this.rasterJobHandler ? await this.rasterJobHandler.getProjectionOffsetGrid({ projectedExtent: i, srcBufferExtent: p.extent, pixelSize: R.toJSON(), datumTransformation: P, rasterTransform: f, hasWrapAround: s > 0 || B, isAdaptive: this.ioConfig.optimizeProjectionAccuracy !== !1, includeGCSGrid: C }, t) : Ji({ projectedExtent: i, srcBufferExtent: p.extent, pixelSize: R, datumTransformation: P, rasterTransform: f, hasWrapAround: s > 0 || B, isAdaptive: !1, includeGCSGrid: C });
|
|
307
|
+
let D;
|
|
308
|
+
const E = !t.requestRawData, X = { rows: $.spacing[0], cols: $.spacing[1] }, H = this._hasNoneOrGCSShiftTransform ? this._getRasterTileAlignmentInfo(r, p.extent.xmin) : void 0, { pixelBlocks: W, mosaicSize: q, isPartiallyFilled: ee } = p;
|
|
309
|
+
let U = null;
|
|
310
|
+
if (this.rasterJobHandler)
|
|
311
|
+
({ pixelBlock: D, localNorthDirections: U } = await this.rasterJobHandler.mosaicAndTransform({ srcPixelBlocks: W, srcMosaicSize: q, destDimension: E ? { width: e, height: n } : null, coefs: E ? $.coefficients : null, sampleSpacing: E ? X : null, projectDirections: C, gcsGrid: C ? $.gcsGrid : null, isUV: this.rasterInfo.dataType === "vector-uv", interpolation: t.interpolation, alignmentInfo: H, blockWidths: null }, t));
|
|
312
|
+
else {
|
|
313
|
+
const N = ke(W, q, { alignmentInfo: H });
|
|
314
|
+
D = E ? gt(N, { width: e, height: n }, $.coefficients, X, t.interpolation) : N, C && $.gcsGrid && (U = Fi({ width: e, height: n }, $.gcsGrid), D = ki(D, this.rasterInfo.dataType, U));
|
|
315
|
+
}
|
|
316
|
+
return t.requestRawData || C ? { extent: i, srcExtent: l, srcTilePixelSize: _, pixelBlock: D, transformGrid: $, localNorthDirections: U, isPartiallyFilled: ee } : { extent: i, srcExtent: l, srcTilePixelSize: _, pixelBlock: D };
|
|
317
|
+
}
|
|
318
|
+
async _fetchRawTiles(i, e, n, t) {
|
|
319
|
+
const { origin: s, blockBoundary: a } = this.rasterInfo.storageInfo, { blockWidth: r, blockHeight: o } = this.getBlockWidthHeight(i);
|
|
320
|
+
let { x: l, y: c } = e, { width: h, height: u, wrapCount: m } = n;
|
|
321
|
+
const f = this._getRasterTileAlignmentInfo(i, 0);
|
|
322
|
+
t.buffer && (l -= t.buffer.cols, c -= t.buffer.rows, h += 2 * t.buffer.cols, u += 2 * t.buffer.rows);
|
|
323
|
+
let d = 0, g = 0, p = 0;
|
|
324
|
+
m && f != null && ({ worldColumnCountFromOrigin: g, originColumnOffset: p, rightPadding: d } = f, g * f.blockWidth - d >= l + h && (d = 0));
|
|
325
|
+
const y = Math.floor(l / r), x = Math.floor(c / o), w = Math.floor((l + h + d - 1) / r), S = Math.floor((c + u + d - 1) / o), T = a[i];
|
|
326
|
+
if (!T)
|
|
327
|
+
return null;
|
|
328
|
+
const { minRow: b, minCol: _, maxCol: F, maxRow: R } = T;
|
|
329
|
+
if (m === 0 && (S < b || w < _ || x > R || y > F))
|
|
330
|
+
return null;
|
|
331
|
+
const k = new Array();
|
|
332
|
+
let M = !1;
|
|
333
|
+
const P = this.ioConfig.allowPartialFill == null ? t.allowPartialFill : this.ioConfig.allowPartialFill;
|
|
334
|
+
for (let H = x; H <= S; H++)
|
|
335
|
+
for (let W = y; W <= w; W++) {
|
|
336
|
+
let q = W;
|
|
337
|
+
if (!t.disableWrapAround && m && f != null && g <= W && (q = W - g - p), H >= b && q >= _ && R >= H && F >= q) {
|
|
338
|
+
const ee = this._tileFetchQueue.push({ pyramidLevel: i, row: H, col: q, options: t }, { signal: t.signal });
|
|
339
|
+
P ? k.push(new Promise((U) => {
|
|
340
|
+
ee.then((N) => U(N)).catch(() => {
|
|
341
|
+
M = !0, U(null);
|
|
342
|
+
});
|
|
343
|
+
})) : k.push(ee);
|
|
344
|
+
} else
|
|
345
|
+
k.push(Promise.resolve(null));
|
|
346
|
+
}
|
|
347
|
+
if (k.length === 0)
|
|
348
|
+
return null;
|
|
349
|
+
const B = await Promise.all(k), C = { height: (S - x + 1) * o, width: (w - y + 1) * r }, { spatialReference: $ } = this.rasterInfo, D = this.getPyramidPixelSize(i), { x: E, y: X } = D;
|
|
350
|
+
return { extent: new z({ xmin: s.x + y * r * E, xmax: s.x + (w + 1) * r * E, ymin: s.y - (S + 1) * o * X, ymax: s.y - x * o * X, spatialReference: $ }), pixelBlocks: B, mosaicSize: C, isPartiallyFilled: M };
|
|
351
|
+
}
|
|
352
|
+
_isSameResolution(i, e, n) {
|
|
353
|
+
return Math.abs(i.x - e.x) < n && Math.abs(i.y - e.y) < n;
|
|
354
|
+
}
|
|
355
|
+
_fetchRawTile(i, e, n, t) {
|
|
356
|
+
const s = this.rasterInfo.storageInfo.blockBoundary[i];
|
|
357
|
+
if (!s)
|
|
358
|
+
return Promise.resolve(null);
|
|
359
|
+
const { minRow: a, minCol: r, maxCol: o, maxRow: l } = s;
|
|
360
|
+
if (e < a || n < r || e > l || n > o)
|
|
361
|
+
return Promise.resolve(null);
|
|
362
|
+
const c = it(this.rasterId, t.sliceId), h = `${i}/${e}/${n}`;
|
|
363
|
+
let u = st(c, t.registryId, h);
|
|
364
|
+
if (u == null) {
|
|
365
|
+
const m = new AbortController();
|
|
366
|
+
u = this.fetchRawTile(i, e, n, { ...t, signal: m.signal }), nt(c, t.registryId, h, u, m), u.catch(() => Ti(c, t.registryId, h));
|
|
367
|
+
}
|
|
368
|
+
return t.signal && _t(t, () => {
|
|
369
|
+
_i(c, t.registryId, h);
|
|
370
|
+
}), u;
|
|
371
|
+
}
|
|
372
|
+
_computeMagDirValues(i) {
|
|
373
|
+
var l;
|
|
374
|
+
const { bandCount: e, dataType: n } = this.rasterInfo;
|
|
375
|
+
if (!(e === 2 && n === "vector-magdir" || n === "vector-uv") || (i == null ? void 0 : i.length) !== 2 || !((l = i[0]) != null && l.length))
|
|
376
|
+
return null;
|
|
377
|
+
const t = i[0].length;
|
|
378
|
+
if (n === "vector-magdir") {
|
|
379
|
+
const c = i[1].map((h) => (h + 360) % 360);
|
|
380
|
+
return [i[0], c];
|
|
381
|
+
}
|
|
382
|
+
const [s, a] = i, r = [], o = [];
|
|
383
|
+
for (let c = 0; c < t; c++) {
|
|
384
|
+
const [h, u] = Mi([s[c], a[c]]);
|
|
385
|
+
r.push(h), o.push(u);
|
|
386
|
+
}
|
|
387
|
+
return [r, o];
|
|
388
|
+
}
|
|
389
|
+
_getRasterTileAlignmentInfo(i, e) {
|
|
390
|
+
return this._rasterTileAlignmentInfo == null && (this._rasterTileAlignmentInfo = Ai(this.rasterInfo)), this._rasterTileAlignmentInfo.pyramidsInfo == null ? null : { startX: e, halfWorldWidth: this._rasterTileAlignmentInfo.halfWorldWidth, hasGCSSShiftTransform: this._rasterTileAlignmentInfo.hasGCSSShiftTransform, ...this._rasterTileAlignmentInfo.pyramidsInfo[i] };
|
|
391
|
+
}
|
|
392
|
+
_getSourceDataInfo(i, e, n, t = {}) {
|
|
393
|
+
const s = { datumTransformation: t.datumTransformation, pyramidLevel: 0, pyramidResolution: null, srcExtent: null, srcHeight: 0, srcResolution: null, srcWidth: 0, ul: { x: 0, y: 0 } };
|
|
394
|
+
t.srcResolution && (s.srcResolution = t.srcResolution, this._updateSourceDataInfo(i, s));
|
|
395
|
+
const a = this.rasterInfo.storageInfo.maximumPyramidLevel || 0, { srcWidth: r, srcHeight: o, pyramidLevel: l } = s, c = r / e, h = o / n, u = l < a && c * h >= 16, m = l === a && this._requireTooManySrcTiles(r, o, e, n);
|
|
396
|
+
if (u || m || r === 0 || o === 0) {
|
|
397
|
+
const f = new A({ x: (i.xmax - i.xmin) / e, y: (i.ymax - i.ymin) / n, spatialReference: i.spatialReference });
|
|
398
|
+
let d = zi(f, this.rasterInfo.spatialReference, i, s.datumTransformation);
|
|
399
|
+
const g = !d || t.srcResolution && d.x + d.y < t.srcResolution.x + t.srcResolution.y;
|
|
400
|
+
if (u && t.srcResolution && g) {
|
|
401
|
+
const p = Math.round(Math.log(Math.max(c, h)) / Math.LN2) - 1;
|
|
402
|
+
if (a - l + 3 >= p) {
|
|
403
|
+
const y = 2 ** p;
|
|
404
|
+
d = { x: t.srcResolution.x * y, y: t.srcResolution.y * y };
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
d && (s.srcResolution = d, this._updateSourceDataInfo(i, s));
|
|
408
|
+
}
|
|
409
|
+
return this._requireTooManySrcTiles(s.srcWidth, s.srcHeight, e, n) && (s.srcWidth = 0, s.srcHeight = 0), s;
|
|
410
|
+
}
|
|
411
|
+
_requireTooManySrcTiles(i, e, n, t) {
|
|
412
|
+
const { tileInfo: s } = this.rasterInfo.storageInfo, a = Math.ceil(i / s.size[0]) * Math.ceil(e / s.size[1]), r = i / n, o = e / t, l = Math.max(1, (n + t) / 1024);
|
|
413
|
+
return a >= Qi * l || r > ot || o > ot;
|
|
414
|
+
}
|
|
415
|
+
_updateSourceDataInfo(i, e) {
|
|
416
|
+
e.srcWidth = 0, e.srcHeight = 0;
|
|
417
|
+
const { rasterInfo: n } = this, t = n.spatialReference, { srcResolution: s, datumTransformation: a } = e, { pyramidLevel: r, pyramidResolution: o, excessiveReading: l } = at(s, n, this.ioConfig.sampling);
|
|
418
|
+
if (l)
|
|
419
|
+
return;
|
|
420
|
+
let c = e.srcExtent || ve(i, t, a);
|
|
421
|
+
if (c == null)
|
|
422
|
+
return;
|
|
423
|
+
const h = n.transform;
|
|
424
|
+
h && (c = h.inverseTransform(c)), e.srcExtent = c;
|
|
425
|
+
const { x: u, y: m } = n.storageInfo.origin, f = Math.floor((c.xmin - u) / o.x + 0.1), d = Math.floor((m - c.ymax) / o.y + 0.1), g = Math.floor((c.xmax - u) / o.x - 0.1), p = Math.floor((m - c.ymin) / o.y - 0.1), y = c.width < 0.1 * o.x ? 0 : g - f + 1, x = c.height < 0.1 * o.y ? 0 : p - d + 1;
|
|
426
|
+
e.pyramidLevel = r, e.pyramidResolution = o, e.srcWidth = y, e.srcHeight = x, e.ul = { x: f, y: d };
|
|
427
|
+
}
|
|
428
|
+
_getRequestOptionsWithSliceId(i) {
|
|
429
|
+
return this.rasterInfo.multidimensionalInfo != null && i.sliceId == null && (i = { ...i, sliceId: this.getSliceIndex(i.multidimensionalDefinition) }), i;
|
|
430
|
+
}
|
|
431
|
+
_processIdentifyResult(i, e) {
|
|
432
|
+
const { srcLocation: n, position: t, pyramidLevel: s, useTransposedTile: a } = e, r = i.pixels[0].length / i.width / i.height;
|
|
433
|
+
if (!(!i.mask || i.mask[t]))
|
|
434
|
+
return { location: n, value: null };
|
|
435
|
+
const { multidimensionalInfo: o } = this.rasterInfo;
|
|
436
|
+
if (o == null || !a) {
|
|
437
|
+
const p = i.pixels.map((w) => w[t]), y = { location: n, value: p, pyramidLevel: s }, x = this._computeMagDirValues(p.map((w) => [w]));
|
|
438
|
+
return x != null && x.length && (y.magdirValue = x.map((w) => w[0])), y;
|
|
439
|
+
}
|
|
440
|
+
let l = i.pixels.map((p) => p.slice(t * r, t * r + r)), c = this._computeMagDirValues(l);
|
|
441
|
+
const { requestSomeSlices: h, identifyOptions: u } = e;
|
|
442
|
+
let m = ci(o, u.transposedVariableName);
|
|
443
|
+
if (h) {
|
|
444
|
+
const p = ui(m, u.multidimensionalDefinition, u.timeExtent);
|
|
445
|
+
l = l.map((y) => p.map((x) => y[x])), c = c == null ? void 0 : c.map((y) => p.map((x) => y[x])), m = p.map((y) => m[y]);
|
|
446
|
+
}
|
|
447
|
+
const f = i.noDataValues || this.rasterInfo.noDataValue, d = { pixels: l, pixelType: i.pixelType };
|
|
448
|
+
let g;
|
|
449
|
+
return f != null && (Ci(d, f), g = d.mask), { location: n, value: null, dataSeries: m.map((p, y) => {
|
|
450
|
+
const x = { value: (g == null ? void 0 : g[y]) === 0 ? null : l.map((w) => w[y]), multidimensionalDefinition: p.multidimensionalDefinition.map((w) => new He({ ...w, isSlice: !0 })) };
|
|
451
|
+
return c != null && c.length && (x.magdirValue = [c[0][y], c[1][y]]), x;
|
|
452
|
+
}), pyramidLevel: s };
|
|
453
|
+
}
|
|
454
|
+
};
|
|
455
|
+
I([v()], G.prototype, "_rasterTileAlignmentInfo", void 0), I([v()], G.prototype, "_tileFetchQueue", void 0), I([v({ readOnly: !0 })], G.prototype, "_isGlobalWrappableSource", null), I([v({ readOnly: !0 })], G.prototype, "_hasNoneOrGCSShiftTransform", null), I([v()], G.prototype, "rasterJobHandler", null), I([v({ readOnly: !0 })], G.prototype, "rasterId", null), I([v(pt)], G.prototype, "url", null), I([v({ type: String, json: { write: !0 } })], G.prototype, "datasetName", void 0), I([v({ type: String, json: { write: !0 } })], G.prototype, "datasetFormat", void 0), I([v()], G.prototype, "hasUniqueSourceStorageInfo", void 0), I([v()], G.prototype, "rasterInfo", void 0), I([v()], G.prototype, "ioConfig", void 0), I([v()], G.prototype, "sourceJSON", void 0), G = I([K("esri.layers.support.rasterDatasets.BaseRaster")], G);
|
|
456
|
+
const se = G;
|
|
457
|
+
function es(i, e) {
|
|
458
|
+
if (i.spatialReference.equals(e))
|
|
459
|
+
return i;
|
|
460
|
+
const n = Xe(i.spatialReference), t = Xe(e);
|
|
461
|
+
if (n === t)
|
|
462
|
+
return i;
|
|
463
|
+
const s = n / t;
|
|
464
|
+
return { x: i.x * s, y: i.y * s };
|
|
465
|
+
}
|
|
466
|
+
async function ze(i, e, n) {
|
|
467
|
+
if (n.type === "extent")
|
|
468
|
+
return is(i, e, n);
|
|
469
|
+
const { width: t, height: s } = i, a = new Uint8Array(t * s), { contains: r, intersects: o } = await import("./geometryEngine-7390e3b3.js");
|
|
470
|
+
return o(e, n) ? n.type === "polyline" ? ss(i, e, n) : r(n, e) ? i : ts(i, e, n) : new Y({ pixelType: i.pixelType, width: t, height: s, mask: a, maskIsAlpha: !1, pixels: [...i.pixels] });
|
|
471
|
+
}
|
|
472
|
+
function ts(i, e, n) {
|
|
473
|
+
if (!i)
|
|
474
|
+
return i;
|
|
475
|
+
const { width: t, height: s } = i, a = e.width / t, r = e.height / s, { xmin: o, ymax: l } = e;
|
|
476
|
+
let c;
|
|
477
|
+
if (n.type === "extent") {
|
|
478
|
+
const p = (n.xmin - o) / a, y = (n.xmax - o) / a, x = (l - n.ymax) / r, w = (l - n.ymin) / r;
|
|
479
|
+
c = [[[p, x], [p, w], [y, w], [y, x], [p, x]]];
|
|
480
|
+
} else
|
|
481
|
+
c = n.rings.map((p) => p.map(([y, x]) => [(y - o) / a, (l - x) / r]));
|
|
482
|
+
const h = document.createElement("canvas");
|
|
483
|
+
h.width = t, h.height = s;
|
|
484
|
+
const u = h.getContext("2d");
|
|
485
|
+
u.fillStyle = "#f00", u.beginPath(), c.forEach((p) => {
|
|
486
|
+
u.moveTo(p[0][0], p[0][1]);
|
|
487
|
+
for (let y = 0; y < p.length; y++)
|
|
488
|
+
u.lineTo(p[y][0], p[y][1]);
|
|
489
|
+
u.closePath();
|
|
490
|
+
}), u.fill();
|
|
491
|
+
const m = u.getImageData(0, 0, t, s).data, f = i.mask, d = t * s, g = new Uint8Array(d);
|
|
492
|
+
for (let p = 0; p < d; p++)
|
|
493
|
+
f && !f[p] || (g[p] = m[4 * p + 3] > 127 ? 255 : 0);
|
|
494
|
+
return new Y({ pixelType: i.pixelType, width: t, height: s, mask: g, maskIsAlpha: !1, pixels: [...i.pixels] });
|
|
495
|
+
}
|
|
496
|
+
function is(i, e, n) {
|
|
497
|
+
const { width: t, height: s } = i, a = new Uint8Array(t * s), r = e.width / t, o = e.height / s;
|
|
498
|
+
if (n.width / r < 0.5 || n.height / o < 0.5)
|
|
499
|
+
return new Y({ pixelType: i.pixelType, width: t, height: s, mask: a, pixels: [...i.pixels] });
|
|
500
|
+
const { xmin: l, xmax: c, ymin: h, ymax: u } = e, { xmin: m, xmax: f, ymin: d, ymax: g } = n, p = Math.max(l, m), y = Math.min(c, f), x = Math.max(h, d), w = Math.min(u, g), S = 0.5 * r, T = 0.5 * o;
|
|
501
|
+
if (y - p < S || w - x < T || y < l + S || p > c - S || x > u - T || w < h + T)
|
|
502
|
+
return new Y({ pixelType: i.pixelType, width: t, height: s, mask: a, pixels: [...i.pixels] });
|
|
503
|
+
const b = Math.max(0, (p - l) / r), _ = Math.min(t, Math.max(0, (y - l) / r)), F = Math.max(0, (u - w) / o), R = Math.min(s, Math.max(0, (u - x) / o)), k = Math.round(b), M = Math.round(_) - 1, P = Math.round(F), B = Math.round(R) - 1;
|
|
504
|
+
if (k === M && b % 1 > 0.5 && _ % 1 < 0.5 || P === B && F % 1 > 0.5 && R % 1 < 0.5)
|
|
505
|
+
return new Y({ pixelType: i.pixelType, width: t, height: s, mask: a, pixels: [...i.pixels] });
|
|
506
|
+
if (k === 0 && P === 0 && M === t && B === s)
|
|
507
|
+
return i;
|
|
508
|
+
const C = i.mask;
|
|
509
|
+
for (let $ = P; $ <= B; $++)
|
|
510
|
+
for (let D = k; D <= M; D++) {
|
|
511
|
+
const E = $ * t + D;
|
|
512
|
+
a[E] = C ? C[E] : 255;
|
|
513
|
+
}
|
|
514
|
+
return new Y({ pixelType: i.pixelType, width: t, height: s, mask: a, pixels: [...i.pixels] });
|
|
515
|
+
}
|
|
516
|
+
function ss(i, e, n) {
|
|
517
|
+
const { width: t, height: s } = i, a = new Uint8Array(t * s), r = e.width / t, o = e.height / s, { xmin: l, ymax: c } = e, { paths: h } = n, u = i.mask;
|
|
518
|
+
for (let m = 0; m < h.length; m++) {
|
|
519
|
+
const f = h[m];
|
|
520
|
+
for (let d = 0; d < f.length - 1; d++) {
|
|
521
|
+
const [g, p] = f[d], [y, x] = f[d + 1];
|
|
522
|
+
let w = Math.floor((c - p) / o), S = Math.floor((c - x) / o);
|
|
523
|
+
if (S < w) {
|
|
524
|
+
const b = w;
|
|
525
|
+
w = S, S = b;
|
|
526
|
+
}
|
|
527
|
+
w = Math.max(0, w), S = Math.min(s - 1, S);
|
|
528
|
+
const T = (y - g) / (x - p);
|
|
529
|
+
for (let b = w; b <= S; b++) {
|
|
530
|
+
const _ = b === w ? Math.max(p, x) : (s + 1 - b) * o, F = b === S ? Math.min(p, x) : _ - o;
|
|
531
|
+
let R = Math.floor(x === p ? (g - l) / r : (T * (_ - p) + g - l) / r), k = Math.floor(x === p ? (y - l) / r : (T * (F - p) + g - l) / r);
|
|
532
|
+
if (k < R) {
|
|
533
|
+
const P = R;
|
|
534
|
+
R = k, k = P;
|
|
535
|
+
}
|
|
536
|
+
const M = b * t;
|
|
537
|
+
R = Math.max(0, R), k = Math.min(t - 1, k);
|
|
538
|
+
for (let P = M + R; P <= M + k; P++)
|
|
539
|
+
a[P] = u ? u[P] : 255;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
return new Y({ pixelType: i.pixelType, width: t, height: s, mask: a, pixels: [...i.pixels] });
|
|
544
|
+
}
|
|
545
|
+
function ns(i, e, n, t = !0) {
|
|
546
|
+
const { spatialReference: s } = i, { x: a, y: r } = es(n, s);
|
|
547
|
+
let o, l, c;
|
|
548
|
+
const h = e.type === "extent" ? e : e.extent;
|
|
549
|
+
let { xmin: u, xmax: m, ymax: f, ymin: d } = h;
|
|
550
|
+
const { xmin: g, ymax: p } = i.extent;
|
|
551
|
+
return t ? (u = g + (u > g ? a * Math.round((u - g) / a) : 0), f = p - (f < p ? r * Math.round((p - f) / r) : 0), m = g + (m > g ? a * Math.round((m - g) / a) : 0), d = p - (d < p ? r * Math.round((p - d) / r) : 0), o = new z({ xmin: u, ymax: f, xmax: m, ymin: d, spatialReference: s }), l = Math.round(o.width / a), c = Math.round(o.height / r)) : (l = Math.floor((m - u) / a + 0.8), c = Math.floor((f - d) / r + 0.8), u = g + (u > g ? a * Math.floor((u - g) / a + 0.1) : 0), f = p - (f < p ? r * Math.floor((p - f) / r + 0.1) : 0), m = u + l * a, d = f - c * r, o = new z({ xmin: u, ymax: f, xmax: m, ymin: d, spatialReference: s })), { extent: o, width: l, height: c };
|
|
552
|
+
}
|
|
553
|
+
const rs = 40;
|
|
554
|
+
let ne = class extends se {
|
|
555
|
+
constructor() {
|
|
556
|
+
super(...arguments), this.datasetFormat = "Function", this.tileType = "Raster", this.rasterFunction = null, this._clippingGeometry = /* @__PURE__ */ new Map();
|
|
557
|
+
}
|
|
558
|
+
async open(e) {
|
|
559
|
+
var h, u, m, f;
|
|
560
|
+
await this.init();
|
|
561
|
+
const { rasterFunction: n } = this;
|
|
562
|
+
(u = (h = this.primaryRasters) == null ? void 0 : h.rasters) != null && u.length ? n.sourceRasters = this.primaryRasters.rasters : (this.primaryRasters = n.getPrimaryRasters(), this.rasterJobHandler && ((m = this.primaryRasters.rasters) == null || m.forEach((d) => d.rasterJobHandler = this.rasterJobHandler)));
|
|
563
|
+
const { rasters: t, rasterIds: s } = this.primaryRasters, a = t.map((d) => d.rasterInfo ? void 0 : d.open(e));
|
|
564
|
+
await Promise.all(a);
|
|
565
|
+
const r = t.map(({ rasterInfo: d }) => d), o = n.bind({ rasterInfos: r, rasterIds: s });
|
|
566
|
+
if (n.rawSourceRasterInfos = r, !o.success || r.length === 0)
|
|
567
|
+
throw new O("raster-function:open", `cannot bind the function: ${o.error ?? ""}`);
|
|
568
|
+
const l = n.functionName === "Table" ? n : (f = n.functionArguments) == null ? void 0 : f.raster;
|
|
569
|
+
(l == null ? void 0 : l.functionName) === "Table" && (n.rasterInfo.attributeTable = _e.fromJSON(l.functionArguments.attributeTableAsRecordSet)), await this.syncJobHandler();
|
|
570
|
+
const c = r[0];
|
|
571
|
+
this.hasUniqueSourceStorageInfo = r.length === 1 || r.slice(1).every((d) => this._hasSameStorageInfo(d, c)), this.set("sourceJSON", t[0].sourceJSON), this.set("rasterInfo", n.rasterInfo), await this._updateClipGeometry();
|
|
572
|
+
}
|
|
573
|
+
async syncJobHandler() {
|
|
574
|
+
var e;
|
|
575
|
+
return (e = this.rasterJobHandler) == null ? void 0 : e.updateRasterFunction(this.rasterFunction);
|
|
576
|
+
}
|
|
577
|
+
async fetchPixels(e, n, t, s = {}) {
|
|
578
|
+
var S, T;
|
|
579
|
+
const { rasters: a, rasterIds: r } = this.primaryRasters;
|
|
580
|
+
let o = !1;
|
|
581
|
+
const { interpolation: l } = s, c = (S = this.rasterFunction.flatWebGLFunctionChain) == null ? void 0 : S.hasFocalFunction;
|
|
582
|
+
!s.requestRawData && c && (o = a.length === 1 && !s.skipRasterFunction, s = { ...s, interpolation: "bilinear", requestRawData: o });
|
|
583
|
+
const h = a.map((b) => b.fetchPixels(e, n, t, s)), u = await Promise.all(h), m = u.map((b) => b.pixelBlock), f = o || s.requestRawData ? u.map((b) => b.srcTilePixelSize) : null;
|
|
584
|
+
if (s.skipRasterFunction || m.every((b) => b == null))
|
|
585
|
+
return u[0];
|
|
586
|
+
const d = ((T = u.find((b) => b.pixelBlock != null)) == null ? void 0 : T.extent) ?? e;
|
|
587
|
+
let g = this.rasterJobHandler ? await this.rasterJobHandler.process({ extent: d, primaryPixelBlocks: m, primaryPixelSizes: f, primaryRasterIds: r }) : this.rasterFunction.process({ extent: d, primaryPixelBlocks: m, primaryPixelSizes: f, primaryRasterIds: r });
|
|
588
|
+
const { transformGrid: p } = u[0];
|
|
589
|
+
if (!o || g == null || p == null) {
|
|
590
|
+
const b = s.noClip ? null : this.getClippingGeometry(d.spatialReference);
|
|
591
|
+
return s.noClip || s.requestRawData || g == null || !b || (g = await ze(g, d, b)), { ...u[0], pixelBlock: g };
|
|
592
|
+
}
|
|
593
|
+
const y = { rows: p.spacing[0], cols: p.spacing[1] };
|
|
594
|
+
let x;
|
|
595
|
+
this.rasterJobHandler ? x = (await this.rasterJobHandler.mosaicAndTransform({ srcPixelBlocks: [g], srcMosaicSize: { width: g.width, height: g.height }, destDimension: { width: n, height: t }, coefs: p.coefficients, sampleSpacing: y, projectDirections: !1, gcsGrid: null, isUV: !1, interpolation: l, alignmentInfo: void 0, blockWidths: null }, s)).pixelBlock : x = gt(g, { width: n, height: t }, p.coefficients, y, l);
|
|
596
|
+
const w = s.noClip ? null : this.getClippingGeometry(e.spatialReference);
|
|
597
|
+
return s.noClip || s.requestRawData || x == null || w == null || (x = await ze(x, e, w)), { extent: e, srcExtent: u[0].srcExtent, pixelBlock: x };
|
|
598
|
+
}
|
|
599
|
+
getClippingGeometry(e) {
|
|
600
|
+
const n = this._clippingGeometry.get("0");
|
|
601
|
+
if (!e || !n)
|
|
602
|
+
return n;
|
|
603
|
+
const t = this._getSRKey(e);
|
|
604
|
+
let s = this._clippingGeometry.get(t);
|
|
605
|
+
return s != null || (s = e.equals(n.spatialReference) ? n : Ae(n, e), this._clippingGeometry.set(t, s)), s;
|
|
606
|
+
}
|
|
607
|
+
_hasSameStorageInfo(e, n) {
|
|
608
|
+
const { storageInfo: t, pixelSize: s, spatialReference: a, extent: r } = e, { storageInfo: o, pixelSize: l, spatialReference: c, extent: h } = n;
|
|
609
|
+
return s.x === l.x && s.y === l.y && a.equals(c) && r.equals(h) && t.blockHeight === o.blockHeight && t.blockWidth === o.blockWidth && t.maximumPyramidLevel === o.maximumPyramidLevel;
|
|
610
|
+
}
|
|
611
|
+
async _updateClipGeometry() {
|
|
612
|
+
const e = this.rasterFunction.getClippingGeometries()[0];
|
|
613
|
+
let n = e == null ? void 0 : e.clippingGeometry;
|
|
614
|
+
if (n && e.clippingType === "inside") {
|
|
615
|
+
const { extent: t } = this.rasterInfo, { difference: s, densify: a } = await import("./geometryEngine-7390e3b3.js");
|
|
616
|
+
let r = a(kt.fromExtent(t), 2 * (t.width + t.height) / rs);
|
|
617
|
+
r = Ae(r, n.spatialReference), n = s(r, n);
|
|
618
|
+
}
|
|
619
|
+
this._clippingGeometry.clear(), n && this._clippingGeometry.set("0", n);
|
|
620
|
+
}
|
|
621
|
+
_getSRKey(e) {
|
|
622
|
+
return String(e.wkid ?? e.wkt ?? e.wkt2);
|
|
623
|
+
}
|
|
624
|
+
};
|
|
625
|
+
I([v({ type: String, json: { write: !0 } })], ne.prototype, "datasetFormat", void 0), I([v()], ne.prototype, "tileType", void 0), I([v()], ne.prototype, "rasterFunction", void 0), I([v()], ne.prototype, "primaryRasters", void 0), ne = I([K("esri.layers.support.rasterDatasets.FunctionRaster")], ne);
|
|
626
|
+
const wt = ne, as = (i) => {
|
|
627
|
+
let e = class extends i {
|
|
628
|
+
constructor(...t) {
|
|
629
|
+
var s, a;
|
|
630
|
+
super(...t), this._isConstructedFromFunctionRaster = !1, this._rasterJobHandler = { instance: null, refCount: 0, connectionPromise: null }, this.bandIds = null, this.copyright = null, this.interpolation = "nearest", this.multidimensionalSubset = null, this.raster = null, this.serviceRasterInfo = null, this.sourceJSON = null, this.spatialReference = null, this.symbolizer = null, this._isConstructedFromFunctionRaster = ((a = (s = t[0]) == null ? void 0 : s.raster) == null ? void 0 : a.datasetFormat) === "Function";
|
|
631
|
+
}
|
|
632
|
+
get fullExtent() {
|
|
633
|
+
var t;
|
|
634
|
+
return (t = this.serviceRasterInfo) == null ? void 0 : t.extent;
|
|
635
|
+
}
|
|
636
|
+
set multidimensionalDefinition(t) {
|
|
637
|
+
this._set("multidimensionalDefinition", t), this.updateRenderer();
|
|
638
|
+
}
|
|
639
|
+
set rasterFunction(t) {
|
|
640
|
+
var s;
|
|
641
|
+
((s = t == null ? void 0 : t.functionName) == null ? void 0 : s.toLowerCase()) === "none" && (t = void 0), this._set("rasterFunction", t), this.updateRasterFunction();
|
|
642
|
+
}
|
|
643
|
+
get rasterInfo() {
|
|
644
|
+
return Ct(le.getLogger(this), "rasterInfo", { replacement: "serviceRasterInfo", version: "4.29", warnOnce: !0 }), this._get("serviceRasterInfo");
|
|
645
|
+
}
|
|
646
|
+
set url(t) {
|
|
647
|
+
this._set("url", ut(t, le.getLogger(this)));
|
|
648
|
+
}
|
|
649
|
+
set renderer(t) {
|
|
650
|
+
t == null && this.rasterFunction == null ? this._configDefaultRenderer("override") : (this._set("renderer", t), this.updateRenderer());
|
|
651
|
+
}
|
|
652
|
+
readRenderer(t, s, a) {
|
|
653
|
+
var o, l;
|
|
654
|
+
const r = (l = (o = s == null ? void 0 : s.layerDefinition) == null ? void 0 : o.drawingInfo) == null ? void 0 : l.renderer;
|
|
655
|
+
return ei(r, a) || void 0;
|
|
656
|
+
}
|
|
657
|
+
async convertVectorFieldData(t, s) {
|
|
658
|
+
const { serviceRasterInfo: a } = this;
|
|
659
|
+
if (t == null || !a)
|
|
660
|
+
return null;
|
|
661
|
+
const r = this._rasterJobHandler.instance, o = a.dataType;
|
|
662
|
+
return r ? r.convertVectorFieldData({ pixelBlock: t, dataType: o }, s) : Pi(t, o);
|
|
663
|
+
}
|
|
664
|
+
async computeStatisticsHistograms(t, s) {
|
|
665
|
+
t = Le(ti, t).clone();
|
|
666
|
+
const { serviceRasterInfo: a } = this, { geometry: r } = t;
|
|
667
|
+
if (r == null)
|
|
668
|
+
throw new O("imagery-tile-mixin:compute-statistics-histograms", "geometry must be specified");
|
|
669
|
+
let o = r;
|
|
670
|
+
const { spatialReference: l } = a;
|
|
671
|
+
r.spatialReference.equals(l) || (await Je(), o = r.type === "extent" ? ve(r, l) : Ae(r, l));
|
|
672
|
+
const c = t.pixelSize ?? new A({ x: a.pixelSize.x, y: a.pixelSize.y, spatialReference: l }), { extent: h, width: u, height: m } = ns(a, o, c), f = await this.fetchPixels(h, u, m, { ...s, interpolation: "nearest" });
|
|
673
|
+
if (f.pixelBlock == null)
|
|
674
|
+
throw new O("imagery-tile-mixin:compute-statistics-histograms", "failed to fetch pixels");
|
|
675
|
+
const d = await ze(f.pixelBlock, h, o), g = this._rasterJobHandler.instance;
|
|
676
|
+
return g ? g.computeStatisticsHistograms({ pixelBlock: d }, s) : We(d);
|
|
677
|
+
}
|
|
678
|
+
async createFlowMesh(t, s) {
|
|
679
|
+
const a = this._rasterJobHandler.instance;
|
|
680
|
+
return a ? a.createFlowMesh(t, s) : Oi(t.meshType, t.simulationSettings, t.flowData, s.signal != null ? s.signal : new AbortController().signal);
|
|
681
|
+
}
|
|
682
|
+
normalizeRasterFetchOptions(t) {
|
|
683
|
+
var o, l;
|
|
684
|
+
const { multidimensionalInfo: s } = this.serviceRasterInfo ?? {};
|
|
685
|
+
if (s == null)
|
|
686
|
+
return t;
|
|
687
|
+
let a = t.multidimensionalDefinition || this.multidimensionalDefinition;
|
|
688
|
+
a != null && a.length || (a = Ze(this.raster.rasterInfo, { multidimensionalSubset: this.multidimensionalSubset }));
|
|
689
|
+
const r = t.timeExtent || this.timeExtent;
|
|
690
|
+
if (a != null && r != null && (r.start != null || r.end != null)) {
|
|
691
|
+
a = a.map((y) => y.clone());
|
|
692
|
+
const c = (l = (o = s.variables.find(({ name: y }) => y === a[0].variableName)) == null ? void 0 : o.dimensions) == null ? void 0 : l.find(({ name: y }) => y === "StdTime"), h = a.find(({ dimensionName: y }) => y === "StdTime");
|
|
693
|
+
if (!c || !h)
|
|
694
|
+
return { ...t, multidimensionalDefinition: null };
|
|
695
|
+
const { start: u, end: m } = r, f = u == null ? null : u.getTime(), d = m == null ? null : m.getTime(), g = f ?? d, p = d ?? f;
|
|
696
|
+
if (c.values != null) {
|
|
697
|
+
const y = c.values.filter((x) => {
|
|
698
|
+
if (Array.isArray(x)) {
|
|
699
|
+
if (g === p)
|
|
700
|
+
return x[0] <= g && x[1] >= g;
|
|
701
|
+
const w = x[0] <= g && x[1] > g || x[0] < p && x[1] >= p, S = x[0] >= g && x[1] <= p || x[0] < g && x[1] > p;
|
|
702
|
+
return w || S;
|
|
703
|
+
}
|
|
704
|
+
return g === p ? x === g : x >= g && x <= p;
|
|
705
|
+
});
|
|
706
|
+
if (y.length) {
|
|
707
|
+
const x = y.sort((w, S) => {
|
|
708
|
+
const T = Array.isArray(w) ? w[0] : w, b = Array.isArray(w) ? w[1] : w, _ = Array.isArray(S) ? S[0] : S, F = Array.isArray(S) ? S[1] : S;
|
|
709
|
+
return g === p ? T - _ : Math.abs(b - p) - Math.abs(F - p);
|
|
710
|
+
})[0];
|
|
711
|
+
h.values = [x];
|
|
712
|
+
} else
|
|
713
|
+
a = null;
|
|
714
|
+
} else if (c.hasRegularIntervals && c.extent) {
|
|
715
|
+
const [y, x] = c.extent;
|
|
716
|
+
g > x || p < y ? a = null : h.values = g === p ? [g] : [Math.max(y, g), Math.min(x, p)];
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
return a != null && hi(a, this.multidimensionalSubset) ? { ...t, multidimensionalDefinition: null } : { ...t, multidimensionalDefinition: a };
|
|
720
|
+
}
|
|
721
|
+
async updateRasterFunction() {
|
|
722
|
+
var h, u, m;
|
|
723
|
+
if (!this.loaded || this.type !== "imagery-tile" || !this.rasterFunction && !this._cachedRasterFunctionJson || JSON.stringify(this.rasterFunction) === JSON.stringify(this._cachedRasterFunctionJson))
|
|
724
|
+
return;
|
|
725
|
+
if (this._isConstructedFromFunctionRaster && this.raster.datasetFormat === "Function") {
|
|
726
|
+
const f = this.raster.rasterFunction.toJSON();
|
|
727
|
+
return !this.rasterFunction && f && this._set("rasterFunction", Ee.fromJSON(f)), void (this._cachedRasterFunctionJson = (h = this.rasterFunction) == null ? void 0 : h.toJSON());
|
|
728
|
+
}
|
|
729
|
+
let t, s = this.raster, a = !1;
|
|
730
|
+
s.datasetFormat === "Function" ? (t = s.primaryRasters.rasters, s = t[0], a = !0) : t = [s];
|
|
731
|
+
const { rasterFunction: r } = this;
|
|
732
|
+
if (r) {
|
|
733
|
+
const f = { raster: s };
|
|
734
|
+
t.length > 1 && t.forEach((p) => f[p.url] = p);
|
|
735
|
+
const d = xt(((u = r.functionDefinition) == null ? void 0 : u.toJSON()) ?? r.toJSON(), f), g = new wt({ rasterFunction: d });
|
|
736
|
+
g.rasterJobHandler = this._rasterJobHandler.instance, await g.open(), this._cachedRasterFunctionJson = (m = this.rasterFunction) == null ? void 0 : m.toJSON(), this.raster = g;
|
|
737
|
+
} else
|
|
738
|
+
this.raster = s, this._cachedRasterFunctionJson = null, await s.when();
|
|
739
|
+
if (this._cachedRendererJson = null, !a && !r)
|
|
740
|
+
return;
|
|
741
|
+
const { bandIds: o } = this, { bandCount: l } = this.raster.rasterInfo, c = o != null && o.length ? o.some((f) => f >= l) : l >= 3;
|
|
742
|
+
o && (c || this.renderer && this.renderer.type !== "raster-stretch") && this._set("bandIds", null), this._configDefaultRenderer("auto");
|
|
743
|
+
}
|
|
744
|
+
async updateRenderer() {
|
|
745
|
+
const { loaded: t, symbolizer: s } = this;
|
|
746
|
+
if (!t || !s || !this.renderer)
|
|
747
|
+
return;
|
|
748
|
+
const { rasterInfo: a } = this.raster, r = et(a, { multidimensionalDefinition: this.multidimensionalDefinition, multidimensionalSubset: this.multidimensionalSubset }), o = r == null ? void 0 : r.name, l = Ye({ ...this.renderer.toJSON(), variableName: o });
|
|
749
|
+
if (JSON.stringify(this._cachedRendererJson) === JSON.stringify(l))
|
|
750
|
+
return;
|
|
751
|
+
const c = this._rasterJobHandler.instance;
|
|
752
|
+
c && (s.rasterInfo = Ke(a, o), s.rendererJSON = l, s.bind(), await c.updateSymbolizer(s), this._cachedRendererJson = l);
|
|
753
|
+
}
|
|
754
|
+
async applyRenderer(t, s) {
|
|
755
|
+
const a = t == null ? void 0 : t.pixelBlock;
|
|
756
|
+
if (!(a != null && a.pixels && a.pixels.length > 0))
|
|
757
|
+
return null;
|
|
758
|
+
let r;
|
|
759
|
+
await this.updateRenderer();
|
|
760
|
+
const o = this._rasterJobHandler.instance, l = this.bandIds ?? [];
|
|
761
|
+
return r = o ? await o.symbolize({ ...t, simpleStretchParams: s, bandIds: l }) : this.symbolizer.symbolize({ ...t, simpleStretchParams: s, bandIds: l }), r;
|
|
762
|
+
}
|
|
763
|
+
getTileUrl(t, s, a) {
|
|
764
|
+
return this.raster.datasetFormat === "RasterTileServer" ? `${this.url}/tile/${t}/${s}/${a}` : "";
|
|
765
|
+
}
|
|
766
|
+
getCompatibleTileInfo(t, s, a = !1) {
|
|
767
|
+
if (!this.loaded || s == null)
|
|
768
|
+
return null;
|
|
769
|
+
if (a && t.equals(this.spatialReference))
|
|
770
|
+
return this.tileInfo;
|
|
771
|
+
const r = Pt(t);
|
|
772
|
+
return te.create({ size: 256, spatialReference: t, origin: r ? { x: r.origin[0], y: r.origin[1] } : { x: s.xmin, y: s.ymax } });
|
|
773
|
+
}
|
|
774
|
+
getCompatibleFullExtent(t) {
|
|
775
|
+
return this.loaded ? (this._compatibleFullExtent && this._compatibleFullExtent.spatialReference.equals(t) || (this._compatibleFullExtent = this.raster.computeExtent(t)), this._compatibleFullExtent) : null;
|
|
776
|
+
}
|
|
777
|
+
async fetchTile(t, s, a, r = {}) {
|
|
778
|
+
var l;
|
|
779
|
+
if (n(this), r.requestAsImageElement) {
|
|
780
|
+
const c = this.getTileUrl(t, s, a);
|
|
781
|
+
return ht(c, { responseType: "image", query: { ...this.refreshParameters, ...this.raster.ioConfig.customFetchParameters }, signal: r.signal }).then((h) => h.data);
|
|
782
|
+
}
|
|
783
|
+
const { serviceRasterInfo: o } = this;
|
|
784
|
+
if (o.multidimensionalInfo != null && (r = this.normalizeRasterFetchOptions(r)).multidimensionalDefinition == null) {
|
|
785
|
+
const c = r.tileInfo || o.storageInfo.tileInfo;
|
|
786
|
+
return { extent: this.raster.getTileExtentFromTileInfo(t, s, a, c), pixelBlock: null };
|
|
787
|
+
}
|
|
788
|
+
return await this._initJobHandler(), await this.updateRasterFunction(), ((l = this.renderer) == null ? void 0 : l.type) === "raster-shaded-relief" && (r = { ...r, buffer: { cols: 1, rows: 1 } }), this.raster.fetchTile(t, s, a, r);
|
|
789
|
+
}
|
|
790
|
+
async fetchPixels(t, s, a, r = {}) {
|
|
791
|
+
return this.serviceRasterInfo.multidimensionalInfo != null && (r = this.normalizeRasterFetchOptions(r)).multidimensionalDefinition == null ? { extent: t, pixelBlock: null } : (await this._initJobHandler(), await this.updateRasterFunction(), s = Math.round(s), a = Math.round(a), this.raster.fetchPixels(t, s, a, r));
|
|
792
|
+
}
|
|
793
|
+
async identify(t, s = {}) {
|
|
794
|
+
var l;
|
|
795
|
+
const { raster: a, serviceRasterInfo: r } = this;
|
|
796
|
+
if (r.multidimensionalInfo != null && !(r.hasMultidimensionalTranspose && (dt(s.multidimensionalDefinition) || s.transposedVariableName || s.timeExtent)) && (s = this.normalizeRasterFetchOptions(s)).multidimensionalDefinition == null)
|
|
797
|
+
return { location: t, value: null };
|
|
798
|
+
const o = (l = this.multidimensionalSubset) == null ? void 0 : l.areaOfInterest;
|
|
799
|
+
if (o && !o.contains(t))
|
|
800
|
+
throw new O("imagery-tile-mixin:identify", "the request cannot be fulfilled when falling outside of the multidimensional subset");
|
|
801
|
+
return a.identify(t, s);
|
|
802
|
+
}
|
|
803
|
+
increaseRasterJobHandlerUsage() {
|
|
804
|
+
this._rasterJobHandler.refCount++;
|
|
805
|
+
}
|
|
806
|
+
decreaseRasterJobHandlerUsage() {
|
|
807
|
+
this._rasterJobHandler.refCount--, this._rasterJobHandler.refCount <= 0 && this._shutdownJobHandler();
|
|
808
|
+
}
|
|
809
|
+
hasStandardTime() {
|
|
810
|
+
var r, o, l;
|
|
811
|
+
const t = (r = this.serviceRasterInfo) == null ? void 0 : r.multidimensionalInfo;
|
|
812
|
+
if (t == null || ((o = this.serviceRasterInfo) == null ? void 0 : o.dataType) !== "standard-time")
|
|
813
|
+
return !1;
|
|
814
|
+
const s = this.multidimensionalDefinition, a = (l = s == null ? void 0 : s[0]) == null ? void 0 : l.variableName;
|
|
815
|
+
return t.variables.some((c) => c.name === a && (!(s != null && s[0].dimensionName) || c.dimensions.some((h) => h.name === "StdTime")));
|
|
816
|
+
}
|
|
817
|
+
getStandardTimeValue(t) {
|
|
818
|
+
return new Date(24 * (t - 25569) * 3600 * 1e3).toString();
|
|
819
|
+
}
|
|
820
|
+
getMultidimensionalSubsetVariables(t) {
|
|
821
|
+
var a;
|
|
822
|
+
const s = t ?? ((a = this.serviceRasterInfo) == null ? void 0 : a.multidimensionalInfo);
|
|
823
|
+
return fi(this.multidimensionalSubset, s);
|
|
824
|
+
}
|
|
825
|
+
_configDefaultSettings() {
|
|
826
|
+
this._configDefaultInterpolation(), this.multidimensionalDefinition || (this.multidimensionalDefinition = Ze(this.raster.rasterInfo, { multidimensionalSubset: this.multidimensionalSubset })), this.rasterFunction && this.raster.datasetFormat === "Function" && (this._cachedRasterFunctionJson = this.rasterFunction.toJSON()), this._configDefaultRenderer();
|
|
827
|
+
}
|
|
828
|
+
_initJobHandler() {
|
|
829
|
+
if (this._rasterJobHandler.connectionPromise != null)
|
|
830
|
+
return this._rasterJobHandler.connectionPromise;
|
|
831
|
+
const t = new ni();
|
|
832
|
+
return this._rasterJobHandler.connectionPromise = t.initialize().then(async () => {
|
|
833
|
+
n(this), this._rasterJobHandler.instance = t, this.raster.rasterJobHandler = t, this.raster.datasetFormat === "Function" && this.raster.syncJobHandler(), this.rasterFunction && await this.updateRasterFunction().catch(() => {
|
|
834
|
+
}), this.renderer && this.updateRenderer();
|
|
835
|
+
}).catch(() => {
|
|
836
|
+
}), this._rasterJobHandler.connectionPromise;
|
|
837
|
+
}
|
|
838
|
+
_shutdownJobHandler() {
|
|
839
|
+
this._rasterJobHandler.instance && this._rasterJobHandler.instance.destroy(), this._rasterJobHandler.instance = null, this._rasterJobHandler.connectionPromise = null, this._rasterJobHandler.refCount = 0, this._cachedRendererJson = null, this.raster && (this.raster.rasterJobHandler = null);
|
|
840
|
+
}
|
|
841
|
+
_configDefaultInterpolation() {
|
|
842
|
+
var t;
|
|
843
|
+
if (this.interpolation == null) {
|
|
844
|
+
n(this);
|
|
845
|
+
const { raster: s } = this, a = ii(s.rasterInfo, s.tileType, (t = this.sourceJSON) == null ? void 0 : t.defaultResamplingMethod);
|
|
846
|
+
this._set("interpolation", a);
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
_configDefaultRenderer(t = "no") {
|
|
850
|
+
var h, u;
|
|
851
|
+
n(this);
|
|
852
|
+
const { rasterInfo: s } = this.raster;
|
|
853
|
+
!this.bandIds && s.bandCount > 1 && (this.bandIds = si(s));
|
|
854
|
+
const a = et(s, { multidimensionalDefinition: this.multidimensionalDefinition, multidimensionalSubset: this.multidimensionalSubset }), r = a == null ? void 0 : a.name;
|
|
855
|
+
if (!this.renderer || t === "override") {
|
|
856
|
+
const m = Qe(s, { bandIds: this.bandIds, variableName: r }), f = s.statistics, d = f && f.length > 0 ? f[0] : null, g = (d == null ? void 0 : d.max) ?? 0, p = (d == null ? void 0 : d.min) ?? 0;
|
|
857
|
+
this.raster.datasetFormat === "WCSServer" && m.type === "raster-stretch" && (g > 1e24 || p < -1e24) && (m.dynamicRangeAdjustment = !0, m.statistics = null, m.stretchType === "none" && (m.stretchType = "min-max")), this.renderer = m;
|
|
858
|
+
}
|
|
859
|
+
const o = Ye({ ...this.renderer.toJSON(), variableName: r }), l = Ke(s, r);
|
|
860
|
+
this.symbolizer ? (this.symbolizer.rendererJSON = o, this.symbolizer.rasterInfo = l) : this.symbolizer = new pi({ rendererJSON: o, rasterInfo: l });
|
|
861
|
+
const c = this.symbolizer.bind();
|
|
862
|
+
if (c.success) {
|
|
863
|
+
if (t === "auto") {
|
|
864
|
+
const { colormap: m } = this.raster.rasterInfo, f = this.renderer;
|
|
865
|
+
if (m != null && f.type === "raster-colormap") {
|
|
866
|
+
const d = Qe(this.raster.rasterInfo);
|
|
867
|
+
JSON.stringify(d) !== JSON.stringify(f) && this._configDefaultRenderer("override");
|
|
868
|
+
} else if (f.type === "raster-stretch") {
|
|
869
|
+
const d = (h = this.bandIds) == null ? void 0 : h.length, g = (u = f.statistics) == null ? void 0 : u.length;
|
|
870
|
+
!f.dynamicRangeAdjustment && g && d && g !== d && this._configDefaultRenderer("override");
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
} else
|
|
874
|
+
le.getLogger(this).warn("imagery-tile-mixin", c.error || "The given renderer is not supported by the layer."), t === "auto" && this._configDefaultRenderer("override");
|
|
875
|
+
}
|
|
876
|
+
};
|
|
877
|
+
function n(t) {
|
|
878
|
+
if (!t.raster || !t.serviceRasterInfo)
|
|
879
|
+
throw new O("imagery-tile", "no raster");
|
|
880
|
+
}
|
|
881
|
+
return I([v({ clonable: !1 })], e.prototype, "_cachedRendererJson", void 0), I([v({ clonable: !1 })], e.prototype, "_cachedRasterFunctionJson", void 0), I([v({ clonable: !1 })], e.prototype, "_compatibleFullExtent", void 0), I([v({ clonable: !1 })], e.prototype, "_isConstructedFromFunctionRaster", void 0), I([v({ clonable: !1 })], e.prototype, "_rasterJobHandler", void 0), I([v()], e.prototype, "bandIds", void 0), I([v({ json: { origins: { service: { read: { source: "copyrightText" } } } } })], e.prototype, "copyright", void 0), I([v({ json: { read: !1 } })], e.prototype, "fullExtent", null), I([v()], e.prototype, "interpolation", void 0), I([v()], e.prototype, "ioConfig", void 0), I([v({ type: [He], json: { write: !0 } })], e.prototype, "multidimensionalDefinition", null), I([v({ type: Kt, json: { write: !0 } })], e.prototype, "multidimensionalSubset", void 0), I([v()], e.prototype, "raster", void 0), I([v({ type: Ee, json: { name: "renderingRule", write: !0 } })], e.prototype, "rasterFunction", null), I([v({ readOnly: !0 })], e.prototype, "rasterInfo", null), I([v()], e.prototype, "serviceRasterInfo", void 0), I([v()], e.prototype, "sourceJSON", void 0), I([v({ readOnly: !0, type: L, json: { read: !1 } })], e.prototype, "spatialReference", void 0), I([v({ type: te })], e.prototype, "tileInfo", void 0), I([v(pt)], e.prototype, "url", null), I([v({ types: Qt, json: { name: "layerDefinition.drawingInfo.renderer", write: { overridePolicy() {
|
|
882
|
+
var s;
|
|
883
|
+
const t = ((s = this.renderer) == null ? void 0 : s.type) === "raster-stretch" && this.renderer.stretchType === "none" && !this.renderer.useGamma;
|
|
884
|
+
return { enabled: !this.loaded || this.raster.tileType === "Raster" || !t };
|
|
885
|
+
} }, origins: { "web-scene": { types: Zt, name: "layerDefinition.drawingInfo.renderer", write: { overridePolicy: (t) => ({ enabled: t && t.type !== "vector-field" && t.type !== "flow" }) } } } } })], e.prototype, "renderer", null), I([Mt("renderer")], e.prototype, "readRenderer", null), I([v({ clonable: !1 })], e.prototype, "symbolizer", void 0), e = I([K("esri.layers.ImageryTileMixin")], e), e;
|
|
886
|
+
};
|
|
887
|
+
function os(i) {
|
|
888
|
+
const e = i.fields, n = i.records, t = e.some((c) => c.name.toLowerCase() === "oid") ? "OBJECTID" : "OID", s = [{ name: t, type: "esriFieldTypeOID", alias: "OID" }].concat(e.map((c) => ({ name: c.name, type: "esriFieldType" + c.typeName, alias: c.name }))), a = s.map((c) => c.name), r = [];
|
|
889
|
+
let o = 0, l = 0;
|
|
890
|
+
return n.forEach((c) => {
|
|
891
|
+
const h = {};
|
|
892
|
+
for (h[t] = o++, l = 1; l < a.length; l++)
|
|
893
|
+
h[a[l]] = c[l - 1];
|
|
894
|
+
r.push({ attributes: h });
|
|
895
|
+
}), { displayFieldName: "", fields: s, features: r };
|
|
896
|
+
}
|
|
897
|
+
let It = class {
|
|
898
|
+
static get supportedVersions() {
|
|
899
|
+
return [5];
|
|
900
|
+
}
|
|
901
|
+
static parse(e) {
|
|
902
|
+
const n = new DataView(e), t = 3 & n.getUint8(0);
|
|
903
|
+
if (t !== 3)
|
|
904
|
+
return { header: { version: t }, recordSet: null };
|
|
905
|
+
const s = n.getUint32(4, !0), a = n.getUint16(8, !0), r = n.getUint16(10, !0), o = { version: t, recordCount: s, headerByteCount: a, recordByteCount: r };
|
|
906
|
+
let l = 32;
|
|
907
|
+
const c = [], h = [];
|
|
908
|
+
let u;
|
|
909
|
+
if (t === 3) {
|
|
910
|
+
for (; n.getUint8(l) !== 13; )
|
|
911
|
+
u = String.fromCharCode(n.getUint8(l + 11)).trim(), c.push({ name: tt(new Uint8Array(e, l, 11)), type: u, typeName: ["String", "Date", "Double", "Boolean", "String", "Integer"][["C", "D", "F", "L", "M", "N"].indexOf(u)], length: n.getUint8(l + 16) }), l += 32;
|
|
912
|
+
if (l += 1, c.length > 0)
|
|
913
|
+
for (; h.length < s && e.byteLength - l > r; ) {
|
|
914
|
+
const m = [];
|
|
915
|
+
n.getUint8(l) === 32 ? (l += 1, c.forEach((f) => {
|
|
916
|
+
if (f.type === "C")
|
|
917
|
+
m.push(tt(new Uint8Array(e, l, f.length)).trim());
|
|
918
|
+
else if (f.type === "N")
|
|
919
|
+
m.push(parseInt(String.fromCharCode.apply(null, new Uint8Array(e, l, f.length)).trim(), 10));
|
|
920
|
+
else if (f.type === "F")
|
|
921
|
+
m.push(parseFloat(String.fromCharCode.apply(null, new Uint8Array(e, l, f.length)).trim()));
|
|
922
|
+
else if (f.type === "D") {
|
|
923
|
+
const d = String.fromCharCode.apply(null, new Uint8Array(e, l, f.length)).trim();
|
|
924
|
+
m.push(new Date(parseInt(d.substring(0, 4), 10), parseInt(d.substring(4, 6), 10) - 1, parseInt(d.substring(6, 8), 10)));
|
|
925
|
+
}
|
|
926
|
+
l += f.length;
|
|
927
|
+
}), h.push(m)) : l += r;
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
return { header: o, fields: c, records: h, recordSet: os({ fields: c, records: h }) };
|
|
931
|
+
}
|
|
932
|
+
};
|
|
933
|
+
const re = /* @__PURE__ */ new Map();
|
|
934
|
+
re.set("int16", "esriFieldTypeSmallInteger"), re.set("int32", "esriFieldTypeInteger"), re.set("int64", "esriFieldTypeInteger"), re.set("float32", "esriFieldTypeSingle"), re.set("float64", "esriFieldTypeDouble"), re.set("text", "esriFieldTypeString");
|
|
935
|
+
const lt = 8;
|
|
936
|
+
let pe = class extends se {
|
|
937
|
+
constructor() {
|
|
938
|
+
super(...arguments), this.storageInfo = null, this.datasetFormat = "CRF";
|
|
939
|
+
}
|
|
940
|
+
async open(e) {
|
|
941
|
+
await this.init();
|
|
942
|
+
const { data: n } = await this.request(this.url + "/conf.json", { signal: e == null ? void 0 : e.signal });
|
|
943
|
+
if (!this._validateHeader(n))
|
|
944
|
+
throw new O("cloudraster:open", "Invalid or unsupported conf.json.");
|
|
945
|
+
this.datasetName = this.url.slice(this.url.lastIndexOf("/") + 1);
|
|
946
|
+
const { storageInfo: t, rasterInfo: s } = this._parseHeader(n);
|
|
947
|
+
if (s.dataType === "thematic") {
|
|
948
|
+
const a = await this._fetchAuxiliaryInformation();
|
|
949
|
+
s.attributeTable = a;
|
|
950
|
+
}
|
|
951
|
+
this._set("storageInfo", t), this._set("rasterInfo", s), this.ioConfig.retryCount = this.ioConfig.retryCount || 0;
|
|
952
|
+
}
|
|
953
|
+
async fetchRawTile(e, n, t, s = {}) {
|
|
954
|
+
const { transposeInfo: a } = this.rasterInfo.storageInfo, { transposedVariableName: r } = s, o = !(!a || !r), l = o ? 0 : this.rasterInfo.storageInfo.maximumPyramidLevel - e;
|
|
955
|
+
if (l < 0)
|
|
956
|
+
return null;
|
|
957
|
+
const c = this._buildCacheFilePath(l, n, t, s.multidimensionalDefinition, r), h = this._getIndexRecordFromBundle(n, t, o), u = await this.request(c, { range: { from: 0, to: this.storageInfo.headerSize - 1 }, responseType: "array-buffer", signal: s.signal });
|
|
958
|
+
if (!u)
|
|
959
|
+
return null;
|
|
960
|
+
const m = new Uint8Array(u.data), f = this._getTileEndAndContentType(m, h);
|
|
961
|
+
if (f.recordSize === 0)
|
|
962
|
+
return null;
|
|
963
|
+
const d = await this.request(c, { range: { from: f.position, to: f.position + f.recordSize }, responseType: "array-buffer", signal: s.signal });
|
|
964
|
+
if (!d)
|
|
965
|
+
return null;
|
|
966
|
+
const [g, p] = this._getTileSize(o);
|
|
967
|
+
return this.decodePixelBlock(d.data, { width: g, height: p, planes: null, pixelType: null, returnInterleaved: o });
|
|
968
|
+
}
|
|
969
|
+
_validateHeader(e) {
|
|
970
|
+
const n = ["origin", "extent", "geodataXform", "LODInfos", "blockWidth", "blockHeight", "bandCount", "pixelType", "pixelSizeX", "pixelSizeY", "format", "packetSize"];
|
|
971
|
+
return e && e.type === "RasterInfo" && !n.some((t) => !e[t]);
|
|
972
|
+
}
|
|
973
|
+
_parseHeader(e) {
|
|
974
|
+
var H, W, q, ee, U;
|
|
975
|
+
const n = ["u1", "u2", "u4", "u8", "s8", "u16", "s16", "u32", "s32", "f32", "f64"][e.pixelType], { bandCount: t, colormap: s, blockWidth: a, blockHeight: r, firstPyramidLevel: o, maximumPyramidLevel: l } = e, c = (H = e.statistics) == null ? void 0 : H.map((N) => ({ min: N.min, max: N.max, avg: N.mean, stddev: N.standardDeviation, median: N.median, mode: N.mode })), h = (ee = (q = (W = e.histograms) == null ? void 0 : W[0]) == null ? void 0 : q.counts) != null && ee.length ? e.histograms : null, u = e.extent.spatialReference, m = (U = e.geodataXform) == null ? void 0 : U.spatialReference, f = new L(u != null && u.wkid || u != null && u.wkt || u != null && u.wkt2 ? u : m);
|
|
976
|
+
let d = new z({ xmin: e.extent.xmin, ymin: e.extent.ymin, xmax: e.extent.xmax, ymax: e.extent.ymax, spatialReference: f });
|
|
977
|
+
const g = new A({ x: e.pixelSizeX, y: e.pixelSizeY, spatialReference: f }), p = Math.round((d.xmax - d.xmin) / g.x), y = Math.round((d.ymax - d.ymin) / g.y), x = this._parseTransform(e.geodataXform), w = x ? d : null;
|
|
978
|
+
x && (d = x.forwardTransform(d), g.x = (d.xmax - d.xmin) / p, g.y = (d.ymax - d.ymin) / y);
|
|
979
|
+
const S = e.properties ?? {}, T = e.format.toLowerCase().replace("cache/", ""), b = new A(e.origin.x, e.origin.y, f);
|
|
980
|
+
let _, F, R, k;
|
|
981
|
+
if (s != null && s.colors)
|
|
982
|
+
for (_ = [], F = 0; F < s.colors.length; F++)
|
|
983
|
+
R = s.colors[F], k = s.values ? s.values[F] : F, _.push([k, 255 & R, R << 16 >>> 24, R << 8 >>> 24, R >>> 24]);
|
|
984
|
+
const M = e.LODInfos, P = [];
|
|
985
|
+
for (F = 0; F < M.levels.length; F++)
|
|
986
|
+
P.push(new ft({ level: M.levels[F], resolution: M.resolutions[F], scale: 96 / 0.0254 * M.resolutions[F] }));
|
|
987
|
+
const B = new te({ dpi: 96, lods: P, format: T, origin: b, size: [a, r], spatialReference: f }), C = { recordSize: lt, packetSize: e.packetSize, headerSize: e.packetSize * e.packetSize * lt + 64 }, $ = [{ maxCol: Math.ceil(p / a) - 1, maxRow: Math.ceil(y / r) - 1, minCol: 0, minRow: 0 }];
|
|
988
|
+
let D = 2;
|
|
989
|
+
if (l > 0)
|
|
990
|
+
for (F = 0; F < l; F++)
|
|
991
|
+
$.push({ maxCol: Math.ceil(p / D / a) - 1, maxRow: Math.ceil(y / D / r) - 1, minCol: 0, minRow: 0 }), D *= 2;
|
|
992
|
+
const E = e.mdInfo;
|
|
993
|
+
let X = null;
|
|
994
|
+
if (E && S._yxs) {
|
|
995
|
+
const N = S._yxs;
|
|
996
|
+
X = { packetSize: N.PacketSize, tileSize: [N.TileXSize, N.TileYSize] };
|
|
997
|
+
}
|
|
998
|
+
return { storageInfo: C, rasterInfo: new xe({ width: p, height: y, pixelType: n, bandCount: t, extent: d, nativeExtent: w, transform: x, spatialReference: f, pixelSize: g, keyProperties: S, statistics: c, histograms: h, multidimensionalInfo: E, colormap: _, storageInfo: new ge({ blockWidth: a, blockHeight: r, pyramidBlockWidth: a, pyramidBlockHeight: r, origin: b, tileInfo: B, transposeInfo: X, firstPyramidLevel: o, maximumPyramidLevel: l, blockBoundary: $ }) }) };
|
|
999
|
+
}
|
|
1000
|
+
_parseTransform(e) {
|
|
1001
|
+
var t, s;
|
|
1002
|
+
if (!Li(e))
|
|
1003
|
+
throw new O("cloudraster:open", "the data contains unsupported geodata transform types");
|
|
1004
|
+
const n = Hi(e);
|
|
1005
|
+
if (n.type === "identity")
|
|
1006
|
+
return null;
|
|
1007
|
+
if (n.type !== "polynomial" || !((t = n.forwardCoefficients) != null && t.length) || !((s = n.inverseCoefficients) != null && s.length))
|
|
1008
|
+
throw new O("cloudraster:open", "the data contains unsupported geodata transforms - both forward and inverse coefficients are required currently");
|
|
1009
|
+
return n;
|
|
1010
|
+
}
|
|
1011
|
+
async _fetchAuxiliaryInformation(e) {
|
|
1012
|
+
const n = this.request(this.url + "/conf.vat.json", { signal: e }).then((r) => r.data).catch(() => null), t = this.request(this.url + "/conf.vat.dbf", { responseType: "array-buffer", signal: e }).then((r) => r.data).catch(() => null), s = await Promise.all([n, t]);
|
|
1013
|
+
let a;
|
|
1014
|
+
if (s[0]) {
|
|
1015
|
+
let r = s[0].fields;
|
|
1016
|
+
const o = s[0].values;
|
|
1017
|
+
if (r && o) {
|
|
1018
|
+
r = r.map((c) => ({ type: c.name === "OID" ? "esriFieldTypeOID" : re.get(c.type), name: c.name, alias: c.alias || c.name }));
|
|
1019
|
+
const l = o.map((c) => ({ attributes: c }));
|
|
1020
|
+
r && o && (a = { fields: r, features: l });
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
return !a && s[1] && (a = It.parse(s[1]).recordSet), _e.fromJSON(a);
|
|
1024
|
+
}
|
|
1025
|
+
_buildCacheFilePath(e, n, t, s, a) {
|
|
1026
|
+
const r = this._getPackageSize(!!a), o = Math.floor(n / r) * r, l = Math.floor(t / r) * r, c = "R" + this._toHexString4(o) + "C" + this._toHexString4(l);
|
|
1027
|
+
let h = "L";
|
|
1028
|
+
h += e >= 10 ? e.toString() : "0" + e.toString();
|
|
1029
|
+
const { multidimensionalInfo: u } = this.rasterInfo, m = s == null ? void 0 : s[0];
|
|
1030
|
+
if (u == null || !m)
|
|
1031
|
+
return `${this.url}/_alllayers/${h}/${c}.bundle`;
|
|
1032
|
+
let f = "_yxs";
|
|
1033
|
+
if (!a) {
|
|
1034
|
+
f = u.variables.find((p) => p.name === m.variableName).dimensions[0].values.indexOf(m.values[0]).toString(16);
|
|
1035
|
+
const g = 4 - f.length;
|
|
1036
|
+
for (let p = 0; p < g; p++)
|
|
1037
|
+
f = "0" + f;
|
|
1038
|
+
f = "S" + f;
|
|
1039
|
+
}
|
|
1040
|
+
const d = this._getVariableFolderName(a || m.variableName);
|
|
1041
|
+
return `${this.url}/_alllayers/${d}/${f}/${h}/${c}.bundle`;
|
|
1042
|
+
}
|
|
1043
|
+
_getPackageSize(e = !1) {
|
|
1044
|
+
const { transposeInfo: n } = this.rasterInfo.storageInfo;
|
|
1045
|
+
return e && n != null ? n.packetSize ?? 0 : this.storageInfo.packetSize;
|
|
1046
|
+
}
|
|
1047
|
+
_getTileSize(e = !1) {
|
|
1048
|
+
const { storageInfo: n } = this.rasterInfo, { transposeInfo: t } = n;
|
|
1049
|
+
return e && t != null ? t.tileSize : n.tileInfo.size;
|
|
1050
|
+
}
|
|
1051
|
+
_getVariableFolderName(e) {
|
|
1052
|
+
return (e = e.trim()) === "" ? "_v" : e.replaceAll(/[\{|\}\-]/g, "_").replace("\\*", "_v");
|
|
1053
|
+
}
|
|
1054
|
+
_getIndexRecordFromBundle(e, n, t = !1) {
|
|
1055
|
+
const s = this._getPackageSize(t), a = s * (e % s) + n % s;
|
|
1056
|
+
if (a < 0)
|
|
1057
|
+
throw new Error("Invalid level / row / col");
|
|
1058
|
+
return 20 + a * this.storageInfo.recordSize + 44;
|
|
1059
|
+
}
|
|
1060
|
+
_getTileEndAndContentType(e, n) {
|
|
1061
|
+
const t = e.subarray(n, n + 8);
|
|
1062
|
+
let s, a = 0;
|
|
1063
|
+
for (s = 0; s < 5; s++)
|
|
1064
|
+
a |= (255 & t[s]) << 8 * s;
|
|
1065
|
+
const r = 1099511627775 & a;
|
|
1066
|
+
for (a = 0, s = 5; s < 8; s++)
|
|
1067
|
+
a |= (255 & t[s]) << 8 * (s - 5);
|
|
1068
|
+
return { position: r, recordSize: 1099511627775 & a };
|
|
1069
|
+
}
|
|
1070
|
+
_toHexString4(e) {
|
|
1071
|
+
let n = e.toString(16);
|
|
1072
|
+
if (n.length !== 4) {
|
|
1073
|
+
let t = 4 - n.length;
|
|
1074
|
+
for (; t-- > 0; )
|
|
1075
|
+
n = "0" + n;
|
|
1076
|
+
}
|
|
1077
|
+
return n;
|
|
1078
|
+
}
|
|
1079
|
+
};
|
|
1080
|
+
I([v({ readOnly: !0 })], pe.prototype, "storageInfo", void 0), I([v({ type: String, json: { write: !0 } })], pe.prototype, "datasetFormat", void 0), pe = I([K("esri.layers.support.rasterDatasets.CloudRaster")], pe);
|
|
1081
|
+
const ls = pe;
|
|
1082
|
+
function bt(i) {
|
|
1083
|
+
return ["x", "e", "east", "long", "longitude"].includes(i.toLowerCase());
|
|
1084
|
+
}
|
|
1085
|
+
function St(i) {
|
|
1086
|
+
return ["y", "n", "west", "lat", "latitude"].includes(i.toLowerCase());
|
|
1087
|
+
}
|
|
1088
|
+
function cs(i) {
|
|
1089
|
+
const { axes: e } = i.domain, n = Object.keys(e), t = [], s = [];
|
|
1090
|
+
let a = -1, r = -1, o = [];
|
|
1091
|
+
for (let x = 0; x < n.length; x++) {
|
|
1092
|
+
const w = n[x];
|
|
1093
|
+
bt(w) ? a = x : St(w) && (r = x);
|
|
1094
|
+
const S = e[w], T = [];
|
|
1095
|
+
if ("values" in S) {
|
|
1096
|
+
S.values.forEach((_) => T.push(typeof _ == "string" ? new Date(_).getTime() : _));
|
|
1097
|
+
const b = T[1] - T[0];
|
|
1098
|
+
t.push([T[0] - 0.5 * b, T[T.length - 1] + 0.5 * b]), s.push(b);
|
|
1099
|
+
} else {
|
|
1100
|
+
const { start: b, stop: _, num: F } = S, R = (_ - b) / (F - 1);
|
|
1101
|
+
t.push([b - 0.5 * R, _ + 0.5 * R]), s.push(R);
|
|
1102
|
+
for (let k = 0; k < F; k++)
|
|
1103
|
+
T.push(b + R * k);
|
|
1104
|
+
}
|
|
1105
|
+
o.push({ name: w, values: T, extent: [T[0], T[T.length - 1]] });
|
|
1106
|
+
}
|
|
1107
|
+
a > -1 && r === -1 ? r = a === 0 ? 1 : 0 : r > -1 && a === -1 ? a = r === 0 ? 1 : 0 : r === -1 && a === -1 && (a = 0, r = 1), o = o.filter((x, w) => !(w === a || w === r));
|
|
1108
|
+
const { referencing: l } = i.domain, c = l.find((x) => x.coordinates.includes(n[a])).system.id, h = c == null ? void 0 : c.slice(c.lastIndexOf("/") + 1), u = h == null || h === "CRS84" ? 4326 : Number(h), m = new L({ wkid: u }), [f, d] = t[a], [g, p] = t[r], y = new z({ xmin: f, xmax: d, ymin: g, ymax: p, spatialReference: m });
|
|
1109
|
+
return { width: Math.round(y.width / s[a]), height: Math.round(y.height / s[r]), extent: y, dimensions: o };
|
|
1110
|
+
}
|
|
1111
|
+
function Ce(i) {
|
|
1112
|
+
const e = $t();
|
|
1113
|
+
return e ? i[e] ?? Object.values(i)[0] : Object.values(i)[0];
|
|
1114
|
+
}
|
|
1115
|
+
function Pe() {
|
|
1116
|
+
return Math.round(255 * Math.random());
|
|
1117
|
+
}
|
|
1118
|
+
function us(i) {
|
|
1119
|
+
var t, s;
|
|
1120
|
+
const e = {}, { parameters: n } = i;
|
|
1121
|
+
if (!n)
|
|
1122
|
+
return e;
|
|
1123
|
+
for (const [a, r] of Object.entries(n)) {
|
|
1124
|
+
const { type: o, description: l, unit: c, categoryEncoding: h, observedProperty: u } = r;
|
|
1125
|
+
if (o === "Parameter" && (e[a] = {}, l && (e[a].description = Ce(l)), c && (e[a].unit = c.label ? Ce(c.label) : null, e[a].symbol = (t = c.symbol) == null ? void 0 : t.value), h)) {
|
|
1126
|
+
const m = Object.entries(h).map((g, p) => ({ OID: p, Value: Number(g[1]), ClassName: g[0].slice(g[0].lastIndexOf("/") + 1), Count: 1 }));
|
|
1127
|
+
let f = !1;
|
|
1128
|
+
(s = u == null ? void 0 : u.categories) != null && s.length && (u.categories.forEach((g) => {
|
|
1129
|
+
if (!g.id)
|
|
1130
|
+
return;
|
|
1131
|
+
const p = g.id.slice(g.id.lastIndexOf("/") + 1), y = m.find((w) => w.ClassName === p);
|
|
1132
|
+
if (!y)
|
|
1133
|
+
return;
|
|
1134
|
+
const x = g.label ? Ce(g.label) : null;
|
|
1135
|
+
if (y.Label = x, g.preferredColor) {
|
|
1136
|
+
const w = Ot.fromHex(g.preferredColor);
|
|
1137
|
+
w && (f = !0, y.Red = w.r, y.Green = w.g, y.Blue = w.b);
|
|
1138
|
+
}
|
|
1139
|
+
}), f && m.forEach((g) => {
|
|
1140
|
+
g.Red == null && (g.Red = Pe(), g.Green = Pe(), g.Blue = Pe());
|
|
1141
|
+
}));
|
|
1142
|
+
const d = { objectIdFieldName: "", fields: [{ name: "OID", type: "esriFieldTypeOID", alias: "OID", domain: null }, { name: "Value", type: "esriFieldTypeInteger", alias: "Value", domain: null }, { name: "Count", type: "esriFieldTypeDouble", alias: "Count", domain: null }, { name: "ClassName", type: "esriFieldTypeString", alias: "ClassName", domain: null, length: 50 }, { name: "Label", type: "esriFieldTypeString", alias: "Label", domain: null, length: 50 }], features: m.map((g) => ({ attributes: g })) };
|
|
1143
|
+
f && d.fields.push({ name: "Red", type: "esriFieldTypeInteger", alias: "Red", domain: null }, { name: "Green", type: "esriFieldTypeInteger", alias: "Green", domain: null }, { name: "Blue", type: "esriFieldTypeInteger", alias: "Blue", domain: null }), e[a].attributeTable = d;
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
return e;
|
|
1147
|
+
}
|
|
1148
|
+
function hs(i) {
|
|
1149
|
+
let e = Number.MAX_VALUE, n = -Number.MAX_VALUE;
|
|
1150
|
+
for (let t = 0; t < i.length; t++) {
|
|
1151
|
+
const s = i[t];
|
|
1152
|
+
s != null && (s < e && (e = s), s > n && (n = s));
|
|
1153
|
+
}
|
|
1154
|
+
return $i(e, n);
|
|
1155
|
+
}
|
|
1156
|
+
function fs(i, e, n) {
|
|
1157
|
+
const t = i.map((l, c) => ({ name: l, count: e[c] })).sort((l, c) => l.name > c.name ? -1 : 1), s = (a = 1, (l) => a *= l.count);
|
|
1158
|
+
var a;
|
|
1159
|
+
const r = [...t.slice(1), { name: "", count: 1 }].reverse().map(s).reverse();
|
|
1160
|
+
let o = 0;
|
|
1161
|
+
for (let l = i.length - 1; l >= 0; l--)
|
|
1162
|
+
o += r[t.findIndex(({ name: c }) => c === i[l])] * (n % e[l]), n = Math.floor(n / e[l]);
|
|
1163
|
+
return o;
|
|
1164
|
+
}
|
|
1165
|
+
function ms(i) {
|
|
1166
|
+
var m;
|
|
1167
|
+
const { width: e, height: n, extent: t, dimensions: s } = cs(i), { ranges: a } = i, r = Object.keys(a).sort((f, d) => f < d ? -1 : 1), o = [];
|
|
1168
|
+
for (let f = 0; f < r.length; f++) {
|
|
1169
|
+
const d = r[f];
|
|
1170
|
+
s != null && s.length && o.push({ name: d, dimensions: s });
|
|
1171
|
+
}
|
|
1172
|
+
const l = us(i);
|
|
1173
|
+
o.forEach((f) => l[f.name] && Object.assign(f, l[f.name]));
|
|
1174
|
+
const c = o.length ? { variables: o } : void 0, h = [];
|
|
1175
|
+
for (let f = 0; f < r.length; f++) {
|
|
1176
|
+
const d = r[f], { values: g, dataType: p, axisNames: y, shape: x } = a[d], w = x.length > 2 ? f * x.slice(0, -2).reduce((R, k) => R * k) : 0, S = y.slice(0, -2), T = x.slice(0, -2), b = p === "float" ? "f32" : hs(g), _ = e * n, F = g.length / _;
|
|
1177
|
+
for (let R = 0; R < F; R++) {
|
|
1178
|
+
const k = Y.createEmptyBand(b, _), M = new Uint8Array(_).fill(255);
|
|
1179
|
+
let P = !1;
|
|
1180
|
+
const B = R * _;
|
|
1181
|
+
for (let C = 0; C < _; C++) {
|
|
1182
|
+
const $ = g[B + C];
|
|
1183
|
+
$ == null ? (M[C] = 0, P = !0) : k[C] = $;
|
|
1184
|
+
}
|
|
1185
|
+
if (f === 0 || s != null && s.length) {
|
|
1186
|
+
const C = new Y({ width: e, height: n, mask: P ? M : null, pixels: [k], pixelType: b });
|
|
1187
|
+
C.updateStatistics(), (s == null ? void 0 : s.length) ? h[fs(S, T, R) + w] = C : h.push(C);
|
|
1188
|
+
} else {
|
|
1189
|
+
const C = h[R];
|
|
1190
|
+
C.pixels.push(k), P ? C.mask && (C.mask = Y.combineBandMasks([C.mask, M])) : C.mask = P ? M : null;
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
const u = (m = Object.values(l).find((f) => f.attributeTable)) == null ? void 0 : m.attributeTable;
|
|
1195
|
+
return { extent: t, pixelBlocks: h, multidimensionalInfo: c, attributeTable: u, bandNames: c ? void 0 : r };
|
|
1196
|
+
}
|
|
1197
|
+
let ce = class extends se {
|
|
1198
|
+
constructor() {
|
|
1199
|
+
super(...arguments), this.datasetFormat = "MEMORY", this.source = null;
|
|
1200
|
+
}
|
|
1201
|
+
get url() {
|
|
1202
|
+
return "";
|
|
1203
|
+
}
|
|
1204
|
+
async open(i) {
|
|
1205
|
+
await this.init();
|
|
1206
|
+
const e = this.source, { pixelBlocks: n, attributeTable: t, statistics: s, histograms: a, name: r, nativeExtent: o, transform: l } = e, c = n[0], { width: h, height: u, pixelType: m } = c, f = e.extent ?? new z({ xmin: -0.5, ymin: 0.5, xmax: h - 0.5, ymax: u - 0.5, spatialReference: new L({ wkid: 3857 }) }), d = e.isPseudoSpatialReference ?? !e.extent, g = { x: f.width / h, y: f.height / u }, p = { ...e.keyProperties };
|
|
1207
|
+
t && (p.DataType = "Thematic");
|
|
1208
|
+
const y = new xe({ width: h, height: u, pixelType: m, extent: f, nativeExtent: o, attributeTable: t, transform: l, pixelSize: g, spatialReference: f.spatialReference, bandCount: c.pixels.length, keyProperties: p, multidimensionalInfo: e.multidimensionalInfo, statistics: s, isPseudoSpatialReference: d, histograms: a });
|
|
1209
|
+
this.ioConfig.skipMapInfo && this.updateImageSpaceRasterInfo(y), this.createRemoteDatasetStorageInfo(y, 512, 512), this._set("rasterInfo", y), this.updateTileInfo(), y.multidimensionalInfo ? await this._buildMDimStats(e.pixelBlocks, y.multidimensionalInfo) : await this._buildInMemoryRaster(c, { width: 512, height: 512 }, i), y.multidimensionalInfo || (this.source = null), this.datasetName = r;
|
|
1210
|
+
}
|
|
1211
|
+
fetchRawTile(i, e, n, t = {}) {
|
|
1212
|
+
if (!this._pixelBlockTiles) {
|
|
1213
|
+
const { rasterInfo: a } = this, [r, o] = a.storageInfo.tileInfo.size, { sliceId: l } = t, { pixelBlocks: c } = this.source, h = { pixelBlock: l == null ? c[0] : c[l], useBilinear: a.dataType !== "thematic", tileSize: { width: r, height: o }, level: i, row: e, col: n }, u = this.rasterJobHandler ? this.rasterJobHandler.clipTile(h, t) : Di(h);
|
|
1214
|
+
return Promise.resolve(u);
|
|
1215
|
+
}
|
|
1216
|
+
const s = this._pixelBlockTiles.get(`${i}/${e}/${n}`);
|
|
1217
|
+
return Promise.resolve(s);
|
|
1218
|
+
}
|
|
1219
|
+
async _buildInMemoryRaster(i, e, n) {
|
|
1220
|
+
var u, m;
|
|
1221
|
+
const { rasterInfo: t } = this, s = t.storageInfo.maximumPyramidLevel ?? 0, a = t.dataType !== "thematic", r = this.rasterJobHandler ? this.rasterJobHandler.split({ pixelBlock: i, tileSize: e, maximumPyramidLevel: s, useBilinear: a }, n) : Promise.resolve(Ni(i, e, s, a)), o = t.statistics != null, l = t.histograms != null, c = this.ioConfig.skipStatistics || o ? Promise.resolve({ statistics: null, histograms: null }) : this.rasterJobHandler ? this.rasterJobHandler.estimateStatisticsHistograms({ pixelBlock: i }, n) : Promise.resolve(di(i)), h = await mt([r, c]);
|
|
1222
|
+
if (!h[0].value && h[1].value)
|
|
1223
|
+
throw new O("inmemory-raster:open", "failed to build in memory raster");
|
|
1224
|
+
this._pixelBlockTiles = h[0].value, o || (t.statistics = (u = h[1].value) == null ? void 0 : u.statistics), l || (t.histograms = (m = h[1].value) == null ? void 0 : m.histograms);
|
|
1225
|
+
}
|
|
1226
|
+
async _buildMDimStats(i, e, n) {
|
|
1227
|
+
for (let t = 0; t < e.variables.length; t++) {
|
|
1228
|
+
const s = e.variables[t];
|
|
1229
|
+
if (s.statistics)
|
|
1230
|
+
continue;
|
|
1231
|
+
const a = s.dimensions.map((c) => {
|
|
1232
|
+
var h, u;
|
|
1233
|
+
return new He({ variableName: s.name, dimensionName: c.name, values: [((h = c.values) == null ? void 0 : h[0]) ?? ((u = c.extent) == null ? void 0 : u[0])], isSlice: !0 });
|
|
1234
|
+
}), r = yt(a, e), o = r == null ? null : i[r];
|
|
1235
|
+
if (o == null)
|
|
1236
|
+
continue;
|
|
1237
|
+
const l = this.rasterJobHandler ? await this.rasterJobHandler.computeStatisticsHistograms({ pixelBlock: o }, n) : We(o);
|
|
1238
|
+
s.statistics = l.statistics, s.histograms || (s.histograms = l.histograms);
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
};
|
|
1242
|
+
I([v({ type: String, json: { write: !0 } })], ce.prototype, "datasetFormat", void 0), I([v()], ce.prototype, "source", void 0), I([v()], ce.prototype, "url", null), ce = I([K("esri.layers.support.rasterDatasets.InMemoryRaster")], ce);
|
|
1243
|
+
const qe = ce;
|
|
1244
|
+
let de = class extends se {
|
|
1245
|
+
constructor() {
|
|
1246
|
+
super(...arguments), this.datasetFormat = "CovJSON";
|
|
1247
|
+
}
|
|
1248
|
+
async open(e) {
|
|
1249
|
+
await this.init();
|
|
1250
|
+
const { extent: n, pixelBlocks: t, multidimensionalInfo: s, attributeTable: a, bandNames: r } = await this._fetchData(e), { statistics: o, histograms: l } = We(t[0]), c = r == null ? void 0 : r.map((f) => ({ BandName: f })), h = { DataType: a ? "Thematic" : s ? "Scientific" : "Generic", BandProperties: c }, u = new qe({ source: { extent: n, pixelBlocks: t, attributeTable: a ? _e.fromJSON(a) : null, multidimensionalInfo: s, statistics: o, histograms: l, keyProperties: h, isPseudoSpatialReference: !1 } });
|
|
1251
|
+
await u.open(), this._inMemoryRaster = u;
|
|
1252
|
+
const m = this.source ? "" : this.url.slice(this.url.lastIndexOf("/") + 1);
|
|
1253
|
+
this._set("datasetName", m.slice(0, m.indexOf("."))), this._set("rasterInfo", u.rasterInfo);
|
|
1254
|
+
}
|
|
1255
|
+
fetchRawTile(e, n, t, s = {}) {
|
|
1256
|
+
return this._inMemoryRaster.fetchRawTile(e, n, t, s);
|
|
1257
|
+
}
|
|
1258
|
+
async _fetchData(e) {
|
|
1259
|
+
var a, r, o, l;
|
|
1260
|
+
const n = this.source ?? (await this.request(this.url, { signal: e == null ? void 0 : e.signal })).data, t = "imagery-tile-layer:open-coverage-json";
|
|
1261
|
+
if (((a = n.type) == null ? void 0 : a.toLowerCase()) !== "coverage" || ((o = (r = n.domain) == null ? void 0 : r.domainType) == null ? void 0 : o.toLowerCase()) !== "grid")
|
|
1262
|
+
throw new O(t, "Only coverage with Grid domain type is supported");
|
|
1263
|
+
if (!n.ranges)
|
|
1264
|
+
throw new O(t, "Missing ranges in the grid coverage data");
|
|
1265
|
+
if (!((l = n.domain.referencing) != null && l.length))
|
|
1266
|
+
throw new O(t, "Missing domain referencing in the grid coverage data");
|
|
1267
|
+
const s = Object.values(n.ranges);
|
|
1268
|
+
for (let c = 0; c < s.length; c++) {
|
|
1269
|
+
const { axisNames: h, shape: u, type: m, values: f } = s[c];
|
|
1270
|
+
if (!(m.toLowerCase() === "ndarray" && (f != null && f.length) && (h != null && h.length) && (u != null && u.length)))
|
|
1271
|
+
throw new O(t, "Only ranges with valid NdArray, axisNames, shape, and inline values are supported");
|
|
1272
|
+
if (!(bt(h[h.length - 1]) && St(h[h.length - 2])))
|
|
1273
|
+
throw new O(t, "Only row-major ordered pixel values are supported. X axis must be the last axis.");
|
|
1274
|
+
}
|
|
1275
|
+
return ms(n);
|
|
1276
|
+
}
|
|
1277
|
+
};
|
|
1278
|
+
I([v({ type: String, json: { write: !0 } })], de.prototype, "datasetFormat", void 0), I([v({ constructOnly: !0 })], de.prototype, "source", void 0), de = I([K("esri.layers.support.rasterDatasets.CovJSONRaster")], de);
|
|
1279
|
+
const ps = de;
|
|
1280
|
+
function fe(i, e) {
|
|
1281
|
+
if (!i || !e)
|
|
1282
|
+
return [];
|
|
1283
|
+
let n = e;
|
|
1284
|
+
e.includes("/") ? (n = e.slice(0, e.indexOf("/")), e = e.slice(e.indexOf("/") + 1)) : e = "";
|
|
1285
|
+
const t = [];
|
|
1286
|
+
if (e) {
|
|
1287
|
+
const a = fe(i, n);
|
|
1288
|
+
for (let r = 0; r < a.length; r++)
|
|
1289
|
+
fe(a[r], e).forEach((o) => t.push(o));
|
|
1290
|
+
return t;
|
|
1291
|
+
}
|
|
1292
|
+
const s = i.getElementsByTagNameNS("*", n);
|
|
1293
|
+
if (!s || s.length === 0)
|
|
1294
|
+
return [];
|
|
1295
|
+
for (let a = 0; a < s.length; a++)
|
|
1296
|
+
t.push(s[a] || s.item(a));
|
|
1297
|
+
return t;
|
|
1298
|
+
}
|
|
1299
|
+
function V(i, e) {
|
|
1300
|
+
if (!i || !e)
|
|
1301
|
+
return null;
|
|
1302
|
+
let n = e;
|
|
1303
|
+
e.includes("/") ? (n = e.slice(0, e.indexOf("/")), e = e.slice(e.indexOf("/") + 1)) : e = "";
|
|
1304
|
+
const t = fe(i, n);
|
|
1305
|
+
return t.length > 0 ? e ? V(t[0], e) : t[0] : null;
|
|
1306
|
+
}
|
|
1307
|
+
function Z(i, e = null) {
|
|
1308
|
+
const n = e ? V(i, e) : i;
|
|
1309
|
+
let t;
|
|
1310
|
+
return n ? (t = n.textContent || n.nodeValue, t ? t.trim() : null) : null;
|
|
1311
|
+
}
|
|
1312
|
+
function ds(i, e) {
|
|
1313
|
+
const n = fe(i, e), t = [];
|
|
1314
|
+
let s;
|
|
1315
|
+
for (let a = 0; a < n.length; a++)
|
|
1316
|
+
s = n[a].textContent || n[a].nodeValue, s && (s = s.trim(), s !== "" && t.push(s));
|
|
1317
|
+
return t;
|
|
1318
|
+
}
|
|
1319
|
+
function Se(i, e) {
|
|
1320
|
+
return ds(i, e).map((n) => Number(n));
|
|
1321
|
+
}
|
|
1322
|
+
function oe(i, e) {
|
|
1323
|
+
const n = Z(i, e);
|
|
1324
|
+
return Number(n);
|
|
1325
|
+
}
|
|
1326
|
+
function Oe(i, e) {
|
|
1327
|
+
var s;
|
|
1328
|
+
const n = (s = i == null ? void 0 : i.nodeName) == null ? void 0 : s.toLowerCase(), t = e.toLowerCase();
|
|
1329
|
+
return n.slice(n.lastIndexOf(":") + 1) === t;
|
|
1330
|
+
}
|
|
1331
|
+
function ct(i, e) {
|
|
1332
|
+
if (!i || !e)
|
|
1333
|
+
return null;
|
|
1334
|
+
const n = [];
|
|
1335
|
+
for (let t = 0; t < i.length; t++)
|
|
1336
|
+
n.push(i[t]), n.push(e[t]);
|
|
1337
|
+
return n;
|
|
1338
|
+
}
|
|
1339
|
+
function ys(i) {
|
|
1340
|
+
const e = V(i, "GeodataXform"), n = Fe(oe(e, "SpatialReference/WKID") || Z(e, "SpatialReference/WKT"));
|
|
1341
|
+
if (e.getAttribute("xsi:type") !== "typens:PolynomialXform")
|
|
1342
|
+
return { spatialReference: n, transform: null };
|
|
1343
|
+
const t = oe(e, "PolynomialOrder") ?? 1, s = Se(e, "CoeffX/Double"), a = Se(e, "CoeffY/Double"), r = Se(e, "InverseCoeffX/Double"), o = Se(e, "InverseCoeffY/Double"), l = ct(s, a), c = ct(r, o);
|
|
1344
|
+
return { spatialReference: n, transform: l && c && l.length && c.length ? new je({ spatialReference: n, polynomialOrder: t, forwardCoefficients: l, inverseCoefficients: c }) : null };
|
|
1345
|
+
}
|
|
1346
|
+
function gs(i) {
|
|
1347
|
+
var m;
|
|
1348
|
+
const e = oe(i, "NoDataValue"), n = V(i, "Histograms/HistItem"), t = oe(n, "HistMin"), s = oe(n, "HistMax"), a = oe(n, "BucketCount"), r = (m = Z(n, "HistCounts")) == null ? void 0 : m.split("|").map((f) => Number(f));
|
|
1349
|
+
let o, l, c, h;
|
|
1350
|
+
fe(i, "Metadata/MDI").forEach((f) => {
|
|
1351
|
+
const d = Number(f.textContent ?? f.nodeValue);
|
|
1352
|
+
switch (f.getAttribute("key").toUpperCase()) {
|
|
1353
|
+
case "STATISTICS_MINIMUM":
|
|
1354
|
+
o = d;
|
|
1355
|
+
break;
|
|
1356
|
+
case "STATISTICS_MAXIMUM":
|
|
1357
|
+
l = d;
|
|
1358
|
+
break;
|
|
1359
|
+
case "STATISTICS_MEAN":
|
|
1360
|
+
c = d;
|
|
1361
|
+
break;
|
|
1362
|
+
case "STATISTICS_STDDEV":
|
|
1363
|
+
h = d;
|
|
1364
|
+
}
|
|
1365
|
+
});
|
|
1366
|
+
const u = oe(i, "Metadata/SourceBandIndex");
|
|
1367
|
+
return { noDataValue: e, histogram: r != null && r.length && t != null && s != null ? { min: t, max: s, size: a || r.length, counts: r } : null, sourceBandIndex: u, statistics: o != null && l != null ? { min: o, max: l, avg: c, stddev: h } : null };
|
|
1368
|
+
}
|
|
1369
|
+
function Fe(i) {
|
|
1370
|
+
if (!i)
|
|
1371
|
+
return null;
|
|
1372
|
+
let e = Number(i);
|
|
1373
|
+
if (!isNaN(e) && e !== 0)
|
|
1374
|
+
return new L({ wkid: e });
|
|
1375
|
+
if (i = String(i).trim(), Dt(i))
|
|
1376
|
+
return new L({ wkt2: i });
|
|
1377
|
+
const n = i.toUpperCase();
|
|
1378
|
+
if (n.startsWith("COMPD_CS")) {
|
|
1379
|
+
if (!n.includes("VERTCS") || !n.includes("GEOGCS") && !n.startsWith("PROJCS"))
|
|
1380
|
+
return null;
|
|
1381
|
+
const t = n.indexOf("VERTCS"), s = n.indexOf("PROJCS"), a = s > -1 ? s : n.indexOf("GEOGCS");
|
|
1382
|
+
if (a === -1)
|
|
1383
|
+
return null;
|
|
1384
|
+
const r = i.slice(a, i.lastIndexOf("]", t) + 1).trim(), o = i.slice(t, i.lastIndexOf("]")).trim();
|
|
1385
|
+
e = $e(r);
|
|
1386
|
+
const l = new L(e ? { wkid: e } : { wkt: r }), c = $e(o);
|
|
1387
|
+
return c && (l.vcsWkid = c), l;
|
|
1388
|
+
}
|
|
1389
|
+
return n.startsWith("GEOGCS") || n.startsWith("PROJCS") ? (e = $e(i), new L(e !== 0 ? { wkid: e } : { wkt: i })) : null;
|
|
1390
|
+
}
|
|
1391
|
+
function $e(i) {
|
|
1392
|
+
var s;
|
|
1393
|
+
const e = i.replaceAll("]", "[").replaceAll('"', "").split("[").map((a) => a.trim()).filter((a) => a !== ""), n = e[e.length - 1].split(","), t = (s = n[0]) == null ? void 0 : s.toLowerCase();
|
|
1394
|
+
if ((t === "epsg" || t === "esri") && i.endsWith('"]]')) {
|
|
1395
|
+
const a = Number(n[1]);
|
|
1396
|
+
if (!isNaN(a) && a !== 0)
|
|
1397
|
+
return a;
|
|
1398
|
+
}
|
|
1399
|
+
return 0;
|
|
1400
|
+
}
|
|
1401
|
+
function Ue(i) {
|
|
1402
|
+
var t;
|
|
1403
|
+
if (((t = i == null ? void 0 : i.documentElement.tagName) == null ? void 0 : t.toLowerCase()) !== "pamdataset")
|
|
1404
|
+
return {};
|
|
1405
|
+
const e = { spatialReference: null, transform: null, metadata: {}, rasterBands: [], statistics: null, histograms: null };
|
|
1406
|
+
i.documentElement.childNodes.forEach((s) => {
|
|
1407
|
+
if (s.nodeType === 1) {
|
|
1408
|
+
if (Oe(s, "SRS")) {
|
|
1409
|
+
if (!e.spatialReference) {
|
|
1410
|
+
const a = Z(s);
|
|
1411
|
+
e.spatialReference = Fe(a);
|
|
1412
|
+
}
|
|
1413
|
+
} else if (Oe(s, "Metadata"))
|
|
1414
|
+
if (s.getAttribute("domain") === "xml:ESRI") {
|
|
1415
|
+
const { spatialReference: a, transform: r } = ys(s);
|
|
1416
|
+
e.transform = r, e.spatialReference || (e.spatialReference = a);
|
|
1417
|
+
} else
|
|
1418
|
+
fe(s, "MDI").forEach((a) => e.metadata[a.getAttribute("key")] = Z(a));
|
|
1419
|
+
else if (Oe(s, "PAMRasterBand")) {
|
|
1420
|
+
const a = gs(s);
|
|
1421
|
+
a.sourceBandIndex != null && e.rasterBands[a.sourceBandIndex] == null ? e.rasterBands[a.sourceBandIndex] = a : e.rasterBands.push(a);
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
});
|
|
1425
|
+
const n = e.rasterBands;
|
|
1426
|
+
if (n.length) {
|
|
1427
|
+
const s = !!n[0].statistics;
|
|
1428
|
+
e.statistics = s ? n.map((r) => r.statistics).filter(Be) : null;
|
|
1429
|
+
const a = !!n[0].histogram;
|
|
1430
|
+
e.histograms = a ? n.map((r) => r.histogram).filter(Be) : null;
|
|
1431
|
+
}
|
|
1432
|
+
return e;
|
|
1433
|
+
}
|
|
1434
|
+
let Te = class extends se {
|
|
1435
|
+
async open(i) {
|
|
1436
|
+
await this.init();
|
|
1437
|
+
const e = await this._fetchData(i);
|
|
1438
|
+
let { spatialReference: n, statistics: t, histograms: s, transform: a } = await this._fetchAuxiliaryData(i);
|
|
1439
|
+
const r = !n;
|
|
1440
|
+
r && (n = new L({ wkid: 3857 })), s != null && s.length && t == null && (t = Ge(s));
|
|
1441
|
+
const { width: o, height: l } = e;
|
|
1442
|
+
let c = new z({ xmin: -0.5, ymin: 0.5 - l, xmax: o - 0.5, ymax: 0.5, spatialReference: n });
|
|
1443
|
+
const h = a ? a.forwardTransform(c) : c;
|
|
1444
|
+
let u = !0;
|
|
1445
|
+
if (a) {
|
|
1446
|
+
const f = a.forwardCoefficients;
|
|
1447
|
+
u = f && f[1] === 0 && f[2] === 0, u && (a = null, c = h);
|
|
1448
|
+
}
|
|
1449
|
+
const m = new qe({ source: { extent: h, nativeExtent: c, transform: a, pixelBlocks: [e], statistics: t, histograms: s, keyProperties: { DateType: "Processed" }, isPseudoSpatialReference: r }, ioConfig: { sampling: "closest", skipStatistics: !0 } });
|
|
1450
|
+
this.ioConfig.skipMapInfo && (m.ioConfig.skipMapInfo = !0), await m.open(), m.source = null, this._set("rasterInfo", m.rasterInfo), this._inMemoryRaster = m;
|
|
1451
|
+
}
|
|
1452
|
+
fetchRawTile(i, e, n, t = {}) {
|
|
1453
|
+
return this._inMemoryRaster.fetchRawTile(i, e, n, t);
|
|
1454
|
+
}
|
|
1455
|
+
async _fetchData(i) {
|
|
1456
|
+
const { data: e } = await this.request(this.url, { responseType: "array-buffer", signal: i == null ? void 0 : i.signal }), n = yi(e).toUpperCase();
|
|
1457
|
+
if (n !== "JPG" && n !== "PNG" && n !== "GIF" && n !== "BMP")
|
|
1458
|
+
throw new O("image-aux-raster:open", "the data is not a supported format");
|
|
1459
|
+
this._set("datasetFormat", n);
|
|
1460
|
+
const t = n.toLowerCase(), s = t === "gif" || t === "bmp" || !Nt("ios"), a = await this.decodePixelBlock(e, { format: t, useCanvas: s, hasNoZlibMask: !0 });
|
|
1461
|
+
if (a == null)
|
|
1462
|
+
throw new O("image-aux-raster:open", "the data cannot be decoded");
|
|
1463
|
+
return a;
|
|
1464
|
+
}
|
|
1465
|
+
async _fetchAuxiliaryData(i) {
|
|
1466
|
+
var h;
|
|
1467
|
+
const e = i == null ? void 0 : i.signal, { skipExtensions: n = [], skipMapInfo: t } = this.ioConfig, s = t || n.includes("aux.xml") ? null : this.request(this.url + ".aux.xml", { responseType: "xml", signal: e }), a = this.datasetFormat, r = a === "JPG" ? "jgw" : a === "PNG" ? "pgw" : a === "BMP" ? "bpw" : null, o = r && n.includes(r) ? null : this.request(this.url.slice(0, this.url.lastIndexOf(".")) + "." + r, { responseType: "text", signal: e }), l = await mt([s, o]);
|
|
1468
|
+
if (e != null && e.aborted)
|
|
1469
|
+
throw Bt();
|
|
1470
|
+
const c = Ue((h = l[0].value) == null ? void 0 : h.data);
|
|
1471
|
+
if (!c.transform) {
|
|
1472
|
+
const u = l[1].value ? l[1].value.data.split(`
|
|
1473
|
+
`).slice(0, 6).map((m) => Number(m)) : null;
|
|
1474
|
+
c.transform = (u == null ? void 0 : u.length) === 6 ? new je({ forwardCoefficients: [u[4], u[5], u[0], -u[1], u[2], -u[3]] }) : null;
|
|
1475
|
+
}
|
|
1476
|
+
return c;
|
|
1477
|
+
}
|
|
1478
|
+
};
|
|
1479
|
+
I([v({ type: String, json: { write: !0 } })], Te.prototype, "datasetFormat", void 0), Te = I([K("esri.layers.support.rasterDatasets.ImageAuxRaster")], Te);
|
|
1480
|
+
const Re = Te;
|
|
1481
|
+
let ye = class extends se {
|
|
1482
|
+
constructor() {
|
|
1483
|
+
super(...arguments), this._levelOffset = 0, this._tilemapCache = null, this._slices = null, this.datasetFormat = "RasterTileServer", this.tileType = null;
|
|
1484
|
+
}
|
|
1485
|
+
async open(i) {
|
|
1486
|
+
var _, F;
|
|
1487
|
+
await this.init();
|
|
1488
|
+
const e = i == null ? void 0 : i.signal, n = this.sourceJSON ? { data: this.sourceJSON } : await this.request(this.url, { query: { f: "json" }, signal: e });
|
|
1489
|
+
n.ssl && (this.url = this.url.replace(/^http:/i, "https:"));
|
|
1490
|
+
const t = n.data;
|
|
1491
|
+
if (this.sourceJSON = t, !t)
|
|
1492
|
+
throw new O("imageserverraster:open", "cannot initialize tiled image service, missing service info");
|
|
1493
|
+
if (!t.tileInfo)
|
|
1494
|
+
throw new O("imageserverraster:open", "use ImageryLayer to open non-tiled image services");
|
|
1495
|
+
this._fixScaleInServiceInfo();
|
|
1496
|
+
const s = ["jpg", "jpeg", "png", "png8", "png24", "png32", "mixed"];
|
|
1497
|
+
this.tileType = t.cacheType, this.tileType == null && (s.includes(t.tileInfo.format.toLowerCase()) ? this.tileType = "Map" : t.tileInfo.format.toLowerCase() === "lerc" ? this.tileType = "Elevation" : this.tileType = "Raster"), this.datasetName = ((_ = t.name) == null ? void 0 : _.slice(t.name.indexOf("/") + 1)) ?? "";
|
|
1498
|
+
const a = await this._fetchRasterInfo({ signal: e });
|
|
1499
|
+
if (a == null)
|
|
1500
|
+
throw new O("image-server-raster:open", "cannot initialize image service");
|
|
1501
|
+
ri(a, t);
|
|
1502
|
+
const r = this.tileType === "Map" ? xs(t.tileInfo, t) : te.fromJSON(t.tileInfo);
|
|
1503
|
+
Et(r);
|
|
1504
|
+
const [o, l] = this._computeMinMaxLOD(a, r), { extent: c, pixelSize: h } = a, u = 0.5 / a.width * h.x, m = Math.max(h.x, h.y), { lods: f } = r;
|
|
1505
|
+
(this.tileType !== "Map" && t.maxScale !== 0 || Math.abs(h.x - h.y) > u || !f.some((R) => Math.abs(R.resolution - m) < u)) && (h.x = h.y = o.resolution, a.width = Math.ceil((c.xmax - c.xmin) / h.x - 0.1), a.height = Math.ceil((c.ymax - c.ymin) / h.y - 0.1));
|
|
1506
|
+
const d = o.level - l.level, [g, p] = r.size, y = [], x = [];
|
|
1507
|
+
f.forEach((R, k) => {
|
|
1508
|
+
R.level >= l.level && R.level <= o.level && y.push({ x: R.resolution, y: R.resolution }), k < f.length - 1 && x.push(Math.round(10 * R.resolution / f[k + 1].resolution) / 10);
|
|
1509
|
+
}), y.sort((R, k) => R.x - k.x);
|
|
1510
|
+
const w = this.computeBlockBoundary(c, g, p, r.origin, y, d), S = y.length > 1 ? y.slice(1) : null;
|
|
1511
|
+
let T;
|
|
1512
|
+
t.transposeInfo && (T = { tileSize: [t.transposeInfo.rows, t.transposeInfo.cols], packetSize: ((F = a.keyProperties) == null ? void 0 : F._yxs.PacketSize) ?? 0 });
|
|
1513
|
+
const b = x.length <= 1 || x.length >= 3 && x.slice(0, -1).every((R) => R === x[0]) ? x[0] ?? 2 : Math.round(10 / (l.resolution / o.resolution) ** (-1 / d)) / 10;
|
|
1514
|
+
if (a.storageInfo = new ge({ blockWidth: r.size[0], blockHeight: r.size[1], pyramidBlockWidth: r.size[0], pyramidBlockHeight: r.size[1], pyramidResolutions: S, pyramidScalingFactor: b, compression: r.format, origin: r.origin, firstPyramidLevel: 1, maximumPyramidLevel: d, tileInfo: r, transposeInfo: T, blockBoundary: w }), this._fixGCSShift(a), this._set("rasterInfo", a), t.capabilities.toLowerCase().includes("tilemap")) {
|
|
1515
|
+
const R = { tileInfo: a.storageInfo.tileInfo, parsedUrl: Jt(this.url), url: this.url, tileServers: [] };
|
|
1516
|
+
this._tilemapCache = new Yi({ layer: R });
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
async fetchRawTile(i, e, n, t = {}) {
|
|
1520
|
+
const { storageInfo: s, extent: a } = this.rasterInfo, { transposeInfo: r } = s, o = r != null && !!t.transposedVariableName;
|
|
1521
|
+
if (this._slices && !o && t.sliceId == null)
|
|
1522
|
+
return null;
|
|
1523
|
+
const l = o ? 0 : s.maximumPyramidLevel - i + this._levelOffset, c = `${this.url}/tile/${l}/${e}/${n}`, h = this._slices ? o ? { variable: t.transposedVariableName } : { sliceId: t.sliceId || 0 } : null, { data: u } = await this.request(c, { query: h, responseType: "array-buffer", signal: t.signal });
|
|
1524
|
+
if (!u)
|
|
1525
|
+
return null;
|
|
1526
|
+
const m = o ? r.tileSize : s.tileInfo.size, f = await this.decodePixelBlock(u, { width: m[0], height: m[1], planes: null, pixelType: null, isPoint: this.tileType === "Elevation", returnInterleaved: o, noDataValue: this.rasterInfo.noDataValue });
|
|
1527
|
+
if (f == null)
|
|
1528
|
+
return null;
|
|
1529
|
+
const d = s.blockBoundary[i];
|
|
1530
|
+
if (s.compression !== "jpg" || n > d.minCol && n < d.maxCol && e > d.minRow && e < d.maxRow)
|
|
1531
|
+
return f;
|
|
1532
|
+
const { origin: g, blockWidth: p, blockHeight: y } = s, { x, y: w } = this.getPyramidPixelSize(i), S = Math.round((a.xmin - g.x) / x) % p, T = Math.round((a.xmax - g.x) / x) % p || p, b = Math.round((g.y - a.ymax) / w) % y, _ = Math.round((g.y - a.ymin) / w) % y || y, F = n === d.minCol ? S : 0, R = e === d.minRow ? b : 0, k = n === d.maxCol ? T : p, M = e === d.maxRow ? _ : y;
|
|
1533
|
+
return Bi(f, { x: F, y: R }, { width: k - F, height: M - R }), f;
|
|
1534
|
+
}
|
|
1535
|
+
getSliceIndex(i) {
|
|
1536
|
+
if (!this._slices || i == null || i.length === 0)
|
|
1537
|
+
return null;
|
|
1538
|
+
const e = i;
|
|
1539
|
+
for (let n = 0; n < this._slices.length; n++) {
|
|
1540
|
+
const t = this._slices[n].multidimensionalDefinition;
|
|
1541
|
+
if (t.length === e.length && !t.some((s) => {
|
|
1542
|
+
const a = e.find((r) => s.variableName === r.variableName && r.dimensionName === s.dimensionName);
|
|
1543
|
+
return a ? (Array.isArray(s.values[0]) ? `${s.values[0][0]}-${s.values[0][1]}` : s.values[0]) !== (Array.isArray(a.values[0]) ? `${a.values[0][0]}-${a.values[0][1]}` : a.values[0]) : !0;
|
|
1544
|
+
}))
|
|
1545
|
+
return n;
|
|
1546
|
+
}
|
|
1547
|
+
return null;
|
|
1548
|
+
}
|
|
1549
|
+
async fetchVariableStatisticsHistograms(i, e) {
|
|
1550
|
+
var a, r, o;
|
|
1551
|
+
const n = this.request(this.url + "/statistics", { query: { variable: i, f: "json" }, signal: e }).then((l) => {
|
|
1552
|
+
var c;
|
|
1553
|
+
return (c = l.data) == null ? void 0 : c.statistics;
|
|
1554
|
+
}), t = this.request(this.url + "/histograms", { query: { variable: i, f: "json" }, signal: e }).then((l) => {
|
|
1555
|
+
var c;
|
|
1556
|
+
return (c = l.data) == null ? void 0 : c.histograms;
|
|
1557
|
+
}), s = await Promise.all([n, t]);
|
|
1558
|
+
return s[0] && s[0].forEach((l) => {
|
|
1559
|
+
l.avg = l.mean, l.stddev = l.standardDeviation;
|
|
1560
|
+
}), (o = (r = (a = s[1]) == null ? void 0 : a[0]) == null ? void 0 : r.counts) != null && o.length || (s[1] = null), { statistics: s[0] || null, histograms: s[1] || null };
|
|
1561
|
+
}
|
|
1562
|
+
async computeBestPyramidLevelForLocation(i, e = {}) {
|
|
1563
|
+
if (!this._tilemapCache)
|
|
1564
|
+
return 0;
|
|
1565
|
+
let n = this.identifyPixelLocation(i, 0, e.datumTransformation);
|
|
1566
|
+
if (n === null)
|
|
1567
|
+
return null;
|
|
1568
|
+
let t = 0;
|
|
1569
|
+
const { maximumPyramidLevel: s } = this.rasterInfo.storageInfo;
|
|
1570
|
+
let a = s - t + this._levelOffset;
|
|
1571
|
+
const r = n.srcLocation;
|
|
1572
|
+
for (; a >= 0; ) {
|
|
1573
|
+
try {
|
|
1574
|
+
if (await this._tilemapCache.fetchAvailability(a, n.row, n.col, e) === "available")
|
|
1575
|
+
break;
|
|
1576
|
+
} catch {
|
|
1577
|
+
}
|
|
1578
|
+
if (a--, t++, n = this.identifyPixelLocation(r, t, e.datumTransformation), n === null)
|
|
1579
|
+
return null;
|
|
1580
|
+
}
|
|
1581
|
+
return a === -1 || n == null ? null : t;
|
|
1582
|
+
}
|
|
1583
|
+
async _fetchRasterInfo(i) {
|
|
1584
|
+
const e = this.sourceJSON;
|
|
1585
|
+
if (this.tileType === "Map") {
|
|
1586
|
+
const r = e.fullExtent || e.extent, o = Math.ceil((r.xmax - r.xmin) / e.pixelSizeX - 0.1), l = Math.ceil((r.ymax - r.ymin) / e.pixelSizeY - 0.1), c = L.fromJSON(e.spatialReference || r.spatialReference), h = new A({ x: e.pixelSizeX, y: e.pixelSizeY, spatialReference: c });
|
|
1587
|
+
return new xe({ width: o, height: l, bandCount: 3, extent: z.fromJSON(r), spatialReference: c, pixelSize: h, pixelType: "u8", statistics: null, keyProperties: { DataType: "processed" } });
|
|
1588
|
+
}
|
|
1589
|
+
const { signal: n } = i, t = ai(this.url, this.sourceJSON, { signal: n, query: this.ioConfig.customFetchParameters }), s = e.hasMultidimensions ? this.request(`${this.url}/slices`, { query: { f: "json" }, signal: n }).then((r) => {
|
|
1590
|
+
var o;
|
|
1591
|
+
return (o = r.data) == null ? void 0 : o.slices;
|
|
1592
|
+
}).catch(() => null) : null, a = await Promise.all([t, s]);
|
|
1593
|
+
return this._slices = a[1], a[0];
|
|
1594
|
+
}
|
|
1595
|
+
_fixScaleInServiceInfo() {
|
|
1596
|
+
const { sourceJSON: i } = this;
|
|
1597
|
+
i.minScale && i.minScale < 0 && (i.minScale = 0), i.maxScale && i.maxScale < 0 && (i.maxScale = 0);
|
|
1598
|
+
}
|
|
1599
|
+
_fixGCSShift(i) {
|
|
1600
|
+
const { extent: e, spatialReference: n } = i;
|
|
1601
|
+
e.xmin > -1 && e.xmax > 181 && (n != null && n.wkid) && n.isGeographic && (i.nativeExtent = i.extent, i.transform = new Wi(), i.extent = i.transform.forwardTransform(e));
|
|
1602
|
+
}
|
|
1603
|
+
_computeMinMaxLOD(i, e) {
|
|
1604
|
+
const { pixelSize: n } = i, t = 0.5 / i.width * n.x, { lods: s } = e, a = e.lodAt(Math.max.apply(null, s.map((m) => m.level))), r = e.lodAt(Math.min.apply(null, s.map((m) => m.level))), { tileType: o } = this;
|
|
1605
|
+
if (o === "Map")
|
|
1606
|
+
return this._levelOffset = s[0].level, [a, r];
|
|
1607
|
+
if (o === "Raster")
|
|
1608
|
+
return [s.find((m) => m.resolution === n.x) ?? a, r];
|
|
1609
|
+
const { minScale: l, maxScale: c } = this.sourceJSON;
|
|
1610
|
+
let h = a;
|
|
1611
|
+
c > 0 && (h = s.find((m) => Math.abs(m.scale - c) < t), h || (h = s.filter((m) => m.scale > c).sort((m, f) => m.scale > f.scale ? 1 : -1)[0] ?? a));
|
|
1612
|
+
let u = r;
|
|
1613
|
+
return l > 0 && (u = s.find((m) => Math.abs(m.scale - l) < t) ?? r, this._levelOffset = u.level - r.level), [h, u];
|
|
1614
|
+
}
|
|
1615
|
+
};
|
|
1616
|
+
function xs(i, e) {
|
|
1617
|
+
if (!i)
|
|
1618
|
+
return null;
|
|
1619
|
+
const { minScale: n, maxScale: t, minLOD: s, maxLOD: a } = e;
|
|
1620
|
+
if (s != null && a != null)
|
|
1621
|
+
return te.fromJSON({ ...i, lods: i.lods.filter(({ level: r }) => r != null && r >= s && r <= a) });
|
|
1622
|
+
if (n !== 0 && t !== 0) {
|
|
1623
|
+
const r = (c) => Math.round(1e4 * c) / 1e4, o = n ? r(n) : 1 / 0, l = t ? r(t) : -1 / 0;
|
|
1624
|
+
return te.fromJSON({ ...i, lods: i.lods.filter((c) => {
|
|
1625
|
+
const h = r(c.scale);
|
|
1626
|
+
return h <= o && h >= l;
|
|
1627
|
+
}) });
|
|
1628
|
+
}
|
|
1629
|
+
return te.fromJSON(i);
|
|
1630
|
+
}
|
|
1631
|
+
I([v({ type: String, json: { write: !0 } })], ye.prototype, "datasetFormat", void 0), I([v()], ye.prototype, "tileType", void 0), ye = I([K("esri.layers.support.rasterDatasets.ImageServerRaster")], ye);
|
|
1632
|
+
const ws = ye, Q = /* @__PURE__ */ new Map();
|
|
1633
|
+
Q.set("Int8", "s8"), Q.set("UInt8", "u8"), Q.set("Int16", "s16"), Q.set("UInt16", "u16"), Q.set("Int32", "s32"), Q.set("UInt32", "u32"), Q.set("Float32", "f32"), Q.set("Float64", "f32"), Q.set("Double64", "f32");
|
|
1634
|
+
const ie = /* @__PURE__ */ new Map();
|
|
1635
|
+
ie.set("none", { blobExtension: ".til", isOneSegment: !0, decoderFormat: "bip" }), ie.set("lerc", { blobExtension: ".lrc", isOneSegment: !1, decoderFormat: "lerc" }), ie.set("deflate", { blobExtension: ".pzp", isOneSegment: !0, decoderFormat: "deflate" }), ie.set("jpeg", { blobExtension: ".pjg", isOneSegment: !0, decoderFormat: "jpg" });
|
|
1636
|
+
let ue = class extends se {
|
|
1637
|
+
constructor() {
|
|
1638
|
+
super(...arguments), this._files = null, this._storageIndex = null, this.datasetFormat = "MRF";
|
|
1639
|
+
}
|
|
1640
|
+
async open(i) {
|
|
1641
|
+
await this.init(), this.datasetName = this.url.slice(this.url.lastIndexOf("/") + 1);
|
|
1642
|
+
const e = i ? i.signal : null, n = await this.request(this.url, { responseType: "xml", signal: e }), { rasterInfo: t, files: s } = this._parseHeader(n.data), { skipMapInfo: a, skipExtensions: r = [] } = this.ioConfig;
|
|
1643
|
+
if (!r.includes("aux.xml") && !a) {
|
|
1644
|
+
const y = await this._fetchAuxiliaryData(i);
|
|
1645
|
+
y != null && (t.statistics = y.statistics ?? t.statistics, t.histograms = y.histograms, y.histograms && t.statistics == null && (t.statistics = Ge(y.histograms)));
|
|
1646
|
+
}
|
|
1647
|
+
a && this.updateImageSpaceRasterInfo(t), this._set("rasterInfo", t), this._files = s;
|
|
1648
|
+
const o = await this.request(s.index, { responseType: "array-buffer", signal: e });
|
|
1649
|
+
this._storageIndex = this._parseIndex(o.data);
|
|
1650
|
+
const { blockWidth: l, blockHeight: c } = this.rasterInfo.storageInfo, h = this.rasterInfo.storageInfo.pyramidScalingFactor, { width: u, height: m } = this.rasterInfo, f = [], d = this._getBandSegmentCount();
|
|
1651
|
+
let g = 0, p = -1;
|
|
1652
|
+
for (; g < this._storageIndex.length; ) {
|
|
1653
|
+
p++;
|
|
1654
|
+
const y = Math.ceil(u / l / h ** p) - 1, x = Math.ceil(m / c / h ** p) - 1;
|
|
1655
|
+
g += (y + 1) * (x + 1) * d * 4, f.push({ maxRow: x, maxCol: y, minCol: 0, minRow: 0 });
|
|
1656
|
+
}
|
|
1657
|
+
this.rasterInfo.storageInfo.blockBoundary = f, p > 0 && (this.rasterInfo.storageInfo.firstPyramidLevel = 1, this.rasterInfo.storageInfo.maximumPyramidLevel = p), this.updateTileInfo();
|
|
1658
|
+
}
|
|
1659
|
+
async fetchRawTile(i, e, n, t = {}) {
|
|
1660
|
+
const { blockWidth: s, blockHeight: a, blockBoundary: r } = this.rasterInfo.storageInfo, o = r[i];
|
|
1661
|
+
if (!o || o.maxRow < e || o.maxCol < n || o.minRow > e || o.minCol > n)
|
|
1662
|
+
return null;
|
|
1663
|
+
const { bandCount: l, pixelType: c } = this.rasterInfo, { ranges: h, actualTileWidth: u, actualTileHeight: m } = this._getTileLocation(i, e, n);
|
|
1664
|
+
if (!h || h.length === 0)
|
|
1665
|
+
return null;
|
|
1666
|
+
if (h[0].from === 0 && h[0].to === 0) {
|
|
1667
|
+
const M = new Uint8Array(s * a);
|
|
1668
|
+
return new Y({ width: s, height: a, pixels: null, mask: M, validPixelCount: 0 });
|
|
1669
|
+
}
|
|
1670
|
+
const { bandIds: f } = this.ioConfig, d = this._getBandSegmentCount(), g = [];
|
|
1671
|
+
let p = 0;
|
|
1672
|
+
for (p = 0; p < d; p++)
|
|
1673
|
+
f && !f.includes(p) || g.push(this.request(this._files.data, { range: { from: h[p].from, to: h[p].to }, responseType: "array-buffer", signal: t.signal }));
|
|
1674
|
+
const y = await Promise.all(g), x = y.map((M) => M.data.byteLength).reduce((M, P) => M + P), w = new Uint8Array(x), S = [];
|
|
1675
|
+
let T = 0;
|
|
1676
|
+
for (p = 0; p < d; p++)
|
|
1677
|
+
S.push(T), w.set(new Uint8Array(y[p].data), T), T += y[p].data.byteLength;
|
|
1678
|
+
const b = ie.get(this.rasterInfo.storageInfo.compression).decoderFormat, _ = await this.decodePixelBlock(w.buffer, { width: s, height: a, format: b, planes: (f == null ? void 0 : f.length) || l, offsets: S, pixelType: c });
|
|
1679
|
+
if (_ == null)
|
|
1680
|
+
return null;
|
|
1681
|
+
let { noDataValue: F } = this.rasterInfo;
|
|
1682
|
+
if (F != null && b !== "lerc" && !_.mask && (F = F[0], F != null)) {
|
|
1683
|
+
const M = _.width * _.height, P = new Uint8Array(M);
|
|
1684
|
+
if (Math.abs(F) > 1e24)
|
|
1685
|
+
for (p = 0; p < M; p++)
|
|
1686
|
+
Math.abs((_.pixels[0][p] - F) / F) > 1e-6 && (P[p] = 1);
|
|
1687
|
+
else
|
|
1688
|
+
for (p = 0; p < M; p++)
|
|
1689
|
+
_.pixels[0][p] !== F && (P[p] = 1);
|
|
1690
|
+
_.mask = P;
|
|
1691
|
+
}
|
|
1692
|
+
let R = 0, k = 0;
|
|
1693
|
+
if (u !== s || m !== a) {
|
|
1694
|
+
let M = _.mask;
|
|
1695
|
+
if (M)
|
|
1696
|
+
for (p = 0; p < a; p++)
|
|
1697
|
+
if (k = p * s, p < m)
|
|
1698
|
+
for (R = u; R < s; R++)
|
|
1699
|
+
M[k + R] = 0;
|
|
1700
|
+
else
|
|
1701
|
+
for (R = 0; R < s; R++)
|
|
1702
|
+
M[k + R] = 0;
|
|
1703
|
+
else
|
|
1704
|
+
for (M = new Uint8Array(s * a), _.mask = M, p = 0; p < m; p++)
|
|
1705
|
+
for (k = p * s, R = 0; R < u; R++)
|
|
1706
|
+
M[k + R] = 1;
|
|
1707
|
+
}
|
|
1708
|
+
return _;
|
|
1709
|
+
}
|
|
1710
|
+
_parseIndex(i) {
|
|
1711
|
+
if (i.byteLength % 16 > 0)
|
|
1712
|
+
throw new Error("invalid array buffer must be multiples of 16");
|
|
1713
|
+
let e, n, t, s, a, r;
|
|
1714
|
+
if (gi) {
|
|
1715
|
+
for (n = new Uint8Array(i), s = new ArrayBuffer(i.byteLength), t = new Uint8Array(s), a = 0; a < i.byteLength / 4; a++)
|
|
1716
|
+
for (r = 0; r < 4; r++)
|
|
1717
|
+
t[4 * a + r] = n[4 * a + 3 - r];
|
|
1718
|
+
e = new Uint32Array(s);
|
|
1719
|
+
} else
|
|
1720
|
+
e = new Uint32Array(i);
|
|
1721
|
+
return e;
|
|
1722
|
+
}
|
|
1723
|
+
_getBandSegmentCount() {
|
|
1724
|
+
return ie.get(this.rasterInfo.storageInfo.compression).isOneSegment ? 1 : this.rasterInfo.bandCount;
|
|
1725
|
+
}
|
|
1726
|
+
_getTileLocation(i, e, n) {
|
|
1727
|
+
const { blockWidth: t, blockHeight: s, pyramidScalingFactor: a } = this.rasterInfo.storageInfo, { width: r, height: o } = this.rasterInfo, l = this._getBandSegmentCount();
|
|
1728
|
+
let c, h, u, m = 0, f = 0;
|
|
1729
|
+
for (u = 0; u < i; u++)
|
|
1730
|
+
f = a ** u, c = Math.ceil(r / t / f), h = Math.ceil(o / s / f), m += c * h;
|
|
1731
|
+
f = a ** i, c = Math.ceil(r / t / f), h = Math.ceil(o / s / f), m += e * c + n, m *= 4 * l;
|
|
1732
|
+
const d = this._storageIndex.subarray(m, m + 4 * l);
|
|
1733
|
+
let g = 0, p = 0;
|
|
1734
|
+
const y = [];
|
|
1735
|
+
for (let x = 0; x < l; x++)
|
|
1736
|
+
g = d[4 * x] * 2 ** 32 + d[4 * x + 1], p = g + d[4 * x + 2] * 2 ** 32 + d[4 * x + 3], y.push({ from: g, to: p });
|
|
1737
|
+
return { ranges: y, actualTileWidth: n < c - 1 ? t : Math.ceil(r / f) - t * (c - 1), actualTileHeight: e < h - 1 ? s : Math.ceil(o / f) - s * (h - 1) };
|
|
1738
|
+
}
|
|
1739
|
+
_parseHeader(i) {
|
|
1740
|
+
const e = V(i, "MRF_META/Raster");
|
|
1741
|
+
if (!e)
|
|
1742
|
+
throw new O("mrf:open", "not a valid MRF format");
|
|
1743
|
+
const n = V(e, "Size"), t = parseInt(n.getAttribute("x"), 10), s = parseInt(n.getAttribute("y"), 10), a = parseInt(n.getAttribute("c"), 10), r = (Z(e, "Compression") || "none").toLowerCase();
|
|
1744
|
+
if (!ie.has(r))
|
|
1745
|
+
throw new O("mrf:open", "currently does not support compression " + r);
|
|
1746
|
+
const o = Z(e, "DataType") || "UInt8", l = Q.get(o);
|
|
1747
|
+
if (l == null)
|
|
1748
|
+
throw new O("mrf:open", "currently does not support pixel type " + o);
|
|
1749
|
+
const c = V(e, "PageSize"), h = parseInt(c.getAttribute("x"), 10), u = parseInt(c.getAttribute("y"), 10), m = V(e, "DataValues");
|
|
1750
|
+
let f, d;
|
|
1751
|
+
if (m && (d = m.getAttribute("NoData"), d != null && (f = d.trim().split(" ").map((M) => parseFloat(M)))), V(i, "MRF_META/CachedSource"))
|
|
1752
|
+
throw new O("mrf:open", "currently does not support MRF referencing other data files");
|
|
1753
|
+
const g = V(i, "MRF_META/GeoTags"), p = V(g, "BoundingBox");
|
|
1754
|
+
let y, x = !1;
|
|
1755
|
+
if (p != null) {
|
|
1756
|
+
const M = parseFloat(p.getAttribute("minx")), P = parseFloat(p.getAttribute("miny")), B = parseFloat(p.getAttribute("maxx")), C = parseFloat(p.getAttribute("maxy")), $ = Z(g, "Projection") || "";
|
|
1757
|
+
let D = L.WGS84;
|
|
1758
|
+
if ($ !== "LOCAL_CS[]")
|
|
1759
|
+
if ($.toLowerCase().startsWith("epsg:")) {
|
|
1760
|
+
const E = Number($.slice(5));
|
|
1761
|
+
isNaN(E) || E === 0 || (D = new L({ wkid: E }));
|
|
1762
|
+
} else
|
|
1763
|
+
D = Fe($) ?? L.WGS84;
|
|
1764
|
+
else
|
|
1765
|
+
x = !0, D = new L({ wkid: 3857 });
|
|
1766
|
+
y = new z(M, P, B, C), y.spatialReference = D;
|
|
1767
|
+
} else
|
|
1768
|
+
x = !0, y = new z({ xmin: -0.5, ymin: 0.5 - s, xmax: t - 0.5, ymax: 0.5, spatialReference: new L({ wkid: 3857 }) });
|
|
1769
|
+
const w = V(i, "MRF_META/Rsets"), S = parseInt((w == null ? void 0 : w.getAttribute("scale")) || "2", 10), T = y.spatialReference, b = new ge({ origin: new A({ x: y.xmin, y: y.ymax, spatialReference: T }), blockWidth: h, blockHeight: u, pyramidBlockWidth: h, pyramidBlockHeight: u, compression: r, pyramidScalingFactor: S }), _ = new A({ x: y.width / t, y: y.height / s, spatialReference: T }), F = new xe({ width: t, height: s, extent: y, isPseudoSpatialReference: x, spatialReference: T, bandCount: a, pixelType: l, pixelSize: _, noDataValue: f, storageInfo: b }), R = Z(i, "datafile"), k = Z(i, "IndexFile");
|
|
1770
|
+
return { rasterInfo: F, files: { mrf: this.url, index: k || this.url.replace(".mrf", ".idx"), data: R || this.url.replace(".mrf", ie.get(r).blobExtension) } };
|
|
1771
|
+
}
|
|
1772
|
+
async _fetchAuxiliaryData(i) {
|
|
1773
|
+
try {
|
|
1774
|
+
const { data: e } = await this.request(this.url + ".aux.xml", { responseType: "xml", signal: i == null ? void 0 : i.signal });
|
|
1775
|
+
return Ue(e);
|
|
1776
|
+
} catch {
|
|
1777
|
+
return null;
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
};
|
|
1781
|
+
I([v()], ue.prototype, "_files", void 0), I([v()], ue.prototype, "_storageIndex", void 0), I([v({ type: String, json: { write: !0 } })], ue.prototype, "datasetFormat", void 0), ue = I([K("esri.layers.support.rasterIO.MRFRaster")], ue);
|
|
1782
|
+
const Is = ue, De = (i, e) => {
|
|
1783
|
+
var n;
|
|
1784
|
+
return (n = i.get(e)) == null ? void 0 : n.values;
|
|
1785
|
+
}, me = (i, e) => {
|
|
1786
|
+
var n, t;
|
|
1787
|
+
return (t = (n = i.get(e)) == null ? void 0 : n.values) == null ? void 0 : t[0];
|
|
1788
|
+
};
|
|
1789
|
+
let ae = class extends se {
|
|
1790
|
+
constructor() {
|
|
1791
|
+
super(...arguments), this._files = null, this._headerInfo = null, this._bufferSize = 1048576, this.datasetFormat = "TIFF";
|
|
1792
|
+
}
|
|
1793
|
+
async open(i) {
|
|
1794
|
+
var g, p, y, x;
|
|
1795
|
+
await this.init();
|
|
1796
|
+
const e = i ? i.signal : null, { data: n } = await this.request(this.url, { range: { from: 0, to: this._bufferSize }, responseType: "array-buffer", signal: e });
|
|
1797
|
+
if (!n)
|
|
1798
|
+
throw new O("tiffraster:open", "failed to open url " + this.url);
|
|
1799
|
+
this.datasetName = this.url.slice(this.url.lastIndexOf("/") + 1, this.url.lastIndexOf("."));
|
|
1800
|
+
const { littleEndian: t, firstIFDPos: s, isBigTiff: a } = xi(n), r = [];
|
|
1801
|
+
await this._readIFDs(r, n, t, s, 0, a ? 8 : 4, e);
|
|
1802
|
+
const { imageInfo: o, rasterInfo: l } = this._parseIFDs(r), c = wi(r), h = Ii(r);
|
|
1803
|
+
if (this._headerInfo = { littleEndian: t, isBigTiff: a, ifds: r, pyramidIFDs: c, maskIFDs: h, ...o }, this._set("rasterInfo", l), !o.isSupported)
|
|
1804
|
+
throw new O("tiffraster:open", "this tiff is not supported: " + o.message);
|
|
1805
|
+
if (!o.tileWidth)
|
|
1806
|
+
throw new O("tiffraster:open", "none-tiled tiff is not optimized for access, convert to COG and retry.");
|
|
1807
|
+
l.isPseudoSpatialReference && le.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");
|
|
1808
|
+
const u = (p = (g = r[0].get("PREDICTOR")) == null ? void 0 : g.values) == null ? void 0 : p[0];
|
|
1809
|
+
if (((x = (y = r[0].get("SAMPLEFORMAT")) == null ? void 0 : y.values) == null ? void 0 : x[0]) === 3 && u === 2)
|
|
1810
|
+
throw new O("tiffraster:open", "unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");
|
|
1811
|
+
const { skipMapInfo: f, skipExtensions: d = [] } = this.ioConfig;
|
|
1812
|
+
if (!d.includes("aux.xml") && !f) {
|
|
1813
|
+
const w = await this._fetchAuxiliaryMetaData(i);
|
|
1814
|
+
w != null && this._processPAMInfo(w, l);
|
|
1815
|
+
}
|
|
1816
|
+
d.includes("vat.dbf") || l.bandCount !== 1 || l.pixelType !== "u8" || f || (l.attributeTable = await this._fetchAuxiliaryTable(i), l.attributeTable != null && (l.keyProperties.DataType = "thematic")), f && this.updateImageSpaceRasterInfo(l), this.updateTileInfo();
|
|
1817
|
+
}
|
|
1818
|
+
async fetchRawTile(i, e, n, t = {}) {
|
|
1819
|
+
var a;
|
|
1820
|
+
if (!((a = this._headerInfo) != null && a.isSupported) || this.isBlockOutside(i, e, n))
|
|
1821
|
+
return null;
|
|
1822
|
+
const s = await this._fetchRawTiffTile(i, e, n, !1, t);
|
|
1823
|
+
if (s != null && this._headerInfo.hasMaskBand) {
|
|
1824
|
+
const r = await this._fetchRawTiffTile(i, e, n, !0, t);
|
|
1825
|
+
r != null && r.pixels[0] instanceof Uint8Array && (s.mask = r.pixels[0]);
|
|
1826
|
+
}
|
|
1827
|
+
return s;
|
|
1828
|
+
}
|
|
1829
|
+
_parseIFDs(i) {
|
|
1830
|
+
var P, B;
|
|
1831
|
+
const e = bi(i), { width: n, height: t, tileWidth: s, tileHeight: a, planes: r, pixelType: o, compression: l, firstPyramidLevel: c, maximumPyramidLevel: h, pyramidBlockWidth: u, pyramidBlockHeight: m, tileBoundary: f, affine: d, metadata: g } = e, p = ((P = e.extent.spatialReference) == null ? void 0 : P.wkt) || ((B = e.extent.spatialReference) == null ? void 0 : B.wkid);
|
|
1832
|
+
let y = Fe(p), x = !!e.isPseudoGeographic;
|
|
1833
|
+
y == null && (x = !0, y = new L({ wkid: 3857 }));
|
|
1834
|
+
const w = new z({ ...e.extent, spatialReference: y }), S = new A(w ? { x: w.xmin, y: w.ymax, spatialReference: y } : { x: 0, y: 0 }), T = new ge({ blockWidth: s, blockHeight: a, pyramidBlockWidth: u, pyramidBlockHeight: m, compression: l, origin: S, firstPyramidLevel: c, maximumPyramidLevel: h, blockBoundary: f }), b = new A({ x: (w.xmax - w.xmin) / n, y: (w.ymax - w.ymin) / t, spatialReference: y }), _ = g ? { BandProperties: g.bandProperties, DataType: g.dataType } : {};
|
|
1835
|
+
let F = null;
|
|
1836
|
+
const R = me(i[0], "PHOTOMETRICINTERPRETATION"), k = De(i[0], "COLORMAP");
|
|
1837
|
+
if (R <= 3 && (k == null ? void 0 : k.length) > 3 && k.length % 3 == 0) {
|
|
1838
|
+
F = [];
|
|
1839
|
+
const C = k.length / 3;
|
|
1840
|
+
for (let $ = 0; $ < C; $++)
|
|
1841
|
+
F.push([$, k[$] >>> 8, k[$ + C] >>> 8, k[$ + 2 * C] >>> 8]);
|
|
1842
|
+
}
|
|
1843
|
+
const M = new xe({ width: n, height: t, bandCount: r, pixelType: o, pixelSize: b, storageInfo: T, spatialReference: y, isPseudoSpatialReference: x, keyProperties: _, extent: w, colormap: F, statistics: g ? g.statistics : null });
|
|
1844
|
+
return d != null && d.length && (M.nativeExtent = new z({ xmin: -0.5, ymin: 0.5 - t, xmax: n - 0.5, ymax: 0.5, spatialReference: y }), M.transform = new je({ polynomialOrder: 1, forwardCoefficients: [d[2] + d[0] / 2, d[5] - d[3] / 2, d[0], d[3], -d[1], -d[4]] }), M.extent = M.transform.forwardTransform(M.nativeExtent), M.pixelSize = new A({ x: (w.xmax - w.xmin) / n, y: (w.ymax - w.ymin) / t, spatialReference: y }), T.origin.x = -0.5, T.origin.y = 0.5), { imageInfo: e, rasterInfo: M };
|
|
1845
|
+
}
|
|
1846
|
+
_processPAMInfo(i, e) {
|
|
1847
|
+
if (e.statistics = i.statistics ?? e.statistics, e.histograms = i.histograms, i.histograms && e.statistics == null && (e.statistics = Ge(i.histograms)), i.transform && e.transform == null) {
|
|
1848
|
+
e.transform = i.transform, e.nativeExtent = e.extent;
|
|
1849
|
+
const n = e.transform.forwardTransform(e.nativeExtent);
|
|
1850
|
+
e.pixelSize = new A({ x: (n.xmax - n.xmin) / e.width, y: (n.ymax - n.ymin) / e.height, spatialReference: e.spatialReference }), e.extent = n;
|
|
1851
|
+
}
|
|
1852
|
+
e.isPseudoSpatialReference && i.spatialReference && (e.spatialReference = i.spatialReference, e.extent.spatialReference = e.nativeExtent.spatialReference = e.storageInfo.origin.spatialReference = e.spatialReference);
|
|
1853
|
+
}
|
|
1854
|
+
async _readIFDs(i, e, n, t, s, a = 4, r) {
|
|
1855
|
+
if (!t)
|
|
1856
|
+
return null;
|
|
1857
|
+
(t >= e.byteLength || t < 0) && (e = (await this.request(this.url, { range: { from: t + s, to: t + s + this._bufferSize }, responseType: "array-buffer", signal: r })).data, s = t + s, t = 0);
|
|
1858
|
+
const o = await this._readIFD(e, n, t, s, we.tiffTags, a, r);
|
|
1859
|
+
if (i.push(o.ifd), !o.nextIFD)
|
|
1860
|
+
return null;
|
|
1861
|
+
await this._readIFDs(i, e, n, o.nextIFD - s, s, a, r);
|
|
1862
|
+
}
|
|
1863
|
+
async _readIFD(i, e, n, t, s = we.tiffTags, a = 4, r) {
|
|
1864
|
+
var l, c;
|
|
1865
|
+
if (!i)
|
|
1866
|
+
return null;
|
|
1867
|
+
const o = Si(i, e, n, t, s, a);
|
|
1868
|
+
if (o.success) {
|
|
1869
|
+
const h = [];
|
|
1870
|
+
if ((l = o.ifd) == null || l.forEach((u) => {
|
|
1871
|
+
u.values || h.push(u);
|
|
1872
|
+
}), h.length > 0) {
|
|
1873
|
+
const u = h.map((f) => f.offlineOffsetSize).filter(Be), m = Math.min.apply(null, u.map((f) => f[0]));
|
|
1874
|
+
if (Math.min.apply(null, u.map((f) => f[0] + f[1])) - m <= this._bufferSize) {
|
|
1875
|
+
const { data: f } = await this.request(this.url, { range: { from: m, to: m + this._bufferSize }, responseType: "array-buffer", signal: r });
|
|
1876
|
+
i = f, t = m, h.forEach((d) => Ri(i, e, d, t));
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
if ((c = o.ifd) != null && c.has("GEOKEYDIRECTORY")) {
|
|
1880
|
+
const u = o.ifd.get("GEOKEYDIRECTORY"), m = u == null ? void 0 : u.values;
|
|
1881
|
+
if (m && m.length > 4) {
|
|
1882
|
+
const f = m[0] + "." + m[1] + "." + m[2], d = await this._readIFD(i, e, u.valueOffset + 6 - t, t, we.geoKeys, 2, r);
|
|
1883
|
+
u.data = d.ifd, u.data && u.data.set("GEOTIFFVersion", { id: 0, type: 2, valueCount: 1, valueOffset: null, values: [f] });
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
return o;
|
|
1887
|
+
}
|
|
1888
|
+
if (o.requiredBufferSize && o.requiredBufferSize !== i.byteLength)
|
|
1889
|
+
return (i = (await this.request(this.url, { range: { from: t, to: t + o.requiredBufferSize + 4 }, responseType: "array-buffer", signal: r })).data).byteLength < o.requiredBufferSize ? null : this._readIFD(i, e, 0, t, we.tiffTags, 4, r);
|
|
1890
|
+
}
|
|
1891
|
+
async _fetchRawTiffTile(i, e, n, t, s = {}) {
|
|
1892
|
+
const a = this._getTileLocation(i, e, n, t);
|
|
1893
|
+
if (!a)
|
|
1894
|
+
return null;
|
|
1895
|
+
const { ranges: r, actualTileWidth: o, actualTileHeight: l, ifd: c } = a, h = r.map((b) => this.request(this.url, { range: b, responseType: "array-buffer", signal: s.signal })), u = await Promise.all(h), m = u.map((b) => b.data.byteLength).reduce((b, _) => b + _), f = u.length === 1 ? u[0].data : new ArrayBuffer(m), d = [0], g = [0];
|
|
1896
|
+
if (u.length > 1) {
|
|
1897
|
+
const b = new Uint8Array(f);
|
|
1898
|
+
for (let _ = 0, F = 0; _ < u.length; _++) {
|
|
1899
|
+
const R = u[_].data;
|
|
1900
|
+
b.set(new Uint8Array(R), F), d[_] = F, F += R.byteLength, g[_] = R.byteLength;
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
const { blockWidth: p, blockHeight: y } = this.getBlockWidthHeight(i), x = await this.decodePixelBlock(f, { format: "tiff", customOptions: { headerInfo: this._headerInfo, ifd: c, offsets: d, sizes: g }, width: p, height: y, planes: null, pixelType: null });
|
|
1904
|
+
if (x == null)
|
|
1905
|
+
return null;
|
|
1906
|
+
let w, S, T;
|
|
1907
|
+
if (o !== p || l !== y) {
|
|
1908
|
+
let b = x.mask;
|
|
1909
|
+
if (b)
|
|
1910
|
+
for (w = 0; w < y; w++)
|
|
1911
|
+
if (T = w * p, w < l)
|
|
1912
|
+
for (S = o; S < p; S++)
|
|
1913
|
+
b[T + S] = 0;
|
|
1914
|
+
else
|
|
1915
|
+
for (S = 0; S < p; S++)
|
|
1916
|
+
b[T + S] = 0;
|
|
1917
|
+
else
|
|
1918
|
+
for (b = new Uint8Array(p * y), x.mask = b, w = 0; w < l; w++)
|
|
1919
|
+
for (T = w * p, S = 0; S < o; S++)
|
|
1920
|
+
b[T + S] = 1;
|
|
1921
|
+
}
|
|
1922
|
+
return x;
|
|
1923
|
+
}
|
|
1924
|
+
_getTileLocation(i, e, n, t = !1) {
|
|
1925
|
+
const { firstPyramidLevel: s, blockBoundary: a } = this.rasterInfo.storageInfo, r = i === 0 ? 0 : i - (s - 1), { _headerInfo: o } = this;
|
|
1926
|
+
if (!o)
|
|
1927
|
+
return null;
|
|
1928
|
+
const l = t ? o.maskIFDs[r] : r === 0 ? o == null ? void 0 : o.ifds[0] : o == null ? void 0 : o.pyramidIFDs[r - 1];
|
|
1929
|
+
if (!l)
|
|
1930
|
+
return null;
|
|
1931
|
+
const c = vi(l, o), h = De(l, "TILEOFFSETS");
|
|
1932
|
+
if (h === void 0)
|
|
1933
|
+
return null;
|
|
1934
|
+
const u = De(l, "TILEBYTECOUNTS"), { minRow: m, minCol: f, maxRow: d, maxCol: g } = a[r];
|
|
1935
|
+
if (e > d || n > g || e < m || n < f)
|
|
1936
|
+
return null;
|
|
1937
|
+
const p = me(l, "IMAGEWIDTH"), y = me(l, "IMAGELENGTH"), x = me(l, "TILEWIDTH"), w = me(l, "TILELENGTH"), S = [];
|
|
1938
|
+
if (c) {
|
|
1939
|
+
const { bandCount: T } = this.rasterInfo;
|
|
1940
|
+
for (let b = 0; b < T; b++) {
|
|
1941
|
+
const _ = b * (d + 1) * (g + 1) + e * (g + 1) + n;
|
|
1942
|
+
S[b] = { from: h[_], to: h[_] + u[_] - 1 };
|
|
1943
|
+
}
|
|
1944
|
+
} else {
|
|
1945
|
+
const T = e * (g + 1) + n;
|
|
1946
|
+
S.push({ from: h[T], to: h[T] + u[T] - 1 });
|
|
1947
|
+
}
|
|
1948
|
+
for (let T = 0; T < S.length; T++)
|
|
1949
|
+
if (S[T].from == null || !S[T].to || S[T].to < 0)
|
|
1950
|
+
return null;
|
|
1951
|
+
return { ranges: S, ifd: l, actualTileWidth: n === g && p % x || x, actualTileHeight: e === d && y % w || w };
|
|
1952
|
+
}
|
|
1953
|
+
async _fetchAuxiliaryMetaData(i) {
|
|
1954
|
+
try {
|
|
1955
|
+
const { data: e } = await this.request(this.url + ".aux.xml", { responseType: "xml", signal: i == null ? void 0 : i.signal });
|
|
1956
|
+
return Ue(e);
|
|
1957
|
+
} catch {
|
|
1958
|
+
return null;
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
async _fetchAuxiliaryTable(i) {
|
|
1962
|
+
try {
|
|
1963
|
+
const { data: e } = await this.request(this.url + ".vat.dbf", { responseType: "array-buffer", signal: i == null ? void 0 : i.signal }), n = It.parse(e);
|
|
1964
|
+
return n != null && n.recordSet ? _e.fromJSON(n.recordSet) : null;
|
|
1965
|
+
} catch {
|
|
1966
|
+
return null;
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
};
|
|
1970
|
+
I([v()], ae.prototype, "_files", void 0), I([v()], ae.prototype, "_headerInfo", void 0), I([v()], ae.prototype, "_bufferSize", void 0), I([v({ type: String, json: { write: !0 } })], ae.prototype, "datasetFormat", void 0), ae = I([K("esri.layers.support.rasterDatasets.TIFFRaster")], ae);
|
|
1971
|
+
const bs = ae, j = /* @__PURE__ */ new Map();
|
|
1972
|
+
j.set("CRF", { desc: "Cloud Raster Format", constructor: ls }), j.set("MRF", { desc: "Meta Raster Format", constructor: Is }), j.set("TIFF", { desc: "GeoTIFF", constructor: bs }), j.set("RasterTileServer", { desc: "Raster Tile Server", constructor: ws }), j.set("JPG", { desc: "JPG Raster Format", constructor: Re }), j.set("PNG", { desc: "PNG Raster Format", constructor: Re }), j.set("GIF", { desc: "GIF Raster Format", constructor: Re }), j.set("BMP", { desc: "BMP Raster Format", constructor: Re }), j.set("CovJSON", { desc: "COVJSON Raster Format", constructor: ps }), j.set("MEMORY", { desc: "In Memory Raster Format", constructor: qe });
|
|
1973
|
+
class Ne {
|
|
1974
|
+
static get supportedFormats() {
|
|
1975
|
+
const e = /* @__PURE__ */ new Set();
|
|
1976
|
+
return j.forEach((n, t) => e.add(t)), e;
|
|
1977
|
+
}
|
|
1978
|
+
static async open(e) {
|
|
1979
|
+
var u;
|
|
1980
|
+
const { url: n, ioConfig: t, source: s, sourceJSON: a } = e;
|
|
1981
|
+
let r = e.datasetFormat ?? (t == null ? void 0 : t.datasetFormat);
|
|
1982
|
+
r == null && (n.includes(".") ? r = n.slice(n.lastIndexOf(".") + 1).toUpperCase() : ((u = s == null ? void 0 : s.type) == null ? void 0 : u.toLowerCase()) === "coverage" ? r = "CovJSON" : s != null && s.extent && s.pixelblocks && (r = "MEMORY")), r === "OVR" || r === "TIF" ? r = "TIFF" : r === "JPG" || r === "JPEG" || r === "JFIF" ? r = "JPG" : r === "COVJSON" && (r = "CovJSON"), n.toLowerCase().includes("/imageserver") && !n.toLowerCase().includes("/wcsserver") && (r = "RasterTileServer");
|
|
1983
|
+
const o = { url: n, source: s, sourceJSON: a, datasetFormat: r, ioConfig: t ?? { bandIds: null, sampling: null } };
|
|
1984
|
+
if (Object.keys(o).forEach((m) => {
|
|
1985
|
+
o[m] == null && delete o[m];
|
|
1986
|
+
}), r) {
|
|
1987
|
+
if (!this.supportedFormats.has(r))
|
|
1988
|
+
throw new O("rasterfactory:open", "not a supported format " + r);
|
|
1989
|
+
if (r === "CRF" && !(t != null && t.enableCRF))
|
|
1990
|
+
throw new O("rasterfactory:open", `cannot open raster: ${n}`);
|
|
1991
|
+
const m = new (j.get(r)).constructor(o);
|
|
1992
|
+
return await m.open({ signal: e.signal }), m;
|
|
1993
|
+
}
|
|
1994
|
+
const l = Array.from(j.keys()).filter((m) => m !== "CovJSON" && m !== "Memory");
|
|
1995
|
+
let c = 0;
|
|
1996
|
+
const h = () => {
|
|
1997
|
+
if (r = l[c++], !r || r === "CRF" && !(t != null && t.enableCRF))
|
|
1998
|
+
return null;
|
|
1999
|
+
const m = new (j.get(r)).constructor(o);
|
|
2000
|
+
return m.open({ signal: e.signal }).then(() => m).catch(() => h());
|
|
2001
|
+
};
|
|
2002
|
+
return h();
|
|
2003
|
+
}
|
|
2004
|
+
static register(e, n, t) {
|
|
2005
|
+
j.has(e.toUpperCase()) || j.set(e.toUpperCase(), { desc: n, constructor: t });
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
let J = class extends Xt(Vi(ji(qi(Yt(as(Xi(Vt(Ui(Ut(At(qt))))))))))) {
|
|
2009
|
+
constructor(...i) {
|
|
2010
|
+
super(...i), this._primaryRasters = [], this.bandIds = null, this.interpolation = null, this.legendEnabled = !0, this.isReference = null, this.listMode = "show", this.sourceJSON = null, this.version = null, this.type = "imagery-tile", this.operationalLayerType = "ArcGISTiledImageServiceLayer", this.popupEnabled = !0, this.popupTemplate = null, this.fields = null, this.source = void 0, this._debouncedSaveOperations = zt(async (e, n, t) => {
|
|
2011
|
+
const { save: s, saveAs: a } = await import("./imageryUtils-04032523.js");
|
|
2012
|
+
switch (e) {
|
|
2013
|
+
case be.SAVE:
|
|
2014
|
+
return s(this, n);
|
|
2015
|
+
case be.SAVE_AS:
|
|
2016
|
+
return a(this, t, n);
|
|
2017
|
+
}
|
|
2018
|
+
});
|
|
2019
|
+
}
|
|
2020
|
+
normalizeCtorArgs(i, e) {
|
|
2021
|
+
return typeof i == "string" ? { url: i, ...e } : i;
|
|
2022
|
+
}
|
|
2023
|
+
load(i) {
|
|
2024
|
+
const e = i != null ? i.signal : null;
|
|
2025
|
+
return this.addResolvingPromise(this.loadFromPortal({ supportedTypes: ["Image Service"] }, i).catch(Lt).then(() => this._openRaster(e))), Promise.resolve(this);
|
|
2026
|
+
}
|
|
2027
|
+
get defaultPopupTemplate() {
|
|
2028
|
+
return this.createPopupTemplate();
|
|
2029
|
+
}
|
|
2030
|
+
get rasterFields() {
|
|
2031
|
+
var o;
|
|
2032
|
+
const i = [new he({ name: "Raster.ServicePixelValue", alias: "Pixel Value", domain: null, editable: !1, length: 50, type: "string" }), new he({ name: "Raster.ServicePixelValue.Raw", alias: "Raw Pixel Value", domain: null, editable: !1, length: 50, type: "string" })], { serviceRasterInfo: e } = this, n = e == null ? void 0 : e.attributeTable, t = n != null ? n.fields : null, s = "Raster.";
|
|
2033
|
+
if (t) {
|
|
2034
|
+
const l = t.filter((c) => c.type !== "oid" && c.name.toLowerCase() !== "value").map((c) => {
|
|
2035
|
+
const h = c.clone();
|
|
2036
|
+
return h.name = s + c.name, h;
|
|
2037
|
+
});
|
|
2038
|
+
i.push(...l);
|
|
2039
|
+
}
|
|
2040
|
+
const a = e == null ? void 0 : e.dataType, r = e == null ? void 0 : e.multidimensionalInfo;
|
|
2041
|
+
if ((a === "vector-magdir" || a === "vector-uv") && r != null) {
|
|
2042
|
+
const l = (o = r.variables[0].unit) == null ? void 0 : o.trim(), c = "Magnitude" + (l ? ` (${l})` : "");
|
|
2043
|
+
i.push(new he({ name: "Raster.Magnitude", alias: c, domain: null, editable: !1, type: "double" })), i.push(new he({ name: "Raster.Direction", alias: "Direction (°)", domain: null, editable: !1, type: "double" }));
|
|
2044
|
+
}
|
|
2045
|
+
return i;
|
|
2046
|
+
}
|
|
2047
|
+
createPopupTemplate(i) {
|
|
2048
|
+
const { rasterFields: e } = this, n = new Set(e.map(({ name: t }) => t).filter((t) => t.toLowerCase() !== "raster.servicepixelvalue.raw"));
|
|
2049
|
+
return Ki({ fields: e, title: this.title }, { ...i, visibleFieldNames: n });
|
|
2050
|
+
}
|
|
2051
|
+
async generateRasterInfo(i, e) {
|
|
2052
|
+
if (!(i = Le(Ee, i)))
|
|
2053
|
+
return this.serviceRasterInfo;
|
|
2054
|
+
try {
|
|
2055
|
+
const { rasterInfo: n } = await this._openFunctionRaster(i, e);
|
|
2056
|
+
return n;
|
|
2057
|
+
} catch (n) {
|
|
2058
|
+
throw n instanceof O ? n : new O("imagery-tile-layer", "the given raster function is not supported");
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
2061
|
+
async save(i) {
|
|
2062
|
+
return this._debouncedSaveOperations(be.SAVE, i);
|
|
2063
|
+
}
|
|
2064
|
+
async saveAs(i, e) {
|
|
2065
|
+
return this._debouncedSaveOperations(be.SAVE_AS, e, i);
|
|
2066
|
+
}
|
|
2067
|
+
write(i, e) {
|
|
2068
|
+
const n = this._primaryRasters[0] ?? this.raster;
|
|
2069
|
+
if (this.loaded ? n.datasetFormat === "RasterTileServer" && (n.tileType === "Raster" || n.tileType === "Map") : this.url && /\/ImageServer(\/|\/?$)/i.test(this.url))
|
|
2070
|
+
return super.write(i, e);
|
|
2071
|
+
if (e != null && e.messages) {
|
|
2072
|
+
const t = `${e.origin}/${e.layerContainerType || "operational-layers"}`;
|
|
2073
|
+
e.messages.push(new O("layer:unsupported", `Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${t}'`, { layer: this }));
|
|
2074
|
+
}
|
|
2075
|
+
return null;
|
|
2076
|
+
}
|
|
2077
|
+
async _openRaster(i) {
|
|
2078
|
+
let e = !1;
|
|
2079
|
+
if (this.raster)
|
|
2080
|
+
await this._openFromRaster(this.raster, i), e = this.raster.datasetFormat === "Function";
|
|
2081
|
+
else {
|
|
2082
|
+
const { url: t, rasterFunction: s, source: a } = this;
|
|
2083
|
+
if (!t && !a)
|
|
2084
|
+
throw new O("imagery-tile-layer:open", "missing url or source parameter");
|
|
2085
|
+
a ? await this._openFromSource(a, i) : s ? await this._openFromUrlWithRasterFunction(t, s, i) : await this._openFromUrl(t, i);
|
|
2086
|
+
}
|
|
2087
|
+
const n = this.raster.rasterInfo;
|
|
2088
|
+
if (!n)
|
|
2089
|
+
throw new O("imagery-tile-layer:load", "cannot load resources on " + this.url);
|
|
2090
|
+
if (this._set("serviceRasterInfo", e ? n : this._primaryRasters[0].rasterInfo), this._set("spatialReference", n.spatialReference), this.sourceJSON = this.sourceJSON || this.raster.sourceJSON, this.sourceJSON != null) {
|
|
2091
|
+
const t = this.raster.tileType === "Map" && this.sourceJSON.minLOD != null && this.sourceJSON.maxLOD != null ? this.sourceJSON : { ...this.sourceJSON, minScale: 0, maxScale: 0 };
|
|
2092
|
+
this.read(t, { origin: "service" });
|
|
2093
|
+
} else
|
|
2094
|
+
this.read({ tileInfo: this.serviceRasterInfo.storageInfo.tileInfo.toJSON() }, { origin: "service" });
|
|
2095
|
+
this.title || (this.title = this.raster.datasetName), this.raster.tileType === "Map" && (this.popupEnabled = !1), this._configDefaultSettings(), this.addHandles(Ht(() => this.customParameters, (t) => {
|
|
2096
|
+
this.raster && (this.raster.ioConfig.customFetchParameters = t);
|
|
2097
|
+
}));
|
|
2098
|
+
}
|
|
2099
|
+
async _openFromRaster(i, e) {
|
|
2100
|
+
i.rasterInfo || await i.open({ signal: e }), this._primaryRasters = i.datasetFormat === "Function" ? i.primaryRasters.rasters : [i], this.url || (this.url = this._primaryRasters[0].url);
|
|
2101
|
+
}
|
|
2102
|
+
async _openFromUrlWithRasterFunction(i, e, n) {
|
|
2103
|
+
const t = [i];
|
|
2104
|
+
e && Gi(e.toJSON(), t);
|
|
2105
|
+
const s = await Promise.all(t.map((r) => Ne.open({ url: r, sourceJSON: this.sourceJSON, ioConfig: { sampling: "closest", ...this.ioConfig, customFetchParameters: this.customParameters }, signal: n }))), a = s.findIndex((r) => r == null);
|
|
2106
|
+
if (a > -1)
|
|
2107
|
+
throw new O("imagery-tile-layer:open", `cannot open raster: ${t[a]}`);
|
|
2108
|
+
return this._primaryRasters = s, this._initializeWithFunctionRaster(e);
|
|
2109
|
+
}
|
|
2110
|
+
async _openFromUrl(i, e) {
|
|
2111
|
+
const n = await Ne.open({ url: i, sourceJSON: this.sourceJSON, ioConfig: { sampling: "closest", ...this.ioConfig, customFetchParameters: this.customParameters }, signal: e });
|
|
2112
|
+
if (n == null)
|
|
2113
|
+
throw new O("imagery-tile-layer:open", `cannot open raster: ${i}`);
|
|
2114
|
+
this._primaryRasters = [n], this.raster = n;
|
|
2115
|
+
}
|
|
2116
|
+
async _openFromSource(i, e) {
|
|
2117
|
+
var a;
|
|
2118
|
+
const n = "the tiled imagery data source is not supported", t = ((a = i.type) == null ? void 0 : a.toLowerCase()) === "coverage" ? "CovJSON" : i.extent && i.pixelBlock ? "MEMORY" : null;
|
|
2119
|
+
if (!t)
|
|
2120
|
+
throw new O("imagery-tile-layer:open", n);
|
|
2121
|
+
t === "MEMORY" && (i = { extent: i.extent, pixelBlocks: [i.pixelBlock] });
|
|
2122
|
+
const s = await Ne.open({ url: "", source: i, datasetFormat: t, ioConfig: { sampling: "closest", ...this.ioConfig, customFetchParameters: this.customParameters }, signal: e });
|
|
2123
|
+
if (s == null)
|
|
2124
|
+
throw new O("imagery-tile-layer:open", n);
|
|
2125
|
+
this._primaryRasters = [s], this.rasterFunction ? await this._initializeWithFunctionRaster(this.rasterFunction) : this.raster = s;
|
|
2126
|
+
}
|
|
2127
|
+
async _openFunctionRaster(i, e) {
|
|
2128
|
+
var a;
|
|
2129
|
+
const n = { raster: this._primaryRasters[0] };
|
|
2130
|
+
this._primaryRasters.length > 1 && this._primaryRasters.forEach((r) => n[r.url] = r);
|
|
2131
|
+
const t = xt(((a = i.functionDefinition) == null ? void 0 : a.toJSON()) ?? i.toJSON(), n), s = new wt({ rasterFunction: t });
|
|
2132
|
+
return await s.open(e), s;
|
|
2133
|
+
}
|
|
2134
|
+
async _initializeWithFunctionRaster(i, e) {
|
|
2135
|
+
try {
|
|
2136
|
+
this.raster = await this._openFunctionRaster(i, e);
|
|
2137
|
+
} catch (n) {
|
|
2138
|
+
n instanceof O && le.getLogger(this).error("imagery-tile-layer:open", n.message), le.getLogger(this).warn("imagery-tile-layer:open", "the raster function cannot be applied and is removed"), this._set("rasterFunction", null), this.raster = this._primaryRasters[0];
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
};
|
|
2142
|
+
I([v({ clonable: !1 })], J.prototype, "_primaryRasters", void 0), I([v({ type: [Wt], json: { write: { overridePolicy() {
|
|
2143
|
+
var i;
|
|
2144
|
+
return { enabled: !this.loaded || this.raster.tileType === "Raster" || ((i = this.bandIds) == null ? void 0 : i.join(",")) !== "0,1,2" };
|
|
2145
|
+
} } } })], J.prototype, "bandIds", void 0), I([v({ json: { write: { overridePolicy() {
|
|
2146
|
+
return { enabled: !this.loaded || this.raster.tileType === "Raster" || this.interpolation !== "bilinear" };
|
|
2147
|
+
} } } }), Gt(oi)], J.prototype, "interpolation", void 0), I([v(li)], J.prototype, "legendEnabled", void 0), I([v({ type: Boolean, json: { read: !1, write: { enabled: !0, overridePolicy: () => ({ enabled: !1 }) } } })], J.prototype, "isReference", void 0), I([v({ type: ["show", "hide"] })], J.prototype, "listMode", void 0), I([v({ json: { read: !0, write: !0 } })], J.prototype, "blendMode", void 0), I([v()], J.prototype, "sourceJSON", void 0), I([v({ readOnly: !0, json: { origins: { service: { read: { source: "currentVersion" } } } } })], J.prototype, "version", void 0), I([v({ readOnly: !0, json: { read: !1 } })], J.prototype, "type", void 0), I([v({ type: ["ArcGISTiledImageServiceLayer"] })], J.prototype, "operationalLayerType", void 0), I([v({ type: Boolean, value: !0, json: { read: { source: "disablePopup", reader: (i, e) => !e.disablePopup }, write: { target: "disablePopup", overridePolicy() {
|
|
2148
|
+
return { enabled: !this.loaded || this.raster.tileType === "Raster" };
|
|
2149
|
+
}, writer(i, e, n) {
|
|
2150
|
+
e[n] = !i;
|
|
2151
|
+
} } } })], J.prototype, "popupEnabled", void 0), I([v({ type: jt, json: { read: { source: "popupInfo" }, write: { target: "popupInfo", overridePolicy() {
|
|
2152
|
+
return { enabled: !this.loaded || this.raster.tileType === "Raster" };
|
|
2153
|
+
} } } })], J.prototype, "popupTemplate", void 0), I([v({ readOnly: !0 })], J.prototype, "defaultPopupTemplate", null), I([v({ readOnly: !0, type: [he] })], J.prototype, "fields", void 0), I([v({ readOnly: !0, type: [he] })], J.prototype, "rasterFields", null), I([v({ constructOnly: !0 })], J.prototype, "source", void 0), J = I([K("esri.layers.ImageryTileLayer")], J);
|
|
2154
|
+
const In = J;
|
|
2155
|
+
export {
|
|
2156
|
+
In as default
|
|
2157
|
+
};
|