@agrotools1/at-components 0.3.2 → 0.3.3
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-0a4e0426.js +109 -0
- package/dist/APIKeyMixin-83e85532.js +19 -0
- package/dist/Analysis-c4011253.js +31 -0
- package/dist/ArcGISCachedService-1c6af1c1.js +47 -0
- package/dist/ArcGISService-1d880889.js +25 -0
- package/dist/AreaMeasurement2D-86006a71.js +405 -0
- package/dist/AreaMeasurement3D-1825243c.js +488 -0
- package/dist/AttachmentInfo-fa04c641.js +34 -0
- package/dist/AttachmentQuery-1450c2f7.js +18 -0
- package/dist/AttributeStore-02f947ea.js +1707 -0
- package/dist/BaseDynamicLayerView2D-eb11c757.js +63 -0
- package/dist/BingMapsLayer-7ad7d511.js +112 -0
- package/dist/Bitmap-14a020d8.js +128 -0
- package/dist/BitmapContainer-cc71fd24.js +23 -0
- package/dist/BlendLayer-e2f97659.js +13 -0
- package/dist/BoundsStore-8612892f.js +63 -0
- package/dist/BufferObject-bd932c2c.js +100 -0
- package/dist/BufferView-97ed14c7.js +683 -0
- package/dist/BuildingSceneLayer-3f5380c8.js +535 -0
- package/dist/Button-15031955.js +36 -0
- package/dist/CSVLayer-a76db6f4.js +208 -0
- package/dist/CSVSourceWorker-afe160ed.js +367 -0
- package/dist/CatalogDynamicGroupLayerView2D-be946494.js +66 -0
- package/dist/CatalogFootprintLayerView2D-14763204.js +76 -0
- package/dist/CatalogLayer-7d6228dd.js +262 -0
- package/dist/CatalogLayerView2D-13e32a42.js +52 -0
- package/dist/ClassBreaksDefinition-7040a7fc.js +18 -0
- package/dist/ColorMaterial.glsl-e56765f1.js +64 -0
- package/dist/ColorSet-4ff0a7b7.js +45 -0
- package/dist/ColorStop-1e154045.js +29 -0
- package/dist/Container-6e3b610b.js +521 -0
- package/dist/CustomParametersMixin-c01280c0.js +12 -0
- package/dist/DefaultMaterial.glsl-e7e23b90.js +42 -0
- package/dist/DefaultMaterial_COLOR_GAMMA-7fd21704.js +653 -0
- package/dist/DefaultTheme-3c5b433f.js +130 -0
- package/dist/DeleteForwardEditsParameters-7073c5e5.js +18 -0
- package/dist/DimensionLayer-f921dd3d.js +129 -0
- package/dist/DirectLineMeasurement3D-61d14af2.js +449 -0
- package/dist/DistanceMeasurement2D-b023b35c.js +303 -0
- package/dist/DoubleArray-1186b8b8.js +25 -0
- package/dist/Dropdown/Checklist/Dropdown.Checklist.d.ts +59 -10
- package/dist/Dropdown/Checklist/draggable.d.ts +5 -4
- package/dist/Dropdown/Dropdown.core.d.ts +0 -13
- package/dist/Dropdown/Dropdown.types.d.ts +16 -0
- package/dist/Dropdown/Filter/Filter.types.d.ts +17 -0
- package/dist/Dropdown/Filter/test.mocks.d.ts +2 -2
- package/dist/Dropdown/List/Dropdown.List.d.ts +6 -21
- package/dist/Dropdown/List/List.types.d.ts +11 -0
- package/dist/Dropdown/List/test.mocks.d.ts +1 -1
- package/dist/EdgeProcessingWorker-cb6277ad.js +63 -0
- package/dist/EditBusLayer-9d740f8f.js +107 -0
- package/dist/ElevationInfo-581ff99d.js +56 -0
- package/dist/ElevationLayer-42b57d9b.js +129 -0
- package/dist/ElevationQuery-f6d0cf9f.js +598 -0
- package/dist/ElevationSamplerWorker-50d805bb.js +62 -0
- package/dist/ExportImageParameters-5b047f92.js +66 -0
- package/dist/ExportStrategy-b6c54d77.js +93 -0
- package/dist/ExportWMSImageParameters-ff5a3ac8.js +33 -0
- package/dist/External-695a389a.js +110 -0
- package/dist/FeatureCollectionSnappingSource-fdaed9e0.js +130 -0
- package/dist/FeatureCommandQueue-c2bd1a39.js +1244 -0
- package/dist/FeatureEffect-9ea1b3da.js +39 -0
- package/dist/FeatureEffectLayer-0fa169c4.js +13 -0
- package/dist/FeatureFilter-638c4cae.js +27 -0
- package/dist/FeatureLayer-2a419d3e.js +693 -0
- package/dist/FeatureLayerBase-7331e738.js +148 -0
- package/dist/FeatureLayerSource-733186fb.js +444 -0
- package/dist/FeatureLayerView2D-bc4994b6.js +1967 -0
- package/dist/FeaturePipelineWorker-5f68488c.js +3633 -0
- package/dist/FeatureReductionLayer-0c152478.js +225 -0
- package/dist/FeatureReductionSelection-f952512d.js +22 -0
- package/dist/FeatureServiceSnappingSource-4c02d5a3.js +481 -0
- package/dist/FeatureServiceSnappingSourceWorker-c2a1dc50.js +747 -0
- package/dist/FeatureSet-2c6b8e00.js +188 -0
- package/dist/FeatureStore-a26846c0.js +131 -0
- package/dist/FeatureTemplate-1b6b7e2d.js +12 -0
- package/dist/FeatureType-9e1f1a7d.js +25 -0
- package/dist/FieldsIndex-91711836.js +109 -0
- package/dist/FormTemplate-ae0cfb6e.js +350 -0
- package/dist/GeoJSONLayer-b2070c34.js +236 -0
- package/dist/GeoJSONSourceWorker-aecb5f9b.js +247 -0
- package/dist/GeoRSSLayer-3743b41f.js +73 -0
- package/dist/GeoRSSLayerView2D-098c24bc.js +140 -0
- package/dist/GeometryUtils-036c7f22.js +403 -0
- package/dist/GraphicContainer-ece3945e.js +26 -0
- package/dist/GraphicManipulator-bc92899f.js +1499 -0
- package/dist/GraphicsLayer-764f0324.js +38 -0
- package/dist/GraphicsLayerView2D-36908d0c.js +114 -0
- package/dist/GraphicsSnappingSource-2bb681c0.js +273 -0
- package/dist/GraphicsView2D-e9cf5cd6.js +620 -0
- package/dist/GroupLayer-5ea5b71b.js +147 -0
- package/dist/GroupLayerView2D-22ec9eaa.js +98 -0
- package/dist/HUDMaterial.glsl-80ab7d22.js +65 -0
- package/dist/HighlightCounter-36842e52.js +41 -0
- package/dist/HighlightGraphicContainer-10cb9671.js +18 -0
- package/dist/I3SBinaryReader-9dbdc661.js +310 -0
- package/dist/I3SLayerDefinitions-b56e2c87.js +55 -0
- package/dist/I3SUtil-5461dc89.js +59 -0
- package/dist/IdentityManager-bb063156.js +899 -0
- package/dist/ImageHistogramParameters-1f8e5179.js +905 -0
- package/dist/ImageryLayer-a807d3b3.js +1799 -0
- package/dist/ImageryLayerView2D-358a3267.js +352 -0
- package/dist/ImageryTileLayer-0f67f262.js +2157 -0
- package/dist/ImageryTileLayerView2D-2bc2bb67.js +1110 -0
- package/dist/Indices-0c5304f2.js +67 -0
- package/dist/IntegratedMesh3DTilesLayer-be69dca8.js +112 -0
- package/dist/IntegratedMeshLayer-3c070523.js +141 -0
- package/dist/InteractiveAnalysisViewModel-3005a4a6.js +7397 -0
- package/dist/InterleavedLayout-d37b99a2.js +163 -0
- package/dist/KMLLayer-2011c3c6.js +162 -0
- package/dist/KMLLayerView2D-5d17145f.js +253 -0
- package/dist/KnowledgeGraphLayerView2D-7172b91b.js +43 -0
- package/dist/LRUCache-39211cf9.js +32 -0
- package/dist/LabelClass-d1080628.js +135 -0
- package/dist/LabelMetric-ab56c6b3.js +400 -0
- package/dist/LaserlinePath.glsl-df8f92cc.js +64 -0
- package/dist/Laserlines.glsl-f7d93e3f.js +65 -0
- package/dist/LayerFloorInfo-3edeb9a2.js +15 -0
- package/dist/LayerView-1c58c8c6.js +206 -0
- package/dist/LercWorker-c7a2aca1.js +157 -0
- package/dist/LineOfSightLayer-3028e21f.js +147 -0
- package/dist/LinkChartLayer-988ae660.js +1027 -0
- package/dist/Lyr3DWorker-4c8c758f.js +82 -0
- package/dist/MagnifierPrograms-123961a3.js +806 -0
- package/dist/MapImageLayer-9241ad63.js +169 -0
- package/dist/MapImageLayerView2D-726e5c66.js +146 -0
- package/dist/MapNotesLayer-2d2db99b.js +283 -0
- package/dist/MapNotesLayerView2D-41f5790c.js +161 -0
- package/dist/MapServiceLayerViewHelper-8f5228ec.js +288 -0
- package/dist/MeasurementWidgetContent-504fd868.js +2642 -0
- package/dist/MediaLayer-e71ce661.js +523 -0
- package/dist/MediaLayerView2D-33c67404.js +332 -0
- package/dist/MemCache-413327b3.js +227 -0
- package/dist/MemorySourceWorker-b0e70dd0.js +222 -0
- package/dist/Mesh-98c4e050.js +980 -0
- package/dist/MeshLocalVertexSpace-7a7e4d4e.js +19 -0
- package/dist/MultiOriginJSONSupport-2fca3cc5.js +158 -0
- package/dist/OGCFeatureLayer-451fbd45.js +211 -0
- package/dist/OGCFeatureLayerView2D-d23b08d2.js +82 -0
- package/dist/ObjectStack-742b2ff3.js +21 -0
- package/dist/Octree-a3c8e90e.js +495 -0
- package/dist/OpenStreetMapLayer-9bb91f97.js +30 -0
- package/dist/OperationalLayer-fbfada66.js +44 -0
- package/dist/OrderByInfo-335eb561.js +16 -0
- package/dist/OrderedLayer-29b4ac64.js +26 -0
- package/dist/OrientedImageryLayer-aa2498e2.js +216 -0
- package/dist/OverlayCompositing.glsl-4b1e83c2.js +65 -0
- package/dist/OverrideHelper-74cc3959.js +242 -0
- package/dist/PBFDecoderWorker-fd40e0f9.js +213 -0
- package/dist/PointCloudLayer-64cdbbb2.js +197 -0
- package/dist/PointCloudUniqueValueRenderer-db9b3a98.js +115 -0
- package/dist/PointCloudWorker-a5eb5224.js +212 -0
- package/dist/PooledRBush-be6fe17a.js +272 -0
- package/dist/Popup-db250fe6.js +3990 -0
- package/dist/PortalLayer-a6ce110e.js +126 -0
- package/dist/Program-ecabc523.js +694 -0
- package/dist/ProgramTemplate-e5ce3b0f.js +35 -0
- package/dist/QueryEngine-87b2546b.js +896 -0
- package/dist/QueryTask-36400ec7.js +119 -0
- package/dist/RasterSymbolizer-cfd47847.js +3024 -0
- package/dist/RasterVFDisplayObject-d4c967ea.js +581 -0
- package/dist/RasterWorker-068ae23a.js +78 -0
- package/dist/RawBlockCache-9e8d4c35.js +185 -0
- package/dist/RealisticTree.glsl-adab8e44.js +42 -0
- package/dist/RefreshableLayer-eec34ca2.js +80 -0
- package/dist/RefreshableLayerView-ee06f08c.js +16 -0
- package/dist/Relationship-a7eb5489.js +64 -0
- package/dist/RelationshipQuery-4551bb04.js +22 -0
- package/dist/RenderingContext-9e8fac0d.js +889 -0
- package/dist/RibbonLine.glsl-5990bf5f.js +65 -0
- package/dist/RouteLayer-858bc482.js +786 -0
- package/dist/RouteLayerView2D-a70d519f.js +195 -0
- package/dist/SDFHelper-efca0a53.js +140 -0
- package/dist/SSAO.glsl-7670c1fc.js +43 -0
- package/dist/SSAOBlur.glsl-3523d6af.js +42 -0
- package/dist/ScaleRangeLayer-7f440b85.js +21 -0
- package/dist/SceneLayer-999bd23f.js +542 -0
- package/dist/SceneLayerSnappingSource-9420aaed.js +218 -0
- package/dist/SceneLayerSnappingSourceWorker-be67e552.js +112 -0
- package/dist/SceneLayerWorker-201939c2.js +164 -0
- package/dist/SceneService-318eff2f.js +215 -0
- package/dist/Scheduler-279ea0c3.js +373 -0
- package/dist/Search/Search.d.ts +1 -1
- package/dist/Search/test.mocks.d.ts +1 -1
- package/dist/Search/utils.d.ts +1 -1
- package/dist/Select/Select.core.d.ts +1 -1
- package/dist/Select/Single/Select.single.d.ts +1 -0
- package/dist/Select/index.d.ts +1 -0
- package/dist/ShadedColorMaterial.glsl-bd2979d8.js +64 -0
- package/dist/SnappingOperation-5100da71.js +48 -0
- package/dist/SourceLayerData-50c2b980.js +116 -0
- package/dist/SpatialFilter-b6c6b2fc.js +1701 -0
- package/dist/Stop-196981da.js +281 -0
- package/dist/StreamLayer-37b818b8.js +188 -0
- package/dist/StreamLayerView2D-7f0f45bc.js +164 -0
- package/dist/StyleRepository-4e8fa398.js +2212 -0
- package/dist/SublayersOwner-90d10612.js +545 -0
- package/dist/SubtypeGroupLayer-959cabf8.js +514 -0
- package/dist/SubtypeGroupLayerView2D-95e63b42.js +84 -0
- package/dist/TableConfig/TableConfig.d.ts +14 -6
- package/dist/TableConfig/test/mocks.d.ts +1 -1
- package/dist/TechniqueInstance-bd190c26.js +233 -0
- package/dist/TemporalLayer-aacda167.js +23 -0
- package/dist/Texture-3618be49.js +501 -0
- package/dist/TextureOnly.glsl-fcca7034.js +65 -0
- package/dist/Theme-85608a9a.js +3426 -0
- package/dist/Tick-79e96104.js +723 -0
- package/dist/TileContainer-f1e7edd8.js +31 -0
- package/dist/TileInfoTilemapCache-2f882821.js +38 -0
- package/dist/TileLayer-db13a237.js +194 -0
- package/dist/TileLayerView2D-15af6be4.js +187 -0
- package/dist/TilemapCache-fc4b2c6c.js +189 -0
- package/dist/TimeInfo-39a9d4e1.js +42 -0
- package/dist/TimeOnly-b759457a.js +706 -0
- package/dist/Toggle/Toggle.d.ts +9 -0
- package/dist/Tooltip-0ba72b27.js +138 -0
- package/dist/TopFeaturesQuery-a11ecc39.js +32 -0
- package/dist/TurboLine-5e62d290.js +565 -0
- package/dist/UniqueValueRenderer-bf2f3234.js +1039 -0
- package/dist/UnknownLayer-2cf71578.js +30 -0
- package/dist/UnknownTimeZone-aabdcf56.js +15 -0
- package/dist/UnsupportedLayer-36650e4a.js +31 -0
- package/dist/UpdateTracking2D-b6d16b0c.js +8566 -0
- package/dist/Util-8f54c96b.js +57 -0
- package/dist/VectorTileLayer-ddcca4ec.js +544 -0
- package/dist/VectorTileLayerView2D-8176946a.js +2108 -0
- package/dist/Version-9eb299cd.js +33 -0
- package/dist/VertexArrayObject-d1a4262b.js +73 -0
- package/dist/VertexColor.glsl-fd9f70e0.js +2683 -0
- package/dist/VertexSnappingCandidate-70513010.js +13 -0
- package/dist/VideoLayerView2D-e08e1d57.js +124 -0
- package/dist/VoxelLayer-959702aa.js +631 -0
- package/dist/WFSLayer-4a41b206.js +221 -0
- package/dist/WFSSourceWorker-53d88982.js +157 -0
- package/dist/WGLContainer-e9e8616e.js +5426 -0
- package/dist/WMSLayer-8e44f55c.js +536 -0
- package/dist/WMSLayerView2D-415a1793.js +117 -0
- package/dist/WMTSLayer-804f4bed.js +531 -0
- package/dist/WMTSLayerView2D-96186a90.js +142 -0
- package/dist/WebTileLayer-7391ea01.js +110 -0
- package/dist/WhereClause-1816217e.js +2766 -0
- package/dist/WorkerHandle-25f67c67.js +47 -0
- package/dist/WorkerTileHandler-a7e508bc.js +1539 -0
- package/dist/action-3ce81e45.js +198 -0
- package/dist/action-group-f2d26c2b.js +145 -0
- package/dist/action-menu-015d91ab.js +1759 -0
- package/dist/apng-e5532475.js +392 -0
- package/dist/arcade-dbe2ca4a.js +229 -0
- package/dist/arcadeAsyncRuntime-78b83b41.js +943 -0
- package/dist/arcadeUtils-cb1066a6.js +8741 -0
- package/dist/arcgis-knowledge-client-core-7379d99e.js +1218 -0
- package/dist/arcgis-knowledge-client-core-simd-ea8b4d20.js +1218 -0
- package/dist/arcgisLayers-cd3494fd.js +152 -0
- package/dist/associatedFeatureServiceUtils-da8d377d.js +92 -0
- package/dist/axisAngleDegrees-19922758.js +49 -0
- package/dist/basis_transcoder-bf0490cc.js +1248 -0
- package/dist/calcite-action-0db4f61c.js +22 -0
- package/dist/calcite-action-bar-1b4c89cb.js +303 -0
- package/dist/calcite-action-group-3c8a934c.js +28 -0
- package/dist/calcite-button-1079a10c.js +228 -0
- package/dist/calcite-flow-c1e71a12.js +128 -0
- package/dist/calcite-flow-item-1097b48f.js +499 -0
- package/dist/calcite-icon-c88b4a67.js +16 -0
- package/dist/calcite-input-8c33ee84.js +24 -0
- package/dist/calcite-label-7fbfbe36.js +79 -0
- package/dist/calcite-list-93af4ae2.js +2135 -0
- package/dist/calcite-list-item-f0a6cda3.js +576 -0
- package/dist/calcite-list-item-group-107a313e.js +71 -0
- package/dist/calcite-loader-5194bf83.js +14 -0
- package/dist/calcite-modal-486280cc.js +333 -0
- package/dist/calcite-notice-a81274a8.js +181 -0
- package/dist/calcite-option-0020a955.js +94 -0
- package/dist/calcite-scrim-27d65e7f.js +18 -0
- package/dist/calcite-select-05f25c2a.js +231 -0
- package/dist/capabilities-238bde7d.js +50 -0
- package/dist/chartCommon-7eda170a.js +256 -0
- package/dist/chartUtilsAm5-fd8aeac2.js +2954 -0
- package/dist/clientSideDefaults-b91506af.js +39 -0
- package/dist/colorRamps-6027ea73.js +38 -0
- package/dist/colorUtils-3dd4b884.js +164 -0
- package/dist/commonProperties-bf4d305f.js +60 -0
- package/dist/computeTranslationToOriginAndRotation-ca5a9439.js +60 -0
- package/dist/conditionalSlot-80a4c6ff.js +27 -0
- package/dist/createConnection-70dd787a.js +299 -0
- package/dist/dataUtils-b632d3a2.js +1421 -0
- package/dist/deduplicate-e13aa9e2.js +89 -0
- package/dist/defaults-40a1a995.js +31 -0
- package/dist/deleteForwardEdits-b0182a08.js +13 -0
- package/dist/diffUtils-5f43e52a.js +90 -0
- package/dist/drapedUtils-416e5304.js +75 -0
- package/dist/earcut-235aa57d.js +292 -0
- package/dist/edgeProcessing-43d45a32.js +252 -0
- package/dist/editingSupport-7706f838.js +203 -0
- package/dist/editsZScale-49d8a8cd.js +37 -0
- package/dist/elevationInfoUtils-3fbfcf1f.js +126 -0
- package/dist/executeForIds-419ba6a3.js +14 -0
- package/dist/executeForTopCount-8a8ba5c7.js +17 -0
- package/dist/executeForTopExtents-9f24d5d0.js +17 -0
- package/dist/executeForTopIds-0bfdb55f.js +17 -0
- package/dist/executeQueryJSON-2a2e9e1b.js +15 -0
- package/dist/executeQueryPBF-f10de9ec.js +152 -0
- package/dist/executeRelationshipQuery-0680cb30.js +53 -0
- package/dist/executeTopFeaturesQuery-c553d696.js +18 -0
- package/dist/featureConversionUtils-83783887.js +479 -0
- package/dist/featureLayerUtils-545d260a.js +250 -0
- package/dist/featureLayerUtils-b18e6016.js +142 -0
- package/dist/featureSetUtils-0c7ba073.js +2530 -0
- package/dist/featuresetbase-aadfabb3.js +707 -0
- package/dist/featuresetgeom-a405018e.js +99 -0
- package/dist/featuresetstats-f6602402.js +81 -0
- package/dist/featuresetstring-834ea865.js +95 -0
- package/dist/fetchService-dac740ef.js +33 -0
- package/dist/fieldProperties-b024e721.js +33 -0
- package/dist/floatRGBA-46ee3e38.js +20 -0
- package/dist/form-0b2f0ac9.js +138 -0
- package/dist/geohashUtils-418d1ca6.js +85 -0
- package/dist/geojson-96d3353d.js +208 -0
- package/dist/geomasync-ff5b3734.js +567 -0
- package/dist/geometryEngine-8fcb3d59.js +192 -0
- package/dist/geometryEngineAsync-212f4b0f.js +217 -0
- package/dist/geometryEngineBase-4c2ff8b9.js +18463 -0
- package/dist/geometryEngineJSON-131b461e.js +171 -0
- package/dist/geometryEngineJSON-b43cf67f.js +46 -0
- package/dist/geometryEngineWorker-707ca480.js +11 -0
- package/dist/geometryServiceUtils-af23d0b5.js +28 -0
- package/dist/georeference-02bc532d.js +291 -0
- package/dist/gif-b072aa1c.js +323 -0
- package/dist/gltfexport-3362ea71.js +705 -0
- package/dist/groupLayerUtils-81545911.js +39 -0
- package/dist/heatmapUtils-b25824e4.js +45 -0
- package/dist/highlightReasons-5b8b2665.js +19 -0
- package/dist/hydrated-b0c62926.js +40 -0
- package/dist/i3s-32edc725.js +809 -0
- package/dist/icon-453c7f62.js +127 -0
- package/dist/imageBitmapUtils-51497e26.js +23 -0
- package/dist/imageUtils-1d1da6e6.js +89 -0
- package/dist/imageUtils-8c40eba6.js +69 -0
- package/dist/imageryUtils-0c00fbf3.js +43 -0
- package/dist/index-3b4c2147.js +45568 -0
- package/dist/index.js +1 -1
- package/dist/input-message-32600f49.js +92 -0
- package/dist/input2-1c0831ed.js +575 -0
- package/dist/interactive-5824e097.js +80 -0
- package/dist/jsonContext-ec21ce85.js +15 -0
- package/dist/jsonUtils-012feb40.js +476 -0
- package/dist/jsonUtils-3979baa3.js +59 -0
- package/dist/jsonUtils-3eb7c689.js +86 -0
- package/dist/kmlUtils-4c198ea5.js +112 -0
- package/dist/knowledgeGraphService-a159d815.js +739 -0
- package/dist/knowledgegraph-eb0d44d4.js +149 -0
- package/dist/labelUtils-01b646c7.js +61 -0
- package/dist/labelingInfo-148dcd26.js +46 -0
- package/dist/layersCreator-4e94f616.js +151 -0
- package/dist/layersLoader-f4e3ab33.js +197 -0
- package/dist/lazyLayerLoader-eb51910e.js +10 -0
- package/dist/lclayout-4d303c41.js +773 -0
- package/dist/lengthUtils-6abaf27a.js +5 -0
- package/dist/lerc-wasm-0ae912df.js +325 -0
- package/dist/libtess-asm-91c97dcd.js +3673 -0
- package/dist/libtess-cba14731.js +269 -0
- package/dist/lineSegment-8f04aab4.js +76 -0
- package/dist/loadGLTFMesh-71542570.js +181 -0
- package/dist/loadable-e7c40a8a.js +24 -0
- package/dist/loader-6272e4b3.js +79 -0
- package/dist/lyr3DWorker-9ee4ee8b.js +2108 -0
- package/dist/mapViewDeps-b17a2e04.js +3052 -0
- package/dist/mediaLayerUtils-f0ccfd82.js +35 -0
- package/dist/meshFeatureSet-304dfa08.js +126 -0
- package/dist/meshVertexSpaceUtils-e7f774fa.js +58 -0
- package/dist/multidimensionalUtils-642f26da.js +290 -0
- package/dist/normalizeUtilsSync-b5f617e6.js +181 -0
- package/dist/number-3af512e3.js +128 -0
- package/dist/objectResourceUtils-d45057aa.js +1455 -0
- package/dist/observers-700e505d.js +30 -0
- package/dist/ogcFeatureUtils-440ed0bf.js +206 -0
- package/dist/openCloseComponent-1501c620.js +37 -0
- package/dist/orientedBoundingBox-80988e7f.js +447 -0
- package/dist/parser-6e351b85.js +488 -0
- package/dist/pbf-a85c52b3.js +215 -0
- package/dist/pbfQueryUtils-5f25f81f.js +422 -0
- package/dist/pe-wasm-e588110b.js +887 -0
- package/dist/persistable-ad01d0ca.js +89 -0
- package/dist/perspectiveUtils-ab58ddbb.js +42 -0
- package/dist/pieChart-d3793e8b.js +555 -0
- package/dist/plane-e103e8ed.js +160 -0
- package/dist/popupUtils-5f7c3e79.js +50 -0
- package/dist/popupUtils-b95ab60a.js +22 -0
- package/dist/portalItemUtils-3d59513a.js +57 -0
- package/dist/portalLayers-16b2f807.js +312 -0
- package/dist/portalUtils-3789afb0.js +7 -0
- package/dist/programUtils-c8d96b39.js +59 -0
- package/dist/project-7eaa59a4.js +21 -0
- package/dist/projectPointToVector-19151d97.js +14 -0
- package/dist/projectVectorToVector-d552535c.js +13 -0
- package/dist/quantityUtils-258bfdb4.js +33 -0
- package/dist/quantizationUtils-752e4d24.js +68 -0
- package/dist/quat-6dc51256.js +104 -0
- package/dist/query-da893693.js +89 -0
- package/dist/queryAttachments-df86b71d.js +39 -0
- package/dist/queryEngineUtils-ffc50ce5.js +21 -0
- package/dist/queryTopFeatures-5a58a12d.js +50 -0
- package/dist/queryZScale-39ffaf30.js +12 -0
- package/dist/rasterProjectionHelper-d13bc46d.js +577 -0
- package/dist/rasterUtils-22b15453.js +122 -0
- package/dist/rasterizingUtils-3388ddbf.js +46 -0
- package/dist/request-82a2415a.js +46 -0
- package/dist/requestImageUtils-2fca27f8.js +8 -0
- package/dist/resourceExtension-672d03cc.js +17 -0
- package/dist/resourceUtils-95b9964a.js +42 -0
- package/dist/resourceUtils-b1e50d5e.js +69 -0
- package/dist/resourceUtils-e8831103.js +62 -0
- package/dist/saveAPIKeyUtils-ee9b0447.js +8 -0
- package/dist/saveUtils-1323ad64.js +24 -0
- package/dist/scaleUtils-1a70f716.js +23 -0
- package/dist/scrim-c0a641cd.js +114 -0
- package/dist/serviceCapabilitiesUtils-33d4e1c0.js +64 -0
- package/dist/sourceUtils-e8c5db4e.js +71 -0
- package/dist/sphere-75cef429.js +199 -0
- package/dist/statsWorker-1f1bc582.js +37 -0
- package/dist/streamLayerUtils-c85a0eed.js +31 -0
- package/dist/style.css +1 -1
- package/dist/styleUtils-05bc85a5.js +75 -0
- package/dist/styleUtils-7bd8d0a7.js +14 -0
- package/dist/sublayerUtils-feb77591.js +37 -0
- package/dist/substitute-c31da60c.js +52 -0
- package/dist/symbolColorUtils-3c385668.js +8 -0
- package/dist/symbolLayerUtils-2d2753b7.js +31 -0
- package/dist/symbologySnappingCandidates-00eeca39.js +221 -0
- package/dist/t9n-55800455.js +349 -0
- package/dist/testSVGPremultipliedAlpha-ec1f73c4.js +94 -0
- package/dist/timeSupport-a7623294.js +410 -0
- package/dist/triangle-c799f11b.js +98 -0
- package/dist/unitConversionUtils-05050e6d.js +17 -0
- package/dist/unitFormatUtils-2a84c371.js +40 -0
- package/dist/uploadAssetErrors-601b044e.js +70 -0
- package/dist/uploadAssets-5a835c8a.js +330 -0
- package/dist/utils-2dc379da.js +79 -0
- package/dist/utils-34b1ea70.js +2746 -0
- package/dist/utils-45c14202.js +232 -0
- package/dist/utils-484969fb.js +91 -0
- package/dist/utils-5aaff624.js +433 -0
- package/dist/utils-a94dc35d.js +419 -0
- package/dist/utils-e68cfebf.js +34 -0
- package/dist/utils-fc14cc83.js +73 -0
- package/dist/utils3-5745e839.js +75 -0
- package/dist/vec3-12b9e1d8.js +81 -0
- package/dist/vec42-a1569d60.js +125 -0
- package/dist/versionUtils-c4f3617a.js +161 -0
- package/dist/visualVariableUtils-bcb95edc.js +267 -0
- package/dist/webStyleSymbolUtils-9db5b81c.js +48 -0
- package/dist/webglDeps-05e0410a.js +23 -0
- package/dist/wfsUtils-7caaa2cc.js +343 -0
- package/dist/workerHelper-86e37deb.js +11 -0
- package/dist/xyChart-0673158d.js +3335 -0
- package/package.json +1 -1
- package/dist/AGraphicContainer-232b465f.js +0 -109
- package/dist/APIKeyMixin-6c797b4c.js +0 -19
- package/dist/Analysis-fb0fc04a.js +0 -31
- package/dist/ArcGISCachedService-e0930844.js +0 -47
- package/dist/ArcGISService-81baed4d.js +0 -25
- package/dist/AreaMeasurement2D-1dbe17c7.js +0 -405
- package/dist/AreaMeasurement3D-3b80654b.js +0 -488
- package/dist/AttachmentInfo-e02ca554.js +0 -34
- package/dist/AttachmentQuery-1667a134.js +0 -18
- package/dist/AttributeStore-2f8bce1a.js +0 -1707
- package/dist/BaseDynamicLayerView2D-6ed632c7.js +0 -63
- package/dist/BingMapsLayer-1b540400.js +0 -112
- package/dist/Bitmap-625c3ae1.js +0 -128
- package/dist/BitmapContainer-ac2e261c.js +0 -23
- package/dist/BlendLayer-38d68343.js +0 -13
- package/dist/BoundsStore-f1942e67.js +0 -63
- package/dist/BufferObject-faafd842.js +0 -100
- package/dist/BufferView-c2f86567.js +0 -683
- package/dist/BuildingSceneLayer-95da2010.js +0 -535
- package/dist/Button-312c8286.js +0 -36
- package/dist/CSVLayer-68bdf977.js +0 -208
- package/dist/CSVSourceWorker-df47e4b9.js +0 -367
- package/dist/CatalogDynamicGroupLayerView2D-5ff99579.js +0 -66
- package/dist/CatalogFootprintLayerView2D-9f09a894.js +0 -76
- package/dist/CatalogLayer-6b5e756d.js +0 -262
- package/dist/CatalogLayerView2D-4f9ea89a.js +0 -52
- package/dist/ClassBreaksDefinition-d32b0ea5.js +0 -18
- package/dist/ColorMaterial.glsl-5fa4dda6.js +0 -64
- package/dist/ColorSet-59641c11.js +0 -45
- package/dist/ColorStop-d5b563ab.js +0 -29
- package/dist/Container-879e59ef.js +0 -521
- package/dist/CustomParametersMixin-c281d5e7.js +0 -12
- package/dist/DefaultMaterial.glsl-6cc65bf3.js +0 -42
- package/dist/DefaultMaterial_COLOR_GAMMA-14d3794c.js +0 -653
- package/dist/DefaultTheme-6f3c03ba.js +0 -130
- package/dist/DeleteForwardEditsParameters-127d0833.js +0 -18
- package/dist/DimensionLayer-031be560.js +0 -129
- package/dist/DirectLineMeasurement3D-342dea70.js +0 -449
- package/dist/DistanceMeasurement2D-a628b12a.js +0 -303
- package/dist/DoubleArray-61325dbc.js +0 -25
- package/dist/EdgeProcessingWorker-9baa9f38.js +0 -63
- package/dist/EditBusLayer-b7db2f6c.js +0 -107
- package/dist/ElevationInfo-016cc1c4.js +0 -56
- package/dist/ElevationLayer-ae7cbbb9.js +0 -129
- package/dist/ElevationQuery-96db182d.js +0 -598
- package/dist/ElevationSamplerWorker-ab27b576.js +0 -62
- package/dist/ExportImageParameters-d1792a7e.js +0 -66
- package/dist/ExportStrategy-a42be397.js +0 -93
- package/dist/ExportWMSImageParameters-853db12a.js +0 -33
- package/dist/External-a5c4899d.js +0 -110
- package/dist/FeatureCollectionSnappingSource-40da43c0.js +0 -130
- package/dist/FeatureCommandQueue-68735fa7.js +0 -1244
- package/dist/FeatureEffect-20b68d20.js +0 -39
- package/dist/FeatureEffectLayer-65d674f5.js +0 -13
- package/dist/FeatureFilter-0babb1a1.js +0 -27
- package/dist/FeatureLayer-bb266fef.js +0 -693
- package/dist/FeatureLayerBase-583207e8.js +0 -148
- package/dist/FeatureLayerSource-daea2938.js +0 -444
- package/dist/FeatureLayerView2D-a93360fa.js +0 -1967
- package/dist/FeaturePipelineWorker-f8bb9d01.js +0 -3633
- package/dist/FeatureReductionLayer-b540e503.js +0 -225
- package/dist/FeatureReductionSelection-75ac9c66.js +0 -22
- package/dist/FeatureServiceSnappingSource-8d342703.js +0 -481
- package/dist/FeatureServiceSnappingSourceWorker-97c5a3e7.js +0 -747
- package/dist/FeatureSet-769d2f68.js +0 -188
- package/dist/FeatureStore-cfee3322.js +0 -131
- package/dist/FeatureTemplate-1be6448a.js +0 -12
- package/dist/FeatureType-69365546.js +0 -25
- package/dist/FieldsIndex-fd635f39.js +0 -109
- package/dist/FormTemplate-8a69784e.js +0 -350
- package/dist/GeoJSONLayer-288dc230.js +0 -236
- package/dist/GeoJSONSourceWorker-2a406166.js +0 -247
- package/dist/GeoRSSLayer-b6cf0b9a.js +0 -73
- package/dist/GeoRSSLayerView2D-a2d897cc.js +0 -140
- package/dist/GeometryUtils-42ae242b.js +0 -403
- package/dist/GraphicContainer-f39e4cce.js +0 -26
- package/dist/GraphicManipulator-d94e3db2.js +0 -1499
- package/dist/GraphicsLayer-06f54c2b.js +0 -38
- package/dist/GraphicsLayerView2D-6b0c439f.js +0 -114
- package/dist/GraphicsSnappingSource-cdbd5c58.js +0 -273
- package/dist/GraphicsView2D-5c69cd54.js +0 -620
- package/dist/GroupLayer-d90d1469.js +0 -147
- package/dist/GroupLayerView2D-47ee20d3.js +0 -98
- package/dist/HUDMaterial.glsl-1f7c8dc7.js +0 -65
- package/dist/HighlightCounter-82aefa16.js +0 -41
- package/dist/HighlightGraphicContainer-5887470a.js +0 -18
- package/dist/I3SBinaryReader-bc4c80ba.js +0 -310
- package/dist/I3SLayerDefinitions-dcda247e.js +0 -55
- package/dist/I3SUtil-f0366135.js +0 -59
- package/dist/IdentityManager-488a6f1a.js +0 -899
- package/dist/ImageHistogramParameters-4dc64f39.js +0 -905
- package/dist/ImageryLayer-b486249a.js +0 -1799
- package/dist/ImageryLayerView2D-f1c342ad.js +0 -352
- package/dist/ImageryTileLayer-12ada40b.js +0 -2157
- package/dist/ImageryTileLayerView2D-f35352b1.js +0 -1110
- package/dist/Indices-d59209a8.js +0 -67
- package/dist/IntegratedMesh3DTilesLayer-be58f806.js +0 -112
- package/dist/IntegratedMeshLayer-7b709481.js +0 -141
- package/dist/InteractiveAnalysisViewModel-cc8c864a.js +0 -7397
- package/dist/InterleavedLayout-31a7340e.js +0 -163
- package/dist/KMLLayer-599771d7.js +0 -162
- package/dist/KMLLayerView2D-017f9a86.js +0 -253
- package/dist/KnowledgeGraphLayerView2D-2578f250.js +0 -43
- package/dist/LRUCache-d9e4b57a.js +0 -32
- package/dist/LabelClass-909af0e5.js +0 -135
- package/dist/LabelMetric-a3f892e4.js +0 -400
- package/dist/LaserlinePath.glsl-763a0501.js +0 -64
- package/dist/Laserlines.glsl-75db5218.js +0 -65
- package/dist/LayerFloorInfo-8abaffaa.js +0 -15
- package/dist/LayerView-2a8c8edc.js +0 -206
- package/dist/LercWorker-06fcacbd.js +0 -157
- package/dist/LineOfSightLayer-019d46c8.js +0 -147
- package/dist/LinkChartLayer-332a03e2.js +0 -1027
- package/dist/Lyr3DWorker-5d6064e5.js +0 -82
- package/dist/MagnifierPrograms-4170fe79.js +0 -806
- package/dist/MapImageLayer-d86788de.js +0 -169
- package/dist/MapImageLayerView2D-0b2dddf2.js +0 -146
- package/dist/MapNotesLayer-07a5011d.js +0 -283
- package/dist/MapNotesLayerView2D-37f2c3b3.js +0 -161
- package/dist/MapServiceLayerViewHelper-f4014bfb.js +0 -288
- package/dist/MeasurementWidgetContent-31e1b266.js +0 -2642
- package/dist/MediaLayer-cd8e19fe.js +0 -523
- package/dist/MediaLayerView2D-bd3bc699.js +0 -332
- package/dist/MemCache-6249a3f0.js +0 -227
- package/dist/MemorySourceWorker-074a99da.js +0 -222
- package/dist/Mesh-17dfbf3e.js +0 -980
- package/dist/MeshLocalVertexSpace-a0c9365a.js +0 -19
- package/dist/MultiOriginJSONSupport-677c0e5f.js +0 -158
- package/dist/OGCFeatureLayer-1db569c4.js +0 -211
- package/dist/OGCFeatureLayerView2D-3dacad79.js +0 -82
- package/dist/ObjectStack-5e8cdae7.js +0 -21
- package/dist/Octree-0cab1591.js +0 -495
- package/dist/OpenStreetMapLayer-4b9e6867.js +0 -30
- package/dist/OperationalLayer-96cb1405.js +0 -44
- package/dist/OrderByInfo-4cb60db9.js +0 -16
- package/dist/OrderedLayer-cbff4a31.js +0 -26
- package/dist/OrientedImageryLayer-301c702b.js +0 -216
- package/dist/OverlayCompositing.glsl-cdda5153.js +0 -65
- package/dist/OverrideHelper-f9ba3c94.js +0 -242
- package/dist/PBFDecoderWorker-eac75de9.js +0 -213
- package/dist/PointCloudLayer-ce8e5fd6.js +0 -197
- package/dist/PointCloudUniqueValueRenderer-ca506fdf.js +0 -115
- package/dist/PointCloudWorker-49b24336.js +0 -212
- package/dist/PooledRBush-af918d48.js +0 -272
- package/dist/Popup-e996c502.js +0 -3990
- package/dist/PortalLayer-60c1c36d.js +0 -126
- package/dist/Program-5b5c8288.js +0 -694
- package/dist/ProgramTemplate-62d54e1b.js +0 -35
- package/dist/QueryEngine-1b2a6d7d.js +0 -896
- package/dist/QueryTask-07de3621.js +0 -119
- package/dist/RasterSymbolizer-c6f76134.js +0 -3024
- package/dist/RasterVFDisplayObject-573f0530.js +0 -581
- package/dist/RasterWorker-f428c6b4.js +0 -78
- package/dist/RawBlockCache-0803fdd7.js +0 -185
- package/dist/RealisticTree.glsl-abb5883e.js +0 -42
- package/dist/RefreshableLayer-0d1a28eb.js +0 -80
- package/dist/RefreshableLayerView-19c8ff47.js +0 -16
- package/dist/Relationship-35bb85fc.js +0 -64
- package/dist/RelationshipQuery-1cb86efa.js +0 -22
- package/dist/RenderingContext-34f41421.js +0 -889
- package/dist/RibbonLine.glsl-88da820b.js +0 -65
- package/dist/RouteLayer-b6a064d9.js +0 -786
- package/dist/RouteLayerView2D-b14b84ae.js +0 -195
- package/dist/SDFHelper-49b28369.js +0 -140
- package/dist/SSAO.glsl-b5eba45c.js +0 -43
- package/dist/SSAOBlur.glsl-7377bef6.js +0 -42
- package/dist/ScaleRangeLayer-d06647e5.js +0 -21
- package/dist/SceneLayer-34617ffa.js +0 -542
- package/dist/SceneLayerSnappingSource-2115fd1b.js +0 -218
- package/dist/SceneLayerSnappingSourceWorker-5051ed2a.js +0 -112
- package/dist/SceneLayerWorker-416bda11.js +0 -164
- package/dist/SceneService-337f7bcd.js +0 -215
- package/dist/Scheduler-b0e8df04.js +0 -373
- package/dist/ShadedColorMaterial.glsl-8dd39e79.js +0 -64
- package/dist/SnappingOperation-726320a3.js +0 -48
- package/dist/SourceLayerData-b2da5f90.js +0 -116
- package/dist/SpatialFilter-0839066d.js +0 -1701
- package/dist/Stop-16e18837.js +0 -281
- package/dist/StreamLayer-a2c5ad69.js +0 -188
- package/dist/StreamLayerView2D-b1cb419c.js +0 -164
- package/dist/StyleRepository-55975dc1.js +0 -2212
- package/dist/SublayersOwner-dfd52113.js +0 -545
- package/dist/SubtypeGroupLayer-19990fdc.js +0 -514
- package/dist/SubtypeGroupLayerView2D-039eecec.js +0 -84
- package/dist/TechniqueInstance-f272ce92.js +0 -233
- package/dist/TemporalLayer-960c7904.js +0 -23
- package/dist/Texture-08e8abdd.js +0 -501
- package/dist/TextureOnly.glsl-adbd8e1e.js +0 -65
- package/dist/Theme-a0c472c9.js +0 -3426
- package/dist/Tick-ad80492f.js +0 -723
- package/dist/TileContainer-6b12d8e1.js +0 -31
- package/dist/TileInfoTilemapCache-b78dac78.js +0 -38
- package/dist/TileLayer-4db1b607.js +0 -194
- package/dist/TileLayerView2D-1f2d0b4c.js +0 -187
- package/dist/TilemapCache-671945d2.js +0 -189
- package/dist/TimeInfo-48493242.js +0 -42
- package/dist/TimeOnly-40ea9bb9.js +0 -706
- package/dist/Tooltip-9ecc3c9d.js +0 -138
- package/dist/TopFeaturesQuery-c0fd4e83.js +0 -32
- package/dist/TurboLine-cb0c9eaa.js +0 -565
- package/dist/UniqueValueRenderer-e4a27dfc.js +0 -1039
- package/dist/UnknownLayer-c3ba50b7.js +0 -30
- package/dist/UnknownTimeZone-832b690f.js +0 -15
- package/dist/UnsupportedLayer-0a89352f.js +0 -31
- package/dist/UpdateTracking2D-881e1d79.js +0 -8566
- package/dist/Util-b8d78341.js +0 -57
- package/dist/VectorTileLayer-43223ebe.js +0 -544
- package/dist/VectorTileLayerView2D-3d5f0721.js +0 -2108
- package/dist/Version-014efc62.js +0 -33
- package/dist/VertexArrayObject-4c6a6897.js +0 -73
- package/dist/VertexColor.glsl-e1468339.js +0 -2683
- package/dist/VertexSnappingCandidate-b3a3d14d.js +0 -13
- package/dist/VideoLayerView2D-f24c6919.js +0 -124
- package/dist/VoxelLayer-5ab46878.js +0 -631
- package/dist/WFSLayer-e8a081ca.js +0 -221
- package/dist/WFSSourceWorker-55c872f8.js +0 -157
- package/dist/WGLContainer-f4c4a8dc.js +0 -5426
- package/dist/WMSLayer-e9d5e4a6.js +0 -536
- package/dist/WMSLayerView2D-56144a1d.js +0 -117
- package/dist/WMTSLayer-c571ae0f.js +0 -531
- package/dist/WMTSLayerView2D-81b561e0.js +0 -142
- package/dist/WebTileLayer-cd295f56.js +0 -110
- package/dist/WhereClause-8bc4aa58.js +0 -2766
- package/dist/WorkerHandle-f8e580f2.js +0 -47
- package/dist/WorkerTileHandler-0f73a7f2.js +0 -1539
- package/dist/action-53058ddb.js +0 -198
- package/dist/action-group-ff2ef7e7.js +0 -145
- package/dist/action-menu-fefff035.js +0 -1759
- package/dist/apng-ac31a3d2.js +0 -392
- package/dist/arcade-ce9e8356.js +0 -229
- package/dist/arcadeAsyncRuntime-068150f3.js +0 -943
- package/dist/arcadeUtils-38c2028a.js +0 -8741
- package/dist/arcgis-knowledge-client-core-418d2890.js +0 -1218
- package/dist/arcgis-knowledge-client-core-simd-bf207cbd.js +0 -1218
- package/dist/arcgisLayers-f9b73e96.js +0 -152
- package/dist/associatedFeatureServiceUtils-f1895302.js +0 -92
- package/dist/axisAngleDegrees-abd6e971.js +0 -49
- package/dist/basis_transcoder-ba9d02db.js +0 -1248
- package/dist/calcite-action-07342a33.js +0 -22
- package/dist/calcite-action-bar-b8b194bf.js +0 -303
- package/dist/calcite-action-group-f93a5b76.js +0 -28
- package/dist/calcite-button-13172f9c.js +0 -228
- package/dist/calcite-flow-959098df.js +0 -128
- package/dist/calcite-flow-item-9141ea0e.js +0 -499
- package/dist/calcite-icon-1f1f741d.js +0 -16
- package/dist/calcite-input-99b0c89d.js +0 -24
- package/dist/calcite-label-5daa57c6.js +0 -79
- package/dist/calcite-list-543efc4b.js +0 -2135
- package/dist/calcite-list-item-a148ac57.js +0 -576
- package/dist/calcite-list-item-group-4da974f3.js +0 -71
- package/dist/calcite-loader-8b29a4cd.js +0 -14
- package/dist/calcite-modal-b64d2a9b.js +0 -333
- package/dist/calcite-notice-1527bc00.js +0 -181
- package/dist/calcite-option-5ea94a2a.js +0 -94
- package/dist/calcite-scrim-35fd270f.js +0 -18
- package/dist/calcite-select-a936a6d4.js +0 -231
- package/dist/capabilities-eb05cd14.js +0 -50
- package/dist/chartCommon-af447b81.js +0 -256
- package/dist/chartUtilsAm5-21243f3e.js +0 -2954
- package/dist/clientSideDefaults-0197b13d.js +0 -39
- package/dist/colorRamps-100595ab.js +0 -38
- package/dist/colorUtils-1a8cc2f8.js +0 -164
- package/dist/commonProperties-7d8f6b56.js +0 -60
- package/dist/computeTranslationToOriginAndRotation-466bc2c5.js +0 -60
- package/dist/conditionalSlot-55a86124.js +0 -27
- package/dist/createConnection-37afc89c.js +0 -299
- package/dist/dataUtils-efd5edf8.js +0 -1421
- package/dist/deduplicate-be0453c1.js +0 -89
- package/dist/defaults-3495cefd.js +0 -31
- package/dist/deleteForwardEdits-8ffa4b4e.js +0 -13
- package/dist/diffUtils-cccaeaa2.js +0 -90
- package/dist/drapedUtils-dfe3325a.js +0 -75
- package/dist/earcut-1a1bdd2c.js +0 -292
- package/dist/edgeProcessing-b0f5f4f0.js +0 -252
- package/dist/editingSupport-93603f8d.js +0 -203
- package/dist/editsZScale-8a2a7226.js +0 -37
- package/dist/elevationInfoUtils-96b1ac38.js +0 -126
- package/dist/executeForIds-48f5ccd3.js +0 -14
- package/dist/executeForTopCount-6ba38c5f.js +0 -17
- package/dist/executeForTopExtents-570aeb4a.js +0 -17
- package/dist/executeForTopIds-066c5e05.js +0 -17
- package/dist/executeQueryJSON-f5d65f6d.js +0 -15
- package/dist/executeQueryPBF-4ff20838.js +0 -152
- package/dist/executeRelationshipQuery-60c2686f.js +0 -53
- package/dist/executeTopFeaturesQuery-029eb564.js +0 -18
- package/dist/featureConversionUtils-8635d4bd.js +0 -479
- package/dist/featureLayerUtils-883379f8.js +0 -250
- package/dist/featureLayerUtils-89be3008.js +0 -142
- package/dist/featureSetUtils-3ba52dc3.js +0 -2530
- package/dist/featuresetbase-360521bb.js +0 -707
- package/dist/featuresetgeom-1c40fbf0.js +0 -99
- package/dist/featuresetstats-8b7ee0fc.js +0 -81
- package/dist/featuresetstring-502232ab.js +0 -95
- package/dist/fetchService-81224f29.js +0 -33
- package/dist/fieldProperties-1d23cc31.js +0 -33
- package/dist/floatRGBA-8dd8f77f.js +0 -20
- package/dist/form-81637afc.js +0 -138
- package/dist/geohashUtils-7a5a8250.js +0 -85
- package/dist/geojson-b271f3fc.js +0 -208
- package/dist/geomasync-4182a04e.js +0 -567
- package/dist/geometryEngine-170fd2fc.js +0 -192
- package/dist/geometryEngineAsync-ff5386c8.js +0 -217
- package/dist/geometryEngineBase-292b6d6f.js +0 -18463
- package/dist/geometryEngineJSON-15d3dac3.js +0 -46
- package/dist/geometryEngineJSON-c8044348.js +0 -171
- package/dist/geometryEngineWorker-19511bd8.js +0 -11
- package/dist/geometryServiceUtils-a348e7af.js +0 -28
- package/dist/georeference-72e12165.js +0 -291
- package/dist/gif-48b9a7df.js +0 -323
- package/dist/gltfexport-45261c80.js +0 -705
- package/dist/groupLayerUtils-f400995e.js +0 -39
- package/dist/heatmapUtils-81245e4b.js +0 -45
- package/dist/highlightReasons-23d6c956.js +0 -19
- package/dist/hydrated-e88a116e.js +0 -40
- package/dist/i3s-8b6deab9.js +0 -809
- package/dist/icon-422742c4.js +0 -127
- package/dist/imageBitmapUtils-12016538.js +0 -23
- package/dist/imageUtils-b38618d9.js +0 -89
- package/dist/imageUtils-c550215a.js +0 -69
- package/dist/imageryUtils-ac0e6068.js +0 -43
- package/dist/index-a450f76b.js +0 -45553
- package/dist/input-message-c606a089.js +0 -92
- package/dist/input2-8de5385e.js +0 -575
- package/dist/interactive-1bfa32d8.js +0 -80
- package/dist/jsonContext-70d89bc5.js +0 -15
- package/dist/jsonUtils-599f89fd.js +0 -86
- package/dist/jsonUtils-59cbda09.js +0 -476
- package/dist/jsonUtils-dbeb4b10.js +0 -59
- package/dist/kmlUtils-acfd0be5.js +0 -112
- package/dist/knowledgeGraphService-d0de6015.js +0 -739
- package/dist/knowledgegraph-1d25377f.js +0 -149
- package/dist/labelUtils-17e6e19c.js +0 -61
- package/dist/labelingInfo-7583b96a.js +0 -46
- package/dist/layersCreator-a7588c85.js +0 -151
- package/dist/layersLoader-503fa253.js +0 -197
- package/dist/lazyLayerLoader-14780aaf.js +0 -10
- package/dist/lclayout-b5aeb13b.js +0 -773
- package/dist/lengthUtils-15c44621.js +0 -5
- package/dist/lerc-wasm-57456401.js +0 -325
- package/dist/libtess-asm-08a80cbf.js +0 -3673
- package/dist/libtess-bcb513a0.js +0 -269
- package/dist/lineSegment-53f5f3d5.js +0 -76
- package/dist/loadGLTFMesh-561cd76a.js +0 -181
- package/dist/loadable-11e952cf.js +0 -24
- package/dist/loader-aafdf7c3.js +0 -79
- package/dist/lyr3DWorker-1876a7b0.js +0 -2108
- package/dist/mapViewDeps-c8de4ef9.js +0 -3052
- package/dist/mediaLayerUtils-236fdb9c.js +0 -35
- package/dist/meshFeatureSet-cf240f51.js +0 -126
- package/dist/meshVertexSpaceUtils-3647b869.js +0 -58
- package/dist/multidimensionalUtils-611e5cda.js +0 -290
- package/dist/normalizeUtilsSync-90304e5d.js +0 -181
- package/dist/number-d1e69c5f.js +0 -128
- package/dist/objectResourceUtils-237c5dab.js +0 -1455
- package/dist/observers-7ebedc04.js +0 -30
- package/dist/ogcFeatureUtils-f14754d3.js +0 -206
- package/dist/openCloseComponent-f7f72e31.js +0 -37
- package/dist/orientedBoundingBox-75e679bc.js +0 -447
- package/dist/parser-54b64f9a.js +0 -488
- package/dist/pbf-4b5a905e.js +0 -215
- package/dist/pbfQueryUtils-780daa49.js +0 -422
- package/dist/pe-wasm-7eeff6bc.js +0 -887
- package/dist/persistable-2afd8b64.js +0 -89
- package/dist/perspectiveUtils-78d50b08.js +0 -42
- package/dist/pieChart-f5575f34.js +0 -555
- package/dist/plane-ee1849b4.js +0 -160
- package/dist/popupUtils-5d826c7a.js +0 -50
- package/dist/popupUtils-8f261298.js +0 -22
- package/dist/portalItemUtils-07c1c29f.js +0 -57
- package/dist/portalLayers-199d1cb1.js +0 -312
- package/dist/portalUtils-f3c544f6.js +0 -7
- package/dist/programUtils-cd0377dc.js +0 -59
- package/dist/project-6d7a2904.js +0 -21
- package/dist/projectPointToVector-5800baf2.js +0 -14
- package/dist/projectVectorToVector-fdcb00cb.js +0 -13
- package/dist/quantityUtils-ab7a657b.js +0 -33
- package/dist/quantizationUtils-dde8a0c2.js +0 -68
- package/dist/quat-48b188ff.js +0 -104
- package/dist/query-581e35c7.js +0 -89
- package/dist/queryAttachments-191977a0.js +0 -39
- package/dist/queryEngineUtils-15b0748f.js +0 -21
- package/dist/queryTopFeatures-e6b8517a.js +0 -50
- package/dist/queryZScale-b9c83898.js +0 -12
- package/dist/rasterProjectionHelper-9e69c84d.js +0 -577
- package/dist/rasterUtils-76d2db45.js +0 -122
- package/dist/rasterizingUtils-730137a6.js +0 -46
- package/dist/request-3c238dd9.js +0 -46
- package/dist/requestImageUtils-6a0b710a.js +0 -8
- package/dist/resourceExtension-8e2ef6d4.js +0 -17
- package/dist/resourceUtils-49ebeb9f.js +0 -42
- package/dist/resourceUtils-b3c85655.js +0 -62
- package/dist/resourceUtils-b45c0ef9.js +0 -69
- package/dist/saveAPIKeyUtils-1146065e.js +0 -8
- package/dist/saveUtils-196e791e.js +0 -24
- package/dist/scaleUtils-7e908168.js +0 -23
- package/dist/scrim-56f6fa37.js +0 -114
- package/dist/serviceCapabilitiesUtils-266d7001.js +0 -64
- package/dist/sourceUtils-0d21eace.js +0 -71
- package/dist/sphere-8103ac36.js +0 -199
- package/dist/statsWorker-04df4d99.js +0 -37
- package/dist/streamLayerUtils-6b66a73a.js +0 -31
- package/dist/styleUtils-31e64784.js +0 -75
- package/dist/styleUtils-3951c967.js +0 -14
- package/dist/sublayerUtils-d60d357a.js +0 -37
- package/dist/substitute-77b7b80a.js +0 -52
- package/dist/symbolColorUtils-d97fe12d.js +0 -8
- package/dist/symbolLayerUtils-5f73a9b9.js +0 -31
- package/dist/symbologySnappingCandidates-bd284687.js +0 -221
- package/dist/t9n-2012740c.js +0 -349
- package/dist/testSVGPremultipliedAlpha-bb386a75.js +0 -94
- package/dist/timeSupport-2eb266be.js +0 -410
- package/dist/triangle-cac8dd7a.js +0 -98
- package/dist/unitConversionUtils-ad9151e0.js +0 -17
- package/dist/unitFormatUtils-3096fcbf.js +0 -40
- package/dist/uploadAssetErrors-b8ec890d.js +0 -70
- package/dist/uploadAssets-42d5e368.js +0 -330
- package/dist/utils-0ec1deff.js +0 -232
- package/dist/utils-25ac5b7c.js +0 -73
- package/dist/utils-3fc8cef0.js +0 -79
- package/dist/utils-59c058ba.js +0 -2746
- package/dist/utils-5a4ac69c.js +0 -419
- package/dist/utils-93ae7d8a.js +0 -34
- package/dist/utils-bba64d46.js +0 -91
- package/dist/utils-ce8900dc.js +0 -433
- package/dist/utils3-72b32be5.js +0 -75
- package/dist/vec3-0abe1464.js +0 -81
- package/dist/vec42-1641eab7.js +0 -125
- package/dist/versionUtils-6a805b25.js +0 -161
- package/dist/visualVariableUtils-7ae62b11.js +0 -267
- package/dist/webStyleSymbolUtils-038dca4c.js +0 -48
- package/dist/webglDeps-c2957fe0.js +0 -23
- package/dist/wfsUtils-a332128b.js +0 -343
- package/dist/workerHelper-2a48e790.js +0 -11
- package/dist/xyChart-131284db.js +0 -3335
|
@@ -1,2157 +0,0 @@
|
|
|
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-a450f76b.js";
|
|
2
|
-
import { m as Ut } from "./MultiOriginJSONSupport-677c0e5f.js";
|
|
3
|
-
import { l as Vt } from "./ArcGISService-81baed4d.js";
|
|
4
|
-
import { n as Xt } from "./BlendLayer-38d68343.js";
|
|
5
|
-
import { e as Yt } from "./CustomParametersMixin-c281d5e7.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-4dc64f39.js";
|
|
7
|
-
import { d as pt, c as li } from "./commonProperties-7d8f6b56.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-611e5cda.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-c6f76134.js";
|
|
10
|
-
import { i as it, m as st, x as nt, h as Ti, s as _i } from "./RawBlockCache-0803fdd7.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-efd5edf8.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-9e69c84d.js";
|
|
13
|
-
import { d as _e } from "./FeatureSet-769d2f68.js";
|
|
14
|
-
import { R as xt, f as Li, i as Hi, y as je, c as Wi, N as Gi } from "./utils-59c058ba.js";
|
|
15
|
-
import { u as ji } from "./OperationalLayer-96cb1405.js";
|
|
16
|
-
import { j as qi } from "./PortalLayer-60c1c36d.js";
|
|
17
|
-
import { f as Ui } from "./RefreshableLayer-0d1a28eb.js";
|
|
18
|
-
import { t as Vi } from "./ScaleRangeLayer-d06647e5.js";
|
|
19
|
-
import { f as Xi } from "./TemporalLayer-960c7904.js";
|
|
20
|
-
import { T as Yi } from "./TilemapCache-671945d2.js";
|
|
21
|
-
import { p as Ki } from "./popupUtils-5d826c7a.js";
|
|
22
|
-
import { A as be } from "./interfaces-fac3cfda.js";
|
|
23
|
-
import "vue";
|
|
24
|
-
import "./jsonUtils-599f89fd.js";
|
|
25
|
-
import "./parser-54b64f9a.js";
|
|
26
|
-
import "./UniqueValueRenderer-e4a27dfc.js";
|
|
27
|
-
import "./ColorStop-d5b563ab.js";
|
|
28
|
-
import "./diffUtils-cccaeaa2.js";
|
|
29
|
-
import "./colorRamps-100595ab.js";
|
|
30
|
-
import "./sizeVariableUtils-a1b694d8.js";
|
|
31
|
-
import "./visualVariableUtils-7ae62b11.js";
|
|
32
|
-
import "./lengthUtils-15c44621.js";
|
|
33
|
-
import "./jsonUtils-dbeb4b10.js";
|
|
34
|
-
import "./styleUtils-31e64784.js";
|
|
35
|
-
import "./utils-0ec1deff.js";
|
|
36
|
-
import "./utils-5a4ac69c.js";
|
|
37
|
-
import "./LRUCache-d9e4b57a.js";
|
|
38
|
-
import "./MemCache-6249a3f0.js";
|
|
39
|
-
import "./ClassBreaksDefinition-d32b0ea5.js";
|
|
40
|
-
import "./ElevationInfo-016cc1c4.js";
|
|
41
|
-
import "./unitConversionUtils-ad9151e0.js";
|
|
42
|
-
import "./colorUtils-1a8cc2f8.js";
|
|
43
|
-
import "./vec42-1641eab7.js";
|
|
44
|
-
import "./vec4f64-043e974c.js";
|
|
45
|
-
import "./portalItemUtils-07c1c29f.js";
|
|
46
|
-
import "./TimeInfo-48493242.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-170fd2fc.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-170fd2fc.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-ac0e6068.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
|
-
};
|