@agrotools1/at-components 0.2.3 → 0.2.5
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-d82e96aa.js +109 -0
- package/dist/APIKeyMixin-2ee64e59.js +19 -0
- package/dist/Analysis-449f84c5.js +31 -0
- package/dist/ArcGISCachedService-a838709f.js +47 -0
- package/dist/ArcGISService-7e5e8710.js +25 -0
- package/dist/AreaMeasurement2D-971dad40.js +405 -0
- package/dist/AreaMeasurement3D-48bc0242.js +488 -0
- package/dist/AttachmentInfo-ad88d558.js +34 -0
- package/dist/AttachmentQuery-c86dac15.js +18 -0
- package/dist/AttributeStore-3851ad0b.js +1707 -0
- package/dist/BaseDynamicLayerView2D-02baa49a.js +63 -0
- package/dist/BingMapsLayer-67c70069.js +112 -0
- package/dist/Bitmap-d455f554.js +128 -0
- package/dist/BitmapContainer-c78799ad.js +23 -0
- package/dist/BlendLayer-246e4998.js +13 -0
- package/dist/BoundsStore-b18f4e4e.js +63 -0
- package/dist/BufferObject-22d914df.js +100 -0
- package/dist/BufferView-5272765e.js +683 -0
- package/dist/BuildingSceneLayer-f08d5129.js +535 -0
- package/dist/Button-335b8469.js +36 -0
- package/dist/CSVLayer-40c0bd0e.js +208 -0
- package/dist/CSVSourceWorker-b8df4580.js +367 -0
- package/dist/CardWithInsights/CardWithInsights.d.ts +2 -1
- package/dist/CatalogDynamicGroupLayerView2D-3abd5c54.js +66 -0
- package/dist/CatalogFootprintLayerView2D-22c795e4.js +76 -0
- package/dist/CatalogLayer-74d18466.js +262 -0
- package/dist/CatalogLayerView2D-ffee45d8.js +52 -0
- package/dist/ClassBreaksDefinition-5a577d31.js +18 -0
- package/dist/ColorMaterial.glsl-bc384e65.js +64 -0
- package/dist/ColorSet-570396b9.js +45 -0
- package/dist/ColorStop-5009138a.js +29 -0
- package/dist/Container-f931e682.js +521 -0
- package/dist/CustomParametersMixin-9e8adcf6.js +12 -0
- package/dist/DefaultMaterial.glsl-092e1a97.js +42 -0
- package/dist/DefaultMaterial_COLOR_GAMMA-43e030be.js +653 -0
- package/dist/DefaultTheme-59d78c72.js +130 -0
- package/dist/DeleteForwardEditsParameters-8b5196fa.js +18 -0
- package/dist/DimensionLayer-6fc6ab12.js +129 -0
- package/dist/DirectLineMeasurement3D-6823c93d.js +449 -0
- package/dist/DistanceMeasurement2D-a6cf62b6.js +303 -0
- package/dist/DoubleArray-bb8ff0fb.js +25 -0
- package/dist/Dropdown/Filter/test.mocks.d.ts +6 -0
- package/dist/Dropdown/List/test.mocks.d.ts +6 -0
- package/dist/EdgeProcessingWorker-c5511714.js +63 -0
- package/dist/EditBusLayer-513ca203.js +107 -0
- package/dist/ElevationInfo-234040e3.js +56 -0
- package/dist/ElevationLayer-599949a0.js +129 -0
- package/dist/ElevationQuery-aaa7fb05.js +598 -0
- package/dist/ElevationSamplerWorker-07be3a80.js +62 -0
- package/dist/ExportImageParameters-b28e28df.js +66 -0
- package/dist/ExportStrategy-d6fd38ed.js +93 -0
- package/dist/ExportWMSImageParameters-be4cc5df.js +33 -0
- package/dist/External-55b35c8d.js +110 -0
- package/dist/Faq/Faq.d.ts +1 -1
- package/dist/Faq/index.d.ts +1 -1
- package/dist/FeatureCollectionSnappingSource-fce9fa91.js +130 -0
- package/dist/FeatureCommandQueue-4e426066.js +1244 -0
- package/dist/FeatureEffect-0a86f0ba.js +39 -0
- package/dist/FeatureEffectLayer-13705792.js +13 -0
- package/dist/FeatureFilter-1635b86a.js +27 -0
- package/dist/FeatureLayer-d2f8e7c0.js +693 -0
- package/dist/FeatureLayerBase-40e10dd6.js +148 -0
- package/dist/FeatureLayerSource-ebd2bea5.js +444 -0
- package/dist/FeatureLayerView2D-23240236.js +1967 -0
- package/dist/FeaturePipelineWorker-8d07a1dd.js +3633 -0
- package/dist/FeatureReductionLayer-55609d4e.js +225 -0
- package/dist/FeatureReductionSelection-2f351ee7.js +22 -0
- package/dist/FeatureServiceSnappingSource-513edf0d.js +481 -0
- package/dist/FeatureServiceSnappingSourceWorker-d6deecd4.js +747 -0
- package/dist/FeatureSet-ffd45984.js +188 -0
- package/dist/FeatureStore-9fd6c0f8.js +131 -0
- package/dist/FeatureTemplate-e4854302.js +12 -0
- package/dist/FeatureType-b4ef51c2.js +25 -0
- package/dist/FieldsIndex-91fb234a.js +109 -0
- package/dist/FormTemplate-67f4d44e.js +350 -0
- package/dist/GeoJSONLayer-e3495648.js +236 -0
- package/dist/GeoJSONSourceWorker-b0ee6d8e.js +247 -0
- package/dist/GeoRSSLayer-afac8cf1.js +73 -0
- package/dist/GeoRSSLayerView2D-b03f6564.js +140 -0
- package/dist/GeometryUtils-058e30f4.js +403 -0
- package/dist/GraphicContainer-d0803f7a.js +26 -0
- package/dist/GraphicManipulator-797ae6c6.js +1499 -0
- package/dist/GraphicsLayer-a30f80da.js +38 -0
- package/dist/GraphicsLayerView2D-0c92e0f2.js +114 -0
- package/dist/GraphicsSnappingSource-e928ab8c.js +273 -0
- package/dist/GraphicsView2D-963eb026.js +620 -0
- package/dist/GroupLayer-7f131ab8.js +147 -0
- package/dist/GroupLayerView2D-5fcc27fc.js +98 -0
- package/dist/HUDMaterial.glsl-3b450c01.js +65 -0
- package/dist/HighlightCounter-fda615cd.js +41 -0
- package/dist/HighlightGraphicContainer-8cfde780.js +18 -0
- package/dist/I3SBinaryReader-a4021fad.js +310 -0
- package/dist/I3SLayerDefinitions-f004f8b6.js +55 -0
- package/dist/I3SUtil-040e44af.js +59 -0
- package/dist/IdentityManager-012e74ca.js +899 -0
- package/dist/ImageHistogramParameters-f7c4c804.js +905 -0
- package/dist/ImageryLayer-c3f0176f.js +1799 -0
- package/dist/ImageryLayerView2D-5a14beb5.js +352 -0
- package/dist/ImageryTileLayer-a93e8471.js +2157 -0
- package/dist/ImageryTileLayerView2D-3e9fea94.js +1110 -0
- package/dist/Indices-f0dca4b5.js +67 -0
- package/dist/Input/index.d.ts +4547 -3
- package/dist/IntegratedMesh3DTilesLayer-7e70c76e.js +112 -0
- package/dist/IntegratedMeshLayer-2283f8d9.js +141 -0
- package/dist/InteractiveAnalysisViewModel-f0a0c72a.js +7397 -0
- package/dist/InterleavedLayout-9490090b.js +163 -0
- package/dist/KMLLayer-06b7037f.js +162 -0
- package/dist/KMLLayerView2D-59f96ec9.js +253 -0
- package/dist/KnowledgeGraphLayerView2D-6c8c4aae.js +43 -0
- package/dist/LRUCache-fc532e9b.js +32 -0
- package/dist/LabelClass-eae6271b.js +135 -0
- package/dist/LabelMetric-ee740bd1.js +400 -0
- package/dist/LaserlinePath.glsl-f58264f5.js +64 -0
- package/dist/Laserlines.glsl-14ab8523.js +65 -0
- package/dist/LayerFloorInfo-6ac1a57d.js +15 -0
- package/dist/LayerView-e41297e4.js +206 -0
- package/dist/LercWorker-22ed35b2.js +157 -0
- package/dist/LineOfSightLayer-6bf67bb7.js +147 -0
- package/dist/LinkChartLayer-e9a861f0.js +1027 -0
- package/dist/Lyr3DWorker-29f7a041.js +82 -0
- package/dist/MagnifierPrograms-1584f9b5.js +806 -0
- package/dist/MapImageLayer-b89cf158.js +169 -0
- package/dist/MapImageLayerView2D-e3f4a4cc.js +146 -0
- package/dist/MapNotesLayer-966f3446.js +283 -0
- package/dist/MapNotesLayerView2D-4aedef2a.js +161 -0
- package/dist/MapServiceLayerViewHelper-4f262166.js +288 -0
- package/dist/MeasurementWidgetContent-82971f95.js +2642 -0
- package/dist/MediaLayer-697a7c14.js +523 -0
- package/dist/MediaLayerView2D-64897044.js +332 -0
- package/dist/MemCache-0861cc28.js +227 -0
- package/dist/MemorySourceWorker-e1c531ac.js +222 -0
- package/dist/Mesh-44c8f6ba.js +980 -0
- package/dist/MeshLocalVertexSpace-6fe3a662.js +19 -0
- package/dist/MultiOriginJSONSupport-248453ac.js +158 -0
- package/dist/Notifications/index.d.ts +1 -0
- package/dist/OGCFeatureLayer-2daa0551.js +211 -0
- package/dist/OGCFeatureLayerView2D-7cebf7e0.js +82 -0
- package/dist/ObjectStack-424092a9.js +21 -0
- package/dist/Octree-21d216f2.js +495 -0
- package/dist/OpenStreetMapLayer-ade6fa9d.js +30 -0
- package/dist/OperationalLayer-097ad3e0.js +44 -0
- package/dist/OrderByInfo-e9ed942d.js +16 -0
- package/dist/OrderedLayer-fef2b56e.js +26 -0
- package/dist/OrientedImageryLayer-424a6234.js +216 -0
- package/dist/OverlayCompositing.glsl-1954a291.js +65 -0
- package/dist/OverrideHelper-f8aace2c.js +242 -0
- package/dist/PBFDecoderWorker-15cd639d.js +213 -0
- package/dist/PointCloudLayer-c820d269.js +197 -0
- package/dist/PointCloudUniqueValueRenderer-e7d37f08.js +115 -0
- package/dist/PointCloudWorker-3e28270d.js +212 -0
- package/dist/PooledRBush-e4cbf810.js +272 -0
- package/dist/Popup-2c03dbc0.js +3990 -0
- package/dist/PortalLayer-09e5a300.js +126 -0
- package/dist/Program-ed5a5aa3.js +694 -0
- package/dist/ProgramTemplate-976cfde1.js +35 -0
- package/dist/QueryEngine-8915348b.js +896 -0
- package/dist/QueryTask-f386d91d.js +119 -0
- package/dist/RasterSymbolizer-6177c6ec.js +3024 -0
- package/dist/RasterVFDisplayObject-6411b56f.js +581 -0
- package/dist/RasterWorker-f825daf0.js +78 -0
- package/dist/RawBlockCache-0d61962b.js +185 -0
- package/dist/RealisticTree.glsl-c9fd0d3c.js +42 -0
- package/dist/RefreshableLayer-0945a308.js +80 -0
- package/dist/RefreshableLayerView-4956f17c.js +16 -0
- package/dist/Relationship-9a82bd43.js +64 -0
- package/dist/RelationshipQuery-68ad49a7.js +22 -0
- package/dist/RenderingContext-49610ad9.js +889 -0
- package/dist/RibbonLine.glsl-6314f72e.js +65 -0
- package/dist/RouteLayer-ff5c8f33.js +786 -0
- package/dist/RouteLayerView2D-2cc60ad2.js +195 -0
- package/dist/SDFHelper-b08be611.js +140 -0
- package/dist/SSAO.glsl-0e92c4e5.js +43 -0
- package/dist/SSAOBlur.glsl-a2bb2587.js +42 -0
- package/dist/ScaleRangeLayer-ab226dbd.js +21 -0
- package/dist/SceneLayer-884ec175.js +542 -0
- package/dist/SceneLayerSnappingSource-aa2944b9.js +218 -0
- package/dist/SceneLayerSnappingSourceWorker-5616c206.js +112 -0
- package/dist/SceneLayerWorker-9745b8b5.js +164 -0
- package/dist/SceneService-da855dda.js +215 -0
- package/dist/Scheduler-b3c40220.js +373 -0
- package/dist/Search/index.d.ts +1 -0
- package/dist/Search/test.mocks.d.ts +3 -0
- package/dist/Search/utils.d.ts +3 -0
- package/dist/Select/index.d.ts +3 -3
- package/dist/ShadedColorMaterial.glsl-f953e894.js +64 -0
- package/dist/SnappingOperation-be595c42.js +48 -0
- package/dist/SourceLayerData-ec8ab72c.js +116 -0
- package/dist/SpatialFilter-7d64232d.js +1701 -0
- package/dist/Stop-c022e866.js +281 -0
- package/dist/StreamLayer-d603abd8.js +188 -0
- package/dist/StreamLayerView2D-6d6618cf.js +164 -0
- package/dist/StyleRepository-2f08de17.js +2212 -0
- package/dist/SublayersOwner-cc0e4f54.js +545 -0
- package/dist/SubtypeGroupLayer-bacf048d.js +514 -0
- package/dist/SubtypeGroupLayerView2D-b3ed2c1a.js +84 -0
- package/dist/TechniqueInstance-397b7dc2.js +233 -0
- package/dist/TemporalLayer-7844bd88.js +23 -0
- package/dist/Texture-b1727861.js +501 -0
- package/dist/TextureOnly.glsl-ffd4a7df.js +65 -0
- package/dist/Theme-12cb681b.js +3426 -0
- package/dist/Tick-25d07d27.js +723 -0
- package/dist/TileContainer-ab77d7a6.js +31 -0
- package/dist/TileInfoTilemapCache-3e97ab02.js +38 -0
- package/dist/TileLayer-03cfc8ab.js +194 -0
- package/dist/TileLayerView2D-3cfd6a21.js +187 -0
- package/dist/TilemapCache-36e3c4b7.js +189 -0
- package/dist/TimeInfo-cea2517f.js +42 -0
- package/dist/TimeOnly-5a143001.js +706 -0
- package/dist/Tooltip-2b4711cb.js +138 -0
- package/dist/TopFeaturesQuery-285284f1.js +32 -0
- package/dist/TurboLine-708823a3.js +565 -0
- package/dist/UniqueValueRenderer-3d92c0b9.js +1039 -0
- package/dist/UnknownLayer-d3dbe7c9.js +30 -0
- package/dist/UnknownTimeZone-ed4def19.js +15 -0
- package/dist/UnsupportedLayer-40bbb9f5.js +31 -0
- package/dist/UpdateTracking2D-23c8ff3f.js +8566 -0
- package/dist/Upload/index.d.ts +1 -1
- package/dist/Util-2ba07f64.js +57 -0
- package/dist/VectorTileLayer-ba191a02.js +544 -0
- package/dist/VectorTileLayerView2D-bd3971cd.js +2108 -0
- package/dist/Version-d45bee25.js +33 -0
- package/dist/VertexArrayObject-08a9d938.js +73 -0
- package/dist/VertexColor.glsl-cfafd4c9.js +2683 -0
- package/dist/VertexSnappingCandidate-cbae227c.js +13 -0
- package/dist/VideoLayerView2D-ec66c226.js +124 -0
- package/dist/VoxelLayer-888a65f9.js +631 -0
- package/dist/WFSLayer-786bdecd.js +221 -0
- package/dist/WFSSourceWorker-a212500b.js +157 -0
- package/dist/WGLContainer-f05c906a.js +5426 -0
- package/dist/WMSLayer-b2c46060.js +536 -0
- package/dist/WMSLayerView2D-a90672e9.js +117 -0
- package/dist/WMTSLayer-860b1a45.js +531 -0
- package/dist/WMTSLayerView2D-c492825d.js +142 -0
- package/dist/WebTileLayer-e178eb17.js +110 -0
- package/dist/WhereClause-ad3cc5ae.js +2766 -0
- package/dist/WorkerHandle-ef6ad49b.js +47 -0
- package/dist/WorkerTileHandler-c2b98dae.js +1539 -0
- package/dist/action-46ccf03a.js +198 -0
- package/dist/action-group-9785519d.js +145 -0
- package/dist/action-menu-f423306a.js +1759 -0
- package/dist/agrotools-theme.css +2 -2
- package/dist/agrotools-theme.css.map +1 -1
- package/dist/apng-66c828d8.js +392 -0
- package/dist/arcade-af30f385.js +229 -0
- package/dist/arcadeAsyncRuntime-fdce05e3.js +943 -0
- package/dist/arcadeUtils-2b5a1e68.js +8741 -0
- package/dist/arcgis-knowledge-client-core-192a1ac0.js +1218 -0
- package/dist/arcgis-knowledge-client-core-simd-4fb6c777.js +1218 -0
- package/dist/arcgisLayers-f43f9183.js +152 -0
- package/dist/associatedFeatureServiceUtils-15949591.js +92 -0
- package/dist/axisAngleDegrees-de05cd64.js +49 -0
- package/dist/basis_transcoder-6f118404.js +1248 -0
- package/dist/calcite-action-bar-9722a11e.js +303 -0
- package/dist/calcite-action-f5829479.js +22 -0
- package/dist/calcite-action-group-3e77994f.js +28 -0
- package/dist/calcite-button-8979d383.js +228 -0
- package/dist/calcite-flow-b50ce308.js +128 -0
- package/dist/calcite-flow-item-57549b16.js +499 -0
- package/dist/calcite-icon-fb43725c.js +16 -0
- package/dist/calcite-input-fcc054c7.js +24 -0
- package/dist/calcite-label-10d65c11.js +79 -0
- package/dist/calcite-list-2847bddc.js +2135 -0
- package/dist/calcite-list-item-53cde043.js +576 -0
- package/dist/calcite-list-item-group-256eb990.js +71 -0
- package/dist/calcite-loader-022a5436.js +14 -0
- package/dist/calcite-modal-5b1a23d9.js +333 -0
- package/dist/calcite-notice-17009704.js +181 -0
- package/dist/calcite-option-c7d00181.js +94 -0
- package/dist/calcite-scrim-1dced2db.js +18 -0
- package/dist/calcite-select-a96a55a3.js +231 -0
- package/dist/capabilities-3f86754a.js +50 -0
- package/dist/chartCommon-af8c14ae.js +256 -0
- package/dist/chartUtilsAm5-418cf95f.js +2954 -0
- package/dist/clientSideDefaults-2aad569c.js +39 -0
- package/dist/colorRamps-0fae1fde.js +38 -0
- package/dist/colorUtils-6d5e716b.js +164 -0
- package/dist/commonProperties-d1f695a2.js +60 -0
- package/dist/computeTranslationToOriginAndRotation-cba163ab.js +60 -0
- package/dist/conditionalSlot-14f35023.js +27 -0
- package/dist/createConnection-f3b9e606.js +299 -0
- package/dist/dataUtils-65604399.js +1421 -0
- package/dist/deduplicate-16f30199.js +89 -0
- package/dist/defaults-b7c93d2a.js +31 -0
- package/dist/deleteForwardEdits-f31f885d.js +13 -0
- package/dist/diffUtils-54c1c039.js +90 -0
- package/dist/drapedUtils-166cd4c2.js +75 -0
- package/dist/earcut-ffaa9a50.js +292 -0
- package/dist/edgeProcessing-1a2c4169.js +252 -0
- package/dist/editingSupport-ffa6f639.js +203 -0
- package/dist/editsZScale-2840378a.js +37 -0
- package/dist/elevationInfoUtils-c1caf596.js +126 -0
- package/dist/executeForIds-b9c9164b.js +14 -0
- package/dist/executeForTopCount-8a73aea7.js +17 -0
- package/dist/executeForTopExtents-a3d0b42e.js +17 -0
- package/dist/executeForTopIds-f14d5790.js +17 -0
- package/dist/executeQueryJSON-6cd89bed.js +15 -0
- package/dist/executeQueryPBF-e1d32cfc.js +152 -0
- package/dist/executeRelationshipQuery-5cadcb20.js +53 -0
- package/dist/executeTopFeaturesQuery-32dda453.js +18 -0
- package/dist/featureConversionUtils-a5f0b9b2.js +479 -0
- package/dist/featureLayerUtils-828813e8.js +250 -0
- package/dist/featureLayerUtils-9e9f97c1.js +142 -0
- package/dist/featureSetUtils-2f86a02f.js +2530 -0
- package/dist/featuresetbase-bb981400.js +707 -0
- package/dist/featuresetgeom-0185b49f.js +99 -0
- package/dist/featuresetstats-3d689b79.js +81 -0
- package/dist/featuresetstring-83733fad.js +95 -0
- package/dist/fetchService-25e9ba70.js +33 -0
- package/dist/fieldProperties-cd5649d9.js +33 -0
- package/dist/floatRGBA-005cc596.js +20 -0
- package/dist/form-41e8f739.js +138 -0
- package/dist/geohashUtils-776cae3b.js +85 -0
- package/dist/geojson-7ef69d00.js +208 -0
- package/dist/geomasync-43a66474.js +567 -0
- package/dist/geometryEngine-e18a460d.js +192 -0
- package/dist/geometryEngineAsync-ae21d4e2.js +217 -0
- package/dist/geometryEngineBase-d653892b.js +18463 -0
- package/dist/geometryEngineJSON-031f6196.js +46 -0
- package/dist/geometryEngineJSON-9aeb41cd.js +171 -0
- package/dist/geometryEngineWorker-1c2f96e6.js +11 -0
- package/dist/geometryServiceUtils-50afe031.js +28 -0
- package/dist/georeference-cf051555.js +291 -0
- package/dist/gif-3fe5f761.js +323 -0
- package/dist/gltfexport-3ec498d6.js +705 -0
- package/dist/groupLayerUtils-5b8e1f89.js +39 -0
- package/dist/heatmapUtils-b512588d.js +45 -0
- package/dist/highlightReasons-b0f772b2.js +19 -0
- package/dist/hydrated-36edecd6.js +40 -0
- package/dist/i3s-239f062a.js +809 -0
- package/dist/icon-5e93376e.js +127 -0
- package/dist/imageBitmapUtils-142daeaf.js +23 -0
- package/dist/imageUtils-27ed5e73.js +89 -0
- package/dist/imageUtils-901282e9.js +69 -0
- package/dist/imageryUtils-b1dd3a54.js +43 -0
- package/dist/index-6ebf29c1.js +43667 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +17 -13
- package/dist/input-message-20d19cfb.js +92 -0
- package/dist/input2-8da11a51.js +575 -0
- package/dist/interactive-bcb1b82d.js +80 -0
- package/dist/jsonContext-45fce1e1.js +15 -0
- package/dist/jsonUtils-09f69988.js +86 -0
- package/dist/jsonUtils-1f447d0c.js +476 -0
- package/dist/jsonUtils-db906457.js +59 -0
- package/dist/kmlUtils-6412718d.js +112 -0
- package/dist/knowledgeGraphService-80890106.js +739 -0
- package/dist/knowledgegraph-475723f0.js +149 -0
- package/dist/labelUtils-85708580.js +61 -0
- package/dist/labelingInfo-62fc9d21.js +46 -0
- package/dist/layersCreator-a94b60fe.js +151 -0
- package/dist/layersLoader-39c74edb.js +197 -0
- package/dist/lazyLayerLoader-7922c10d.js +10 -0
- package/dist/lclayout-6ac84378.js +773 -0
- package/dist/lengthUtils-6a89d855.js +5 -0
- package/dist/lerc-wasm-b8b3cd2c.js +325 -0
- package/dist/libtess-61451fa0.js +269 -0
- package/dist/libtess-asm-fef1a4ca.js +3673 -0
- package/dist/lineSegment-f45db35c.js +76 -0
- package/dist/loadGLTFMesh-2f9cee21.js +181 -0
- package/dist/loadable-c29cb205.js +24 -0
- package/dist/loader-d9b4787f.js +79 -0
- package/dist/lyr3DWorker-33babc2c.js +2108 -0
- package/dist/mapViewDeps-f5b886c8.js +3052 -0
- package/dist/mediaLayerUtils-5a2c2fe8.js +35 -0
- package/dist/meshFeatureSet-2312bbe6.js +126 -0
- package/dist/meshVertexSpaceUtils-c9b69510.js +58 -0
- package/dist/multidimensionalUtils-e85f5a78.js +290 -0
- package/dist/normalizeUtilsSync-555b1847.js +181 -0
- package/dist/number-72e1a662.js +128 -0
- package/dist/objectResourceUtils-abe804cf.js +1455 -0
- package/dist/observers-f3bd3593.js +30 -0
- package/dist/ogcFeatureUtils-7097c17e.js +206 -0
- package/dist/openCloseComponent-67a2c20c.js +37 -0
- package/dist/orientedBoundingBox-4ae2c366.js +447 -0
- package/dist/parser-7a76caf9.js +488 -0
- package/dist/pbf-0b9b579c.js +215 -0
- package/dist/pbfQueryUtils-baba23c7.js +422 -0
- package/dist/pe-wasm-d080c07b.js +887 -0
- package/dist/persistable-82932da9.js +89 -0
- package/dist/perspectiveUtils-1b383b17.js +42 -0
- package/dist/pieChart-eca78f7c.js +555 -0
- package/dist/plane-84e27261.js +160 -0
- package/dist/popupUtils-b72d32fb.js +22 -0
- package/dist/popupUtils-cde1d105.js +50 -0
- package/dist/portalItemUtils-28314a3f.js +57 -0
- package/dist/portalLayers-eeaa6e57.js +312 -0
- package/dist/portalUtils-457f542e.js +7 -0
- package/dist/programUtils-0c20a48e.js +59 -0
- package/dist/project-1b5431dd.js +21 -0
- package/dist/projectPointToVector-1f1d1dc7.js +14 -0
- package/dist/projectVectorToVector-b7e757a1.js +13 -0
- package/dist/quantityUtils-b64583f9.js +33 -0
- package/dist/quantizationUtils-9e478e23.js +68 -0
- package/dist/quat-5502b70d.js +104 -0
- package/dist/query-b2397453.js +89 -0
- package/dist/queryAttachments-4361fd2f.js +39 -0
- package/dist/queryEngineUtils-f24bc98c.js +21 -0
- package/dist/queryTopFeatures-e06aa562.js +50 -0
- package/dist/queryZScale-b18ec359.js +12 -0
- package/dist/rasterProjectionHelper-935c256c.js +577 -0
- package/dist/rasterUtils-efad8a20.js +122 -0
- package/dist/rasterizingUtils-80de9b14.js +46 -0
- package/dist/request-cae502b7.js +46 -0
- package/dist/requestImageUtils-caebcf1e.js +8 -0
- package/dist/resourceExtension-7d14f4fc.js +17 -0
- package/dist/resourceUtils-8d97f5bf.js +42 -0
- package/dist/resourceUtils-be991ca4.js +69 -0
- package/dist/resourceUtils-fa1a565f.js +62 -0
- package/dist/saveAPIKeyUtils-9f0454db.js +8 -0
- package/dist/saveUtils-22a6caa6.js +24 -0
- package/dist/scaleUtils-ba5596ad.js +23 -0
- package/dist/scrim-5b1b6156.js +114 -0
- package/dist/serviceCapabilitiesUtils-3a47b26b.js +64 -0
- package/dist/sourceUtils-ded5acd6.js +71 -0
- package/dist/sphere-418b76df.js +199 -0
- package/dist/statsWorker-a082453a.js +37 -0
- package/dist/streamLayerUtils-22aa35f2.js +31 -0
- package/dist/style.css +1 -1
- package/dist/styleUtils-aa4777b6.js +75 -0
- package/dist/styleUtils-e5f7ddb7.js +14 -0
- package/dist/sublayerUtils-7c5ebfea.js +37 -0
- package/dist/substitute-da3c695d.js +52 -0
- package/dist/symbolColorUtils-5d3e355f.js +8 -0
- package/dist/symbolLayerUtils-47cdd4d1.js +31 -0
- package/dist/symbologySnappingCandidates-6ebf1df0.js +221 -0
- package/dist/t9n-c80e56d9.js +349 -0
- package/dist/testSVGPremultipliedAlpha-b9ff88ef.js +94 -0
- package/dist/timeSupport-8d2432f7.js +410 -0
- package/dist/triangle-07f96fb9.js +98 -0
- package/dist/unitConversionUtils-c1bfd22b.js +17 -0
- package/dist/unitFormatUtils-e75be0c3.js +40 -0
- package/dist/uploadAssetErrors-3493bdb9.js +70 -0
- package/dist/uploadAssets-24fe5279.js +330 -0
- package/dist/utils-17d83806.js +2746 -0
- package/dist/utils-717efd4b.js +73 -0
- package/dist/utils-74e8e651.js +433 -0
- package/dist/utils-7c8f1d3f.js +232 -0
- package/dist/utils-94cbe432.js +79 -0
- package/dist/utils-a76b92ed.js +34 -0
- package/dist/utils-e73651cf.js +419 -0
- package/dist/utils-f46de72c.js +91 -0
- package/dist/utils3-eb04cacb.js +75 -0
- package/dist/vec3-61daf837.js +81 -0
- package/dist/vec42-27060a00.js +125 -0
- package/dist/versionUtils-c9c03a5d.js +161 -0
- package/dist/visualVariableUtils-bc9bfef1.js +267 -0
- package/dist/webStyleSymbolUtils-0990caa8.js +48 -0
- package/dist/webglDeps-812387f7.js +23 -0
- package/dist/wfsUtils-fdccd660.js +343 -0
- package/dist/workerHelper-d8d5f17b.js +11 -0
- package/dist/xyChart-94c1ef04.js +3335 -0
- package/package.json +1 -1
- package/dist/AGraphicContainer-98a4c8a4.js +0 -109
- package/dist/APIKeyMixin-9511e0a5.js +0 -19
- package/dist/Accordion/Accordion.d.ts +0 -49
- package/dist/Analysis-4b1d1fb5.js +0 -31
- package/dist/ArcGISCachedService-93e2cb27.js +0 -47
- package/dist/ArcGISService-3f8d89c1.js +0 -25
- package/dist/AreaMeasurement2D-e0bb230c.js +0 -405
- package/dist/AreaMeasurement3D-a9959ecf.js +0 -488
- package/dist/AttachmentInfo-601c56e2.js +0 -34
- package/dist/AttachmentQuery-3504d550.js +0 -18
- package/dist/AttributeStore-b90878e3.js +0 -1707
- package/dist/Avatar/Avatar.d.ts +0 -66
- package/dist/BaseDynamicLayerView2D-b2faf028.js +0 -63
- package/dist/BingMapsLayer-5d79fe2b.js +0 -112
- package/dist/Bitmap-f775c851.js +0 -128
- package/dist/BitmapContainer-af5942b8.js +0 -23
- package/dist/BlendLayer-a792edf6.js +0 -13
- package/dist/BoundsStore-789624df.js +0 -63
- package/dist/BufferObject-cbd0168e.js +0 -100
- package/dist/BufferView-004ad517.js +0 -683
- package/dist/BuildingSceneLayer-25bc760b.js +0 -535
- package/dist/Button/Button.d.ts +0 -82
- package/dist/Button-70963624.js +0 -36
- package/dist/CSVLayer-fd3b6750.js +0 -208
- package/dist/CSVSourceWorker-eb24cd85.js +0 -367
- package/dist/CatalogDynamicGroupLayerView2D-dfc700a4.js +0 -66
- package/dist/CatalogFootprintLayerView2D-6eb16597.js +0 -76
- package/dist/CatalogLayer-1cc632fe.js +0 -262
- package/dist/CatalogLayerView2D-d143aa34.js +0 -52
- package/dist/Checkbox/Checkbox.d.ts +0 -87
- package/dist/ClassBreaksDefinition-07ba0c64.js +0 -18
- package/dist/ColorMaterial.glsl-e7801766.js +0 -64
- package/dist/ColorSet-df5696b5.js +0 -45
- package/dist/ColorStop-7187f368.js +0 -29
- package/dist/Container-ac97765a.js +0 -521
- package/dist/CustomParametersMixin-b3432b3e.js +0 -12
- package/dist/DataTable/Column/Column.d.ts +0 -36
- package/dist/DataTable/Counters/Counters.d.ts +0 -41
- package/dist/DataTable/DataTable.d.ts +0 -113
- package/dist/DefaultMaterial.glsl-3cc4efe7.js +0 -42
- package/dist/DefaultMaterial_COLOR_GAMMA-337c63aa.js +0 -653
- package/dist/DefaultTheme-12dffc66.js +0 -130
- package/dist/DeleteForwardEditsParameters-ae76d898.js +0 -18
- package/dist/DimensionLayer-9eb47c76.js +0 -129
- package/dist/DirectLineMeasurement3D-e9903136.js +0 -449
- package/dist/DistanceMeasurement2D-a4853462.js +0 -303
- package/dist/DoubleArray-5076283e.js +0 -25
- package/dist/EdgeProcessingWorker-c1783ddd.js +0 -63
- package/dist/EditBusLayer-e812f4c9.js +0 -107
- package/dist/ElevationInfo-fad03d5e.js +0 -56
- package/dist/ElevationLayer-397792d5.js +0 -129
- package/dist/ElevationQuery-beceb62f.js +0 -598
- package/dist/ElevationSamplerWorker-0048a204.js +0 -62
- package/dist/ExportImageParameters-c6c4bc61.js +0 -66
- package/dist/ExportStrategy-908f5b8d.js +0 -93
- package/dist/ExportWMSImageParameters-34da6b46.js +0 -33
- package/dist/External-14daf0c1.js +0 -110
- package/dist/FeatureCollectionSnappingSource-f97a1829.js +0 -130
- package/dist/FeatureCommandQueue-d4817eac.js +0 -1244
- package/dist/FeatureEffect-08976bbd.js +0 -39
- package/dist/FeatureEffectLayer-05c258f4.js +0 -13
- package/dist/FeatureFilter-8c5e44b1.js +0 -27
- package/dist/FeatureLayer-d3659466.js +0 -693
- package/dist/FeatureLayerBase-9b63f732.js +0 -148
- package/dist/FeatureLayerSource-960f1c01.js +0 -444
- package/dist/FeatureLayerView2D-7503e1ed.js +0 -1967
- package/dist/FeaturePipelineWorker-d4301d2a.js +0 -3633
- package/dist/FeatureReductionLayer-e6cf73ac.js +0 -225
- package/dist/FeatureReductionSelection-d90249a7.js +0 -22
- package/dist/FeatureServiceSnappingSource-9e49ca72.js +0 -481
- package/dist/FeatureServiceSnappingSourceWorker-39b093b3.js +0 -747
- package/dist/FeatureSet-d79f0e48.js +0 -188
- package/dist/FeatureStore-eb4b87c0.js +0 -131
- package/dist/FeatureTemplate-edb1b782.js +0 -12
- package/dist/FeatureType-bba29adb.js +0 -25
- package/dist/FieldsIndex-75cca4d0.js +0 -109
- package/dist/FormTemplate-22911c47.js +0 -350
- package/dist/GeoJSONLayer-b33c96b8.js +0 -236
- package/dist/GeoJSONSourceWorker-b04ff552.js +0 -247
- package/dist/GeoRSSLayer-6e5fcd0e.js +0 -73
- package/dist/GeoRSSLayerView2D-21b6b12e.js +0 -140
- package/dist/GeometryUtils-fa897cbd.js +0 -403
- package/dist/GraphicContainer-1fd6bfce.js +0 -26
- package/dist/GraphicManipulator-f3b7dc9b.js +0 -1499
- package/dist/GraphicsLayer-e0686779.js +0 -38
- package/dist/GraphicsLayerView2D-a7eba2fe.js +0 -114
- package/dist/GraphicsSnappingSource-594f402a.js +0 -273
- package/dist/GraphicsView2D-347562b8.js +0 -620
- package/dist/GroupLayer-7ae0a916.js +0 -147
- package/dist/GroupLayerView2D-ffcde606.js +0 -98
- package/dist/HUDMaterial.glsl-b0a3e0ce.js +0 -65
- package/dist/HighlightCounter-e18f0179.js +0 -41
- package/dist/HighlightGraphicContainer-fd774cea.js +0 -18
- package/dist/I3SBinaryReader-190e99de.js +0 -310
- package/dist/I3SLayerDefinitions-6ddaca60.js +0 -55
- package/dist/I3SUtil-44b83dc0.js +0 -59
- package/dist/IdentityManager-fbe91c13.js +0 -899
- package/dist/ImageHistogramParameters-d64fd9c8.js +0 -905
- package/dist/ImageryLayer-67878a78.js +0 -1799
- package/dist/ImageryLayerView2D-ae45faba.js +0 -352
- package/dist/ImageryTileLayer-9dca8b93.js +0 -2157
- package/dist/ImageryTileLayerView2D-977f66aa.js +0 -1110
- package/dist/Indices-e6dc3b15.js +0 -67
- package/dist/Input/Input.core.d.ts +0 -159
- package/dist/IntegratedMesh3DTilesLayer-8811e7bf.js +0 -112
- package/dist/IntegratedMeshLayer-9162c0b5.js +0 -141
- package/dist/InteractiveAnalysisViewModel-b046fcb9.js +0 -7397
- package/dist/InterleavedLayout-32973c8a.js +0 -163
- package/dist/KMLLayer-80f81df7.js +0 -162
- package/dist/KMLLayerView2D-b6ba3b80.js +0 -253
- package/dist/KnowledgeGraphLayerView2D-ae91bd81.js +0 -43
- package/dist/LRUCache-27e8c401.js +0 -32
- package/dist/LabelClass-d9a476d6.js +0 -135
- package/dist/LabelMetric-e2728bbf.js +0 -400
- package/dist/LaserlinePath.glsl-60d00e61.js +0 -64
- package/dist/Laserlines.glsl-499a6cbf.js +0 -65
- package/dist/LayerFloorInfo-d05cf9dd.js +0 -15
- package/dist/LayerView-036988a9.js +0 -206
- package/dist/Legend/Legend.d.ts +0 -73
- package/dist/LercWorker-b1b4bb47.js +0 -157
- package/dist/LineOfSightLayer-9a9a60b7.js +0 -147
- package/dist/LinkChartLayer-d61803bb.js +0 -1027
- package/dist/Lyr3DWorker-87be14e0.js +0 -82
- package/dist/MagnifierPrograms-da7a27ab.js +0 -806
- package/dist/Map/Map.d.ts +0 -26
- package/dist/MapImageLayer-f07adf1a.js +0 -169
- package/dist/MapImageLayerView2D-d1b140c3.js +0 -146
- package/dist/MapNotesLayer-c662d147.js +0 -283
- package/dist/MapNotesLayerView2D-bf9ac698.js +0 -161
- package/dist/MapServiceLayerViewHelper-fb724de9.js +0 -288
- package/dist/MeasurementWidgetContent-e4888ef2.js +0 -2642
- package/dist/MediaLayer-36d873a3.js +0 -523
- package/dist/MediaLayerView2D-e58b8ec0.js +0 -332
- package/dist/MemCache-a9232ec2.js +0 -227
- package/dist/MemorySourceWorker-20ff27d6.js +0 -222
- package/dist/Mesh-3839826a.js +0 -980
- package/dist/MeshLocalVertexSpace-00151564.js +0 -19
- package/dist/Modal/Modal.d.ts +0 -106
- package/dist/MultiOriginJSONSupport-bb258670.js +0 -158
- package/dist/OGCFeatureLayer-2a8b7ecc.js +0 -211
- package/dist/OGCFeatureLayerView2D-185f9649.js +0 -82
- package/dist/ObjectStack-10d91171.js +0 -21
- package/dist/Octree-78797046.js +0 -495
- package/dist/OpenStreetMapLayer-b0a17790.js +0 -30
- package/dist/OperationalLayer-55af27d6.js +0 -44
- package/dist/OrderByInfo-22e3c805.js +0 -16
- package/dist/OrderedLayer-1403a591.js +0 -26
- package/dist/OrientedImageryLayer-8ec8d7d1.js +0 -216
- package/dist/OverlayCompositing.glsl-ba3bd81d.js +0 -65
- package/dist/OverrideHelper-82325a2c.js +0 -242
- package/dist/PBFDecoderWorker-f6517afc.js +0 -213
- package/dist/Paginator/Paginator.d.ts +0 -43
- package/dist/PointCloudLayer-cff43a10.js +0 -197
- package/dist/PointCloudUniqueValueRenderer-f337a895.js +0 -115
- package/dist/PointCloudWorker-cdb28dc1.js +0 -212
- package/dist/PooledRBush-ee4e60af.js +0 -272
- package/dist/Popup-c7f55588.js +0 -3990
- package/dist/PortalLayer-07b3c53e.js +0 -126
- package/dist/Program-ba2f18b2.js +0 -694
- package/dist/ProgramTemplate-eee4f097.js +0 -35
- package/dist/ProgressBar/ProgressBar.d.ts +0 -73
- package/dist/QueryEngine-10c97624.js +0 -896
- package/dist/QueryTask-115430b6.js +0 -119
- package/dist/RadioButton/RadioButton.d.ts +0 -87
- package/dist/RasterSymbolizer-fbf433fe.js +0 -3024
- package/dist/RasterVFDisplayObject-20b0dd86.js +0 -581
- package/dist/RasterWorker-44c37e20.js +0 -78
- package/dist/RawBlockCache-25203dbd.js +0 -185
- package/dist/RealisticTree.glsl-bc07c4dc.js +0 -42
- package/dist/RefreshableLayer-9550b85a.js +0 -80
- package/dist/RefreshableLayerView-601f7038.js +0 -16
- package/dist/Relationship-c662830e.js +0 -64
- package/dist/RelationshipQuery-765f068e.js +0 -22
- package/dist/RenderingContext-3db74548.js +0 -889
- package/dist/RibbonLine.glsl-c6a715b7.js +0 -65
- package/dist/RouteLayer-3f5411f3.js +0 -786
- package/dist/RouteLayerView2D-a5fd4cbf.js +0 -195
- package/dist/SDFHelper-a34e90ee.js +0 -140
- package/dist/SSAO.glsl-5491a708.js +0 -43
- package/dist/SSAOBlur.glsl-f3068b8e.js +0 -42
- package/dist/ScaleRangeLayer-7ddf00b4.js +0 -21
- package/dist/SceneLayer-c594bfc3.js +0 -542
- package/dist/SceneLayerSnappingSource-a0504ac7.js +0 -218
- package/dist/SceneLayerSnappingSourceWorker-a04d6692.js +0 -112
- package/dist/SceneLayerWorker-1865768e.js +0 -164
- package/dist/SceneService-fb9f0142.js +0 -215
- package/dist/Scheduler-eacc84bb.js +0 -373
- package/dist/Select/Item/Item.d.ts +0 -104
- package/dist/Select/Multiple/Select.multiple.d.ts +0 -90
- package/dist/Select/Select.core.d.ts +0 -78
- package/dist/Select/Single/Select.single.d.ts +0 -66
- package/dist/ShadedColorMaterial.glsl-db97956b.js +0 -64
- package/dist/SnappingOperation-9622a00d.js +0 -48
- package/dist/SourceLayerData-7016f1a5.js +0 -116
- package/dist/SpatialFilter-d20d4f50.js +0 -1701
- package/dist/Stop-68022e32.js +0 -281
- package/dist/StreamLayer-7c837e3d.js +0 -188
- package/dist/StreamLayerView2D-586f5a6a.js +0 -164
- package/dist/StyleRepository-fba75e70.js +0 -2212
- package/dist/SublayersOwner-3dc574cd.js +0 -545
- package/dist/SubtypeGroupLayer-1f9c5398.js +0 -514
- package/dist/SubtypeGroupLayerView2D-0f108d9d.js +0 -84
- package/dist/Tabs/Tab/Tab.d.ts +0 -69
- package/dist/Tabs/Tabs.d.ts +0 -50
- package/dist/TechniqueInstance-0481dbff.js +0 -233
- package/dist/TemporalLayer-8116b4a4.js +0 -23
- package/dist/Texture-22a8cca5.js +0 -501
- package/dist/TextureOnly.glsl-458f8148.js +0 -65
- package/dist/Theme-f05b8eb0.js +0 -3426
- package/dist/Tick-aef93b48.js +0 -723
- package/dist/TileContainer-0bf0ea1b.js +0 -31
- package/dist/TileInfoTilemapCache-d78858c0.js +0 -38
- package/dist/TileLayer-0edee064.js +0 -194
- package/dist/TileLayerView2D-78d5801b.js +0 -187
- package/dist/TilemapCache-79699d61.js +0 -189
- package/dist/TimeInfo-40c96ade.js +0 -42
- package/dist/TimeOnly-9ee66ca6.js +0 -706
- package/dist/Tipograph/Paragraph/Paragraph.d.ts +0 -25
- package/dist/Tipograph/Title/Title.d.ts +0 -25
- package/dist/Toggle/Toggle.d.ts +0 -45
- package/dist/Tooltip-e7498dc9.js +0 -138
- package/dist/TopFeaturesQuery-ad224e01.js +0 -32
- package/dist/TurboLine-6ab04aef.js +0 -565
- package/dist/UniqueValueRenderer-eaa5f8a6.js +0 -1039
- package/dist/UnknownLayer-e280ddd4.js +0 -30
- package/dist/UnknownTimeZone-220952b5.js +0 -15
- package/dist/UnsupportedLayer-447f7676.js +0 -31
- package/dist/UpdateTracking2D-e9adad8f.js +0 -8566
- package/dist/Upload/Upload.d.ts +0 -129
- package/dist/Util-002f5109.js +0 -57
- package/dist/VectorTileLayer-3210be81.js +0 -544
- package/dist/VectorTileLayerView2D-6a51e3b8.js +0 -2108
- package/dist/Version-3de8cbca.js +0 -33
- package/dist/VertexArrayObject-07998745.js +0 -73
- package/dist/VertexColor.glsl-e415cf02.js +0 -2683
- package/dist/VertexSnappingCandidate-b676241f.js +0 -13
- package/dist/VideoLayerView2D-f659dd0d.js +0 -124
- package/dist/VoxelLayer-003f82ff.js +0 -631
- package/dist/WFSLayer-3da6c5f7.js +0 -221
- package/dist/WFSSourceWorker-9a11693a.js +0 -157
- package/dist/WGLContainer-3d159b63.js +0 -5426
- package/dist/WMSLayer-fc0632f8.js +0 -536
- package/dist/WMSLayerView2D-54e80e1b.js +0 -117
- package/dist/WMTSLayer-9324b12b.js +0 -531
- package/dist/WMTSLayerView2D-3ef936db.js +0 -142
- package/dist/WebTileLayer-45c563ff.js +0 -110
- package/dist/WhereClause-7a28b740.js +0 -2766
- package/dist/WorkerHandle-0d54a6c7.js +0 -47
- package/dist/WorkerTileHandler-786c2b24.js +0 -1539
- package/dist/action-163397e3.js +0 -198
- package/dist/action-group-4859fb97.js +0 -145
- package/dist/action-menu-2d70b2fc.js +0 -1759
- package/dist/apng-9b71d52c.js +0 -392
- package/dist/arcade-fa309282.js +0 -229
- package/dist/arcadeAsyncRuntime-738498fd.js +0 -943
- package/dist/arcadeUtils-f71d80fa.js +0 -8741
- package/dist/arcgis-knowledge-client-core-6056bcea.js +0 -1218
- package/dist/arcgis-knowledge-client-core-simd-9bc1f83e.js +0 -1218
- package/dist/arcgisLayers-b2b878bd.js +0 -152
- package/dist/associatedFeatureServiceUtils-df5b5187.js +0 -92
- package/dist/axisAngleDegrees-32643b7c.js +0 -49
- package/dist/basis_transcoder-3187cc92.js +0 -1248
- package/dist/calcite-action-bar-5a87c23c.js +0 -303
- package/dist/calcite-action-ee2ca847.js +0 -22
- package/dist/calcite-action-group-19aa86ee.js +0 -28
- package/dist/calcite-button-8e9175c0.js +0 -228
- package/dist/calcite-flow-57d26d2d.js +0 -128
- package/dist/calcite-flow-item-4a3e3fc0.js +0 -499
- package/dist/calcite-icon-d99e280a.js +0 -16
- package/dist/calcite-input-28b20785.js +0 -24
- package/dist/calcite-label-4f30e08d.js +0 -79
- package/dist/calcite-list-0cee7628.js +0 -2135
- package/dist/calcite-list-item-0a19efa8.js +0 -576
- package/dist/calcite-list-item-group-0706662f.js +0 -71
- package/dist/calcite-loader-865045b1.js +0 -14
- package/dist/calcite-modal-3e4da6fd.js +0 -333
- package/dist/calcite-notice-50b74ab7.js +0 -181
- package/dist/calcite-option-713c1d40.js +0 -94
- package/dist/calcite-scrim-809fbd0b.js +0 -18
- package/dist/calcite-select-28d8edfc.js +0 -231
- package/dist/capabilities-c8f838be.js +0 -50
- package/dist/chartCommon-13718cda.js +0 -256
- package/dist/chartUtilsAm5-6be145fb.js +0 -2954
- package/dist/clientSideDefaults-5c1f97c9.js +0 -39
- package/dist/colorRamps-8792655e.js +0 -38
- package/dist/colorUtils-54f4b662.js +0 -164
- package/dist/commonProperties-f9559903.js +0 -60
- package/dist/computeTranslationToOriginAndRotation-4876cb93.js +0 -60
- package/dist/conditionalSlot-87175989.js +0 -27
- package/dist/createConnection-f974a00a.js +0 -299
- package/dist/dataUtils-7c276b73.js +0 -1421
- package/dist/deduplicate-59fb9cac.js +0 -89
- package/dist/defaults-2bfa4a36.js +0 -31
- package/dist/deleteForwardEdits-f653b513.js +0 -13
- package/dist/diffUtils-e71a6152.js +0 -90
- package/dist/drapedUtils-b42fcbc6.js +0 -75
- package/dist/earcut-6fa1a128.js +0 -292
- package/dist/edgeProcessing-2ff1f201.js +0 -252
- package/dist/editingSupport-68545668.js +0 -203
- package/dist/editsZScale-c7cdd215.js +0 -37
- package/dist/elevationInfoUtils-5456a079.js +0 -126
- package/dist/executeForIds-4ab75c0d.js +0 -14
- package/dist/executeForTopCount-7e095ec1.js +0 -17
- package/dist/executeForTopExtents-19daf9d0.js +0 -17
- package/dist/executeForTopIds-1ba3a4af.js +0 -17
- package/dist/executeQueryJSON-46168866.js +0 -15
- package/dist/executeQueryPBF-d8623daf.js +0 -152
- package/dist/executeRelationshipQuery-011dfb45.js +0 -53
- package/dist/executeTopFeaturesQuery-02166801.js +0 -18
- package/dist/featureConversionUtils-650d7601.js +0 -479
- package/dist/featureLayerUtils-64e09283.js +0 -142
- package/dist/featureLayerUtils-b07f9c11.js +0 -250
- package/dist/featureSetUtils-9d37d6f8.js +0 -2530
- package/dist/featuresetbase-62aeb079.js +0 -707
- package/dist/featuresetgeom-51f9fc4e.js +0 -99
- package/dist/featuresetstats-4db32894.js +0 -81
- package/dist/featuresetstring-990c3287.js +0 -95
- package/dist/fetchService-5198dd4a.js +0 -33
- package/dist/fieldProperties-edfa24cb.js +0 -33
- package/dist/floatRGBA-516d7961.js +0 -20
- package/dist/form-99719d52.js +0 -138
- package/dist/geohashUtils-2bc76440.js +0 -85
- package/dist/geojson-603231df.js +0 -208
- package/dist/geomasync-e9063b4c.js +0 -567
- package/dist/geometryEngine-d3bb2fd6.js +0 -192
- package/dist/geometryEngineAsync-55aa6170.js +0 -217
- package/dist/geometryEngineBase-527e8b63.js +0 -18463
- package/dist/geometryEngineJSON-28087174.js +0 -46
- package/dist/geometryEngineJSON-d54949f9.js +0 -171
- package/dist/geometryEngineWorker-dc2c7127.js +0 -11
- package/dist/geometryServiceUtils-6a3e1e93.js +0 -28
- package/dist/georeference-ed8b2c30.js +0 -291
- package/dist/gif-204e82dd.js +0 -323
- package/dist/gltfexport-b2566542.js +0 -705
- package/dist/groupLayerUtils-ea9e6359.js +0 -39
- package/dist/heatmapUtils-56758920.js +0 -45
- package/dist/highlightReasons-de432106.js +0 -19
- package/dist/hydrated-0e1c7565.js +0 -40
- package/dist/i3s-bb0b5b67.js +0 -809
- package/dist/icon-c6e3bd23.js +0 -127
- package/dist/imageBitmapUtils-881d8c64.js +0 -23
- package/dist/imageUtils-57eeedc5.js +0 -69
- package/dist/imageUtils-ef69c578.js +0 -89
- package/dist/imageryUtils-23f51cb1.js +0 -43
- package/dist/index-01c737ed.js +0 -42563
- package/dist/input-message-673a9baa.js +0 -92
- package/dist/input2-bbf6454e.js +0 -575
- package/dist/interactive-aeb2cb9f.js +0 -80
- package/dist/jsonContext-2dc288b1.js +0 -15
- package/dist/jsonUtils-1abd4bfc.js +0 -59
- package/dist/jsonUtils-913fa1bd.js +0 -86
- package/dist/jsonUtils-f6a5e63b.js +0 -476
- package/dist/kmlUtils-7c2744fe.js +0 -112
- package/dist/knowledgeGraphService-6a349e04.js +0 -739
- package/dist/knowledgegraph-c91b0bb2.js +0 -149
- package/dist/labelUtils-a3634e8f.js +0 -61
- package/dist/labelingInfo-568c9210.js +0 -46
- package/dist/layersCreator-4a5366ea.js +0 -151
- package/dist/layersLoader-b87d4857.js +0 -197
- package/dist/lazyLayerLoader-8817000c.js +0 -10
- package/dist/lclayout-64c67b4e.js +0 -773
- package/dist/lengthUtils-695e744c.js +0 -5
- package/dist/lerc-wasm-13192bf3.js +0 -325
- package/dist/libtess-asm-4883179d.js +0 -3673
- package/dist/libtess-fc70d1ce.js +0 -269
- package/dist/lineSegment-3aa941f5.js +0 -76
- package/dist/loadGLTFMesh-db6645f5.js +0 -181
- package/dist/loadable-266f324b.js +0 -24
- package/dist/loader-d1ce1bc1.js +0 -79
- package/dist/lyr3DWorker-dd48e619.js +0 -2108
- package/dist/mapViewDeps-226d9da3.js +0 -3052
- package/dist/mediaLayerUtils-ae485c27.js +0 -35
- package/dist/meshFeatureSet-8a2ad011.js +0 -126
- package/dist/meshVertexSpaceUtils-6efe3dcc.js +0 -58
- package/dist/multidimensionalUtils-508a3f3f.js +0 -290
- package/dist/normalizeUtilsSync-1dae280b.js +0 -181
- package/dist/number-5aa3a81b.js +0 -128
- package/dist/objectResourceUtils-642ab03e.js +0 -1455
- package/dist/observers-f646a6a4.js +0 -30
- package/dist/ogcFeatureUtils-46ac1c44.js +0 -206
- package/dist/openCloseComponent-47eb52c6.js +0 -37
- package/dist/orientedBoundingBox-554ccdc6.js +0 -447
- package/dist/parser-0701286c.js +0 -488
- package/dist/pbf-5dd791f5.js +0 -215
- package/dist/pbfQueryUtils-a6ca7e23.js +0 -422
- package/dist/pe-wasm-6c16b121.js +0 -887
- package/dist/persistable-9eb0e8df.js +0 -89
- package/dist/perspectiveUtils-b194621d.js +0 -42
- package/dist/pieChart-b97433d0.js +0 -555
- package/dist/plane-3398eec1.js +0 -160
- package/dist/popupUtils-c444b896.js +0 -22
- package/dist/popupUtils-d871563b.js +0 -50
- package/dist/portalItemUtils-4c4caad0.js +0 -57
- package/dist/portalLayers-cb07742f.js +0 -312
- package/dist/portalUtils-effd590f.js +0 -7
- package/dist/programUtils-65af7b7c.js +0 -59
- package/dist/project-ee9c2947.js +0 -21
- package/dist/projectPointToVector-7dc831a9.js +0 -14
- package/dist/projectVectorToVector-5163db7a.js +0 -13
- package/dist/quantityUtils-5cd4cf90.js +0 -33
- package/dist/quantizationUtils-0a8f74c6.js +0 -68
- package/dist/quat-a508aed3.js +0 -104
- package/dist/query-b6e1fd14.js +0 -89
- package/dist/queryAttachments-7b39ebdc.js +0 -39
- package/dist/queryEngineUtils-cb8e309e.js +0 -21
- package/dist/queryTopFeatures-2e0e3941.js +0 -50
- package/dist/queryZScale-c5733d0a.js +0 -12
- package/dist/rasterProjectionHelper-213afa27.js +0 -577
- package/dist/rasterUtils-f2e44e8b.js +0 -122
- package/dist/rasterizingUtils-25cc0190.js +0 -46
- package/dist/request-e0c679b3.js +0 -46
- package/dist/requestImageUtils-37d79281.js +0 -8
- package/dist/resourceExtension-5f3f1c80.js +0 -17
- package/dist/resourceUtils-0d68cbc2.js +0 -69
- package/dist/resourceUtils-374db840.js +0 -62
- package/dist/resourceUtils-43ce192b.js +0 -42
- package/dist/saveAPIKeyUtils-1a3d4a8a.js +0 -8
- package/dist/saveUtils-43fdc547.js +0 -24
- package/dist/scaleUtils-bdf8b6cb.js +0 -23
- package/dist/scrim-44eb4dc0.js +0 -114
- package/dist/serviceCapabilitiesUtils-823612b8.js +0 -64
- package/dist/sourceUtils-01d115c6.js +0 -71
- package/dist/sphere-908cd9aa.js +0 -199
- package/dist/statsWorker-49f9befe.js +0 -37
- package/dist/streamLayerUtils-29324e05.js +0 -31
- package/dist/styleUtils-82e8da52.js +0 -75
- package/dist/styleUtils-8541d60d.js +0 -14
- package/dist/sublayerUtils-eaac2486.js +0 -37
- package/dist/substitute-1f578d70.js +0 -52
- package/dist/symbolColorUtils-18fd6b3d.js +0 -8
- package/dist/symbolLayerUtils-4c58b291.js +0 -31
- package/dist/symbologySnappingCandidates-14d94b6b.js +0 -221
- package/dist/t9n-c1c2b6c8.js +0 -349
- package/dist/testSVGPremultipliedAlpha-159dac90.js +0 -94
- package/dist/timeSupport-3f529cdb.js +0 -410
- package/dist/triangle-8a3a2ba8.js +0 -98
- package/dist/unitConversionUtils-f0ebaf75.js +0 -17
- package/dist/unitFormatUtils-555e2d94.js +0 -40
- package/dist/uploadAssetErrors-d1389781.js +0 -70
- package/dist/uploadAssets-5e85f09d.js +0 -330
- package/dist/utils-3a10b10c.js +0 -34
- package/dist/utils-505c54e9.js +0 -91
- package/dist/utils-5432e258.js +0 -433
- package/dist/utils-7a88ec6a.js +0 -419
- package/dist/utils-7fa9cdf9.js +0 -2746
- package/dist/utils-d252c575.js +0 -73
- package/dist/utils-f07e00b3.js +0 -232
- package/dist/utils-fda10b4b.js +0 -79
- package/dist/utils3-c34ab97c.js +0 -75
- package/dist/vec3-f79c600d.js +0 -81
- package/dist/vec42-36edeb73.js +0 -125
- package/dist/versionUtils-6935648b.js +0 -161
- package/dist/visualVariableUtils-c425461a.js +0 -267
- package/dist/webStyleSymbolUtils-4f42a29f.js +0 -48
- package/dist/webglDeps-5f18210d.js +0 -23
- package/dist/wfsUtils-6f7f1e3e.js +0 -343
- package/dist/workerHelper-9dc9a790.js +0 -11
- package/dist/xyChart-e5648fee.js +0 -3335
|
@@ -0,0 +1,2746 @@
|
|
|
1
|
+
import { y as _e } from "./colorUtils-6d5e716b.js";
|
|
2
|
+
import { e as c, y as m, c as A, bx as $e, ei as rs, bu as jt, db as Y, bz as L, bv as vs, c7 as ws, c5 as Ct, c2 as _t, kI as kt, W as Bt, a$ as Be, b3 as bs } from "./index-6ebf29c1.js";
|
|
3
|
+
import { u as w, r as nt, i as vt, o as As, t as Ts, n as Fe, v as os, d as Xt, w as is, x as Ps, y as K, z as $s, A as Fs, B as Ns, C as Is } from "./dataUtils-65604399.js";
|
|
4
|
+
import { a as Rs, s as ks, v as Vt, C as Cs, w as as, e as je, x as _s, y as Bs, z as Kt, E as js, H as Ss, I as Jt, J as Ms, M as Os, K as Ds } from "./RasterSymbolizer-6177c6ec.js";
|
|
5
|
+
import { m as Gs, p as zs } from "./colorRamps-0fae1fde.js";
|
|
6
|
+
let Ut = class extends $e {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments), this.raster = void 0;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
c([m({ json: { write: !0 } })], Ut.prototype, "raster", void 0), Ut = c([A("esri.layers.support.rasterFunctions.AspectFunctionArguments")], Ut);
|
|
12
|
+
const D = Ut;
|
|
13
|
+
var Yt;
|
|
14
|
+
let wt = Yt = class extends D {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments), this.raster2 = void 0;
|
|
17
|
+
}
|
|
18
|
+
get rasters() {
|
|
19
|
+
return [this.raster, this.raster2];
|
|
20
|
+
}
|
|
21
|
+
clone() {
|
|
22
|
+
return new Yt({ raster: this.raster, raster2: this.raster2, operation: this.operation });
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
c([m({ json: { write: !0 } })], wt.prototype, "operation", void 0), c([m({ json: { write: !0 } })], wt.prototype, "raster2", void 0), c([m({ readOnly: !0 })], wt.prototype, "rasters", null), wt = Yt = c([A("esri.layers.support.rasterFunctions.ArithmeticFunctionArguments")], wt);
|
|
26
|
+
const Es = wt, Vs = /* @__PURE__ */ new Set(["slope", "aspect", "curvature", "hillshade", "shadedrelief", "statistics"]);
|
|
27
|
+
let S = class extends $e {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments), this.functionArguments = null, this.readingBufferSize = 0, this.id = -1, this.isNoopProcess = !1, this.rawInputBandIds = [], this.rawSourceRasterInfos = null, this.isInputBandIdsSwizzled = !1, this.swizzledBandSelection = [], this.isBranch = !1, this._bindingResult = null;
|
|
30
|
+
}
|
|
31
|
+
get supportsGPU() {
|
|
32
|
+
return this._bindingResult.supportsGPU;
|
|
33
|
+
}
|
|
34
|
+
get flatWebGLFunctionChain() {
|
|
35
|
+
var u;
|
|
36
|
+
const t = this.getWebGLProcessorDefinition();
|
|
37
|
+
if (!t)
|
|
38
|
+
return null;
|
|
39
|
+
const e = [t], { parameters: s } = t;
|
|
40
|
+
let o = s.rasters || s.raster && [s.raster];
|
|
41
|
+
for (; o != null && o.length; ) {
|
|
42
|
+
e.unshift(...o);
|
|
43
|
+
const l = [];
|
|
44
|
+
for (let p = 0; p < o.length; p++) {
|
|
45
|
+
const { parameters: h } = o[p], f = h.rasters || h.raster && [h.raster];
|
|
46
|
+
f != null && f.length && l.push(...f);
|
|
47
|
+
}
|
|
48
|
+
o = l;
|
|
49
|
+
}
|
|
50
|
+
for (let l = e.length - 1; l >= 0; l--)
|
|
51
|
+
e[l].isNoopProcess && e.splice(l, 1);
|
|
52
|
+
let r = !1;
|
|
53
|
+
for (let l = 0; l < e.length; l++) {
|
|
54
|
+
const p = e[l];
|
|
55
|
+
p.id = e.length - l - 1;
|
|
56
|
+
const { rasters: h } = p.parameters;
|
|
57
|
+
r = r || h != null && h.length > 1;
|
|
58
|
+
}
|
|
59
|
+
const a = e.some(({ name: l }) => Vs.has(l.toLowerCase())), { rawSourceRasterInfos: n } = this;
|
|
60
|
+
return { functions: e, hasBranches: r, hasFocalFunction: a, isSourceSingleBand: ((u = n == null ? void 0 : n[0]) == null ? void 0 : u.bandCount) === 1 };
|
|
61
|
+
}
|
|
62
|
+
bind(t, e = !1, s = -1) {
|
|
63
|
+
this.id = s + 1;
|
|
64
|
+
const o = this._getRasterValues();
|
|
65
|
+
let r = !0;
|
|
66
|
+
for (let a = 0; a < o.length; a++) {
|
|
67
|
+
const n = o[a];
|
|
68
|
+
if (n != null && this._isRasterFunctionValue(n)) {
|
|
69
|
+
const u = n.bind(t, e, this.id + a);
|
|
70
|
+
if (!u.success)
|
|
71
|
+
return this._bindingResult = u, u;
|
|
72
|
+
r = r && u.supportsGPU;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return !this.rasterInfo || e ? (this.sourceRasterInfos = this._getSourceRasterInfos(t), this._bindingResult = this._bindSourceRasters(), this._bindingResult.success && this._patchRasterInfo(), this._bindingResult.supportsGPU = r && this._bindingResult.supportsGPU, this.processInputBandIds(), this._bindingResult) : (this._bindingResult = { success: !0, supportsGPU: !0 }, this.processInputBandIds(), this._bindingResult);
|
|
76
|
+
}
|
|
77
|
+
process(t) {
|
|
78
|
+
const e = this._getRasterValues(), s = e.length === 0 ? t.pixelBlocks ?? t.primaryPixelBlocks : e.map((o) => this._readRasterValue(o, t));
|
|
79
|
+
return this._processPixels({ ...t, pixelBlocks: s });
|
|
80
|
+
}
|
|
81
|
+
processInputBandIds() {
|
|
82
|
+
const t = this._getRasterValues().filter(this._isRasterFunctionValue);
|
|
83
|
+
let e;
|
|
84
|
+
if (t.length > 1) {
|
|
85
|
+
const r = t.map((n) => n.processInputBandIds()[0]);
|
|
86
|
+
this.rawInputBandIds = r, this.isInputBandIdsSwizzled = this.rawInputBandIds.some((n, u) => n !== u);
|
|
87
|
+
const a = t.filter((n) => n.functionName === "ExtractBand");
|
|
88
|
+
return a.length && a.forEach((n, u) => {
|
|
89
|
+
n.isInputBandIdsSwizzled = !0, n.swizzledBandSelection = [u, u, u];
|
|
90
|
+
}), this.rawInputBandIds;
|
|
91
|
+
}
|
|
92
|
+
const s = t[0];
|
|
93
|
+
if (s) {
|
|
94
|
+
if (e = s.processInputBandIds(), s.isInputBandIdsSwizzled)
|
|
95
|
+
return this.rawInputBandIds = e, e;
|
|
96
|
+
} else {
|
|
97
|
+
e = [];
|
|
98
|
+
const { bandCount: r } = this.sourceRasterInfos[0];
|
|
99
|
+
for (let a = 0; a < r; a++)
|
|
100
|
+
e.push(a);
|
|
101
|
+
}
|
|
102
|
+
const o = this._getInputBandIds(e);
|
|
103
|
+
return this.isInputBandIdsSwizzled = o.some((r, a) => r !== a), this.rawInputBandIds = o, this.rawInputBandIds;
|
|
104
|
+
}
|
|
105
|
+
getPrimaryRasters() {
|
|
106
|
+
const t = [], e = [];
|
|
107
|
+
return this._getPrimaryRasters(this, t, e), { rasters: t, rasterIds: e };
|
|
108
|
+
}
|
|
109
|
+
getWebGLProcessorDefinition() {
|
|
110
|
+
const t = this._getWebGLParameters(), { raster: e, rasters: s } = this.functionArguments;
|
|
111
|
+
return s && Array.isArray(s) && s.length ? (t.rasters = s.map((o) => this._isRasterFunctionValue(o) ? o.getWebGLProcessorDefinition() : typeof o == "number" ? { name: "Constant", parameters: { value: o }, pixelType: "f32", id: -1, isNoopProcess: !1 } : { name: "Identity", parameters: { value: o }, pixelType: "f32", id: -1, isNoopProcess: !1 }), t.rasters.some((o) => o != null) || (t.rasters = null)) : this._isRasterFunctionValue(e) && (t.raster = e.getWebGLProcessorDefinition()), { name: this.functionName, parameters: t, pixelType: this.outputPixelType, id: this.id, isNoopProcess: this.isNoopProcess };
|
|
112
|
+
}
|
|
113
|
+
getClippingGeometries() {
|
|
114
|
+
const t = [];
|
|
115
|
+
this.functionName === "Clip" && t.push(this.functionArguments);
|
|
116
|
+
const { raster: e, rasters: s } = this.functionArguments;
|
|
117
|
+
if (s && Array.isArray(s) && s.length)
|
|
118
|
+
s.forEach((o) => {
|
|
119
|
+
if (this._isRasterFunctionValue(o)) {
|
|
120
|
+
const r = o.getClippingGeometries();
|
|
121
|
+
t.push(...r);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
else if (this._isRasterFunctionValue(e)) {
|
|
125
|
+
const o = e.getClippingGeometries();
|
|
126
|
+
t.push(...o);
|
|
127
|
+
}
|
|
128
|
+
return t;
|
|
129
|
+
}
|
|
130
|
+
_getOutputPixelType(t) {
|
|
131
|
+
return this.outputPixelType === "unknown" ? t : this.outputPixelType ?? t;
|
|
132
|
+
}
|
|
133
|
+
_getWebGLParameters() {
|
|
134
|
+
return {};
|
|
135
|
+
}
|
|
136
|
+
_getInputBandIds(t) {
|
|
137
|
+
return t;
|
|
138
|
+
}
|
|
139
|
+
_removeStatsHistColormapVAT(t) {
|
|
140
|
+
t.statistics = null, t.histograms = null, t.colormap = null, t.attributeTable = null;
|
|
141
|
+
}
|
|
142
|
+
_getRasterValues() {
|
|
143
|
+
const { rasterArgumentNames: t } = this;
|
|
144
|
+
return t[0] === "rasters" ? this.functionArguments.rasters ?? [] : t.flatMap((e) => this.functionArguments[e]);
|
|
145
|
+
}
|
|
146
|
+
_getSourceRasterInfos(t) {
|
|
147
|
+
const e = this._getRasterValues(), { rasterInfos: s, rasterIds: o } = t;
|
|
148
|
+
if (e.length === 0)
|
|
149
|
+
return s;
|
|
150
|
+
const r = e.map((n) => n && typeof n == "object" && "bind" in n && n.rasterInfo ? n.rasterInfo : typeof n == "string" && o.includes(n) ? s[o.indexOf(n)] : typeof n != "number" ? s[0] : void 0), a = r.find((n) => n) ?? s[0];
|
|
151
|
+
return r.forEach((n, u) => {
|
|
152
|
+
n === void 0 && (r[u] = a);
|
|
153
|
+
}), r;
|
|
154
|
+
}
|
|
155
|
+
_getPrimaryRasterId(t) {
|
|
156
|
+
return t == null ? void 0 : t.rasterId;
|
|
157
|
+
}
|
|
158
|
+
_getPrimaryRasters(t, e = [], s = []) {
|
|
159
|
+
for (let o = 0; o < t.sourceRasters.length; o++) {
|
|
160
|
+
const r = t.sourceRasters[o];
|
|
161
|
+
if (typeof r != "number")
|
|
162
|
+
if ("bind" in r)
|
|
163
|
+
this._getPrimaryRasters(r, e, s);
|
|
164
|
+
else {
|
|
165
|
+
const a = r, n = this._getPrimaryRasterId(a);
|
|
166
|
+
if (n == null)
|
|
167
|
+
continue;
|
|
168
|
+
s.includes(n) || (this.mainPrimaryRasterId === n ? (e.unshift(a), s.unshift(n)) : (e.push(a), s.push(n)));
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
_isRasterFunctionValue(t) {
|
|
173
|
+
return t != null && typeof t == "object" && "getWebGLProcessorDefinition" in t;
|
|
174
|
+
}
|
|
175
|
+
_readRasterValue(t, e) {
|
|
176
|
+
const { primaryPixelBlocks: s } = e;
|
|
177
|
+
if (t == null || t === "$$") {
|
|
178
|
+
const o = s[0];
|
|
179
|
+
return o == null ? null : o.clone();
|
|
180
|
+
}
|
|
181
|
+
if (typeof t == "string") {
|
|
182
|
+
const o = e.primaryRasterIds.indexOf(t);
|
|
183
|
+
return o === -1 ? null : s[o];
|
|
184
|
+
}
|
|
185
|
+
if (typeof t == "number") {
|
|
186
|
+
const o = s[0];
|
|
187
|
+
if (o == null)
|
|
188
|
+
return null;
|
|
189
|
+
const { width: r, height: a, pixelType: n } = o, u = new Float32Array(r * a);
|
|
190
|
+
u.fill(t);
|
|
191
|
+
const l = this.sourceRasterInfos[0].bandCount, p = new Array(l).fill(u);
|
|
192
|
+
return new w({ width: r, height: a, pixelType: n, pixels: p });
|
|
193
|
+
}
|
|
194
|
+
return t.process(e);
|
|
195
|
+
}
|
|
196
|
+
_patchRasterInfo() {
|
|
197
|
+
const { rasterInfo: t } = this;
|
|
198
|
+
if (!(t != null && t.keyProperties))
|
|
199
|
+
return;
|
|
200
|
+
const { bandCount: e, keyProperties: s, statistics: o, histograms: r } = t, a = s.BandProperties;
|
|
201
|
+
a && a.length !== e && (t.keyProperties = { ...s, BandProperties: void 0 }), o && o.length !== e && (t.statistics = o.length > e ? o.slice(0, e) : null), r && r.length !== e && (t.histograms = r.length > e ? r.slice(0, e) : null), s.BAND_COUNT && Number(s.BAND_COUNT) !== e && (t.keyProperties = { ...s, BAND_COUNT: typeof s.BAND_COUNT == "string" ? String(e) : e });
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
c([m({ json: { write: !0 } })], S.prototype, "functionName", void 0), c([m({ json: { write: !0 } })], S.prototype, "functionArguments", void 0), c([m()], S.prototype, "rasterArgumentNames", void 0), c([m({ json: { write: !0 } }), rs((i) => i == null ? void 0 : i.toLowerCase())], S.prototype, "outputPixelType", void 0), c([m({ json: { write: !0 } })], S.prototype, "mainPrimaryRasterId", void 0), c([m()], S.prototype, "sourceRasters", void 0), c([m({ type: [Rs], json: { write: !0 } })], S.prototype, "sourceRasterInfos", void 0), c([m({ json: { write: !0 } })], S.prototype, "rasterInfo", void 0), c([m({ json: { write: !0 } })], S.prototype, "readingBufferSize", void 0), c([m({ json: { write: !0 } })], S.prototype, "id", void 0), c([m()], S.prototype, "isNoopProcess", void 0), c([m()], S.prototype, "supportsGPU", null), c([m()], S.prototype, "rawInputBandIds", void 0), c([m()], S.prototype, "rawSourceRasterInfos", void 0), c([m()], S.prototype, "isInputBandIdsSwizzled", void 0), c([m()], S.prototype, "swizzledBandSelection", void 0), c([m()], S.prototype, "isBranch", void 0), c([m({ readOnly: !0 })], S.prototype, "flatWebGLFunctionChain", null), c([m()], S.prototype, "_bindingResult", void 0), S = c([A("esri.layers.support.rasterFunctions.BaseRasterFunction")], S);
|
|
205
|
+
const G = S, $ = { userDefined: -1, lineDetectionHorizontal: 0, lineDetectionVertical: 1, lineDetectionLeftDiagonal: 2, lineDetectionRightDiagonal: 3, gradientNorth: 4, gradientWest: 5, gradientEast: 6, gradientSouth: 7, gradientNorthEast: 8, gradientNorthWest: 9, smoothArithmeticMean: 10, smoothing3x3: 11, smoothing5x5: 12, sharpening3x3: 13, sharpening5x5: 14, laplacian3x3: 15, laplacian5x5: 16, sobelHorizontal: 17, sobelVertical: 18, sharpen: 19, sharpen2: 20, pointSpread: 21, none: 255 }, Us = { plus: 1, minus: 2, times: 3, sqrt: 4, power: 5, abs: 10, divide: 23, exp: 25, exp10: 26, exp2: 27, int: 30, float: 32, ln: 35, log10: 36, log2: 37, mod: 44, negate: 45, roundDown: 48, roundUp: 49, square: 53, floatDivide: 64, floorDivide: 65 }, U = { bitwiseAnd: 11, bitwiseLeftShift: 12, bitwiseNot: 13, bitwiseOr: 14, bitwiseRightShift: 15, bitwiseXOr: 16, booleanAnd: 17, booleanNot: 18, booleanOr: 19, booleanXOr: 20, equalTo: 24, greaterThan: 28, greaterThanEqual: 29, lessThan: 33, lessThanEqual: 34, isNull: 31, notEqual: 46 }, H = { acos: 6, asin: 7, atan: 8, atanh: 9, cos: 21, cosh: 22, sin: 51, sinh: 52, tan: 56, tanh: 57, acosh: 59, asinh: 60, atan2: 61 }, Ls = { majority: 38, max: 39, mean: 40, med: 41, min: 42, minority: 43, range: 47, stddev: 54, sum: 55, variety: 58, majorityIgnoreNoData: 66, maxIgnoreNoData: 67, meanIgnoreNoData: 68, medIgnoreNoData: 69, minIgnoreNoData: 70, minorityIgnoreNoData: 71, rangeIgnoreNoData: 72, stddevIgnoreNoData: 73, sumIgnoreNoData: 74, varietyIgnoreNoData: 75 }, us = { setNull: 50, conditional: 78 }, Se = { ...Us, ...U, ...H, ...Ls, ...us }, ls = /* @__PURE__ */ new Map([[H.acos, { domain: [0, Math.PI], isInteger: !1 }], [H.asin, { domain: [-Math.PI / 2, Math.PI / 2], isInteger: !1 }], [H.atan, { domain: [-Math.PI / 2, Math.PI / 2], isInteger: !1 }], [H.cos, { domain: [-1, 1], isInteger: !1 }], [H.sin, { domain: [-1, 1], isInteger: !1 }], [U.booleanAnd, { domain: [0, 1], isInteger: !0 }], [U.booleanNot, { domain: [0, 1], isInteger: !0 }], [U.booleanOr, { domain: [0, 1], isInteger: !0 }], [U.booleanXOr, { domain: [0, 1], isInteger: !0 }], [U.equalTo, { domain: [0, 1], isInteger: !0 }], [U.notEqual, { domain: [0, 1], isInteger: !0 }], [U.greaterThan, { domain: [0, 1], isInteger: !0 }], [U.greaterThanEqual, { domain: [0, 1], isInteger: !0 }], [U.lessThan, { domain: [0, 1], isInteger: !0 }], [U.lessThanEqual, { domain: [0, 1], isInteger: !0 }], [U.isNull, { domain: [0, 1], isInteger: !0 }]]);
|
|
206
|
+
function Me(i) {
|
|
207
|
+
return ls.get(i);
|
|
208
|
+
}
|
|
209
|
+
const Oe = [0, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 999, 999, 999, 999, 999, 999, 2, 1, 2, 999, 1, 1, 2, 1, 1, 1, 999, 999, 1, 1, 999, 1, 1, 2, 999, 999, 2, 2, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 3, 999, 3];
|
|
210
|
+
function Ws(i, t = !1) {
|
|
211
|
+
const e = i.map((n) => n.mask), s = e.filter((n) => n != null), o = i[0].pixels[0].length;
|
|
212
|
+
if (s.length === 0 || t && s.length !== e.length)
|
|
213
|
+
return new Uint8Array(o).fill(255);
|
|
214
|
+
const r = s[0], a = new Uint8Array(r);
|
|
215
|
+
if (s.length === 1)
|
|
216
|
+
return a;
|
|
217
|
+
if (!t) {
|
|
218
|
+
for (let n = 1; n < s.length; n++) {
|
|
219
|
+
const u = s[n];
|
|
220
|
+
for (let l = 0; l < a.length; l++)
|
|
221
|
+
a[l] && (a[l] = u[l] ? 255 : 0);
|
|
222
|
+
}
|
|
223
|
+
return a;
|
|
224
|
+
}
|
|
225
|
+
for (let n = 1; n < s.length; n++) {
|
|
226
|
+
const u = s[n];
|
|
227
|
+
for (let l = 0; l < a.length; l++)
|
|
228
|
+
a[l] === 0 && (a[l] = u[l] ? 255 : 0);
|
|
229
|
+
}
|
|
230
|
+
return a;
|
|
231
|
+
}
|
|
232
|
+
function qs(i, t, e) {
|
|
233
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
234
|
+
for (let n = 0; n < r; n++)
|
|
235
|
+
t && !t[n] || (a[n] = s[n] + o[n]);
|
|
236
|
+
return a;
|
|
237
|
+
}
|
|
238
|
+
function Hs(i, t, e) {
|
|
239
|
+
const [s] = i, o = s.length, r = w.createEmptyBand("f32", o);
|
|
240
|
+
return r.set(s), r;
|
|
241
|
+
}
|
|
242
|
+
function Xs(i, t, e) {
|
|
243
|
+
const [s] = i, o = s.length, r = w.createEmptyBand(e, o);
|
|
244
|
+
for (let a = 0; a < o; a++)
|
|
245
|
+
t && !t[a] || (r[a] = s[a] * s[a]);
|
|
246
|
+
return r;
|
|
247
|
+
}
|
|
248
|
+
function Js(i, t, e) {
|
|
249
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
250
|
+
for (let n = 0; n < r; n++)
|
|
251
|
+
t && !t[n] || (a[n] = s[n] - o[n]);
|
|
252
|
+
return a;
|
|
253
|
+
}
|
|
254
|
+
function Ks(i, t, e) {
|
|
255
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
256
|
+
for (let n = 0; n < r; n++)
|
|
257
|
+
t && !t[n] || (a[n] = s[n] * o[n]);
|
|
258
|
+
return a;
|
|
259
|
+
}
|
|
260
|
+
function Ys(i, t, e) {
|
|
261
|
+
const [s] = i, o = s.length, r = w.createEmptyBand(e, o);
|
|
262
|
+
for (let a = 0; a < o; a++)
|
|
263
|
+
t && !t[a] || (r[a] = Math.sign(s[a]) * Math.floor(Math.abs(s[a])));
|
|
264
|
+
return r;
|
|
265
|
+
}
|
|
266
|
+
function cs(i, t, e) {
|
|
267
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
268
|
+
for (let n = 0; n < r; n++)
|
|
269
|
+
t && !t[n] || (a[n] = s[n] / o[n]);
|
|
270
|
+
return a;
|
|
271
|
+
}
|
|
272
|
+
function Zs(i, t, e) {
|
|
273
|
+
return cs(i, t, "f32");
|
|
274
|
+
}
|
|
275
|
+
function Qs(i, t, e) {
|
|
276
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
277
|
+
for (let n = 0; n < r; n++)
|
|
278
|
+
t && !t[n] || (a[n] = Math.floor(s[n] / o[n]));
|
|
279
|
+
return a;
|
|
280
|
+
}
|
|
281
|
+
function tn(i, t, e, s) {
|
|
282
|
+
const o = i[0], r = o.length, a = w.createEmptyBand(e, r);
|
|
283
|
+
if (s === H.atanh) {
|
|
284
|
+
for (let u = 0; u < r; u++)
|
|
285
|
+
if (t[u]) {
|
|
286
|
+
const l = o[u];
|
|
287
|
+
Math.abs(l) >= 1 ? t[u] = 0 : a[u] = Math.atanh(l);
|
|
288
|
+
}
|
|
289
|
+
return a;
|
|
290
|
+
}
|
|
291
|
+
const n = s === H.asin ? Math.asin : Math.acos;
|
|
292
|
+
for (let u = 0; u < r; u++)
|
|
293
|
+
if (t[u]) {
|
|
294
|
+
const l = o[u];
|
|
295
|
+
Math.abs(l) > 1 ? t[u] = 0 : a[u] = n(l);
|
|
296
|
+
}
|
|
297
|
+
return a;
|
|
298
|
+
}
|
|
299
|
+
function en(i, t, e, s) {
|
|
300
|
+
const [o] = i, r = o.length, a = w.createEmptyBand(e, r);
|
|
301
|
+
for (let n = 0; n < r; n++)
|
|
302
|
+
t && !t[n] || (a[n] = s(o[n]));
|
|
303
|
+
return a;
|
|
304
|
+
}
|
|
305
|
+
function sn(i, t, e, s) {
|
|
306
|
+
const [o, r] = i, a = o.length, n = w.createEmptyBand(e, a);
|
|
307
|
+
for (let u = 0; u < a; u++)
|
|
308
|
+
t && !t[u] || (n[u] = s(o[u], r[u]));
|
|
309
|
+
return n;
|
|
310
|
+
}
|
|
311
|
+
function nn(i, t, e) {
|
|
312
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
313
|
+
for (let n = 0; n < r; n++)
|
|
314
|
+
t && !t[n] || (a[n] = s[n] & o[n]);
|
|
315
|
+
return a;
|
|
316
|
+
}
|
|
317
|
+
function rn(i, t, e) {
|
|
318
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
319
|
+
for (let n = 0; n < r; n++)
|
|
320
|
+
t && !t[n] || (a[n] = s[n] << o[n]);
|
|
321
|
+
return a;
|
|
322
|
+
}
|
|
323
|
+
function on(i, t, e) {
|
|
324
|
+
const [s] = i, o = s.length, r = w.createEmptyBand(e, o);
|
|
325
|
+
for (let a = 0; a < o; a++)
|
|
326
|
+
t && !t[a] || (r[a] = ~s[a]);
|
|
327
|
+
return r;
|
|
328
|
+
}
|
|
329
|
+
function an(i, t, e) {
|
|
330
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
331
|
+
for (let n = 0; n < r; n++)
|
|
332
|
+
t && !t[n] || (a[n] = s[n] | o[n]);
|
|
333
|
+
return a;
|
|
334
|
+
}
|
|
335
|
+
function un(i, t, e) {
|
|
336
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
337
|
+
for (let n = 0; n < r; n++)
|
|
338
|
+
t && !t[n] || (a[n] = s[n] >> o[n]);
|
|
339
|
+
return a;
|
|
340
|
+
}
|
|
341
|
+
function ln(i, t, e) {
|
|
342
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
343
|
+
for (let n = 0; n < r; n++)
|
|
344
|
+
t && !t[n] || (a[n] = s[n] ^ o[n]);
|
|
345
|
+
return a;
|
|
346
|
+
}
|
|
347
|
+
function cn(i, t, e) {
|
|
348
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
349
|
+
for (let n = 0; n < r; n++)
|
|
350
|
+
t && !t[n] || (a[n] = s[n] && o[n] ? 1 : 0);
|
|
351
|
+
return a;
|
|
352
|
+
}
|
|
353
|
+
function pn(i, t, e) {
|
|
354
|
+
const [s] = i, o = s.length, r = w.createEmptyBand(e, o);
|
|
355
|
+
for (let a = 0; a < o; a++)
|
|
356
|
+
t && !t[a] || (r[a] = s[a] ? 0 : 1);
|
|
357
|
+
return r;
|
|
358
|
+
}
|
|
359
|
+
function hn(i, t, e) {
|
|
360
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
361
|
+
for (let n = 0; n < r; n++)
|
|
362
|
+
t && !t[n] || (a[n] = s[n] || o[n] ? 1 : 0);
|
|
363
|
+
return a;
|
|
364
|
+
}
|
|
365
|
+
function mn(i, t, e) {
|
|
366
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
367
|
+
for (let n = 0; n < r; n++)
|
|
368
|
+
t && !t[n] || (a[n] = (s[n] ? 1 : 0) ^ (o[n] ? 1 : 0));
|
|
369
|
+
return a;
|
|
370
|
+
}
|
|
371
|
+
function fn(i, t, e) {
|
|
372
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
373
|
+
for (let n = 0; n < r; n++)
|
|
374
|
+
t && !t[n] || (a[n] = s[n] === o[n] ? 1 : 0);
|
|
375
|
+
return a;
|
|
376
|
+
}
|
|
377
|
+
function Ne(i, t, e, s) {
|
|
378
|
+
const [o] = i, r = o.length, a = w.createEmptyBand(e, r), n = s === Math.E;
|
|
379
|
+
for (let u = 0; u < r; u++)
|
|
380
|
+
t && !t[u] || (a[u] = n ? Math.exp(o[u]) : s ** o[u]);
|
|
381
|
+
return a;
|
|
382
|
+
}
|
|
383
|
+
function dn(i, t, e) {
|
|
384
|
+
return Ne(i, t, e, 10);
|
|
385
|
+
}
|
|
386
|
+
function gn(i, t, e) {
|
|
387
|
+
return Ne(i, t, e, 2);
|
|
388
|
+
}
|
|
389
|
+
function yn(i, t, e) {
|
|
390
|
+
return Ne(i, t, e, Math.E);
|
|
391
|
+
}
|
|
392
|
+
function Ie(i, t, e, s) {
|
|
393
|
+
const [o] = i, r = o.length, a = w.createEmptyBand(e, r);
|
|
394
|
+
for (let n = 0; n < r; n++)
|
|
395
|
+
t && !t[n] || (o[n] <= 0 ? t[n] = 0 : a[n] = s(o[n]));
|
|
396
|
+
return a;
|
|
397
|
+
}
|
|
398
|
+
function xn(i, t, e) {
|
|
399
|
+
return Ie(i, t, e, Math.log10);
|
|
400
|
+
}
|
|
401
|
+
function vn(i, t, e) {
|
|
402
|
+
return Ie(i, t, e, Math.log2);
|
|
403
|
+
}
|
|
404
|
+
function wn(i, t, e) {
|
|
405
|
+
return Ie(i, t, e, Math.log);
|
|
406
|
+
}
|
|
407
|
+
function bn(i, t, e) {
|
|
408
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
409
|
+
for (let n = 0; n < r; n++)
|
|
410
|
+
t && !t[n] || (a[n] = s[n] > o[n] ? 1 : 0);
|
|
411
|
+
return a;
|
|
412
|
+
}
|
|
413
|
+
function An(i, t, e) {
|
|
414
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
415
|
+
for (let n = 0; n < r; n++)
|
|
416
|
+
t && !t[n] || (a[n] = s[n] >= o[n] ? 1 : 0);
|
|
417
|
+
return a;
|
|
418
|
+
}
|
|
419
|
+
function Tn(i, t, e) {
|
|
420
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
421
|
+
for (let n = 0; n < r; n++)
|
|
422
|
+
t && !t[n] || (a[n] = s[n] < o[n] ? 1 : 0);
|
|
423
|
+
return a;
|
|
424
|
+
}
|
|
425
|
+
function Pn(i, t, e) {
|
|
426
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
427
|
+
for (let n = 0; n < r; n++)
|
|
428
|
+
t && !t[n] || (a[n] = s[n] <= o[n] ? 1 : 0);
|
|
429
|
+
return a;
|
|
430
|
+
}
|
|
431
|
+
function $n(i, t, e) {
|
|
432
|
+
const [s] = i, o = s.length, r = w.createEmptyBand(e, o);
|
|
433
|
+
if (!t)
|
|
434
|
+
return r;
|
|
435
|
+
for (let a = 0; a < o; a++)
|
|
436
|
+
r[a] = t[a] ? 0 : 1;
|
|
437
|
+
return r;
|
|
438
|
+
}
|
|
439
|
+
function Fn(i, t, e) {
|
|
440
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
441
|
+
for (let n = 0; n < r; n++)
|
|
442
|
+
t && !t[n] || (a[n] = s[n] % o[n]);
|
|
443
|
+
return a;
|
|
444
|
+
}
|
|
445
|
+
function Nn(i, t, e) {
|
|
446
|
+
const [s] = i, o = s.length, r = w.createEmptyBand(e, o);
|
|
447
|
+
for (let a = 0; a < o; a++)
|
|
448
|
+
t && !t[a] || (r[a] = -s[a]);
|
|
449
|
+
return r;
|
|
450
|
+
}
|
|
451
|
+
function In(i, t, e) {
|
|
452
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r);
|
|
453
|
+
for (let n = 0; n < r; n++)
|
|
454
|
+
t && !t[n] || (a[n] = s[n] === o[n] ? 0 : 1);
|
|
455
|
+
return a;
|
|
456
|
+
}
|
|
457
|
+
function Rn(i, t, e) {
|
|
458
|
+
const [s, o] = i, r = s.length, a = w.createEmptyBand(e, r), n = new Uint8Array(r);
|
|
459
|
+
for (let u = 0; u < r; u++)
|
|
460
|
+
t != null && !t[u] || s[u] !== 0 || (a[u] = o[u], n[u] = 255);
|
|
461
|
+
return { band: a, mask: n };
|
|
462
|
+
}
|
|
463
|
+
function De(i, t, e) {
|
|
464
|
+
const [s, o, r] = i, a = s.length, n = w.createEmptyBand(e, a);
|
|
465
|
+
for (let u = 0; u < a; u++)
|
|
466
|
+
t && !t[u] || (n[u] = s[u] ? o[u] : r[u]);
|
|
467
|
+
return n;
|
|
468
|
+
}
|
|
469
|
+
function Ge(i, t, e) {
|
|
470
|
+
const s = i.length;
|
|
471
|
+
if (s < 2)
|
|
472
|
+
return i[0];
|
|
473
|
+
const [o] = i, r = o.length, a = w.createEmptyBand(e, r);
|
|
474
|
+
for (let n = 0; n < r; n++)
|
|
475
|
+
if (!t || t[n]) {
|
|
476
|
+
let u = o[n];
|
|
477
|
+
for (let l = 1; l < s; l++) {
|
|
478
|
+
const p = i[l][n];
|
|
479
|
+
u < p && (u = p);
|
|
480
|
+
}
|
|
481
|
+
a[n] = u;
|
|
482
|
+
}
|
|
483
|
+
return a;
|
|
484
|
+
}
|
|
485
|
+
function ze(i, t, e) {
|
|
486
|
+
const s = i.length;
|
|
487
|
+
if (s < 2)
|
|
488
|
+
return i[0];
|
|
489
|
+
const [o] = i, r = o.length, a = w.createEmptyBand(e, r);
|
|
490
|
+
for (let n = 0; n < r; n++)
|
|
491
|
+
if (!t || t[n]) {
|
|
492
|
+
let u = o[n];
|
|
493
|
+
for (let l = 1; l < s; l++) {
|
|
494
|
+
const p = i[l][n];
|
|
495
|
+
u > p && (u = p);
|
|
496
|
+
}
|
|
497
|
+
a[n] = u;
|
|
498
|
+
}
|
|
499
|
+
return a;
|
|
500
|
+
}
|
|
501
|
+
function Ee(i, t, e) {
|
|
502
|
+
const s = i.length;
|
|
503
|
+
if (s < 2)
|
|
504
|
+
return i[0];
|
|
505
|
+
const [o] = i, r = o.length, a = w.createEmptyBand(e, r);
|
|
506
|
+
for (let n = 0; n < r; n++)
|
|
507
|
+
if (!t || t[n]) {
|
|
508
|
+
let u = o[n], l = u;
|
|
509
|
+
for (let p = 1; p < s; p++) {
|
|
510
|
+
const h = i[p][n];
|
|
511
|
+
l < h ? l = h : u > h && (u = h);
|
|
512
|
+
}
|
|
513
|
+
a[n] = l - u;
|
|
514
|
+
}
|
|
515
|
+
return a;
|
|
516
|
+
}
|
|
517
|
+
function Ve(i, t, e) {
|
|
518
|
+
const s = i.length;
|
|
519
|
+
if (s < 2)
|
|
520
|
+
return i[0];
|
|
521
|
+
const [o] = i, r = o.length, a = w.createEmptyBand(e, r);
|
|
522
|
+
for (let n = 0; n < r; n++)
|
|
523
|
+
if (!t || t[n]) {
|
|
524
|
+
let u = 0;
|
|
525
|
+
for (let l = 0; l < s; l++)
|
|
526
|
+
u += i[l][n];
|
|
527
|
+
a[n] = u / s;
|
|
528
|
+
}
|
|
529
|
+
return a;
|
|
530
|
+
}
|
|
531
|
+
function Ue(i, t, e) {
|
|
532
|
+
const s = i.length;
|
|
533
|
+
if (s < 2)
|
|
534
|
+
return i[0];
|
|
535
|
+
const [o] = i, r = o.length, a = w.createEmptyBand(e, r);
|
|
536
|
+
for (let n = 0; n < r; n++)
|
|
537
|
+
if (!t || t[n])
|
|
538
|
+
for (let u = 0; u < s; u++) {
|
|
539
|
+
const l = i[u];
|
|
540
|
+
a[n] += l[n];
|
|
541
|
+
}
|
|
542
|
+
return a;
|
|
543
|
+
}
|
|
544
|
+
function Le(i, t, e) {
|
|
545
|
+
const s = i.length;
|
|
546
|
+
if (s < 2)
|
|
547
|
+
return i[0];
|
|
548
|
+
const [o] = i, r = o.length, a = w.createEmptyBand(e, r);
|
|
549
|
+
for (let n = 0; n < r; n++)
|
|
550
|
+
if (!t || t[n]) {
|
|
551
|
+
const u = new Float32Array(s);
|
|
552
|
+
let l = 0;
|
|
553
|
+
for (let h = 0; h < s; h++) {
|
|
554
|
+
const f = i[h];
|
|
555
|
+
l += f[n], u[h] = f[n];
|
|
556
|
+
}
|
|
557
|
+
l /= s;
|
|
558
|
+
let p = 0;
|
|
559
|
+
for (let h = 0; h < s; h++)
|
|
560
|
+
p += (u[h] - l) ** 2;
|
|
561
|
+
a[n] = Math.sqrt(p / s);
|
|
562
|
+
}
|
|
563
|
+
return a;
|
|
564
|
+
}
|
|
565
|
+
function We(i, t, e) {
|
|
566
|
+
const s = i.length;
|
|
567
|
+
if (s < 2)
|
|
568
|
+
return i[0];
|
|
569
|
+
const o = Math.floor(s / 2), [r] = i, a = r.length, n = w.createEmptyBand(e, a), u = new Float32Array(s), l = s % 2 == 1;
|
|
570
|
+
for (let p = 0; p < a; p++)
|
|
571
|
+
if (!t || t[p]) {
|
|
572
|
+
for (let h = 0; h < s; h++)
|
|
573
|
+
u[h] = i[h][p];
|
|
574
|
+
u.sort(), n[p] = l ? u[o] : (u[o] + u[o - 1]) / 2;
|
|
575
|
+
}
|
|
576
|
+
return n;
|
|
577
|
+
}
|
|
578
|
+
function ps(i, t, e) {
|
|
579
|
+
const [s, o] = i;
|
|
580
|
+
if (o == null)
|
|
581
|
+
return s;
|
|
582
|
+
const r = s.length, a = w.createEmptyBand(e, r);
|
|
583
|
+
for (let n = 0; n < r; n++)
|
|
584
|
+
t[n] && (s[n] === o[n] ? a[n] = s[n] : t[n] = 0);
|
|
585
|
+
return a;
|
|
586
|
+
}
|
|
587
|
+
function qe(i, t, e) {
|
|
588
|
+
const s = i.length;
|
|
589
|
+
if (s <= 2)
|
|
590
|
+
return ps(i, t, e);
|
|
591
|
+
const o = i[0].length, r = w.createEmptyBand(e, o), a = /* @__PURE__ */ new Map();
|
|
592
|
+
for (let n = 0; n < o; n++)
|
|
593
|
+
if (!t || t[n]) {
|
|
594
|
+
let u;
|
|
595
|
+
a.clear();
|
|
596
|
+
for (let h = 0; h < s; h++)
|
|
597
|
+
u = i[h][n], a.set(u, a.has(u) ? a.get(u) + 1 : 1);
|
|
598
|
+
let l = 0, p = 0;
|
|
599
|
+
for (const h of a.keys())
|
|
600
|
+
l = a.get(h), l > p && (p = l, u = h);
|
|
601
|
+
r[n] = u;
|
|
602
|
+
}
|
|
603
|
+
return r;
|
|
604
|
+
}
|
|
605
|
+
function He(i, t, e) {
|
|
606
|
+
const s = i.length;
|
|
607
|
+
if (s <= 2)
|
|
608
|
+
return ps(i, t, e);
|
|
609
|
+
const o = i[0].length, r = w.createEmptyBand(e, o), a = /* @__PURE__ */ new Map();
|
|
610
|
+
for (let n = 0; n < o; n++)
|
|
611
|
+
if (!t || t[n]) {
|
|
612
|
+
let u;
|
|
613
|
+
a.clear();
|
|
614
|
+
for (let h = 0; h < s; h++)
|
|
615
|
+
u = i[h][n], a.set(u, a.has(u) ? a.get(u) + 1 : 1);
|
|
616
|
+
let l = 0, p = i.length;
|
|
617
|
+
for (const h of a.keys())
|
|
618
|
+
l = a.get(h), l < p && (p = l, u = h);
|
|
619
|
+
r[n] = u;
|
|
620
|
+
}
|
|
621
|
+
return r;
|
|
622
|
+
}
|
|
623
|
+
function Xe(i, t, e) {
|
|
624
|
+
const s = i.length;
|
|
625
|
+
if (s < 2)
|
|
626
|
+
return i[0];
|
|
627
|
+
const [o] = i, r = o.length, a = w.createEmptyBand(e, r), n = /* @__PURE__ */ new Set();
|
|
628
|
+
for (let u = 0; u < r; u++)
|
|
629
|
+
if (!t || t[u]) {
|
|
630
|
+
let l;
|
|
631
|
+
n.clear();
|
|
632
|
+
for (let p = 0; p < s; p++)
|
|
633
|
+
l = i[p][u], n.add(l);
|
|
634
|
+
a[u] = n.size;
|
|
635
|
+
}
|
|
636
|
+
return a;
|
|
637
|
+
}
|
|
638
|
+
const O = /* @__PURE__ */ new Map(), Ht = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Map();
|
|
639
|
+
function kn() {
|
|
640
|
+
O.size || (O.set(4, Math.sqrt), O.set(6, Math.acos), O.set(7, Math.asin), O.set(8, Math.atan), O.set(9, Math.atanh), O.set(10, Math.abs), O.set(21, Math.cos), O.set(22, Math.cosh), O.set(48, Math.floor), O.set(49, Math.ceil), O.set(51, Math.sin), O.set(52, Math.sinh), O.set(56, Math.tan), O.set(57, Math.tanh), O.set(59, Math.acosh), O.set(60, Math.asinh), O.set(65, Math.floor), Ht.set(5, Math.pow), Ht.set(61, Math.atan2), T.set(1, qs), T.set(2, Js), T.set(3, Ks), T.set(11, nn), T.set(12, rn), T.set(13, on), T.set(14, an), T.set(15, un), T.set(16, ln), T.set(17, cn), T.set(18, pn), T.set(19, hn), T.set(20, mn), T.set(23, cs), T.set(24, fn), T.set(25, yn), T.set(26, dn), T.set(27, gn), T.set(28, bn), T.set(29, An), T.set(30, Ys), T.set(31, $n), T.set(32, Hs), T.set(33, Tn), T.set(34, Pn), T.set(35, wn), T.set(36, xn), T.set(37, vn), T.set(44, Fn), T.set(45, Nn), T.set(46, In), T.set(53, Xs), T.set(64, Zs), T.set(65, Qs), T.set(76, De), T.set(78, De), j.set(38, qe), j.set(39, Ge), j.set(40, Ve), j.set(41, We), j.set(42, ze), j.set(43, He), j.set(47, Ee), j.set(54, Le), j.set(55, Ue), j.set(58, Xe), j.set(66, qe), j.set(67, Ge), j.set(68, Ve), j.set(69, We), j.set(70, ze), j.set(71, He), j.set(72, Ee), j.set(73, Le), j.set(74, Ue), j.set(75, Xe));
|
|
641
|
+
}
|
|
642
|
+
function Cn(i, t, e, s) {
|
|
643
|
+
let [o, r] = vt(e);
|
|
644
|
+
const a = nt(e);
|
|
645
|
+
a && (o -= 1e-5, r += 1e-5);
|
|
646
|
+
for (let n = 0; n < t.length; n++)
|
|
647
|
+
if (t[n]) {
|
|
648
|
+
const u = i[n];
|
|
649
|
+
isNaN(u) || u < o || u > r ? t[n] = 0 : s[n] = a ? Math.round(u) : u;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
function hs(i, t, e = {}) {
|
|
653
|
+
kn();
|
|
654
|
+
let s = Ws(i, t >= 66 && t <= 75);
|
|
655
|
+
const { outputPixelType: o = "f32" } = e, r = !j.has(t) || e.processAsMultiband, a = r ? i[0].pixels.length : 1, n = [];
|
|
656
|
+
for (let l = 0; l < a; l++) {
|
|
657
|
+
const p = j.has(t) && !r ? i.flatMap((g) => g.pixels) : i.map((g) => g.pixels[l]);
|
|
658
|
+
let h, f = !0;
|
|
659
|
+
if (t === us.setNull) {
|
|
660
|
+
const g = Rn(p, s, o);
|
|
661
|
+
h = g.band, s = g.mask, f = !1;
|
|
662
|
+
} else
|
|
663
|
+
T.has(t) ? h = T.get(t)(p, s, "f64") : O.has(t) ? h = t === H.asin || t === H.acos || t === H.atanh ? tn(p, s, "f64", t) : en(p, s, "f64", O.get(t)) : Ht.has(t) ? h = sn(p, s, "f64", Ht.get(t)) : j.has(t) ? h = j.get(t)(p, s, "f64") : (h = p[0], f = !1);
|
|
664
|
+
if (f && t !== U.isNull && !ls.has(t)) {
|
|
665
|
+
const g = w.createEmptyBand(o, h.length);
|
|
666
|
+
s || (s = new Uint8Array(h.length).fill(255)), Cn(h, s, o, g), h = g;
|
|
667
|
+
}
|
|
668
|
+
n.push(h);
|
|
669
|
+
}
|
|
670
|
+
const u = i[0];
|
|
671
|
+
return new w({ width: u.width, height: u.height, pixelType: o, mask: t === U.isNull ? null : s, pixels: n });
|
|
672
|
+
}
|
|
673
|
+
function _n(i, t, e) {
|
|
674
|
+
return hs(i, t = [null, 1, 2, 3, 23, 5, 44][t] ?? 1, { outputPixelType: e });
|
|
675
|
+
}
|
|
676
|
+
let bt = class extends G {
|
|
677
|
+
constructor() {
|
|
678
|
+
super(...arguments), this.functionName = "Arithmetic", this.functionArguments = null, this.rasterArgumentNames = ["raster", "raster2"];
|
|
679
|
+
}
|
|
680
|
+
_bindSourceRasters() {
|
|
681
|
+
const { operation: t } = this.functionArguments;
|
|
682
|
+
if (t < 1 || t > 6)
|
|
683
|
+
return { success: !1, supportsGPU: !1, error: "unsupported operation" };
|
|
684
|
+
const e = this.sourceRasterInfos[0].clone();
|
|
685
|
+
return this.outputPixelType = this._getOutputPixelType(e.pixelType), e.pixelType = this.outputPixelType, this._removeStatsHistColormapVAT(e), this.rasterInfo = e, { success: !0, supportsGPU: e.bandCount <= 3 };
|
|
686
|
+
}
|
|
687
|
+
_processPixels(t) {
|
|
688
|
+
const { pixelBlocks: e } = t;
|
|
689
|
+
return (e == null ? void 0 : e[0]) == null || (e == null ? void 0 : e[1]) == null ? null : _n(e, this.functionArguments.operation, this.outputPixelType);
|
|
690
|
+
}
|
|
691
|
+
_getWebGLParameters() {
|
|
692
|
+
const { operation: t } = this.functionArguments, e = ["", "plus", "minus", "times", "divide", "power", "mod"][t], s = this.outputPixelType ?? "f32";
|
|
693
|
+
let [o, r] = vt(s);
|
|
694
|
+
const a = nt(s);
|
|
695
|
+
return a && (o -= 1e-4, r += 1e-4), { imageCount: 2, operationName: e, domainRange: [o, r], isOutputRounded: a };
|
|
696
|
+
}
|
|
697
|
+
};
|
|
698
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], bt.prototype, "functionName", void 0), c([m({ type: Es, json: { write: !0, name: "rasterFunctionArguments" } })], bt.prototype, "functionArguments", void 0), c([m()], bt.prototype, "rasterArgumentNames", void 0), bt = c([A("esri.layers.support.rasterFunctions.ArithmeticFunction")], bt);
|
|
699
|
+
const Bn = bt;
|
|
700
|
+
var Zt;
|
|
701
|
+
let Qt = Zt = class extends D {
|
|
702
|
+
clone() {
|
|
703
|
+
return new Zt({ raster: this.raster });
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
Qt = Zt = c([A("esri.layers.support.rasterFunctions.AspectFunctionArguments")], Qt);
|
|
707
|
+
const jn = Qt;
|
|
708
|
+
let rt = class extends G {
|
|
709
|
+
constructor() {
|
|
710
|
+
super(...arguments), this.functionName = "Aspect", this.functionArguments = null, this.rasterArgumentNames = ["raster"], this.isGCS = !1;
|
|
711
|
+
}
|
|
712
|
+
_bindSourceRasters() {
|
|
713
|
+
var s;
|
|
714
|
+
const t = this.sourceRasterInfos[0];
|
|
715
|
+
this.isGCS = ((s = t.spatialReference) == null ? void 0 : s.isGeographic) ?? !1, this.outputPixelType = this._getOutputPixelType("f32");
|
|
716
|
+
const e = t.clone();
|
|
717
|
+
return e.pixelType = this.outputPixelType, e.statistics = [{ min: -1, max: 360, avg: 180, stddev: 30 }], e.histograms = null, e.colormap = null, e.attributeTable = null, e.bandCount = 1, this.rasterInfo = e, { success: !0, supportsGPU: !0 };
|
|
718
|
+
}
|
|
719
|
+
_processPixels(t) {
|
|
720
|
+
var n;
|
|
721
|
+
const e = (n = t.pixelBlocks) == null ? void 0 : n[0];
|
|
722
|
+
if (e == null)
|
|
723
|
+
return null;
|
|
724
|
+
const { extent: s, primaryPixelSizes: o } = t, r = o == null ? void 0 : o[0], a = r ?? (s ? { x: s.width / e.width, y: s.height / e.height } : { x: 1, y: 1 });
|
|
725
|
+
return ks(e, { resolution: a });
|
|
726
|
+
}
|
|
727
|
+
};
|
|
728
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], rt.prototype, "functionName", void 0), c([m({ type: jn, json: { write: !0, name: "rasterFunctionArguments" } })], rt.prototype, "functionArguments", void 0), c([m()], rt.prototype, "rasterArgumentNames", void 0), c([m({ json: { write: !0 } })], rt.prototype, "isGCS", void 0), rt = c([A("esri.layers.support.rasterFunctions.AspectFunction")], rt);
|
|
729
|
+
const Sn = rt, Mn = /* @__PURE__ */ new Set(["+", "-", "*", "/", "(", ")"]);
|
|
730
|
+
function On(i, t) {
|
|
731
|
+
(i = i.replaceAll(" ", "")).startsWith("-") && (i = "0" + i), i.startsWith("+") && (i = i.slice(1, i.length));
|
|
732
|
+
const e = i.split(""), s = [], o = [];
|
|
733
|
+
let r = "";
|
|
734
|
+
for (let a = 0; a < e.length; a++) {
|
|
735
|
+
const n = e[a];
|
|
736
|
+
Mn.has(n) ? (r.length && o.push(Je(r, t)), s.push(n), r = "") : r = r.concat(n);
|
|
737
|
+
}
|
|
738
|
+
return r.length && o.push(Je(r, t)), { ops: s, nums: o };
|
|
739
|
+
}
|
|
740
|
+
function Je(i, t) {
|
|
741
|
+
return i.toLowerCase().startsWith("b") ? t[parseInt(i.slice(1), 10) - 1] : parseFloat(i);
|
|
742
|
+
}
|
|
743
|
+
function Dn(i, t, e, s) {
|
|
744
|
+
if (typeof e == "number" && typeof s == "number")
|
|
745
|
+
return e + s;
|
|
746
|
+
let o, r, a;
|
|
747
|
+
typeof e == "number" ? (a = s, o = a.length, r = new Float32Array(o), r.fill(e)) : (o = e.length, r = e, s.constructor === Number ? (a = new Float32Array(o), a.fill(s)) : a = s);
|
|
748
|
+
const n = new Float32Array(o);
|
|
749
|
+
switch (t) {
|
|
750
|
+
case "+":
|
|
751
|
+
for (let u = 0; u < o; u++)
|
|
752
|
+
(i == null || i[u]) && (n[u] = r[u] + a[u]);
|
|
753
|
+
break;
|
|
754
|
+
case "-":
|
|
755
|
+
for (let u = 0; u < o; u++)
|
|
756
|
+
(i == null || i[u]) && (n[u] = r[u] - a[u]);
|
|
757
|
+
break;
|
|
758
|
+
case "*":
|
|
759
|
+
for (let u = 0; u < o; u++)
|
|
760
|
+
(i == null || i[u]) && (n[u] = r[u] * a[u]);
|
|
761
|
+
break;
|
|
762
|
+
case "/":
|
|
763
|
+
for (let u = 0; u < o; u++)
|
|
764
|
+
(i == null || i[u]) && a[u] && (n[u] = r[u] / a[u]);
|
|
765
|
+
break;
|
|
766
|
+
case "(":
|
|
767
|
+
case ")":
|
|
768
|
+
throw new Error("encountered error with custom band index equation");
|
|
769
|
+
}
|
|
770
|
+
return n;
|
|
771
|
+
}
|
|
772
|
+
function Gn(i, t) {
|
|
773
|
+
i.splice(t, 1);
|
|
774
|
+
let e = 0, s = 0;
|
|
775
|
+
do {
|
|
776
|
+
e = 0, s = 0;
|
|
777
|
+
for (let o = 0; o < i.length; o++)
|
|
778
|
+
if (i[o] === "(")
|
|
779
|
+
e = o;
|
|
780
|
+
else if (i[o] === ")") {
|
|
781
|
+
s = o;
|
|
782
|
+
break;
|
|
783
|
+
}
|
|
784
|
+
s === e + 1 && i.splice(e, 2);
|
|
785
|
+
} while (s === e + 1);
|
|
786
|
+
return i;
|
|
787
|
+
}
|
|
788
|
+
function zn(i) {
|
|
789
|
+
if (i.length === 1)
|
|
790
|
+
return { opIndex: 0, numIndex: 0 };
|
|
791
|
+
let t = 0, e = 0;
|
|
792
|
+
for (let a = 0; a < i.length; a++)
|
|
793
|
+
if (i[a] === "(")
|
|
794
|
+
t = a;
|
|
795
|
+
else if (i[a] === ")") {
|
|
796
|
+
e = a;
|
|
797
|
+
break;
|
|
798
|
+
}
|
|
799
|
+
const s = e === 0 ? i : i.slice(t + 1, e);
|
|
800
|
+
let o = -1;
|
|
801
|
+
for (let a = 0; a < s.length; a++)
|
|
802
|
+
if (s[a] === "*" || s[a] === "/") {
|
|
803
|
+
o = a;
|
|
804
|
+
break;
|
|
805
|
+
}
|
|
806
|
+
if (o > -1)
|
|
807
|
+
e > 0 && (o += t + 1);
|
|
808
|
+
else {
|
|
809
|
+
for (let a = 0; a < s.length; a++)
|
|
810
|
+
if (s[a] === "+" || s[a] === "-") {
|
|
811
|
+
o = a;
|
|
812
|
+
break;
|
|
813
|
+
}
|
|
814
|
+
e > 0 && (o += t + 1);
|
|
815
|
+
}
|
|
816
|
+
let r = 0;
|
|
817
|
+
for (let a = 0; a < o; a++)
|
|
818
|
+
i[a] === "(" && r++;
|
|
819
|
+
return { opIndex: o, numIndex: o - r };
|
|
820
|
+
}
|
|
821
|
+
function En(i, t, e) {
|
|
822
|
+
let s, { ops: o, nums: r } = On(e, t);
|
|
823
|
+
if (o.length === 0) {
|
|
824
|
+
const a = r.length === 1 ? r[0] : t[0];
|
|
825
|
+
if (a instanceof Float32Array)
|
|
826
|
+
return [a];
|
|
827
|
+
const n = new Float32Array(t[0].length);
|
|
828
|
+
return typeof a == "number" ? n.fill(a) : n.set(a), [n];
|
|
829
|
+
}
|
|
830
|
+
for (; o.length > 0; ) {
|
|
831
|
+
const { numIndex: a, opIndex: n } = zn(o);
|
|
832
|
+
if (s = Dn(i, o[n], r[a], r[a + 1]), o.length === 1)
|
|
833
|
+
break;
|
|
834
|
+
o = Gn(o, n), r.splice(a, 2, s);
|
|
835
|
+
}
|
|
836
|
+
return [s];
|
|
837
|
+
}
|
|
838
|
+
const Vn = new jt({ 0: "custom", 1: "ndvi", 2: "savi", 3: "tsavi", 4: "msavi", 5: "gemi", 6: "pvi", 7: "gvitm", 8: "sultan", 9: "vari", 10: "gndvi", 11: "sr", 12: "ndvi-re", 13: "sr-re", 14: "mtvi2", 15: "rtvi-core", 16: "ci-re", 17: "ci-g", 18: "ndwi", 19: "evi", 20: "iron-oxide", 21: "ferrous-minerals", 22: "clay-minerals", 23: "wndwi", 24: "bai", 25: "nbr", 26: "ndbi", 27: "ndmi", 28: "ndsi", 29: "mndwi" }, { useNumericKeys: !0 });
|
|
839
|
+
function Un(i, t) {
|
|
840
|
+
if (!As(i))
|
|
841
|
+
return i;
|
|
842
|
+
const { equation: e, method: s } = t, o = t.bandIndexes.map((p) => p - 1), { pixels: r, mask: a } = i;
|
|
843
|
+
let n;
|
|
844
|
+
switch (s) {
|
|
845
|
+
case "gndvi":
|
|
846
|
+
case "nbr":
|
|
847
|
+
case "ndbi":
|
|
848
|
+
case "ndvi":
|
|
849
|
+
case "ndvi-re":
|
|
850
|
+
case "ndsi":
|
|
851
|
+
case "ndmi":
|
|
852
|
+
case "mndwi":
|
|
853
|
+
n = Ke(a, r[o[0]], r[o[1]]);
|
|
854
|
+
break;
|
|
855
|
+
case "ndwi":
|
|
856
|
+
n = Ke(a, r[o[1]], r[o[0]]);
|
|
857
|
+
break;
|
|
858
|
+
case "sr":
|
|
859
|
+
case "sr-re":
|
|
860
|
+
case "iron-oxide":
|
|
861
|
+
case "ferrous-minerals":
|
|
862
|
+
case "clay-minerals":
|
|
863
|
+
n = Wn(a, r[o[0]], r[o[1]]);
|
|
864
|
+
break;
|
|
865
|
+
case "ci-g":
|
|
866
|
+
case "ci-re":
|
|
867
|
+
n = qn(a, r[o[0]], r[o[1]]);
|
|
868
|
+
break;
|
|
869
|
+
case "savi":
|
|
870
|
+
n = Hn(a, r[o[0]], r[o[1]], o[2] + 1);
|
|
871
|
+
break;
|
|
872
|
+
case "tsavi":
|
|
873
|
+
n = Xn(a, r[o[0]], r[o[1]], o[2] + 1, o[3] + 1, o[4] + 1);
|
|
874
|
+
break;
|
|
875
|
+
case "msavi":
|
|
876
|
+
n = Jn(a, r[o[0]], r[o[1]]);
|
|
877
|
+
break;
|
|
878
|
+
case "gemi":
|
|
879
|
+
n = Kn(a, r[o[0]], r[o[1]]);
|
|
880
|
+
break;
|
|
881
|
+
case "pvi":
|
|
882
|
+
n = Yn(a, r[o[0]], r[o[1]], o[2] + 1, o[3] + 1);
|
|
883
|
+
break;
|
|
884
|
+
case "gvitm":
|
|
885
|
+
n = Zn(a, [r[o[0]], r[o[1]], r[o[2]], r[o[3]], r[o[4]], r[o[5]]]);
|
|
886
|
+
break;
|
|
887
|
+
case "sultan":
|
|
888
|
+
n = Qn(a, [r[o[0]], r[o[1]], r[o[2]], r[o[3]], r[o[4]]]);
|
|
889
|
+
break;
|
|
890
|
+
case "vari":
|
|
891
|
+
n = tr(a, [r[o[0]], r[o[1]], r[o[2]]]);
|
|
892
|
+
break;
|
|
893
|
+
case "mtvi2":
|
|
894
|
+
n = er(a, [r[o[0]], r[o[1]], r[o[2]]]);
|
|
895
|
+
break;
|
|
896
|
+
case "rtvi-core":
|
|
897
|
+
n = sr(a, [r[o[0]], r[o[1]], r[o[2]]]);
|
|
898
|
+
break;
|
|
899
|
+
case "evi":
|
|
900
|
+
n = nr(a, [r[o[0]], r[o[1]], r[o[2]]]);
|
|
901
|
+
break;
|
|
902
|
+
case "wndwi":
|
|
903
|
+
n = rr(a, [r[o[0]], r[o[1]], r[o[2]]], o[3] ? o[3] + 1 : 0.5);
|
|
904
|
+
break;
|
|
905
|
+
case "bai":
|
|
906
|
+
n = or(a, r[o[0]], r[o[1]]);
|
|
907
|
+
break;
|
|
908
|
+
case "custom":
|
|
909
|
+
n = En(a, r, e);
|
|
910
|
+
break;
|
|
911
|
+
default:
|
|
912
|
+
return i;
|
|
913
|
+
}
|
|
914
|
+
const u = a != null ? new Uint8Array(a.length) : null;
|
|
915
|
+
a != null && u != null && u.set(a);
|
|
916
|
+
const l = new w({ width: i.width, height: i.height, pixelType: "f32", pixels: n, mask: u });
|
|
917
|
+
return l.updateStatistics(), l;
|
|
918
|
+
}
|
|
919
|
+
function Ln(i, t, e, s) {
|
|
920
|
+
const { mask: o, pixels: r, width: a, height: n } = i, u = r[e], l = r[t], p = l.length, h = s ? new Uint8Array(p) : new Float32Array(p), f = s ? 100 : 1, g = s ? 100.5 : 0;
|
|
921
|
+
for (let y = 0; y < p; y++)
|
|
922
|
+
if (o == null || o[y]) {
|
|
923
|
+
const d = u[y], b = l[y], v = d + b;
|
|
924
|
+
v && (h[y] = (d - b) / v * f + g);
|
|
925
|
+
}
|
|
926
|
+
const x = new w({ width: a, height: n, mask: o, pixelType: s ? "u8" : "f32", pixels: [h] });
|
|
927
|
+
return x.updateStatistics(), x;
|
|
928
|
+
}
|
|
929
|
+
function E(i) {
|
|
930
|
+
const t = new Float32Array(9);
|
|
931
|
+
return t[3 * i[0]] = 1, t[3 * i[1] + 1] = 1, t[3 * i[2] + 2] = 1, t;
|
|
932
|
+
}
|
|
933
|
+
function Ke(i, t, e) {
|
|
934
|
+
const s = e.length, o = new Float32Array(s);
|
|
935
|
+
for (let r = 0; r < s; r++)
|
|
936
|
+
if (i == null || i[r]) {
|
|
937
|
+
const a = t[r], n = e[r], u = a + n;
|
|
938
|
+
u && (o[r] = (a - n) / u);
|
|
939
|
+
}
|
|
940
|
+
return [o];
|
|
941
|
+
}
|
|
942
|
+
function Wn(i, t, e) {
|
|
943
|
+
const s = e.length, o = new Float32Array(s);
|
|
944
|
+
for (let r = 0; r < s; r++)
|
|
945
|
+
if (i == null || i[r]) {
|
|
946
|
+
const a = t[r], n = e[r];
|
|
947
|
+
n && (o[r] = a / n);
|
|
948
|
+
}
|
|
949
|
+
return [o];
|
|
950
|
+
}
|
|
951
|
+
function qn(i, t, e) {
|
|
952
|
+
const s = t.length, o = new Float32Array(s);
|
|
953
|
+
for (let r = 0; r < s; r++)
|
|
954
|
+
if (i == null || i[r]) {
|
|
955
|
+
const a = t[r], n = e[r];
|
|
956
|
+
n && (o[r] = a / n - 1);
|
|
957
|
+
}
|
|
958
|
+
return [o];
|
|
959
|
+
}
|
|
960
|
+
function Hn(i, t, e, s) {
|
|
961
|
+
const o = e.length, r = new Float32Array(o);
|
|
962
|
+
for (let a = 0; a < o; a++)
|
|
963
|
+
if (i == null || i[a]) {
|
|
964
|
+
const n = e[a], u = t[a], l = u + n + s;
|
|
965
|
+
l && (r[a] = (u - n) / l * (1 + s));
|
|
966
|
+
}
|
|
967
|
+
return [r];
|
|
968
|
+
}
|
|
969
|
+
function Xn(i, t, e, s, o, r) {
|
|
970
|
+
const a = e.length, n = new Float32Array(a), u = -o * s + r * (1 + s * s);
|
|
971
|
+
for (let l = 0; l < a; l++)
|
|
972
|
+
if (i == null || i[l]) {
|
|
973
|
+
const p = e[l], h = t[l], f = o * h + p + u;
|
|
974
|
+
f && (n[l] = s * (h - s * p - o) / f);
|
|
975
|
+
}
|
|
976
|
+
return [n];
|
|
977
|
+
}
|
|
978
|
+
function Jn(i, t, e) {
|
|
979
|
+
const s = e.length, o = new Float32Array(s);
|
|
980
|
+
for (let r = 0; r < s; r++)
|
|
981
|
+
if (i == null || i[r]) {
|
|
982
|
+
const a = e[r], n = t[r], u = 2 * n + 1;
|
|
983
|
+
o[r] = 0.5 * (u - Math.sqrt(u * u - 8 * (n - a)));
|
|
984
|
+
}
|
|
985
|
+
return [o];
|
|
986
|
+
}
|
|
987
|
+
function Kn(i, t, e) {
|
|
988
|
+
const s = e.length, o = new Float32Array(s);
|
|
989
|
+
for (let r = 0; r < s; r++)
|
|
990
|
+
if (i == null || i[r]) {
|
|
991
|
+
const a = e[r], n = t[r];
|
|
992
|
+
if (a !== 1 && n + a + 0.5 !== 0) {
|
|
993
|
+
const u = (2 * (n * n - a * a) + 1.5 * n + 0.5 * a) / (n + a + 0.5);
|
|
994
|
+
o[r] = u * (1 - 0.25 * u) - (a - 0.125) / (1 - a);
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
return [o];
|
|
998
|
+
}
|
|
999
|
+
function Yn(i, t, e, s, o) {
|
|
1000
|
+
const r = e.length, a = new Float32Array(r), n = 1 / Math.sqrt(1 + s * s);
|
|
1001
|
+
for (let u = 0; u < r; u++)
|
|
1002
|
+
if (i == null || i[u]) {
|
|
1003
|
+
const l = e[u], p = t[u];
|
|
1004
|
+
a[u] = (p - s * l - o) * n;
|
|
1005
|
+
}
|
|
1006
|
+
return [a];
|
|
1007
|
+
}
|
|
1008
|
+
function Zn(i, t) {
|
|
1009
|
+
const [e, s, o, r, a, n] = t, u = e.length, l = new Float32Array(u);
|
|
1010
|
+
for (let p = 0; p < u; p++)
|
|
1011
|
+
(i == null || i[p]) && (l[p] = -0.2848 * e[p] - 0.2435 * s[p] - 0.5436 * o[p] + 0.7243 * r[p] + 0.084 * a[p] - 0.18 * n[p]);
|
|
1012
|
+
return [l];
|
|
1013
|
+
}
|
|
1014
|
+
function Qn(i, t) {
|
|
1015
|
+
const [e, s, o, r, a] = t, n = e.length, u = new Float32Array(n), l = new Float32Array(n), p = new Float32Array(n);
|
|
1016
|
+
for (let h = 0; h < n; h++)
|
|
1017
|
+
(i == null || i[h]) && (u[h] = a[h] ? r[h] / a[h] * 100 : 0, l[h] = e[h] ? r[h] / e[h] * 100 : 0, p[h] = o[h] ? s[h] / o[h] * (r[h] / o[h]) * 100 : 0);
|
|
1018
|
+
return [u, l, p];
|
|
1019
|
+
}
|
|
1020
|
+
function tr(i, t) {
|
|
1021
|
+
const [e, s, o] = t, r = e.length, a = new Float32Array(r);
|
|
1022
|
+
for (let n = 0; n < r; n++)
|
|
1023
|
+
if (i == null || i[n])
|
|
1024
|
+
for (n = 0; n < r; n++) {
|
|
1025
|
+
const u = e[n], l = s[n], p = l + u - o[n];
|
|
1026
|
+
p && (a[n] = (l - u) / p);
|
|
1027
|
+
}
|
|
1028
|
+
return [a];
|
|
1029
|
+
}
|
|
1030
|
+
function er(i, t) {
|
|
1031
|
+
const [e, s, o] = t, r = e.length, a = new Float32Array(r);
|
|
1032
|
+
for (let n = 0; n < r; n++)
|
|
1033
|
+
if (i == null || i[n])
|
|
1034
|
+
for (n = 0; n < r; n++) {
|
|
1035
|
+
const u = e[n], l = s[n], p = o[n], h = Math.sqrt((2 * u + 1) ** 2 - (6 * u - 5 * Math.sqrt(l)) - 0.5);
|
|
1036
|
+
if (h) {
|
|
1037
|
+
const f = 1.5 * (1.2 * (u - p) - 2.5 * (l - p));
|
|
1038
|
+
a[n] = f / h;
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
return [a];
|
|
1042
|
+
}
|
|
1043
|
+
function sr(i, t) {
|
|
1044
|
+
const [e, s, o] = t, r = e.length, a = new Float32Array(r);
|
|
1045
|
+
for (let n = 0; n < r; n++)
|
|
1046
|
+
if (i == null || i[n])
|
|
1047
|
+
for (n = 0; n < r; n++) {
|
|
1048
|
+
const u = e[n], l = s[n], p = o[n];
|
|
1049
|
+
a[n] = 100 * (u - l) - 10 * (u - p);
|
|
1050
|
+
}
|
|
1051
|
+
return [a];
|
|
1052
|
+
}
|
|
1053
|
+
function nr(i, t) {
|
|
1054
|
+
const [e, s, o] = t, r = e.length, a = new Float32Array(r);
|
|
1055
|
+
for (let n = 0; n < r; n++)
|
|
1056
|
+
if (i == null || i[n])
|
|
1057
|
+
for (n = 0; n < r; n++) {
|
|
1058
|
+
const u = e[n], l = s[n], p = u + 6 * l - 7.5 * o[n] + 1;
|
|
1059
|
+
p && (a[n] = 2.5 * (u - l) / p);
|
|
1060
|
+
}
|
|
1061
|
+
return [a];
|
|
1062
|
+
}
|
|
1063
|
+
function rr(i, t, e = 0.5) {
|
|
1064
|
+
const [s, o, r] = t, a = o.length, n = new Float32Array(a);
|
|
1065
|
+
for (let u = 0; u < a; u++)
|
|
1066
|
+
if (i == null || i[u])
|
|
1067
|
+
for (u = 0; u < a; u++) {
|
|
1068
|
+
const l = s[u], p = o[u], h = r[u], f = l + e * p + (1 - e) * h;
|
|
1069
|
+
f && (n[u] = (l - e * p - (1 - e) * h) / f);
|
|
1070
|
+
}
|
|
1071
|
+
return [n];
|
|
1072
|
+
}
|
|
1073
|
+
function or(i, t, e) {
|
|
1074
|
+
const s = e.length, o = new Float32Array(s);
|
|
1075
|
+
for (let r = 0; r < s; r++)
|
|
1076
|
+
if (i == null || i[r])
|
|
1077
|
+
for (r = 0; r < s; r++) {
|
|
1078
|
+
const a = (0.1 - t[r]) ** 2 + (0.06 - e[r]) ** 2;
|
|
1079
|
+
a && (o[r] = 1 / a);
|
|
1080
|
+
}
|
|
1081
|
+
return [o];
|
|
1082
|
+
}
|
|
1083
|
+
var te;
|
|
1084
|
+
let Mt = te = class extends D {
|
|
1085
|
+
constructor() {
|
|
1086
|
+
super(...arguments), this.method = "custom";
|
|
1087
|
+
}
|
|
1088
|
+
clone() {
|
|
1089
|
+
return new te({ method: this.method, bandIndexes: this.bandIndexes, raster: L(this.raster) });
|
|
1090
|
+
}
|
|
1091
|
+
};
|
|
1092
|
+
c([m({ json: { type: String, write: !0 } })], Mt.prototype, "bandIndexes", void 0), c([Y(Vn)], Mt.prototype, "method", void 0), Mt = te = c([A("esri.layers.support.rasterFunctions.BandArithmeticFunctionArguments")], Mt);
|
|
1093
|
+
const ir = Mt, ar = /* @__PURE__ */ new Set(["vari", "mtvi2", "rtvi-core", "evi"]);
|
|
1094
|
+
let At = class extends G {
|
|
1095
|
+
constructor() {
|
|
1096
|
+
super(...arguments), this.functionName = "BandArithmetic", this.functionArguments = null, this.rasterArgumentNames = ["raster"];
|
|
1097
|
+
}
|
|
1098
|
+
_bindSourceRasters() {
|
|
1099
|
+
this.outputPixelType = this._getOutputPixelType("f32");
|
|
1100
|
+
const t = this.sourceRasterInfos[0];
|
|
1101
|
+
if (t.bandCount < 2)
|
|
1102
|
+
return { success: !1, supportsGPU: !1, error: "band-arithmetic-function: source raster has insufficient amount of raster bands" };
|
|
1103
|
+
const e = t.clone();
|
|
1104
|
+
return e.pixelType = this.outputPixelType, e.bandCount = this.functionArguments.method === "sultan" ? 3 : 1, this._removeStatsHistColormapVAT(e), e.keyProperties = { ...e.keyProperties, BandProperties: void 0 }, this.rasterInfo = e, { success: !0, supportsGPU: !["custom", "gvitm", "sultan"].includes(this.functionArguments.method) };
|
|
1105
|
+
}
|
|
1106
|
+
_processPixels(t) {
|
|
1107
|
+
var a;
|
|
1108
|
+
const e = (a = t.pixelBlocks) == null ? void 0 : a[0];
|
|
1109
|
+
if (e == null)
|
|
1110
|
+
return e;
|
|
1111
|
+
const { method: s, bandIndexes: o } = this.functionArguments, r = o.split(" ").map((n) => parseFloat(n));
|
|
1112
|
+
return Un(e, { method: s, bandIndexes: r, equation: o });
|
|
1113
|
+
}
|
|
1114
|
+
_getWebGLParameters() {
|
|
1115
|
+
const t = this.functionArguments.bandIndexes.split(" ").map((n) => parseFloat(n) - 1);
|
|
1116
|
+
t.length === 2 && t.push(0);
|
|
1117
|
+
const e = this.isInputBandIdsSwizzled ? [0, 1, 2] : t;
|
|
1118
|
+
let s, o;
|
|
1119
|
+
const r = new Float32Array(3), { method: a } = this.functionArguments;
|
|
1120
|
+
switch (a) {
|
|
1121
|
+
case "gndvi":
|
|
1122
|
+
case "nbr":
|
|
1123
|
+
case "ndbi":
|
|
1124
|
+
case "ndvi":
|
|
1125
|
+
case "ndvi-re":
|
|
1126
|
+
case "ndsi":
|
|
1127
|
+
case "ndmi":
|
|
1128
|
+
case "mndwi":
|
|
1129
|
+
s = E([e[0], e[1], 0]), o = "ndxi";
|
|
1130
|
+
break;
|
|
1131
|
+
case "ndwi":
|
|
1132
|
+
s = E([e[1], e[0], 0]), o = "ndxi";
|
|
1133
|
+
break;
|
|
1134
|
+
case "sr":
|
|
1135
|
+
case "sr-re":
|
|
1136
|
+
case "iron-oxide":
|
|
1137
|
+
case "ferrous-minerals":
|
|
1138
|
+
case "clay-minerals":
|
|
1139
|
+
s = E([e[0], e[1], 0]), o = "sr";
|
|
1140
|
+
break;
|
|
1141
|
+
case "ci-g":
|
|
1142
|
+
case "ci-re":
|
|
1143
|
+
s = E([e[0], e[1], 0]), o = "ci";
|
|
1144
|
+
break;
|
|
1145
|
+
case "savi":
|
|
1146
|
+
s = E([e[0], e[1], 0]), o = "savi", r[0] = t[2] + 1;
|
|
1147
|
+
break;
|
|
1148
|
+
case "tsavi":
|
|
1149
|
+
s = E([e[0], e[1], 0]), o = "tsavi", r[0] = t[2] + 1, r[1] = t[3] + 1, r[2] = t[4] + 1;
|
|
1150
|
+
break;
|
|
1151
|
+
case "msavi":
|
|
1152
|
+
s = E([e[0], e[1], 0]), o = "msavi";
|
|
1153
|
+
break;
|
|
1154
|
+
case "gemi":
|
|
1155
|
+
s = E([e[0], e[1], 0]), o = "gemi";
|
|
1156
|
+
break;
|
|
1157
|
+
case "pvi":
|
|
1158
|
+
s = E([e[0], e[1], 0]), o = "tsavi", r[0] = t[2] + 1, r[1] = t[3] + 1;
|
|
1159
|
+
break;
|
|
1160
|
+
case "vari":
|
|
1161
|
+
s = E([e[0], e[1], e[2]]), o = "vari";
|
|
1162
|
+
break;
|
|
1163
|
+
case "mtvi2":
|
|
1164
|
+
s = E([e[0], e[1], e[2]]), o = "mtvi";
|
|
1165
|
+
break;
|
|
1166
|
+
case "rtvi-core":
|
|
1167
|
+
s = E([e[0], e[1], e[2]]), o = "rtvicore";
|
|
1168
|
+
break;
|
|
1169
|
+
case "evi":
|
|
1170
|
+
s = E([e[0], e[1], e[2]]), o = "evi";
|
|
1171
|
+
break;
|
|
1172
|
+
case "wndwi":
|
|
1173
|
+
s = E([e[0], e[1], 0]), o = "wndwi", r[0] = t[3] ? t[3] + 1 : 0.5;
|
|
1174
|
+
break;
|
|
1175
|
+
case "bai":
|
|
1176
|
+
s = E([e[1], e[0], 0]), o = "bai";
|
|
1177
|
+
break;
|
|
1178
|
+
default:
|
|
1179
|
+
s = E([0, 1, 2]), o = "custom";
|
|
1180
|
+
}
|
|
1181
|
+
return { bandIndexMat3: s, indexType: o, adjustments: r };
|
|
1182
|
+
}
|
|
1183
|
+
_getInputBandIds(t) {
|
|
1184
|
+
if (this.functionArguments.method === "custom")
|
|
1185
|
+
return t;
|
|
1186
|
+
const e = this.functionArguments.bandIndexes.split(" ").map((n) => parseFloat(n) - 1), s = t.length, o = e.map((n) => n >= s ? s - 1 : n), r = ar.has(this.functionArguments.method) ? 3 : 2, a = o.slice(0, r).map((n) => t[n]);
|
|
1187
|
+
return a.length === 2 && a.push(0), a;
|
|
1188
|
+
}
|
|
1189
|
+
};
|
|
1190
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], At.prototype, "functionName", void 0), c([m({ type: ir, json: { write: !0, name: "rasterFunctionArguments" } })], At.prototype, "functionArguments", void 0), c([m()], At.prototype, "rasterArgumentNames", void 0), At = c([A("esri.layers.support.rasterFunctions.BandArithmeticFunction")], At);
|
|
1191
|
+
const ur = At;
|
|
1192
|
+
var ee;
|
|
1193
|
+
const Ye = new jt({ 1: "outside", 2: "inside" }, { useNumericKeys: !0 });
|
|
1194
|
+
let Ot = ee = class extends D {
|
|
1195
|
+
constructor() {
|
|
1196
|
+
super(...arguments), this.clippingType = "outside";
|
|
1197
|
+
}
|
|
1198
|
+
clone() {
|
|
1199
|
+
return new ee({ clippingGeometry: this.clippingGeometry.clone(), clippingType: this.clippingType });
|
|
1200
|
+
}
|
|
1201
|
+
};
|
|
1202
|
+
c([m({ types: vs, json: { read: ws, write: !0 } })], Ot.prototype, "clippingGeometry", void 0), c([m({ json: { read: Ye.read, write: Ye.write } })], Ot.prototype, "clippingType", void 0), Ot = ee = c([A("esri.layers.support.rasterFunctions.ClipFunctionArguments")], Ot);
|
|
1203
|
+
const lr = Ot;
|
|
1204
|
+
let ot = class extends G {
|
|
1205
|
+
constructor() {
|
|
1206
|
+
super(...arguments), this.functionName = "Clip", this.functionArguments = null, this.rasterArgumentNames = ["raster"], this.isNoopProcess = !0;
|
|
1207
|
+
}
|
|
1208
|
+
_bindSourceRasters() {
|
|
1209
|
+
const t = this.sourceRasterInfos[0].clone();
|
|
1210
|
+
return this.outputPixelType = this._getOutputPixelType(t.pixelType), t.pixelType = this.outputPixelType, this.rasterInfo = t, { success: !0, supportsGPU: !0 };
|
|
1211
|
+
}
|
|
1212
|
+
_processPixels(t) {
|
|
1213
|
+
var e;
|
|
1214
|
+
return (e = t.pixelBlocks) == null ? void 0 : e[0];
|
|
1215
|
+
}
|
|
1216
|
+
_getWebGLParameters() {
|
|
1217
|
+
const { clippingGeometry: t, clippingType: e } = this.functionArguments;
|
|
1218
|
+
return { clippingGeometry: t.toJSON(), clippingType: e };
|
|
1219
|
+
}
|
|
1220
|
+
};
|
|
1221
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], ot.prototype, "functionName", void 0), c([m({ type: lr, json: { write: !0, name: "rasterFunctionArguments" } })], ot.prototype, "functionArguments", void 0), c([m()], ot.prototype, "rasterArgumentNames", void 0), c([m()], ot.prototype, "isNoopProcess", void 0), ot = c([A("esri.layers.support.rasterFunctions.ClipFunction")], ot);
|
|
1222
|
+
const cr = ot;
|
|
1223
|
+
var se;
|
|
1224
|
+
let X = se = class extends D {
|
|
1225
|
+
castColormapName(i) {
|
|
1226
|
+
if (!i)
|
|
1227
|
+
return null;
|
|
1228
|
+
const t = i.toLowerCase();
|
|
1229
|
+
return Cs.includes(t) ? t : null;
|
|
1230
|
+
}
|
|
1231
|
+
readColorRamp(i) {
|
|
1232
|
+
return zs(i);
|
|
1233
|
+
}
|
|
1234
|
+
readColorRampName(i, t) {
|
|
1235
|
+
if (!i)
|
|
1236
|
+
return null;
|
|
1237
|
+
const e = Vt.jsonValues.find((s) => s.toLowerCase() === i.toLowerCase());
|
|
1238
|
+
return e ? Vt.fromJSON(e) : null;
|
|
1239
|
+
}
|
|
1240
|
+
clone() {
|
|
1241
|
+
var i;
|
|
1242
|
+
return new se({ colormap: L(this.colormap), colormapName: this.colormapName, colorRamp: (i = this.colorRamp) == null ? void 0 : i.clone(), colorRampName: this.colorRampName });
|
|
1243
|
+
}
|
|
1244
|
+
};
|
|
1245
|
+
c([m({ type: [[Number]], json: { write: !0 } })], X.prototype, "colormap", void 0), c([m({ type: String, json: { write: !0 } })], X.prototype, "colormapName", void 0), c([rs("colormapName")], X.prototype, "castColormapName", null), c([m({ types: Gs, json: { write: !0 } })], X.prototype, "colorRamp", void 0), c([Ct("colorRamp")], X.prototype, "readColorRamp", null), c([m({ type: Vt.apiValues, json: { type: Vt.jsonValues, write: Vt.write } })], X.prototype, "colorRampName", void 0), c([Ct("colorRampName")], X.prototype, "readColorRampName", null), X = se = c([A("esri.layers.support.rasterFunctions.ColormapFunctionArguments")], X);
|
|
1246
|
+
const pr = X, hr = [[36, 0, 255], [36, 0, 255], [36, 0, 255], [36, 0, 255], [112, 75, 3], [113, 76, 3], [114, 77, 3], [115, 77, 3], [116, 78, 3], [117, 79, 3], [118, 79, 3], [119, 80, 3], [121, 81, 4], [122, 82, 4], [123, 82, 4], [124, 83, 4], [125, 84, 4], [126, 84, 4], [127, 85, 4], [128, 86, 4], [129, 86, 4], [130, 87, 4], [131, 88, 4], [132, 89, 4], [133, 89, 4], [134, 90, 4], [135, 91, 4], [136, 91, 4], [137, 92, 4], [138, 93, 4], [139, 94, 4], [140, 94, 4], [142, 95, 5], [143, 96, 5], [144, 96, 5], [145, 97, 5], [146, 98, 5], [147, 99, 5], [148, 99, 5], [149, 100, 5], [150, 101, 5], [151, 101, 5], [152, 102, 5], [153, 103, 5], [154, 104, 5], [155, 104, 5], [156, 105, 5], [157, 106, 5], [158, 106, 5], [159, 107, 5], [160, 108, 5], [161, 108, 5], [162, 109, 5], [164, 110, 6], [165, 111, 6], [166, 111, 6], [167, 112, 6], [168, 113, 6], [169, 113, 6], [170, 114, 6], [171, 115, 6], [172, 116, 6], [173, 116, 6], [174, 117, 6], [245, 0, 0], [245, 5, 0], [245, 10, 0], [246, 15, 0], [246, 20, 0], [246, 25, 0], [246, 30, 0], [247, 35, 0], [247, 40, 0], [247, 45, 0], [247, 50, 0], [247, 55, 0], [248, 60, 0], [248, 65, 0], [248, 70, 0], [248, 75, 0], [249, 81, 0], [249, 86, 0], [249, 91, 0], [249, 96, 0], [250, 101, 0], [250, 106, 0], [250, 111, 0], [250, 116, 0], [250, 121, 0], [251, 126, 0], [251, 131, 0], [251, 136, 0], [251, 141, 0], [252, 146, 0], [252, 151, 0], [252, 156, 0], [252, 156, 0], [251, 159, 0], [250, 162, 0], [249, 165, 0], [248, 168, 0], [247, 171, 0], [246, 174, 0], [245, 177, 0], [245, 179, 0], [244, 182, 0], [243, 185, 0], [242, 188, 0], [241, 191, 0], [240, 194, 0], [239, 197, 0], [238, 200, 0], [237, 203, 0], [236, 206, 0], [235, 209, 0], [234, 212, 0], [233, 215, 0], [232, 218, 0], [231, 221, 0], [230, 224, 0], [230, 226, 0], [229, 229, 0], [228, 232, 0], [227, 235, 0], [226, 238, 0], [225, 241, 0], [224, 244, 0], [223, 247, 0], [165, 247, 0], [163, 244, 0], [161, 240, 0], [158, 237, 0], [156, 233, 1], [154, 230, 1], [152, 227, 1], [149, 223, 1], [147, 220, 1], [145, 216, 1], [143, 213, 1], [140, 210, 2], [138, 206, 2], [136, 203, 2], [134, 200, 2], [132, 196, 2], [129, 193, 2], [127, 189, 2], [125, 186, 3], [123, 183, 3], [120, 179, 3], [118, 176, 3], [116, 172, 3], [114, 169, 3], [111, 166, 3], [109, 162, 4], [107, 159, 4], [105, 155, 4], [103, 152, 4], [100, 149, 4], [98, 145, 4], [96, 142, 4], [94, 138, 5], [91, 135, 5], [89, 132, 5], [87, 128, 5], [85, 125, 5], [82, 121, 5], [80, 118, 5], [78, 115, 6], [76, 111, 6], [73, 108, 6], [71, 105, 6], [69, 101, 6], [67, 98, 6], [65, 94, 6], [62, 91, 7], [60, 88, 7], [58, 84, 7], [56, 81, 7], [53, 77, 7], [51, 74, 7], [49, 71, 7], [47, 67, 8], [44, 64, 8], [42, 60, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8], [40, 57, 8]], mr = [[36, 0, 255], [36, 0, 255], [36, 0, 255], [36, 0, 255], [245, 20, 0], [245, 24, 0], [245, 29, 0], [245, 31, 0], [247, 33, 0], [247, 33, 0], [247, 37, 0], [247, 41, 0], [247, 41, 0], [247, 41, 0], [247, 45, 0], [247, 45, 0], [247, 47, 0], [247, 49, 0], [247, 49, 0], [247, 54, 0], [247, 54, 0], [247, 56, 0], [247, 58, 0], [247, 58, 0], [250, 62, 0], [250, 62, 0], [250, 62, 0], [250, 67, 0], [250, 67, 0], [250, 67, 0], [250, 69, 0], [250, 71, 0], [250, 71, 0], [250, 75, 0], [250, 75, 0], [250, 78, 0], [250, 79, 0], [250, 79, 0], [250, 79, 0], [250, 81, 0], [250, 83, 0], [250, 83, 0], [250, 87, 0], [250, 87, 0], [250, 90, 0], [250, 92, 0], [252, 93, 0], [252, 93, 0], [252, 97, 0], [252, 97, 0], [252, 97, 0], [252, 97, 0], [252, 101, 0], [252, 101, 0], [252, 101, 0], [252, 101, 0], [252, 105, 0], [252, 105, 0], [252, 107, 0], [252, 109, 0], [252, 109, 0], [252, 113, 13], [255, 118, 20], [255, 119, 23], [255, 121, 25], [255, 126, 33], [255, 132, 38], [255, 133, 40], [255, 135, 43], [255, 141, 48], [255, 144, 54], [255, 150, 59], [255, 152, 61], [255, 153, 64], [255, 159, 69], [255, 163, 77], [255, 165, 79], [255, 168, 82], [255, 174, 87], [255, 176, 92], [255, 181, 97], [255, 183, 99], [255, 186, 102], [255, 191, 107], [255, 197, 115], [255, 201, 120], [255, 203, 123], [255, 205, 125], [255, 209, 130], [255, 214, 138], [255, 216, 141], [255, 218, 143], [255, 224, 150], [255, 228, 156], [255, 234, 163], [255, 236, 165], [255, 238, 168], [255, 243, 173], [255, 248, 181], [255, 252, 186], [253, 252, 186], [250, 252, 187], [244, 250, 180], [238, 247, 176], [234, 246, 173], [231, 245, 169], [223, 240, 163], [217, 237, 157], [211, 235, 150], [205, 233, 146], [200, 230, 142], [195, 227, 136], [189, 224, 132], [184, 222, 126], [180, 220, 123], [174, 217, 119], [169, 214, 114], [163, 212, 108], [160, 210, 105], [154, 207, 101], [148, 204, 96], [143, 201, 93], [138, 199, 88], [134, 197, 84], [130, 194, 81], [126, 191, 77], [117, 189, 70], [115, 186, 68], [112, 184, 64], [106, 181, 60], [100, 179, 55], [94, 176, 49], [92, 174, 47], [90, 173, 45], [81, 168, 37], [75, 166, 33], [71, 163, 28], [66, 160, 24], [62, 158, 21], [56, 156, 14], [51, 153, 0], [51, 153, 0], [51, 153, 0], [50, 150, 0], [50, 150, 0], [50, 150, 0], [50, 150, 0], [49, 148, 0], [49, 148, 0], [49, 148, 0], [48, 145, 0], [48, 145, 0], [48, 145, 0], [48, 145, 0], [48, 143, 0], [48, 143, 0], [48, 143, 0], [48, 143, 0], [47, 140, 0], [47, 140, 0], [47, 140, 0], [47, 140, 0], [46, 138, 0], [46, 138, 0], [46, 138, 0], [46, 138, 0], [45, 135, 0], [45, 135, 0], [45, 135, 0], [45, 135, 0], [44, 133, 0], [44, 133, 0], [44, 133, 0], [43, 130, 0], [43, 130, 0], [43, 130, 0], [43, 130, 0], [43, 130, 0], [43, 130, 0], [42, 128, 0], [42, 128, 0], [42, 128, 0], [42, 125, 0], [42, 125, 0], [42, 125, 0], [42, 125, 0], [41, 122, 0], [41, 122, 0], [41, 122, 0], [41, 122, 0], [40, 120, 0], [40, 120, 0], [40, 120, 0], [40, 120, 0], [40, 120, 0], [39, 117, 0], [39, 117, 0], [39, 117, 0], [39, 117, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0], [38, 115, 0]];
|
|
1247
|
+
function Re(i, t) {
|
|
1248
|
+
const e = [], s = [];
|
|
1249
|
+
for (let r = 0; r < i.length - 1; r++)
|
|
1250
|
+
e.push({ type: "algorithmic", algorithm: "esriHSVAlgorithm", fromColor: i[r].slice(1), toColor: i[r + 1].slice(1) }), s.push(i[r + 1][0] - i[r][0]);
|
|
1251
|
+
const o = i[i.length - 1][0];
|
|
1252
|
+
return as({ type: "multipart", colorRamps: e }, { numColors: o, weights: t = t ?? s });
|
|
1253
|
+
}
|
|
1254
|
+
function fr() {
|
|
1255
|
+
return Re([[0, 0, 191, 191], [51, 0, 0, 255], [102, 255, 0, 255], [153, 255, 0, 127], [204, 191, 63, 127], [256, 20, 20, 20]]);
|
|
1256
|
+
}
|
|
1257
|
+
function dr() {
|
|
1258
|
+
const i = Re([[0, 255, 255, 255], [70, 0, 255, 0], [80, 205, 173, 193], [100, 150, 150, 150], [110, 120, 51, 100], [130, 120, 100, 200], [140, 28, 3, 144], [160, 6, 0, 55], [180, 10, 25, 30], [201, 6, 7, 27]]);
|
|
1259
|
+
for (let t = i.length; t < 256; t++)
|
|
1260
|
+
i.push([6, 27, 7]);
|
|
1261
|
+
return i;
|
|
1262
|
+
}
|
|
1263
|
+
function gr() {
|
|
1264
|
+
return as({ type: "algorithmic", algorithm: "esriHSVAlgorithm", fromColor: [0, 0, 0], toColor: [255, 255, 255] });
|
|
1265
|
+
}
|
|
1266
|
+
function yr() {
|
|
1267
|
+
const i = [];
|
|
1268
|
+
for (let t = 0; t < 256; t++) {
|
|
1269
|
+
const e = [];
|
|
1270
|
+
for (let s = 0; s < 3; s++)
|
|
1271
|
+
e.push(Math.round(255 * Math.random()));
|
|
1272
|
+
i.push(e);
|
|
1273
|
+
}
|
|
1274
|
+
return i;
|
|
1275
|
+
}
|
|
1276
|
+
function xr() {
|
|
1277
|
+
return Re([[0, 38, 41, 54], [69, 79, 82, 90], [131, 156, 156, 156], [256, 253, 253, 241]], [0.268, 0.238, 0.495]);
|
|
1278
|
+
}
|
|
1279
|
+
function vr(i) {
|
|
1280
|
+
let t;
|
|
1281
|
+
switch (i) {
|
|
1282
|
+
case "elevation":
|
|
1283
|
+
t = fr();
|
|
1284
|
+
break;
|
|
1285
|
+
case "gray":
|
|
1286
|
+
t = gr();
|
|
1287
|
+
break;
|
|
1288
|
+
case "hillshade":
|
|
1289
|
+
t = xr();
|
|
1290
|
+
break;
|
|
1291
|
+
case "ndvi":
|
|
1292
|
+
t = hr;
|
|
1293
|
+
break;
|
|
1294
|
+
case "ndvi2":
|
|
1295
|
+
t = dr();
|
|
1296
|
+
break;
|
|
1297
|
+
case "ndvi3":
|
|
1298
|
+
t = mr;
|
|
1299
|
+
break;
|
|
1300
|
+
case "random":
|
|
1301
|
+
t = yr();
|
|
1302
|
+
}
|
|
1303
|
+
return t ? (t = t.map((e, s) => [s, ...e]), t) : null;
|
|
1304
|
+
}
|
|
1305
|
+
let Z = class extends G {
|
|
1306
|
+
constructor() {
|
|
1307
|
+
super(...arguments), this.functionName = "Colormap", this.functionArguments = null, this.rasterArgumentNames = ["raster"], this.isNoopProcess = !0;
|
|
1308
|
+
}
|
|
1309
|
+
_bindSourceRasters() {
|
|
1310
|
+
const t = this.sourceRasterInfos[0];
|
|
1311
|
+
if (t.bandCount > 1)
|
|
1312
|
+
return { success: !1, supportsGPU: !1, error: "colormap-function: source data must be single band" };
|
|
1313
|
+
let { colormap: e, colormapName: s, colorRamp: o, colorRampName: r } = this.functionArguments;
|
|
1314
|
+
if (!(e != null && e.length))
|
|
1315
|
+
if (o)
|
|
1316
|
+
e = je(o, { interpolateAlpha: !0 });
|
|
1317
|
+
else if (r) {
|
|
1318
|
+
const u = _s(r);
|
|
1319
|
+
u && (e = je(u));
|
|
1320
|
+
} else
|
|
1321
|
+
s && (e = vr(s));
|
|
1322
|
+
if (!(e != null && e.length))
|
|
1323
|
+
return { success: !1, supportsGPU: !1, error: "colormap-function: missing colormap argument" };
|
|
1324
|
+
const a = this._getOutputPixelType(t.pixelType);
|
|
1325
|
+
this.outputPixelType = a.startsWith("f") ? "s32" : a;
|
|
1326
|
+
const n = t.clone();
|
|
1327
|
+
return n.pixelType = this.outputPixelType, n.colormap = e, n.bandCount = 1, this.rasterInfo = n, { success: !0, supportsGPU: !0 };
|
|
1328
|
+
}
|
|
1329
|
+
_processPixels(t) {
|
|
1330
|
+
var s;
|
|
1331
|
+
let e = (s = t.pixelBlocks) == null ? void 0 : s[0];
|
|
1332
|
+
return !e || nt(e.pixelType) || (e = e.clone(), e.clamp(this.outputPixelType)), e;
|
|
1333
|
+
}
|
|
1334
|
+
};
|
|
1335
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], Z.prototype, "functionName", void 0), c([m({ type: pr, json: { write: !0, name: "rasterFunctionArguments" } })], Z.prototype, "functionArguments", void 0), c([m()], Z.prototype, "rasterArgumentNames", void 0), c([m()], Z.prototype, "isNoopProcess", void 0), c([m({ json: { write: !0 } })], Z.prototype, "indexedColormap", void 0), Z = c([A("esri.layers.support.rasterFunctions.ColormapFunction")], Z);
|
|
1336
|
+
const wr = Z;
|
|
1337
|
+
var ne;
|
|
1338
|
+
let Dt = ne = class extends D {
|
|
1339
|
+
constructor() {
|
|
1340
|
+
super(...arguments), this.rasters = [];
|
|
1341
|
+
}
|
|
1342
|
+
writeRasters(i, t) {
|
|
1343
|
+
t.rasters = i.map((e) => typeof e == "number" || typeof e == "string" ? e : e.toJSON());
|
|
1344
|
+
}
|
|
1345
|
+
clone() {
|
|
1346
|
+
return new ne({ rasters: L(this.rasters) });
|
|
1347
|
+
}
|
|
1348
|
+
};
|
|
1349
|
+
c([m({ json: { write: !0 } })], Dt.prototype, "rasters", void 0), c([_t("rasters")], Dt.prototype, "writeRasters", null), Dt = ne = c([A("esri.layers.support.rasterFunctions.CompositeBandFunctionArguments")], Dt);
|
|
1350
|
+
const br = Dt;
|
|
1351
|
+
let Tt = class extends G {
|
|
1352
|
+
constructor() {
|
|
1353
|
+
super(...arguments), this.functionName = "CompositeBand", this.functionArguments = null, this.rasterArgumentNames = ["rasters"];
|
|
1354
|
+
}
|
|
1355
|
+
_bindSourceRasters() {
|
|
1356
|
+
const { sourceRasterInfos: t } = this, e = t[0];
|
|
1357
|
+
this.outputPixelType = this._getOutputPixelType(e.pixelType);
|
|
1358
|
+
const s = e.clone();
|
|
1359
|
+
if (s.attributeTable = null, s.colormap = null, s.pixelType = this.outputPixelType, s.bandCount = t.map(({ bandCount: r }) => r).reduce((r, a) => r + a), t.every(({ statistics: r }) => r != null && r.length)) {
|
|
1360
|
+
const r = [];
|
|
1361
|
+
t.forEach(({ statistics: a }) => a != null && r.push(...a)), s.statistics = r;
|
|
1362
|
+
}
|
|
1363
|
+
if (t.every(({ histograms: r }) => r != null && r.length)) {
|
|
1364
|
+
const r = [];
|
|
1365
|
+
t.forEach(({ histograms: a }) => a != null && r.push(...a)), s.histograms = r;
|
|
1366
|
+
}
|
|
1367
|
+
s.bandCount > 1 && (s.colormap = null, s.attributeTable = null);
|
|
1368
|
+
const o = t.every((r) => {
|
|
1369
|
+
var a;
|
|
1370
|
+
return (a = r.keyProperties.BandProperties) == null ? void 0 : a.length;
|
|
1371
|
+
}) ? t.flatMap((r) => r.keyProperties.BandProperties) : void 0;
|
|
1372
|
+
return s.keyProperties = { ...s.keyProperties, BandProperties: o }, this.rasterInfo = s, { success: !0, supportsGPU: s.bandCount <= 3 };
|
|
1373
|
+
}
|
|
1374
|
+
_processPixels(t) {
|
|
1375
|
+
const { pixelBlocks: e } = t;
|
|
1376
|
+
return e ? (e == null ? void 0 : e[0]) == null ? null : Ts(e) : null;
|
|
1377
|
+
}
|
|
1378
|
+
_getWebGLParameters() {
|
|
1379
|
+
return { bandCount: this.rasterInfo.bandCount };
|
|
1380
|
+
}
|
|
1381
|
+
};
|
|
1382
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], Tt.prototype, "functionName", void 0), c([m({ type: br, json: { write: !0, name: "rasterFunctionArguments" } })], Tt.prototype, "functionArguments", void 0), c([m()], Tt.prototype, "rasterArgumentNames", void 0), Tt = c([A("esri.layers.support.rasterFunctions.CompositeBandFunction")], Tt);
|
|
1383
|
+
const Ar = Tt;
|
|
1384
|
+
var re;
|
|
1385
|
+
let Gt = re = class extends D {
|
|
1386
|
+
constructor() {
|
|
1387
|
+
super(...arguments), this.contrastOffset = 0, this.brightnessOffset = 0;
|
|
1388
|
+
}
|
|
1389
|
+
clone() {
|
|
1390
|
+
return new re({ contrastOffset: this.contrastOffset, brightnessOffset: this.brightnessOffset, raster: this.raster });
|
|
1391
|
+
}
|
|
1392
|
+
};
|
|
1393
|
+
c([m({ json: { write: !0 } })], Gt.prototype, "contrastOffset", void 0), c([m({ json: { write: !0 } })], Gt.prototype, "brightnessOffset", void 0), Gt = re = c([A("esri.layers.support.rasterFunctions.ContrastBrightnessFunctionArguments")], Gt);
|
|
1394
|
+
const Tr = Gt;
|
|
1395
|
+
let it = class extends G {
|
|
1396
|
+
constructor() {
|
|
1397
|
+
super(...arguments), this.functionName = "ContrastBrightness", this.functionArguments = null, this.rasterArgumentNames = ["raster"], this.lookup = null;
|
|
1398
|
+
}
|
|
1399
|
+
_bindSourceRasters() {
|
|
1400
|
+
const { sourceRasterInfos: t } = this, e = t[0];
|
|
1401
|
+
if (e.pixelType !== "u8")
|
|
1402
|
+
return { success: !1, supportsGPU: !1, error: "Only unsigned 8 bit raster is supported by ContrastBrightness function." };
|
|
1403
|
+
this.outputPixelType = this._getOutputPixelType("u8");
|
|
1404
|
+
const s = e.clone();
|
|
1405
|
+
this._removeStatsHistColormapVAT(s), this.rasterInfo = s;
|
|
1406
|
+
const { contrastOffset: o, brightnessOffset: r } = this.functionArguments;
|
|
1407
|
+
return this.lookup = Bs(o, r), { success: !0, supportsGPU: !0 };
|
|
1408
|
+
}
|
|
1409
|
+
_processPixels(t) {
|
|
1410
|
+
var s;
|
|
1411
|
+
const e = (s = t.pixelBlocks) == null ? void 0 : s[0];
|
|
1412
|
+
return e == null ? null : Fe(e, { lut: e.pixels.map(() => this.lookup), offset: 0, outputPixelType: "u8" });
|
|
1413
|
+
}
|
|
1414
|
+
_getWebGLParameters() {
|
|
1415
|
+
const { contrastOffset: t, brightnessOffset: e } = this.functionArguments;
|
|
1416
|
+
return { contrastOffset: t, brightnessOffset: e };
|
|
1417
|
+
}
|
|
1418
|
+
};
|
|
1419
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], it.prototype, "functionName", void 0), c([m({ type: Tr, json: { write: !0, name: "rasterFunctionArguments" } })], it.prototype, "functionArguments", void 0), c([m()], it.prototype, "rasterArgumentNames", void 0), c([m({ json: { write: !0 } })], it.prototype, "lookup", void 0), it = c([A("esri.layers.support.rasterFunctions.ContrastBrightnessFunction")], it);
|
|
1420
|
+
const Pr = it;
|
|
1421
|
+
function ke(i, t, e, s, o) {
|
|
1422
|
+
const r = Math.floor(s / 2);
|
|
1423
|
+
for (let n = 0; n < r; n++)
|
|
1424
|
+
for (let u = 0; u < t; u++)
|
|
1425
|
+
i[n * t + u] = i[(o - 1 - n) * t + u], i[(e - 1 - n) * t + u] = i[(e - o + n) * t + u];
|
|
1426
|
+
const a = Math.floor(o / 2);
|
|
1427
|
+
for (let n = 0; n < e; n++) {
|
|
1428
|
+
const u = n * t;
|
|
1429
|
+
for (let l = 0; l < a; l++)
|
|
1430
|
+
i[u + l] = i[u + o - 1 - l], i[u + t - l - 1] = i[u + t + l - o];
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
const B = /* @__PURE__ */ new Map();
|
|
1434
|
+
function $r(i) {
|
|
1435
|
+
const t = Math.sqrt(i.length), e = i.slice(0, t), s = [1];
|
|
1436
|
+
for (let o = 1; o < t; o++) {
|
|
1437
|
+
let r = null;
|
|
1438
|
+
for (let a = 0; a < t; a++) {
|
|
1439
|
+
const n = i[a + o * t], u = i[a];
|
|
1440
|
+
if (r == null)
|
|
1441
|
+
if (u === 0) {
|
|
1442
|
+
if (n)
|
|
1443
|
+
return { separable: !1, row: null, col: null };
|
|
1444
|
+
} else
|
|
1445
|
+
r = n / u;
|
|
1446
|
+
else if (n / u !== r)
|
|
1447
|
+
return { separable: !1, row: null, col: null };
|
|
1448
|
+
}
|
|
1449
|
+
if (r == null)
|
|
1450
|
+
return { separable: !1, row: null, col: null };
|
|
1451
|
+
s.push(r);
|
|
1452
|
+
}
|
|
1453
|
+
return { separable: !0, row: e, col: s };
|
|
1454
|
+
}
|
|
1455
|
+
function Ze(i, t, e, s, o, r, a) {
|
|
1456
|
+
const n = new Float32Array(t * e), u = r.length, l = a ? 0 : s, p = a ? s : 0, h = a ? 1 : t;
|
|
1457
|
+
for (let f = l; f < e - l; f++) {
|
|
1458
|
+
const g = f * t;
|
|
1459
|
+
for (let x = p; x < t - p; x++) {
|
|
1460
|
+
if (o && !o[g + x])
|
|
1461
|
+
continue;
|
|
1462
|
+
let y = 0;
|
|
1463
|
+
for (let d = 0; d < u; d++)
|
|
1464
|
+
y += i[g + x + (d - s) * h] * r[d];
|
|
1465
|
+
n[g + x] = y;
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
return n;
|
|
1469
|
+
}
|
|
1470
|
+
function Fr(i, t, e, s, o, r, a) {
|
|
1471
|
+
const n = new Float32Array(t * e), u = Math.floor(s / 2), l = Math.floor(o / 2);
|
|
1472
|
+
for (let p = u; p < e - u; p++) {
|
|
1473
|
+
const h = p * t;
|
|
1474
|
+
for (let f = l; f < t - l; f++) {
|
|
1475
|
+
if (r && !r[h + f])
|
|
1476
|
+
continue;
|
|
1477
|
+
let g = 0;
|
|
1478
|
+
for (let x = 0; x < s; x++)
|
|
1479
|
+
for (let y = 0; y < o; y++)
|
|
1480
|
+
g += i[h + f + (x - u) * t + y - l] * a[x * o + y];
|
|
1481
|
+
n[h + f] = g;
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
return n;
|
|
1485
|
+
}
|
|
1486
|
+
function Nr(i, t, e = !0) {
|
|
1487
|
+
const { pixels: s, width: o, height: r, pixelType: a, mask: n } = i, u = s.length, l = [], { kernel: p, rows: h, cols: f } = t;
|
|
1488
|
+
for (let g = 0; g < u; g++) {
|
|
1489
|
+
const x = Fr(s[g], o, r, h, f, n, p);
|
|
1490
|
+
e && ke(x, o, r, h, f), l.push(x);
|
|
1491
|
+
}
|
|
1492
|
+
return new w({ width: o, height: r, pixelType: a, pixels: l, mask: n });
|
|
1493
|
+
}
|
|
1494
|
+
function Ir(i, t, e, s = !0) {
|
|
1495
|
+
const { pixels: o, width: r, height: a, pixelType: n, mask: u } = i, l = o.length, p = [], h = t.length, f = e.length, g = Math.floor(h / 2), x = Math.floor(f / 2);
|
|
1496
|
+
for (let y = 0; y < l; y++) {
|
|
1497
|
+
let d = Ze(o[y], r, a, g, u, t, !0);
|
|
1498
|
+
d = Ze(d, r, a, x, u, e, !1), s && ke(d, r, a, h, f), p.push(d);
|
|
1499
|
+
}
|
|
1500
|
+
return new w({ width: r, height: a, pixelType: n, pixels: p, mask: u });
|
|
1501
|
+
}
|
|
1502
|
+
function Rr(i, t) {
|
|
1503
|
+
const e = $r(t.kernel), s = t.mirrorEdges !== !1, o = e.separable ? Ir(i, e.row, e.col, s) : Nr(i, t, s), { outputPixelType: r } = t;
|
|
1504
|
+
return r && o.clamp(r), o;
|
|
1505
|
+
}
|
|
1506
|
+
B.set($.none, [0, 0, 0, 0, 1, 0, 0, 0, 0]), B.set($.lineDetectionHorizontal, [-1, -1, -1, 2, 2, 2, -1, -1, -1]), B.set($.lineDetectionVertical, [-1, 2, -1, -1, 2, -1, -1, 2, -1]), B.set($.lineDetectionLeftDiagonal, [2, -1, -1, -1, 2, -1, -1, -1, 2]), B.set($.lineDetectionRightDiagonal, [-1, -1, 2, -1, 2, -1, 2, -1, -1]), B.set($.gradientNorth, [-1, -2, -1, 0, 0, 0, 1, 2, 1]), B.set($.gradientWest, [-1, 0, 1, -2, 0, 2, -1, 0, 1]), B.set($.gradientEast, [1, 0, -1, 2, 0, -2, 1, 0, -1]), B.set($.gradientSouth, [1, 2, 1, 0, 0, 0, -1, -2, -1]), B.set($.gradientNorthEast, [0, -1, -2, 1, 0, -1, 2, 1, 0]), B.set($.gradientNorthWest, [-2, -1, 0, -1, 0, 1, 0, 1, 2]), B.set($.smoothArithmeticMean, [0.111111111111, 0.111111111111, 0.111111111111, 0.111111111111, 0.111111111111, 0.111111111111, 0.111111111111, 0.111111111111, 0.111111111111]), B.set($.smoothing3x3, [0.0625, 0.125, 0.0625, 0.125, 0.25, 0.125, 0.0625, 0.125, 0.0625]), B.set($.smoothing5x5, [1, 1, 1, 1, 1, 1, 4, 4, 4, 1, 1, 4, 12, 4, 1, 1, 4, 4, 4, 1, 1, 1, 1, 1, 1]), B.set($.sharpening3x3, [-1, -1, -1, -1, 9, -1, -1, -1, -1]), B.set($.sharpening5x5, [-1, -3, -4, -3, -1, -3, 0, 6, 0, -3, -4, 6, 21, 6, -4, -3, 0, 6, 0, -3, -1, -3, -4, -3, -1]), B.set($.laplacian3x3, [0, -1, 0, -1, 4, -1, 0, -1, 0]), B.set($.laplacian5x5, [0, 0, -1, 0, 0, 0, -1, -2, -1, 0, -1, -2, 17, -2, -1, 0, -1, -2, -1, 0, 0, 0, -1, 0, 0]), B.set($.sobelHorizontal, [-1, -2, -1, 0, 0, 0, 1, 2, 1]), B.set($.sobelVertical, [-1, 0, 1, -2, 0, 2, -1, 0, 1]), B.set($.sharpen, [0, -0.25, 0, -0.25, 2, -0.25, 0, -0.25, 0]), B.set($.sharpen2, [-0.25, -0.25, -0.25, -0.25, 3, -0.25, -0.25, -0.25, -0.25]), B.set($.pointSpread, [-0.627, 0.352, -0.627, 0.352, 2.923, 0.352, -0.627, 0.352, -0.627]);
|
|
1507
|
+
var oe;
|
|
1508
|
+
let at = oe = class extends D {
|
|
1509
|
+
constructor() {
|
|
1510
|
+
super(...arguments), this.rows = 3, this.cols = 3, this.kernel = [0, 0, 0, 0, 1, 0, 0, 0, 0];
|
|
1511
|
+
}
|
|
1512
|
+
set convolutionType(i) {
|
|
1513
|
+
this._set("convolutionType", i);
|
|
1514
|
+
const t = B.get(i);
|
|
1515
|
+
if (!t || i === $.userDefined || i === $.none)
|
|
1516
|
+
return;
|
|
1517
|
+
const e = Math.sqrt(t.length);
|
|
1518
|
+
this._set("kernel", t), this._set("cols", e), this._set("rows", e);
|
|
1519
|
+
}
|
|
1520
|
+
clone() {
|
|
1521
|
+
return new oe({ cols: this.cols, rows: this.rows, kernel: [...this.kernel], convolutionType: this.convolutionType, raster: L(this.raster) });
|
|
1522
|
+
}
|
|
1523
|
+
};
|
|
1524
|
+
c([m({ json: { type: Number, write: !0 } })], at.prototype, "rows", void 0), c([m({ json: { type: Number, write: !0 } })], at.prototype, "cols", void 0), c([m({ json: { name: "type", type: Number, write: !0 } })], at.prototype, "convolutionType", null), c([m({ json: { type: [Number], write: !0 } })], at.prototype, "kernel", void 0), at = oe = c([A("esri.layers.support.rasterFunctions.ConvolutionFunctionArguments")], at);
|
|
1525
|
+
const kr = at, Qe = 25;
|
|
1526
|
+
let ut = class extends G {
|
|
1527
|
+
constructor() {
|
|
1528
|
+
super(...arguments), this.functionName = "Convolution", this.rasterArgumentNames = ["raster"];
|
|
1529
|
+
}
|
|
1530
|
+
get _normalizedKernel() {
|
|
1531
|
+
const { kernel: t, convolutionType: e } = this.functionArguments, s = t.reduce((o, r) => o + r);
|
|
1532
|
+
return e === -1 || s === 0 || s === 1 ? t : t.map((o) => o / s);
|
|
1533
|
+
}
|
|
1534
|
+
_bindSourceRasters() {
|
|
1535
|
+
const { convolutionType: t, rows: e, cols: s, kernel: o } = this.functionArguments;
|
|
1536
|
+
if (!Object.values($).includes(t))
|
|
1537
|
+
return { success: !1, supportsGPU: !1, error: `convolution-function: the specified kernel type is not supported ${t}` };
|
|
1538
|
+
if (t !== $.none && e * s !== o.length)
|
|
1539
|
+
return { success: !1, supportsGPU: !1, error: "convolution-function: the specified rows and cols do not match the length of the kernel" };
|
|
1540
|
+
const r = this.sourceRasterInfos[0];
|
|
1541
|
+
this.outputPixelType = this._getOutputPixelType(r.pixelType);
|
|
1542
|
+
const a = r.clone();
|
|
1543
|
+
a.pixelType = this.outputPixelType;
|
|
1544
|
+
const n = [$.none, $.sharpen, $.sharpen2, $.sharpening3x3, $.sharpening5x5];
|
|
1545
|
+
return (t === -1 || this.outputPixelType !== "u8" && !n.includes(t)) && (a.statistics = null, a.histograms = null), a.colormap = null, a.attributeTable = null, this.rasterInfo = a, { success: !0, supportsGPU: o.length <= Qe };
|
|
1546
|
+
}
|
|
1547
|
+
_processPixels(t) {
|
|
1548
|
+
var a;
|
|
1549
|
+
const e = (a = t.pixelBlocks) == null ? void 0 : a[0];
|
|
1550
|
+
if (e == null || this.functionArguments.convolutionType === $.none)
|
|
1551
|
+
return e;
|
|
1552
|
+
const { rows: s, cols: o } = this.functionArguments, { _normalizedKernel: r } = this;
|
|
1553
|
+
return Rr(e, { kernel: r, rows: s, cols: o, outputPixelType: this.outputPixelType });
|
|
1554
|
+
}
|
|
1555
|
+
_getWebGLParameters() {
|
|
1556
|
+
const t = new Float32Array(Qe);
|
|
1557
|
+
return t.set(this._normalizedKernel), { kernelRows: this.functionArguments.rows, kernelCols: this.functionArguments.cols, kernel: t, clampRange: vt(this.outputPixelType) };
|
|
1558
|
+
}
|
|
1559
|
+
};
|
|
1560
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], ut.prototype, "functionName", void 0), c([m({ type: kr, json: { write: !0, name: "rasterFunctionArguments" } })], ut.prototype, "functionArguments", void 0), c([m()], ut.prototype, "rasterArgumentNames", void 0), c([m()], ut.prototype, "_normalizedKernel", null), ut = c([A("esri.layers.support.rasterFunctions.ConvolutionFunction")], ut);
|
|
1561
|
+
const Cr = ut;
|
|
1562
|
+
var ie;
|
|
1563
|
+
const ms = new jt({ 0: "standard", 1: "platform", 2: "profile" }, { useNumericKeys: !0 });
|
|
1564
|
+
let Pt = ie = class extends D {
|
|
1565
|
+
constructor() {
|
|
1566
|
+
super(...arguments), this.curvatureType = "standard", this.zFactor = 1;
|
|
1567
|
+
}
|
|
1568
|
+
readCurvatureType(i, t) {
|
|
1569
|
+
return ms.fromJSON(t.type ?? t.curvatureType ?? 0);
|
|
1570
|
+
}
|
|
1571
|
+
clone() {
|
|
1572
|
+
return new ie({ curvatureType: this.curvatureType, zFactor: this.zFactor, raster: this.raster });
|
|
1573
|
+
}
|
|
1574
|
+
};
|
|
1575
|
+
c([m({ json: { write: { target: "type" } } }), Y(ms)], Pt.prototype, "curvatureType", void 0), c([Ct("curvatureType", ["type", "curvatureType"])], Pt.prototype, "readCurvatureType", null), c([m({ type: Number, json: { write: !0 } })], Pt.prototype, "zFactor", void 0), Pt = ie = c([A("esri.layers.support.rasterFunctions.CurvatureFunctionArguments")], Pt);
|
|
1576
|
+
const _r = Pt;
|
|
1577
|
+
let lt = class extends G {
|
|
1578
|
+
constructor() {
|
|
1579
|
+
super(...arguments), this.functionName = "Curvature", this.functionArguments = null, this.rasterArgumentNames = ["raster"], this.isGCS = !1;
|
|
1580
|
+
}
|
|
1581
|
+
_bindSourceRasters() {
|
|
1582
|
+
var e;
|
|
1583
|
+
this.outputPixelType = this._getOutputPixelType("f32");
|
|
1584
|
+
const t = this.sourceRasterInfos[0].clone();
|
|
1585
|
+
return t.pixelType = this.outputPixelType, t.bandCount = 1, this._removeStatsHistColormapVAT(t), this.rasterInfo = t, this.isGCS = ((e = t.spatialReference) == null ? void 0 : e.isGeographic) ?? !1, { success: !0, supportsGPU: !0 };
|
|
1586
|
+
}
|
|
1587
|
+
_processPixels(t) {
|
|
1588
|
+
var p;
|
|
1589
|
+
const e = (p = t.pixelBlocks) == null ? void 0 : p[0];
|
|
1590
|
+
if (e == null)
|
|
1591
|
+
return null;
|
|
1592
|
+
const { zFactor: s, curvatureType: o } = this.functionArguments, { extent: r, primaryPixelSizes: a } = t, n = a == null ? void 0 : a[0], u = n ?? (r ? { x: r.width / e.width, y: r.height / e.height } : { x: 1, y: 1 }), l = this.isGCS && s >= 1 ? s * Kt : s;
|
|
1593
|
+
return js(e, { zFactor: l, curvatureType: o, resolution: u });
|
|
1594
|
+
}
|
|
1595
|
+
_getWebGLParameters() {
|
|
1596
|
+
const { zFactor: t, curvatureType: e } = this.functionArguments;
|
|
1597
|
+
return { curvatureType: e, zFactor: this.isGCS && t >= 1 ? t * Kt : t };
|
|
1598
|
+
}
|
|
1599
|
+
};
|
|
1600
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], lt.prototype, "functionName", void 0), c([m({ type: _r, json: { write: !0, name: "rasterFunctionArguments" } })], lt.prototype, "functionArguments", void 0), c([m()], lt.prototype, "rasterArgumentNames", void 0), c([m({ json: { write: !0 } })], lt.prototype, "isGCS", void 0), lt = c([A("esri.layers.support.rasterFunctions.CurvatureFunction")], lt);
|
|
1601
|
+
const Br = lt;
|
|
1602
|
+
var ae;
|
|
1603
|
+
let J = ae = class extends D {
|
|
1604
|
+
constructor() {
|
|
1605
|
+
super(...arguments), this.bandIds = [], this.bandNames = [], this.bandWavelengths = [], this.missingBandAction = os.bestMatch;
|
|
1606
|
+
}
|
|
1607
|
+
clone() {
|
|
1608
|
+
var i, t, e;
|
|
1609
|
+
return new ae({ bandIds: (i = this.bandIds) == null ? void 0 : i.slice(), bandNames: (t = this.bandNames) == null ? void 0 : t.slice(), bandWavelengths: (e = this.bandWavelengths) == null ? void 0 : e.slice(), missingBandAction: this.missingBandAction, method: this.method, wavelengthMatchTolerance: this.wavelengthMatchTolerance });
|
|
1610
|
+
}
|
|
1611
|
+
};
|
|
1612
|
+
c([m({ json: { write: !0 } })], J.prototype, "bandIds", void 0), c([m({ json: { write: !0 } })], J.prototype, "bandNames", void 0), c([m({ json: { write: !0 } })], J.prototype, "bandWavelengths", void 0), c([Y({ 0: "name", 1: "wavelength", 2: "id" })], J.prototype, "method", void 0), c([m({ json: { write: !0 } })], J.prototype, "missingBandAction", void 0), c([m({ json: { write: !0 } })], J.prototype, "wavelengthMatchTolerance", void 0), J = ae = c([A("esri.layers.support.rasterFunctions.ExtractBandFunctionArguments")], J);
|
|
1613
|
+
const jr = J;
|
|
1614
|
+
let $t = class extends G {
|
|
1615
|
+
constructor() {
|
|
1616
|
+
super(...arguments), this.functionName = "ExtractBand", this.functionArguments = null, this.rasterArgumentNames = ["raster"];
|
|
1617
|
+
}
|
|
1618
|
+
_bindSourceRasters() {
|
|
1619
|
+
var b;
|
|
1620
|
+
const { functionArguments: t, sourceRasterInfos: e } = this, s = e[0], { method: o, bandNames: r, bandWavelengths: a, bandIds: n, missingBandAction: u } = t, l = (r == null ? void 0 : r.length) && (o === "name" || o !== "id" && !(n != null && n.length)), p = (a == null ? void 0 : a.length) && (o === "wavelength" || o !== "id" && !(n != null && n.length)), h = u === os.fail, f = l ? this._matchBandNames(s, r) : p ? this._matchBandWavelengths(s, a, h) : this._matchBandIds(s, n, h);
|
|
1621
|
+
if (f == null)
|
|
1622
|
+
return { success: !1, supportsGPU: !1, error: `extract-band-function: Invalid ${l ? "band names" : p ? "band wavelengths" : "band ids"} for the imagery data source` };
|
|
1623
|
+
this.functionArguments.bandIds = f, this.functionArguments.method = "id", this.outputPixelType = this._getOutputPixelType("f32");
|
|
1624
|
+
const g = s.clone();
|
|
1625
|
+
g.pixelType = this.outputPixelType, g.bandCount = f.length;
|
|
1626
|
+
const { statistics: x, histograms: y } = g;
|
|
1627
|
+
x != null && x.length && (g.statistics = f.map((v) => x[v] || x[x.length - 1])), y != null && y.length && (g.histograms = f.map((v) => y[v] || y[y.length - 1]));
|
|
1628
|
+
let d = (b = g.keyProperties) == null ? void 0 : b.BandProperties;
|
|
1629
|
+
return d != null && d.length && (d = f.map((v) => v >= d.length ? d[d.length - 1] : d[v]), g.keyProperties = { ...g.keyProperties, BandProperties: d }), this.rasterInfo = g, { success: !0, supportsGPU: g.bandCount <= 3 };
|
|
1630
|
+
}
|
|
1631
|
+
_processPixels(t) {
|
|
1632
|
+
var r;
|
|
1633
|
+
const e = (r = t.pixelBlocks) == null ? void 0 : r[0];
|
|
1634
|
+
if (e == null)
|
|
1635
|
+
return null;
|
|
1636
|
+
const s = e.pixels.length, o = this.functionArguments.bandIds.map((a) => a >= s ? s - 1 : a);
|
|
1637
|
+
return e.extractBands(o);
|
|
1638
|
+
}
|
|
1639
|
+
_getWebGLParameters() {
|
|
1640
|
+
let t;
|
|
1641
|
+
if (this.isInputBandIdsSwizzled)
|
|
1642
|
+
t = this.swizzledBandSelection.length ? this.swizzledBandSelection : [0, 1, 2];
|
|
1643
|
+
else {
|
|
1644
|
+
t = [...this.functionArguments.bandIds], t.length === 0 ? t = [0, 1, 2] : t.length < 3 && (t[1] = t[1] ?? t[0], t[2] = t[2] ?? t[1]);
|
|
1645
|
+
for (let e = 0; e < 3; e++)
|
|
1646
|
+
t[e] = Math.min(t[e], 2);
|
|
1647
|
+
}
|
|
1648
|
+
return { bandIndexMat3: E(t) };
|
|
1649
|
+
}
|
|
1650
|
+
_getInputBandIds(t) {
|
|
1651
|
+
const e = t.length;
|
|
1652
|
+
return this.functionArguments.bandIds.map((s) => s >= e ? e - 1 : s).map((s) => t[s]);
|
|
1653
|
+
}
|
|
1654
|
+
_matchBandNames(t, e) {
|
|
1655
|
+
const s = t.bandInfos.map(({ name: r }) => r.toLowerCase()), o = [];
|
|
1656
|
+
for (let r = 0; r < e.length; r++) {
|
|
1657
|
+
const a = e[r].toLowerCase();
|
|
1658
|
+
let n = s.indexOf(a);
|
|
1659
|
+
if (n === -1 && a === "nearinfrared" && (n = s.findIndex((u) => u.startsWith("nearinfrared_1")), n === -1 && (n = s.findIndex((u) => u.startsWith("nearinfrared")))), n === -1)
|
|
1660
|
+
return null;
|
|
1661
|
+
o.push(n);
|
|
1662
|
+
}
|
|
1663
|
+
return o;
|
|
1664
|
+
}
|
|
1665
|
+
_matchBandIds(t, e, s) {
|
|
1666
|
+
const { bandCount: o } = t;
|
|
1667
|
+
return !(e != null && e.length) || s && e.some((r) => r < 0 || r >= o) ? null : e;
|
|
1668
|
+
}
|
|
1669
|
+
_matchBandWavelengths(t, e, s) {
|
|
1670
|
+
const { bandInfos: o } = t, r = [];
|
|
1671
|
+
for (let u = 0; u < o.length; u++) {
|
|
1672
|
+
const { minWavelength: l, maxWavelength: p } = o[u];
|
|
1673
|
+
if (!l || !p)
|
|
1674
|
+
return null;
|
|
1675
|
+
r.push({ minWavelength: l, maxWavelength: p });
|
|
1676
|
+
}
|
|
1677
|
+
const { wavelengthMatchTolerance: a } = this.functionArguments, n = [];
|
|
1678
|
+
for (let u = 0; u < e.length; u++) {
|
|
1679
|
+
const l = e[u];
|
|
1680
|
+
let p = !1, h = -1, f = Number.MAX_VALUE;
|
|
1681
|
+
for (let g = 0; g < r.length; g++) {
|
|
1682
|
+
const x = r[g], y = l >= x.minWavelength && l <= x.maxWavelength, d = Math.abs(l - (x.minWavelength + x.maxWavelength) / 2);
|
|
1683
|
+
y ? d < f && (p = !0, h = g, f = d) : !p && d < f && (h = g, f = d);
|
|
1684
|
+
}
|
|
1685
|
+
if (!p && a && f < a && (p = !0), !p && s)
|
|
1686
|
+
return null;
|
|
1687
|
+
n.push(h);
|
|
1688
|
+
}
|
|
1689
|
+
return n;
|
|
1690
|
+
}
|
|
1691
|
+
};
|
|
1692
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], $t.prototype, "functionName", void 0), c([m({ type: jr, json: { write: !0, name: "rasterFunctionArguments" } })], $t.prototype, "functionArguments", void 0), c([m()], $t.prototype, "rasterArgumentNames", void 0), $t = c([A("esri.layers.support.rasterFunctions.ExtractBandFunction")], $t);
|
|
1693
|
+
const Sr = $t;
|
|
1694
|
+
function Mr(i, t, e) {
|
|
1695
|
+
const { pixels: s, width: o, height: r, mask: a, bandMasks: n } = i, u = o * r, l = n != null && n.length ? w.combineBandMasks(n) : a, p = Math.min(t.length, s.length), h = e.startsWith("f"), f = !h && e !== i.pixelType, [g, x] = vt(e), y = w.createEmptyBand(e, u);
|
|
1696
|
+
for (let b = 0; b < r; b++) {
|
|
1697
|
+
let v = b * o;
|
|
1698
|
+
for (let R = 0; R < o; R++, v++)
|
|
1699
|
+
if (!l || l[v]) {
|
|
1700
|
+
let N = 0;
|
|
1701
|
+
for (let z = 0; z < p; z++)
|
|
1702
|
+
N += t[z] * s[z][v];
|
|
1703
|
+
h || (N = Math.round(N), f && (N = N > x ? x : N < g ? g : N)), y[v] = N;
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
const d = new w({ width: o, height: r, pixels: [y], pixelType: e, mask: l });
|
|
1707
|
+
return d.updateStatistics(), d;
|
|
1708
|
+
}
|
|
1709
|
+
var ue;
|
|
1710
|
+
let Lt = ue = class extends D {
|
|
1711
|
+
clone() {
|
|
1712
|
+
return new ue({ conversionParameters: [...this.conversionParameters], raster: this.raster });
|
|
1713
|
+
}
|
|
1714
|
+
};
|
|
1715
|
+
c([m({ type: [Number], json: { write: !0 } })], Lt.prototype, "conversionParameters", void 0), Lt = ue = c([A("esri.layers.support.rasterFunctions.GrayscaleFunctionArguments")], Lt);
|
|
1716
|
+
const Or = Lt;
|
|
1717
|
+
let ct = class extends G {
|
|
1718
|
+
constructor() {
|
|
1719
|
+
super(...arguments), this.functionName = "Grayscale", this.functionArguments = null, this.rasterArgumentNames = ["raster"];
|
|
1720
|
+
}
|
|
1721
|
+
get _normalizedWeights() {
|
|
1722
|
+
const { conversionParameters: t } = this.functionArguments, e = t.reduce((s, o) => s + o);
|
|
1723
|
+
return t.map((s) => s / e);
|
|
1724
|
+
}
|
|
1725
|
+
_bindSourceRasters() {
|
|
1726
|
+
const { conversionParameters: t } = this.functionArguments;
|
|
1727
|
+
if (!(t != null && t.length))
|
|
1728
|
+
return { success: !1, supportsGPU: !1, error: "missing valid conversion parameters." };
|
|
1729
|
+
const e = this.sourceRasterInfos[0].clone();
|
|
1730
|
+
this.outputPixelType = this._getOutputPixelType(e.pixelType), e.pixelType = this.outputPixelType;
|
|
1731
|
+
const s = t.length === 3 || e.bandCount === 3 && t.length > 3;
|
|
1732
|
+
return e.bandCount = 1, this._removeStatsHistColormapVAT(e), this.rasterInfo = e, { success: !0, supportsGPU: s };
|
|
1733
|
+
}
|
|
1734
|
+
_processPixels(t) {
|
|
1735
|
+
var s;
|
|
1736
|
+
const e = (s = t.pixelBlocks) == null ? void 0 : s[0];
|
|
1737
|
+
return e == null ? null : Mr(e, this._normalizedWeights, this.outputPixelType);
|
|
1738
|
+
}
|
|
1739
|
+
_getWebGLParameters() {
|
|
1740
|
+
return { weights: this._normalizedWeights };
|
|
1741
|
+
}
|
|
1742
|
+
};
|
|
1743
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], ct.prototype, "functionName", void 0), c([m({ type: Or, json: { write: !0, name: "rasterFunctionArguments" } })], ct.prototype, "functionArguments", void 0), c([m()], ct.prototype, "rasterArgumentNames", void 0), c([m()], ct.prototype, "_normalizedWeights", null), ct = c([A("esri.layers.support.rasterFunctions.GrayscaleFunction")], ct);
|
|
1744
|
+
const Dr = ct;
|
|
1745
|
+
var le;
|
|
1746
|
+
let pt = le = class extends D {
|
|
1747
|
+
constructor() {
|
|
1748
|
+
super(...arguments), this.rasters = [], this.processAsMultiband = !0;
|
|
1749
|
+
}
|
|
1750
|
+
writeRasters(i, t) {
|
|
1751
|
+
t.rasters = i.map((e) => typeof e == "number" || typeof e == "string" ? e : e.toJSON());
|
|
1752
|
+
}
|
|
1753
|
+
clone() {
|
|
1754
|
+
return new le({ operation: this.operation, processAsMultiband: this.processAsMultiband, rasters: L(this.rasters) });
|
|
1755
|
+
}
|
|
1756
|
+
};
|
|
1757
|
+
c([m({ json: { write: !0 } })], pt.prototype, "operation", void 0), c([m({ json: { write: !0 } })], pt.prototype, "rasters", void 0), c([_t("rasters")], pt.prototype, "writeRasters", null), c([m({ json: { write: !0 } })], pt.prototype, "processAsMultiband", void 0), pt = le = c([A("esri.layers.support.rasterFunctions.LocalFunctionArguments")], pt);
|
|
1758
|
+
const Gr = pt;
|
|
1759
|
+
let Ft = class extends G {
|
|
1760
|
+
constructor() {
|
|
1761
|
+
super(...arguments), this.functionName = "Local", this.functionArguments = null, this.rasterArgumentNames = ["rasters"];
|
|
1762
|
+
}
|
|
1763
|
+
_bindSourceRasters() {
|
|
1764
|
+
const { sourceRasterInfos: t } = this, e = t[0], { bandCount: s } = e, { processAsMultiband: o } = this.functionArguments;
|
|
1765
|
+
if (t.some((l) => l.bandCount !== s))
|
|
1766
|
+
return { success: !1, supportsGPU: !1, error: "local-function: input rasters do not have same band count" };
|
|
1767
|
+
const { operation: r, rasters: a } = this.functionArguments, n = Oe[r];
|
|
1768
|
+
if (!(n === 999 || a.length === n || a.length <= 1 && n === 1))
|
|
1769
|
+
return { success: !1, supportsGPU: !1, error: `local-function: the length of functionArguments.rasters does not match operation's requirement: ${n}` };
|
|
1770
|
+
const u = e.clone();
|
|
1771
|
+
return u.bandCount = n !== 999 || o ? s : 1, this._removeStatsHistColormapVAT(u), this._updateStatistics(u), this._updatePixelType(u), this.rasterInfo = u, { success: !0, supportsGPU: u.bandCount === 1 && n <= 3 && (r < 11 || r > 16) };
|
|
1772
|
+
}
|
|
1773
|
+
_processPixels(t) {
|
|
1774
|
+
const { pixelBlocks: e } = t;
|
|
1775
|
+
return e == null || e.some((s) => s == null) ? null : hs(e, this.functionArguments.operation, { processAsMultiband: this.functionArguments.processAsMultiband, outputPixelType: this.outputPixelType ?? void 0 });
|
|
1776
|
+
}
|
|
1777
|
+
_getWebGLParameters() {
|
|
1778
|
+
var u;
|
|
1779
|
+
const { operation: t } = this.functionArguments, e = Oe[t], s = ((u = Object.keys(Se).find((l) => Se[l] === t)) == null ? void 0 : u.toLowerCase()) ?? "undefined", o = this.outputPixelType ?? "f32";
|
|
1780
|
+
let [r, a] = vt(o);
|
|
1781
|
+
const n = nt(o);
|
|
1782
|
+
return n && (r -= 1e-4, a += 1e-4), { imageCount: e, operationName: s, domainRange: [r, a], isOutputRounded: n };
|
|
1783
|
+
}
|
|
1784
|
+
_updateStatistics(t) {
|
|
1785
|
+
var r, a;
|
|
1786
|
+
const e = this.sourceRasterInfos[0], { operation: s } = this.functionArguments, o = (r = Me(s)) == null ? void 0 : r.domain;
|
|
1787
|
+
if (o) {
|
|
1788
|
+
t.statistics = [];
|
|
1789
|
+
for (let n = 0; n < t.bandCount; n++)
|
|
1790
|
+
t.statistics[n] = { min: o[0], max: o[1], avg: (o[0] + o[1]) / 2, stddev: (o[0] + o[1]) / 10 };
|
|
1791
|
+
} else
|
|
1792
|
+
s === 45 && ((a = e.statistics) != null && a.length) && (t.statistics = e.statistics.map((n) => ({ min: -n.max, max: -n.min, avg: n.avg != null ? -n.avg : void 0, stddev: n.stddev != null ? -n.stddev : void 0 })));
|
|
1793
|
+
}
|
|
1794
|
+
_updatePixelType(t) {
|
|
1795
|
+
const { statistics: e, pixelType: s } = this.sourceRasterInfos[0], { operation: o } = this.functionArguments, { domain: r, isInteger: a } = Me(o) ?? { domain: null, isInteger: !1 };
|
|
1796
|
+
let n = "f32";
|
|
1797
|
+
if (r && a)
|
|
1798
|
+
n = Xt(r[0], r[1]);
|
|
1799
|
+
else if (o === 30) {
|
|
1800
|
+
const u = e == null ? void 0 : e[0];
|
|
1801
|
+
n = u ? Xt(u.min, u.max) : nt(s) ? s : "s32";
|
|
1802
|
+
} else if (o === 45 && nt(s)) {
|
|
1803
|
+
const u = e == null ? void 0 : e.map(({ max: f }) => -f), l = e == null ? void 0 : e.map(({ min: f }) => -f), p = u != null && u.length ? Math.min(...u) : null, h = l != null && l.length ? Math.min(...l) : null;
|
|
1804
|
+
n = p != null && h != null ? Xt(p, h) : s.startsWith("s") ? s.replace("s", "u") : s === "u1" || s === "u2" || s === "u4" ? "s8" : s === "u8" ? "s16" : "s32";
|
|
1805
|
+
}
|
|
1806
|
+
t.pixelType = this.outputPixelType = this._getOutputPixelType(n);
|
|
1807
|
+
}
|
|
1808
|
+
};
|
|
1809
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], Ft.prototype, "functionName", void 0), c([m({ type: Gr, json: { write: !0, name: "rasterFunctionArguments" } })], Ft.prototype, "functionArguments", void 0), c([m()], Ft.prototype, "rasterArgumentNames", void 0), Ft = c([A("esri.layers.support.rasterFunctions.LocalFunction")], Ft);
|
|
1810
|
+
const zr = Ft;
|
|
1811
|
+
var ce;
|
|
1812
|
+
let ht = ce = class extends D {
|
|
1813
|
+
constructor() {
|
|
1814
|
+
super(...arguments), this.includedRanges = null, this.noDataValues = null, this.noDataInterpretation = is.matchAny;
|
|
1815
|
+
}
|
|
1816
|
+
get normalizedNoDataValues() {
|
|
1817
|
+
const { noDataValues: i } = this;
|
|
1818
|
+
if (!(i != null && i.length))
|
|
1819
|
+
return null;
|
|
1820
|
+
let t = !1;
|
|
1821
|
+
const e = i.map((s) => {
|
|
1822
|
+
if (typeof s == "number")
|
|
1823
|
+
return t = !0, [s];
|
|
1824
|
+
if (typeof s == "string") {
|
|
1825
|
+
const o = s.trim().split(" ").filter((r) => r.trim() !== "").map((r) => Number(r));
|
|
1826
|
+
return t = t || o.length > 0, o.length === 0 ? null : o;
|
|
1827
|
+
}
|
|
1828
|
+
return null;
|
|
1829
|
+
});
|
|
1830
|
+
return t ? e : null;
|
|
1831
|
+
}
|
|
1832
|
+
clone() {
|
|
1833
|
+
var i, t;
|
|
1834
|
+
return new ce({ includedRanges: ((i = this.includedRanges) == null ? void 0 : i.slice()) ?? [], noDataValues: ((t = this.noDataValues) == null ? void 0 : t.slice()) ?? [], noDataInterpretation: this.noDataInterpretation });
|
|
1835
|
+
}
|
|
1836
|
+
};
|
|
1837
|
+
c([m({ json: { write: !0 } })], ht.prototype, "includedRanges", void 0), c([m({ json: { write: !0 } })], ht.prototype, "noDataValues", void 0), c([m()], ht.prototype, "normalizedNoDataValues", null), c([m({ json: { write: !0 } })], ht.prototype, "noDataInterpretation", void 0), ht = ce = c([A("esri.layers.support.rasterFunctions.MaskFunctionArguments")], ht);
|
|
1838
|
+
const Er = ht;
|
|
1839
|
+
let mt = class extends G {
|
|
1840
|
+
constructor() {
|
|
1841
|
+
super(...arguments), this.functionName = "Mask", this.functionArguments = null, this.rasterArgumentNames = ["raster"];
|
|
1842
|
+
}
|
|
1843
|
+
_bindSourceRasters() {
|
|
1844
|
+
const t = this.sourceRasterInfos[0].clone(), { pixelType: e } = t;
|
|
1845
|
+
this.outputPixelType = this._getOutputPixelType(e), t.pixelType = this.outputPixelType, this.rasterInfo = t;
|
|
1846
|
+
const { includedRanges: s, normalizedNoDataValues: o } = this.functionArguments;
|
|
1847
|
+
if (!(s != null && s.length) && !(o != null && o.length))
|
|
1848
|
+
return { success: !1, supportsGPU: !1, error: "missing includedRanges or noDataValues argument" };
|
|
1849
|
+
let r = [];
|
|
1850
|
+
for (let n = 0; n < t.bandCount; n++) {
|
|
1851
|
+
const u = Ps(e, s == null ? void 0 : s.slice(2 * n, 2 * n + 2), o == null ? void 0 : o[n]);
|
|
1852
|
+
if (u == null) {
|
|
1853
|
+
r = null;
|
|
1854
|
+
break;
|
|
1855
|
+
}
|
|
1856
|
+
r.push(u);
|
|
1857
|
+
}
|
|
1858
|
+
this.lookups = r;
|
|
1859
|
+
const a = o != null && o.every((n) => {
|
|
1860
|
+
var u;
|
|
1861
|
+
return (n == null ? void 0 : n.length) === ((u = o[0]) == null ? void 0 : u.length);
|
|
1862
|
+
});
|
|
1863
|
+
return { success: !0, supportsGPU: (!s || s.length <= 2 * K) && (!o || a && o[0].length <= K) };
|
|
1864
|
+
}
|
|
1865
|
+
_processPixels(t) {
|
|
1866
|
+
var l;
|
|
1867
|
+
const e = (l = t.pixelBlocks) == null ? void 0 : l[0];
|
|
1868
|
+
if (e == null)
|
|
1869
|
+
return null;
|
|
1870
|
+
const { outputPixelType: s, lookups: o } = this, { includedRanges: r, noDataInterpretation: a, normalizedNoDataValues: n } = this.functionArguments, u = a === is.matchAll;
|
|
1871
|
+
return $s(e, { includedRanges: r, noDataValues: n, outputPixelType: s, matchAll: u, lookups: o });
|
|
1872
|
+
}
|
|
1873
|
+
_getWebGLParameters() {
|
|
1874
|
+
var r;
|
|
1875
|
+
const { includedRanges: t, normalizedNoDataValues: e } = this.functionArguments, s = new Float32Array(K);
|
|
1876
|
+
s.fill(kt), (r = e == null ? void 0 : e[0]) != null && r.length && s.set(e[0]);
|
|
1877
|
+
const o = new Float32Array(K);
|
|
1878
|
+
for (let a = 0; a < o.length; a += 2)
|
|
1879
|
+
o[a] = (t == null ? void 0 : t[a]) ?? -kt, o[a + 1] = (t == null ? void 0 : t[a + 1]) ?? kt;
|
|
1880
|
+
return t && t.length && o.set(t), { bandCount: this.sourceRasterInfos[0].bandCount, noDataValues: s, includedRanges: o };
|
|
1881
|
+
}
|
|
1882
|
+
};
|
|
1883
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], mt.prototype, "functionName", void 0), c([m({ type: Er, json: { write: !0, name: "rasterFunctionArguments" } })], mt.prototype, "functionArguments", void 0), c([m()], mt.prototype, "rasterArgumentNames", void 0), c([m({ json: { write: !0 } })], mt.prototype, "lookups", void 0), mt = c([A("esri.layers.support.rasterFunctions.MaskFunction")], mt);
|
|
1884
|
+
const Vr = mt;
|
|
1885
|
+
var pe;
|
|
1886
|
+
let Nt = pe = class extends D {
|
|
1887
|
+
constructor() {
|
|
1888
|
+
super(...arguments), this.visibleBandID = 0, this.infraredBandID = 1, this.scientificOutput = !1;
|
|
1889
|
+
}
|
|
1890
|
+
clone() {
|
|
1891
|
+
const { visibleBandID: i, infraredBandID: t, scientificOutput: e } = this;
|
|
1892
|
+
return new pe({ visibleBandID: i, infraredBandID: t, scientificOutput: e });
|
|
1893
|
+
}
|
|
1894
|
+
};
|
|
1895
|
+
c([m({ json: { write: !0 } })], Nt.prototype, "visibleBandID", void 0), c([m({ json: { write: !0 } })], Nt.prototype, "infraredBandID", void 0), c([m({ json: { write: !0 } })], Nt.prototype, "scientificOutput", void 0), Nt = pe = c([A("esri.layers.support.rasterFunctions.NDVIFunctionArguments")], Nt);
|
|
1896
|
+
const Ur = Nt;
|
|
1897
|
+
let It = class extends G {
|
|
1898
|
+
constructor() {
|
|
1899
|
+
super(...arguments), this.functionName = "NDVI", this.functionArguments = null, this.rasterArgumentNames = ["raster"];
|
|
1900
|
+
}
|
|
1901
|
+
_bindSourceRasters() {
|
|
1902
|
+
const { scientificOutput: t, visibleBandID: e, infraredBandID: s } = this.functionArguments;
|
|
1903
|
+
this.outputPixelType = this._getOutputPixelType(t ? "f32" : "u8");
|
|
1904
|
+
const o = this.sourceRasterInfos[0], r = Math.max(e, s);
|
|
1905
|
+
if (o.bandCount < 2 || r >= o.bandCount)
|
|
1906
|
+
return { success: !1, supportsGPU: !1, error: "ndvi-function: source raster has insufficient amount of raster bands" };
|
|
1907
|
+
const a = o.clone();
|
|
1908
|
+
a.pixelType = this.outputPixelType, a.colormap = null, a.histograms = null, a.bandCount = 1, a.keyProperties = { ...a.keyProperties, BandProperties: void 0 };
|
|
1909
|
+
const [n, u, l, p] = t ? [-1, 1, 0, 0.1] : [0, 200, 100, 10];
|
|
1910
|
+
return a.statistics = [{ min: n, max: u, avg: l, stddev: p }], this.rasterInfo = a, { success: !0, supportsGPU: !0 };
|
|
1911
|
+
}
|
|
1912
|
+
_processPixels(t) {
|
|
1913
|
+
var a;
|
|
1914
|
+
const e = (a = t.pixelBlocks) == null ? void 0 : a[0];
|
|
1915
|
+
if (e == null)
|
|
1916
|
+
return null;
|
|
1917
|
+
const { visibleBandID: s, infraredBandID: o, scientificOutput: r } = this.functionArguments;
|
|
1918
|
+
return Ln(e, s, o, !r);
|
|
1919
|
+
}
|
|
1920
|
+
_getWebGLParameters() {
|
|
1921
|
+
const { visibleBandID: t, infraredBandID: e, scientificOutput: s } = this.functionArguments, o = this.isInputBandIdsSwizzled ? [0, 1, 2] : [e, t, 0];
|
|
1922
|
+
return { bandIndexMat3: E(o), scaled: !s };
|
|
1923
|
+
}
|
|
1924
|
+
_getInputBandIds(t) {
|
|
1925
|
+
const { visibleBandID: e, infraredBandID: s } = this.functionArguments;
|
|
1926
|
+
return [s, e, 0].map((o) => t[o]);
|
|
1927
|
+
}
|
|
1928
|
+
};
|
|
1929
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], It.prototype, "functionName", void 0), c([m({ type: Ur, json: { write: !0, name: "rasterFunctionArguments" } })], It.prototype, "functionArguments", void 0), c([m()], It.prototype, "rasterArgumentNames", void 0), It = c([A("esri.layers.support.rasterFunctions.NDVIFunction")], It);
|
|
1930
|
+
const Lr = It;
|
|
1931
|
+
var he;
|
|
1932
|
+
let Q = he = class extends D {
|
|
1933
|
+
constructor() {
|
|
1934
|
+
super(...arguments), this.inputRanges = null, this.outputValues = null, this.noDataRanges = null, this.allowUnmatched = !1, this.isLastInputRangeInclusive = !1;
|
|
1935
|
+
}
|
|
1936
|
+
clone() {
|
|
1937
|
+
return new he({ inputRanges: [...this.inputRanges], outputValues: [...this.outputValues], noDataRanges: [...this.noDataRanges], allowUnmatched: this.allowUnmatched, isLastInputRangeInclusive: this.isLastInputRangeInclusive });
|
|
1938
|
+
}
|
|
1939
|
+
};
|
|
1940
|
+
c([m({ json: { write: !0 } })], Q.prototype, "inputRanges", void 0), c([m({ json: { write: !0 } })], Q.prototype, "outputValues", void 0), c([m({ json: { write: !0 } })], Q.prototype, "noDataRanges", void 0), c([m({ json: { write: !0 } })], Q.prototype, "allowUnmatched", void 0), c([m({ json: { write: !0 } })], Q.prototype, "isLastInputRangeInclusive", void 0), Q = he = c([A("esri.layers.support.rasterFunctions.RemapFunctionArguments")], Q);
|
|
1941
|
+
const Wr = Q;
|
|
1942
|
+
let ft = class extends G {
|
|
1943
|
+
constructor() {
|
|
1944
|
+
super(...arguments), this.functionName = "Remap", this.functionArguments = null, this.rasterArgumentNames = ["raster"], this.lookup = null;
|
|
1945
|
+
}
|
|
1946
|
+
_bindSourceRasters() {
|
|
1947
|
+
const t = this.sourceRasterInfos[0].clone(), { pixelType: e } = t;
|
|
1948
|
+
this.outputPixelType = this._getOutputPixelType(e), t.pixelType = this.outputPixelType, t.colormap = null, t.histograms = null, t.bandCount = 1, t.attributeTable = null;
|
|
1949
|
+
const { statistics: s } = t, { allowUnmatched: o, outputValues: r, inputRanges: a, noDataRanges: n, isLastInputRangeInclusive: u } = this.functionArguments;
|
|
1950
|
+
if (s != null && s.length && (r != null && r.length))
|
|
1951
|
+
if (o) {
|
|
1952
|
+
const l = Math.min.apply(null, [...r, s[0].min]), p = Math.max.apply(null, [...r, s[0].max]);
|
|
1953
|
+
t.statistics = [{ ...s[0], min: l, max: p }];
|
|
1954
|
+
} else {
|
|
1955
|
+
let l = r[0], p = l;
|
|
1956
|
+
for (let h = 0; h < r.length; h++)
|
|
1957
|
+
l = l > r[h] ? r[h] : l, p = p > r[h] ? p : r[h];
|
|
1958
|
+
t.statistics = [{ ...s[0], min: l, max: p }];
|
|
1959
|
+
}
|
|
1960
|
+
return this.rasterInfo = t, this.lookup = o ? null : Fs({ srcPixelType: e, inputRanges: a, outputValues: r, noDataRanges: n, allowUnmatched: o, isLastInputRangeInclusive: u, outputPixelType: this.outputPixelType }), { success: !0, supportsGPU: (!r || r.length <= K) && (!n || n.length <= K) };
|
|
1961
|
+
}
|
|
1962
|
+
_processPixels(t) {
|
|
1963
|
+
var p;
|
|
1964
|
+
const e = (p = t.pixelBlocks) == null ? void 0 : p[0];
|
|
1965
|
+
if (e == null)
|
|
1966
|
+
return null;
|
|
1967
|
+
const { lookup: s, outputPixelType: o } = this;
|
|
1968
|
+
if (s) {
|
|
1969
|
+
const h = Fe(e, { lut: [s.lut], offset: s.offset, outputPixelType: o });
|
|
1970
|
+
return h != null && s.mask && (h.mask = Ns(e.pixels[0], e.mask, s.mask, s.offset, "u8")), h;
|
|
1971
|
+
}
|
|
1972
|
+
const { inputRanges: r, outputValues: a, noDataRanges: n, allowUnmatched: u, isLastInputRangeInclusive: l } = this.functionArguments;
|
|
1973
|
+
return Is(e, { inputRanges: r, outputValues: a, noDataRanges: n, outputPixelType: o, allowUnmatched: u, isLastInputRangeInclusive: l });
|
|
1974
|
+
}
|
|
1975
|
+
_getWebGLParameters() {
|
|
1976
|
+
const { allowUnmatched: t, noDataRanges: e, isLastInputRangeInclusive: s } = this.functionArguments, o = new Float32Array(3 * K), r = 1e-5, a = this.functionArguments.inputRanges ?? [], n = this.functionArguments.outputValues ?? [], u = n.length;
|
|
1977
|
+
for (let p = 0; p < K; p++)
|
|
1978
|
+
o[3 * p] = a[2 * p] ?? kt - 1, o[3 * p + 1] = a[2 * p + 1] ?? kt, o[3 * p + 2] = n[p] ?? 0, p < u && (p > 0 && (o[3 * p] -= r), (p < u - 1 || !s) && (o[3 * p + 1] -= r));
|
|
1979
|
+
const l = new Float32Array(2 * K);
|
|
1980
|
+
return l.fill(kt), e != null && e.length && l.set(e), { allowUnmatched: t, rangeMaps: o, noDataRanges: l, clampRange: vt(this.outputPixelType) };
|
|
1981
|
+
}
|
|
1982
|
+
};
|
|
1983
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], ft.prototype, "functionName", void 0), c([m({ type: Wr, json: { write: !0, name: "rasterFunctionArguments" } })], ft.prototype, "functionArguments", void 0), c([m()], ft.prototype, "rasterArgumentNames", void 0), c([m({ json: { write: !0 } })], ft.prototype, "lookup", void 0), ft = c([A("esri.layers.support.rasterFunctions.RemapFunction")], ft);
|
|
1984
|
+
const qr = ft;
|
|
1985
|
+
var me;
|
|
1986
|
+
const Hr = new jt({ 1: "degree", 2: "percent-rise", 3: "adjusted" }, { useNumericKeys: !0 });
|
|
1987
|
+
let tt = me = class extends D {
|
|
1988
|
+
constructor() {
|
|
1989
|
+
super(...arguments), this.slopeType = "degree", this.zFactor = 1, this.pixelSizePower = 0.664, this.pixelSizeFactor = 0.024, this.removeEdgeEffect = !1;
|
|
1990
|
+
}
|
|
1991
|
+
clone() {
|
|
1992
|
+
return new me({ slopeType: this.slopeType, zFactor: this.zFactor, pixelSizePower: this.pixelSizePower, pixelSizeFactor: this.pixelSizeFactor, removeEdgeEffect: this.removeEdgeEffect, raster: this.raster });
|
|
1993
|
+
}
|
|
1994
|
+
};
|
|
1995
|
+
c([Y(Hr)], tt.prototype, "slopeType", void 0), c([m({ type: Number, json: { write: !0 } })], tt.prototype, "zFactor", void 0), c([m({ type: Number, json: { name: "psPower", write: !0 } })], tt.prototype, "pixelSizePower", void 0), c([m({ type: Number, json: { name: "psZFactor", write: !0 } })], tt.prototype, "pixelSizeFactor", void 0), c([m({ type: Boolean, json: { write: !0 } })], tt.prototype, "removeEdgeEffect", void 0), tt = me = c([A("esri.layers.support.rasterFunctions.SlopeFunctionArguments")], tt);
|
|
1996
|
+
const Xr = tt;
|
|
1997
|
+
let dt = class extends G {
|
|
1998
|
+
constructor() {
|
|
1999
|
+
super(...arguments), this.functionName = "Slope", this.functionArguments = null, this.rasterArgumentNames = ["raster"], this.isGCS = !1;
|
|
2000
|
+
}
|
|
2001
|
+
_bindSourceRasters() {
|
|
2002
|
+
var e;
|
|
2003
|
+
this.outputPixelType = this._getOutputPixelType("f32");
|
|
2004
|
+
const t = this.sourceRasterInfos[0].clone();
|
|
2005
|
+
return t.pixelType = this.outputPixelType, t.statistics = this.functionArguments.slopeType !== "percent-rise" ? [{ min: 0, max: 90, avg: 1, stddev: 1 }] : null, t.histograms = null, t.colormap = null, t.attributeTable = null, t.bandCount = 1, this.rasterInfo = t, this.isGCS = ((e = t.spatialReference) == null ? void 0 : e.isGeographic) ?? !1, { success: !0, supportsGPU: !0 };
|
|
2006
|
+
}
|
|
2007
|
+
_processPixels(t) {
|
|
2008
|
+
var f;
|
|
2009
|
+
const e = (f = t.pixelBlocks) == null ? void 0 : f[0];
|
|
2010
|
+
if (e == null)
|
|
2011
|
+
return null;
|
|
2012
|
+
const { zFactor: s, slopeType: o, pixelSizePower: r, pixelSizeFactor: a } = this.functionArguments, { isGCS: n } = this, { extent: u, primaryPixelSizes: l } = t, p = l == null ? void 0 : l[0], h = p ?? (u ? { x: u.width / e.width, y: u.height / e.height } : { x: 1, y: 1 });
|
|
2013
|
+
return Ss(e, { zFactor: s, slopeType: o, pixelSizePower: r, pixelSizeFactor: a, isGCS: n, resolution: h });
|
|
2014
|
+
}
|
|
2015
|
+
_getWebGLParameters() {
|
|
2016
|
+
const { zFactor: t, slopeType: e, pixelSizeFactor: s, pixelSizePower: o } = this.functionArguments;
|
|
2017
|
+
return { zFactor: this.isGCS && t >= 1 ? t * Kt : t, slopeType: e, pixelSizeFactor: s ?? 0, pixelSizePower: o ?? 0 };
|
|
2018
|
+
}
|
|
2019
|
+
};
|
|
2020
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], dt.prototype, "functionName", void 0), c([m({ type: Xr, json: { write: !0, name: "rasterFunctionArguments" } })], dt.prototype, "functionArguments", void 0), c([m()], dt.prototype, "rasterArgumentNames", void 0), c([m({ json: { write: !0 } })], dt.prototype, "isGCS", void 0), dt = c([A("esri.layers.support.rasterFunctions.SlopeFunction")], dt);
|
|
2021
|
+
const Jr = dt, ts = new jt({ 1: "min", 2: "max", 3: "mean", 4: "stddev", 5: "median", 6: "majority", 7: "minority" }, { useNumericKeys: !0 });
|
|
2022
|
+
function Kr(i, t) {
|
|
2023
|
+
const { fillNoDataOnly: e } = t, { band: s, width: o, height: r, mask: a, outBand: n } = i;
|
|
2024
|
+
if (e && !a)
|
|
2025
|
+
return void n.set(s);
|
|
2026
|
+
const { statisticsType: u, kernelRows: l, kernelCols: p } = t, h = u === "stddev", f = o * r, g = new Float64Array(f), x = new Float64Array(f), y = new Uint32Array(f);
|
|
2027
|
+
for (let F = 0; F < r; F++) {
|
|
2028
|
+
const P = F * o;
|
|
2029
|
+
let I = 0, k = 0, C = 0;
|
|
2030
|
+
for (let _ = 0; _ < p; _++)
|
|
2031
|
+
a && !a[P + _] || (I += s[P + _], h && (k += s[P + _] ** 2), C++);
|
|
2032
|
+
g[P] = I, x[P] = k, y[P] = C;
|
|
2033
|
+
for (let _ = 1; _ <= o - p; _++) {
|
|
2034
|
+
const W = P + _ - 1, St = W + p;
|
|
2035
|
+
a ? (a[W] && (C--, I -= s[W], h && (k -= s[W] ** 2)), a[St] && (C++, I += s[St], h && (k += s[St] ** 2))) : (I -= s[W], I += s[St], h && (k -= s[W] ** 2, k += s[St] ** 2)), g[P + _] = I, y[P + _] = C, h && (x[P + _] = k);
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
const d = new Float64Array(f), b = new Float64Array(f), v = new Uint32Array(f), R = l * o;
|
|
2039
|
+
for (let F = 0; F <= o - p; F++) {
|
|
2040
|
+
let P = 0, I = 0, k = 0;
|
|
2041
|
+
for (let C = 0; C < l; C++) {
|
|
2042
|
+
const _ = C * o + F;
|
|
2043
|
+
P += g[_], k += y[_], h && (I += x[_]);
|
|
2044
|
+
}
|
|
2045
|
+
d[F] = P, b[F] = I, v[F] = k;
|
|
2046
|
+
for (let C = 1; C <= r - l; C++) {
|
|
2047
|
+
const _ = (C - 1) * o + F, W = _ + R;
|
|
2048
|
+
P -= g[_], P += g[W], k -= y[_], k += y[W], h && (I -= x[_], I += x[W]), d[C * o + F] = P, b[C * o + F] = I, v[C * o + F] = k;
|
|
2049
|
+
}
|
|
2050
|
+
}
|
|
2051
|
+
const N = Math.floor(l / 2), z = Math.floor(p / 2);
|
|
2052
|
+
for (let F = N; F < r - N; F++) {
|
|
2053
|
+
const P = F * o;
|
|
2054
|
+
for (let I = z; I < o - z; I++) {
|
|
2055
|
+
const k = (F - N) * o + I - z, C = v[k];
|
|
2056
|
+
if (C === 0 || e && (!a || a[P + I]))
|
|
2057
|
+
continue;
|
|
2058
|
+
const _ = d[k] / C, W = h ? Math.sqrt((b[k] - d[k] * _) / C) : _;
|
|
2059
|
+
n[P + I] = W, a && (a[P + I] = 255);
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
function Yr(i, t) {
|
|
2064
|
+
const { fillNoDataOnly: e } = t, { band: s, width: o, height: r, mask: a, outBand: n } = i;
|
|
2065
|
+
if (e && !a)
|
|
2066
|
+
return void n.set(s);
|
|
2067
|
+
const { kernelRows: u, kernelCols: l, statisticsType: p } = t, h = Math.floor(u / 2), f = Math.floor(l / 2), g = p === "min", x = n.slice(), y = new Uint32Array(o * r);
|
|
2068
|
+
for (let d = h; d < r - h; d++) {
|
|
2069
|
+
const b = d * o;
|
|
2070
|
+
for (let v = f; v < o - f; v++) {
|
|
2071
|
+
let R = g ? Number.MAX_VALUE : -Number.MAX_VALUE, N = 0;
|
|
2072
|
+
for (let z = 0; z < u; z++)
|
|
2073
|
+
for (let F = 0; F < l; F++) {
|
|
2074
|
+
const P = b + v + (z - h) * o + F - f;
|
|
2075
|
+
a && !a[P] || (R = g ? Math.min(R, s[P]) : Math.max(R, s[P]), N++);
|
|
2076
|
+
}
|
|
2077
|
+
a ? (x[b + v] = N === 0 ? 0 : R, y[b + v] = N) : n[b + v] = N === 0 ? 0 : R;
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
if (a)
|
|
2081
|
+
for (let d = h; d < r - h; d++) {
|
|
2082
|
+
const b = d * o;
|
|
2083
|
+
for (let v = f; v < o - f; v++)
|
|
2084
|
+
if (y[b + v]) {
|
|
2085
|
+
if (e && a[b + v])
|
|
2086
|
+
continue;
|
|
2087
|
+
n[b + v] = x[b + v], a[b + v] = 255;
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
function Zr(i, t) {
|
|
2092
|
+
const { fillNoDataOnly: e } = t, { band: s, width: o, height: r, mask: a, outBand: n } = i;
|
|
2093
|
+
if (e && !a)
|
|
2094
|
+
return void n.set(s);
|
|
2095
|
+
const { kernelRows: u, kernelCols: l } = t, p = Math.floor(u / 2), h = Math.floor(l / 2), f = n.slice(), g = new Uint32Array(o * r);
|
|
2096
|
+
for (let x = p; x < r - p; x++) {
|
|
2097
|
+
const y = x * o;
|
|
2098
|
+
for (let d = h; d < o - h; d++) {
|
|
2099
|
+
if (e && a && a[y + d])
|
|
2100
|
+
continue;
|
|
2101
|
+
const b = [];
|
|
2102
|
+
for (let v = 0; v < u; v++)
|
|
2103
|
+
for (let R = 0; R < l; R++) {
|
|
2104
|
+
const N = y + d + (v - p) * o + R - h;
|
|
2105
|
+
a && !a[N] || b.push(s[N]);
|
|
2106
|
+
}
|
|
2107
|
+
b.length && (b.sort((v, R) => v - R), a ? (f[y + d] = b[Math.floor((b.length - 1) / 2)], g[y + d] = b.length) : n[y + d] = b[Math.floor((b.length - 1) / 2)]);
|
|
2108
|
+
}
|
|
2109
|
+
}
|
|
2110
|
+
if (a)
|
|
2111
|
+
for (let x = p; x < r - p; x++) {
|
|
2112
|
+
const y = x * o;
|
|
2113
|
+
for (let d = h; d < o - h; d++)
|
|
2114
|
+
if (g[y + d]) {
|
|
2115
|
+
if (e && a[y + d])
|
|
2116
|
+
continue;
|
|
2117
|
+
n[y + d] = f[y + d], a[y + d] = 255;
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
function Qr(i, t) {
|
|
2122
|
+
const { fillNoDataOnly: e } = t, { band: s, width: o, height: r, mask: a, outBand: n } = i;
|
|
2123
|
+
if (e && !a)
|
|
2124
|
+
return void n.set(s);
|
|
2125
|
+
const { kernelRows: u, kernelCols: l } = t, p = Math.floor(u / 2), h = Math.floor(l / 2), f = t.statisticsType === "majority", g = u * l, x = n.slice(), y = new Uint32Array(o * r);
|
|
2126
|
+
for (let d = p; d < r - p; d++) {
|
|
2127
|
+
const b = d * o;
|
|
2128
|
+
for (let v = h; v < o - h; v++) {
|
|
2129
|
+
if (e && a && a[b + v])
|
|
2130
|
+
continue;
|
|
2131
|
+
const R = /* @__PURE__ */ new Map();
|
|
2132
|
+
for (let P = 0; P < u; P++)
|
|
2133
|
+
for (let I = 0; I < l; I++) {
|
|
2134
|
+
const k = b + v + (P - p) * o + I - h;
|
|
2135
|
+
if (a && !a[k])
|
|
2136
|
+
continue;
|
|
2137
|
+
const C = s[k];
|
|
2138
|
+
R.set(C, R.has(C) ? R.get(C) + 1 : 1);
|
|
2139
|
+
}
|
|
2140
|
+
if (R.size === 0)
|
|
2141
|
+
continue;
|
|
2142
|
+
let N = 0, z = 0, F = f ? 0 : g + 1;
|
|
2143
|
+
for (const P of R.keys())
|
|
2144
|
+
z = R.get(P), f === z > F && (F = z, N = P);
|
|
2145
|
+
a ? (x[b + v] = N, y[b + v] = R.size) : n[b + v] = N;
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
if (a)
|
|
2149
|
+
for (let d = p; d < r - p; d++) {
|
|
2150
|
+
const b = d * o;
|
|
2151
|
+
for (let v = h; v < o - h; v++)
|
|
2152
|
+
if (y[b + v]) {
|
|
2153
|
+
if (e && a[b + v])
|
|
2154
|
+
continue;
|
|
2155
|
+
n[b + v] = x[b + v], a[b + v] = 255;
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
}
|
|
2159
|
+
function to(i, t) {
|
|
2160
|
+
const { mask: e } = i, { fillNoDataOnly: s } = t;
|
|
2161
|
+
if (s && !e)
|
|
2162
|
+
return i;
|
|
2163
|
+
const { pixels: o, width: r, height: a, bandMasks: n, pixelType: u } = i, l = o.length, p = r * a, h = [], { kernelRows: f, kernelCols: g, statisticsType: x, mirrorEdges: y } = t;
|
|
2164
|
+
if (s && !e)
|
|
2165
|
+
return i;
|
|
2166
|
+
const d = t.outputPixelType ?? u, b = [];
|
|
2167
|
+
for (let N = 0; N < l; N++) {
|
|
2168
|
+
const z = o[N], F = w.createEmptyBand(d, p);
|
|
2169
|
+
s && F.set(z);
|
|
2170
|
+
const P = (n == null ? void 0 : n[N]) ?? e, I = (P == null ? void 0 : P.slice()) ?? null, k = { band: z, width: r, height: a, mask: I, outBand: F };
|
|
2171
|
+
switch (x) {
|
|
2172
|
+
case "min":
|
|
2173
|
+
case "max":
|
|
2174
|
+
Yr(k, t);
|
|
2175
|
+
break;
|
|
2176
|
+
case "mean":
|
|
2177
|
+
case "stddev":
|
|
2178
|
+
Kr(k, t);
|
|
2179
|
+
break;
|
|
2180
|
+
case "median":
|
|
2181
|
+
Zr(k, t);
|
|
2182
|
+
break;
|
|
2183
|
+
case "majority":
|
|
2184
|
+
case "minority":
|
|
2185
|
+
Qr(k, t);
|
|
2186
|
+
}
|
|
2187
|
+
y && !s && ke(F, r, a, f, g), h.push(F), I && b.push(I);
|
|
2188
|
+
}
|
|
2189
|
+
let v = b[0] ?? e;
|
|
2190
|
+
b.length !== l && (b.length = 0), l > 1 && (n != null && n.length) && (v = w.combineBandMasks(n));
|
|
2191
|
+
const R = new w({ pixelType: d, width: r, height: a, pixels: h, bandMasks: n && b.length ? b : null, mask: v });
|
|
2192
|
+
return R.updateStatistics(), R;
|
|
2193
|
+
}
|
|
2194
|
+
var fe;
|
|
2195
|
+
let gt = fe = class extends D {
|
|
2196
|
+
constructor() {
|
|
2197
|
+
super(...arguments), this.rows = 3, this.cols = 3, this.fillNoDataOnly = !1, this.statisticsType = "min";
|
|
2198
|
+
}
|
|
2199
|
+
clone() {
|
|
2200
|
+
return new fe({ rows: this.rows, cols: this.cols, fillNoDataOnly: this.fillNoDataOnly, statisticsType: this.statisticsType, raster: L(this.raster) });
|
|
2201
|
+
}
|
|
2202
|
+
};
|
|
2203
|
+
c([m({ json: { write: !0, read: { source: ["kernelRows", "rows"], reader: (i, t) => Number(i ?? (t == null ? void 0 : t.kernelRows) ?? 3) } } })], gt.prototype, "rows", void 0), c([m({ json: { write: !0, read: { source: ["kernelCols", "cols"], reader: (i, t) => Number(i ?? (t == null ? void 0 : t.kernelCols) ?? 3) } } })], gt.prototype, "cols", void 0), c([m({ json: { write: !0 } })], gt.prototype, "fillNoDataOnly", void 0), c([m({ json: { read: { source: ["statisticsType", "type"], reader: (i, t) => ts.fromJSON((t == null ? void 0 : t.statisticsType) ?? (t == null ? void 0 : t.type)) ?? "min" }, write: { target: "type" } } }), Y(ts)], gt.prototype, "statisticsType", void 0), gt = fe = c([A("esri.layers.support.rasterFunctions.StatisticsFunctionArguments")], gt);
|
|
2204
|
+
const eo = gt;
|
|
2205
|
+
let Rt = class extends G {
|
|
2206
|
+
constructor() {
|
|
2207
|
+
super(...arguments), this.functionName = "Statistics", this.rasterArgumentNames = ["raster"];
|
|
2208
|
+
}
|
|
2209
|
+
_bindSourceRasters() {
|
|
2210
|
+
const { type: t } = this.functionArguments.toJSON();
|
|
2211
|
+
if (t < 1 || t > 7)
|
|
2212
|
+
return { success: !1, supportsGPU: !1, error: `statistics-function: the given statistics type is not supported ${t}` };
|
|
2213
|
+
const e = this.sourceRasterInfos[0];
|
|
2214
|
+
this.outputPixelType = this._getOutputPixelType(e.pixelType);
|
|
2215
|
+
const s = e.clone();
|
|
2216
|
+
s.pixelType = this.outputPixelType;
|
|
2217
|
+
const { statisticsType: o } = this.functionArguments;
|
|
2218
|
+
return o === "stddev" && this._removeStatsHistColormapVAT(s), this.rasterInfo = s, { success: !0, supportsGPU: s.bandCount <= 3 && t < 5 };
|
|
2219
|
+
}
|
|
2220
|
+
_processPixels(t) {
|
|
2221
|
+
var n;
|
|
2222
|
+
const e = (n = t.pixelBlocks) == null ? void 0 : n[0];
|
|
2223
|
+
if (e == null)
|
|
2224
|
+
return e;
|
|
2225
|
+
const { statisticsType: s, rows: o, cols: r, fillNoDataOnly: a } = this.functionArguments;
|
|
2226
|
+
return to(e, { kernelRows: o, kernelCols: r, fillNoDataOnly: a, outputPixelType: this.outputPixelType, statisticsType: s, mirrorEdges: !0 });
|
|
2227
|
+
}
|
|
2228
|
+
_getWebGLParameters() {
|
|
2229
|
+
const { rows: t, cols: e, statisticsType: s, fillNoDataOnly: o } = this.functionArguments;
|
|
2230
|
+
return { fillNoDataOnly: o, kernelRows: t, kernelCols: e, statisticsType: s, clampRange: vt(this.outputPixelType) };
|
|
2231
|
+
}
|
|
2232
|
+
};
|
|
2233
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], Rt.prototype, "functionName", void 0), c([m({ type: eo, json: { write: !0, name: "rasterFunctionArguments" } })], Rt.prototype, "functionArguments", void 0), c([m()], Rt.prototype, "rasterArgumentNames", void 0), Rt = c([A("esri.layers.support.rasterFunctions.StatisticsFunction")], Rt);
|
|
2234
|
+
const so = Rt;
|
|
2235
|
+
var de;
|
|
2236
|
+
let yt = de = class extends D {
|
|
2237
|
+
constructor() {
|
|
2238
|
+
super(...arguments), this.statistics = null, this.histograms = null;
|
|
2239
|
+
}
|
|
2240
|
+
readStatistics(i, t) {
|
|
2241
|
+
if (!(i != null && i.length))
|
|
2242
|
+
return null;
|
|
2243
|
+
const e = [];
|
|
2244
|
+
return i.forEach((s) => {
|
|
2245
|
+
const o = { min: s.min, max: s.max, avg: s.avg ?? s.mean, stddev: s.stddev ?? s.standardDeviation };
|
|
2246
|
+
e.push(o);
|
|
2247
|
+
}), e;
|
|
2248
|
+
}
|
|
2249
|
+
writeStatistics(i, t, e) {
|
|
2250
|
+
if (!(i != null && i.length))
|
|
2251
|
+
return;
|
|
2252
|
+
const s = [];
|
|
2253
|
+
i.forEach((o) => {
|
|
2254
|
+
const r = { ...o, mean: o.avg, standardDeviation: o.stddev };
|
|
2255
|
+
delete r.avg, delete r.stddev, s.push(r);
|
|
2256
|
+
}), t[e] = s;
|
|
2257
|
+
}
|
|
2258
|
+
clone() {
|
|
2259
|
+
return new de({ statistics: L(this.statistics), histograms: L(this.histograms) });
|
|
2260
|
+
}
|
|
2261
|
+
};
|
|
2262
|
+
c([m({ json: { write: !0 } })], yt.prototype, "statistics", void 0), c([Ct("statistics")], yt.prototype, "readStatistics", null), c([_t("statistics")], yt.prototype, "writeStatistics", null), c([m({ json: { write: !0 } })], yt.prototype, "histograms", void 0), yt = de = c([A("esri.layers.support.rasterFunctions.StatisticsHistogramFunctionArguments")], yt);
|
|
2263
|
+
const no = yt;
|
|
2264
|
+
let et = class extends G {
|
|
2265
|
+
constructor() {
|
|
2266
|
+
super(...arguments), this.functionName = "StatisticsHistogram", this.functionArguments = null, this.rasterArgumentNames = ["raster"], this.isNoopProcess = !0;
|
|
2267
|
+
}
|
|
2268
|
+
_bindSourceRasters() {
|
|
2269
|
+
const t = this.sourceRasterInfos[0];
|
|
2270
|
+
this.outputPixelType = this._getOutputPixelType("u8");
|
|
2271
|
+
const e = t.clone(), { statistics: s, histograms: o } = this.functionArguments;
|
|
2272
|
+
return o && (e.histograms = o), s && (e.statistics = s), this.rasterInfo = e, { success: !0, supportsGPU: !0 };
|
|
2273
|
+
}
|
|
2274
|
+
_processPixels(t) {
|
|
2275
|
+
var e;
|
|
2276
|
+
return (e = t.pixelBlocks) == null ? void 0 : e[0];
|
|
2277
|
+
}
|
|
2278
|
+
};
|
|
2279
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], et.prototype, "functionName", void 0), c([m({ type: no, json: { write: !0, name: "rasterFunctionArguments" } })], et.prototype, "functionArguments", void 0), c([m()], et.prototype, "rasterArgumentNames", void 0), c([m({ json: { write: !0 } })], et.prototype, "indexedColormap", void 0), c([m()], et.prototype, "isNoopProcess", void 0), et = c([A("esri.layers.support.rasterFunctions.StatisticsHistogramFunction")], et);
|
|
2280
|
+
const ro = et;
|
|
2281
|
+
var ge;
|
|
2282
|
+
const oo = new jt({ 0: "none", 3: "standard-deviation", 4: "histogram-equalization", 5: "min-max", 6: "percent-clip", 9: "sigmoid" }, { useNumericKeys: !0 });
|
|
2283
|
+
let V = ge = class extends D {
|
|
2284
|
+
constructor() {
|
|
2285
|
+
super(...arguments), this.computeGamma = !1, this.dynamicRangeAdjustment = !1, this.gamma = [], this.histograms = null, this.statistics = null, this.stretchType = "none", this.useGamma = !1;
|
|
2286
|
+
}
|
|
2287
|
+
writeStatistics(i, t, e) {
|
|
2288
|
+
i != null && i.length && (Array.isArray(i[0]) || (i = i.map((s) => [s.min, s.max, s.avg, s.stddev])), t[e] = i);
|
|
2289
|
+
}
|
|
2290
|
+
clone() {
|
|
2291
|
+
return new ge({ stretchType: this.stretchType, outputMin: this.outputMin, outputMax: this.outputMax, useGamma: this.useGamma, computeGamma: this.computeGamma, statistics: L(this.statistics), gamma: L(this.gamma), sigmoidStrengthLevel: this.sigmoidStrengthLevel, numberOfStandardDeviations: this.numberOfStandardDeviations, minPercent: this.minPercent, maxPercent: this.maxPercent, histograms: L(this.histograms), dynamicRangeAdjustment: this.dynamicRangeAdjustment, raster: this.raster });
|
|
2292
|
+
}
|
|
2293
|
+
};
|
|
2294
|
+
c([m({ type: Boolean, json: { write: !0 } })], V.prototype, "computeGamma", void 0), c([m({ type: Boolean, json: { name: "dra", write: !0 } })], V.prototype, "dynamicRangeAdjustment", void 0), c([m({ type: [Number], json: { write: !0 } })], V.prototype, "gamma", void 0), c([m()], V.prototype, "histograms", void 0), c([m({ type: Number, json: { write: !0 } })], V.prototype, "maxPercent", void 0), c([m({ type: Number, json: { write: !0 } })], V.prototype, "minPercent", void 0), c([m({ type: Number, json: { write: !0 } })], V.prototype, "numberOfStandardDeviations", void 0), c([m({ type: Number, json: { name: "max", write: !0 } })], V.prototype, "outputMax", void 0), c([m({ type: Number, json: { name: "min", write: !0 } })], V.prototype, "outputMin", void 0), c([m({ type: Number, json: { write: !0 } })], V.prototype, "sigmoidStrengthLevel", void 0), c([m({ json: { type: [[Number]], write: !0 } })], V.prototype, "statistics", void 0), c([_t("statistics")], V.prototype, "writeStatistics", null), c([Y(oo)], V.prototype, "stretchType", void 0), c([m({ type: Boolean, json: { write: !0 } })], V.prototype, "useGamma", void 0), V = ge = c([A("esri.layers.support.rasterFunctions.StretchFunctionArguments")], V);
|
|
2295
|
+
const io = V;
|
|
2296
|
+
let st = class extends G {
|
|
2297
|
+
constructor() {
|
|
2298
|
+
super(...arguments), this.functionName = "Stretch", this.functionArguments = null, this.rasterArgumentNames = ["raster"], this.lookup = null, this.cutOffs = null;
|
|
2299
|
+
}
|
|
2300
|
+
_bindSourceRasters() {
|
|
2301
|
+
this.lookup = null, this.cutOffs = null;
|
|
2302
|
+
const t = this.sourceRasterInfos[0], { pixelType: e } = t, { functionArguments: s } = this, { dynamicRangeAdjustment: o, gamma: r, useGamma: a } = s;
|
|
2303
|
+
if (!o && ["u8", "u16", "s8", "s16"].includes(e)) {
|
|
2304
|
+
const u = Jt(s.toJSON(), { rasterInfo: t }), l = nt(this.outputPixelType) ? "round" : "float";
|
|
2305
|
+
this.lookup = Ms({ pixelType: e, ...u, gamma: a ? r : null, rounding: l }), this.cutOffs = u;
|
|
2306
|
+
} else
|
|
2307
|
+
o || (this.cutOffs = Jt(s.toJSON(), { rasterInfo: t }));
|
|
2308
|
+
this.outputPixelType = this._getOutputPixelType(e);
|
|
2309
|
+
const n = t.clone();
|
|
2310
|
+
return n.pixelType = this.outputPixelType, this._removeStatsHistColormapVAT(n), this.outputPixelType === "u8" && (n.keyProperties.DataType = "processed"), this.rasterInfo = n, { success: !0, supportsGPU: !o };
|
|
2311
|
+
}
|
|
2312
|
+
_processPixels(t) {
|
|
2313
|
+
var n;
|
|
2314
|
+
const e = (n = t.pixelBlocks) == null ? void 0 : n[0];
|
|
2315
|
+
if (e == null)
|
|
2316
|
+
return e;
|
|
2317
|
+
const { lookup: s } = this;
|
|
2318
|
+
if (s)
|
|
2319
|
+
return Fe(e, { ...s, outputPixelType: this.rasterInfo.pixelType });
|
|
2320
|
+
const { functionArguments: o } = this, r = this.cutOffs || Jt(o.toJSON(), { rasterInfo: this.sourceRasterInfos[0], pixelBlock: e }), a = o.useGamma ? o.gamma : null;
|
|
2321
|
+
return Os(e, { ...r, gamma: a, outputPixelType: this.outputPixelType });
|
|
2322
|
+
}
|
|
2323
|
+
_getWebGLParameters() {
|
|
2324
|
+
const { outputMin: t = 0, outputMax: e = 255, gamma: s, useGamma: o } = this.functionArguments, r = this.rasterInfo.bandCount >= 2 ? 3 : 1, a = o && (s != null && s.length) ? Ds(r, s) : [1, 1, 1], { minCutOff: n, maxCutOff: u } = this.cutOffs ?? { minCutOff: [0, 0, 0], maxCutOff: [255, 255, 255] };
|
|
2325
|
+
n.length === 1 && (n[1] = n[2] = n[0], u[1] = u[2] = u[0]);
|
|
2326
|
+
const l = new Float32Array(r);
|
|
2327
|
+
let p;
|
|
2328
|
+
for (p = 0; p < r; p++)
|
|
2329
|
+
l[p] = (e - t) / (u[p] - n[p]);
|
|
2330
|
+
const h = nt(this.outputPixelType);
|
|
2331
|
+
return { bandCount: r, outMin: t, outMax: e, minCutOff: n, maxCutOff: u, factor: l, useGamma: o, gamma: o && s ? s : [1, 1, 1], gammaCorrection: o && a ? a : [1, 1, 1], stretchType: this.functionArguments.stretchType, isOutputRounded: h, type: "stretch" };
|
|
2332
|
+
}
|
|
2333
|
+
};
|
|
2334
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], st.prototype, "functionName", void 0), c([m({ type: io, json: { write: !0, name: "rasterFunctionArguments" } })], st.prototype, "functionArguments", void 0), c([m()], st.prototype, "rasterArgumentNames", void 0), c([m({ json: { write: !0 } })], st.prototype, "lookup", void 0), c([m({ json: { write: !0 } })], st.prototype, "cutOffs", void 0), st = c([A("esri.layers.support.rasterFunctions.StretchFunction")], st);
|
|
2335
|
+
const ao = st;
|
|
2336
|
+
var ye;
|
|
2337
|
+
let Wt = ye = class extends D {
|
|
2338
|
+
constructor() {
|
|
2339
|
+
super(...arguments), this.attributeTableAsRecordSet = null;
|
|
2340
|
+
}
|
|
2341
|
+
clone() {
|
|
2342
|
+
return new ye({ attributeTableAsRecordSet: L(this.attributeTableAsRecordSet) });
|
|
2343
|
+
}
|
|
2344
|
+
};
|
|
2345
|
+
c([m({ json: { write: !0 } })], Wt.prototype, "attributeTableAsRecordSet", void 0), Wt = ye = c([A("esri.layers.support.rasterFunctions.TableFunctionArguments")], Wt);
|
|
2346
|
+
const uo = Wt;
|
|
2347
|
+
let xt = class extends G {
|
|
2348
|
+
constructor() {
|
|
2349
|
+
super(...arguments), this.functionName = "Table", this.functionArguments = null, this.rasterArgumentNames = ["raster"], this.isNoopProcess = !0;
|
|
2350
|
+
}
|
|
2351
|
+
_bindSourceRasters() {
|
|
2352
|
+
const t = this.sourceRasterInfos[0];
|
|
2353
|
+
if (t.bandCount > 1 || t.pixelType.startsWith("f"))
|
|
2354
|
+
return { success: !1, supportsGPU: !1, error: "table-function: Source data must be single band and integer pixel type." };
|
|
2355
|
+
const { attributeTableAsRecordSet: e } = this.functionArguments;
|
|
2356
|
+
if (!e)
|
|
2357
|
+
return { success: !1, supportsGPU: !1, error: "table-function: Missing attributeTableAsRecordSet argument." };
|
|
2358
|
+
this.outputPixelType = this._getOutputPixelType(t.pixelType);
|
|
2359
|
+
const s = t.clone();
|
|
2360
|
+
return s.pixelType = this.outputPixelType, s.bandCount = 1, s.dataType !== "thematic" && (s.keyProperties = s.keyProperties ? { ...s.keyProperties, DataType: "thematic" } : { DataType: "thematic" }), this.rasterInfo = s, { success: !0, supportsGPU: !0 };
|
|
2361
|
+
}
|
|
2362
|
+
_processPixels(t) {
|
|
2363
|
+
var e;
|
|
2364
|
+
return (e = t.pixelBlocks) == null ? void 0 : e[0];
|
|
2365
|
+
}
|
|
2366
|
+
};
|
|
2367
|
+
c([m({ json: { write: !0, name: "rasterFunction" } })], xt.prototype, "functionName", void 0), c([m({ type: uo, json: { write: !0, name: "rasterFunctionArguments" } })], xt.prototype, "functionArguments", void 0), c([m()], xt.prototype, "rasterArgumentNames", void 0), c([m()], xt.prototype, "isNoopProcess", void 0), xt = c([A("esri.layers.support.rasterFunctions.TableFunction")], xt);
|
|
2368
|
+
const lo = xt, M = /* @__PURE__ */ new Map();
|
|
2369
|
+
function co(i, t) {
|
|
2370
|
+
const { rasterFunctionArguments: e } = i;
|
|
2371
|
+
e && (e.rasters || [e.raster]).forEach((s) => {
|
|
2372
|
+
s && typeof s != "number" && (typeof s == "string" ? s.startsWith("http") && (t.includes(s) || t.push(s)) : "rasterFunctionArguments" in s && co(s, t));
|
|
2373
|
+
});
|
|
2374
|
+
}
|
|
2375
|
+
function Jo(i, t) {
|
|
2376
|
+
if (t = t ?? {}, "function" in (i = L(i)) && "arguments" in i && i.arguments) {
|
|
2377
|
+
const e = gs(i, /* @__PURE__ */ new Map(), t);
|
|
2378
|
+
if (we(e), !e.renderingRule)
|
|
2379
|
+
throw new Bt("raster-function-helper", "Unsupported raster function json.");
|
|
2380
|
+
i = e.renderingRule;
|
|
2381
|
+
}
|
|
2382
|
+
if ("rasterFunction" in i)
|
|
2383
|
+
return fs(i = xe(i), t);
|
|
2384
|
+
throw new Bt("raster-function-helper", "unsupported raster function json.");
|
|
2385
|
+
}
|
|
2386
|
+
function po(i, t) {
|
|
2387
|
+
return t[0] === "rasters" && Array.isArray(i.rasters) ? i.rasters : t.map((e) => i[e]);
|
|
2388
|
+
}
|
|
2389
|
+
function es(i) {
|
|
2390
|
+
return !!(i && typeof i == "object" && i.rasterFunction && i.rasterFunctionArguments);
|
|
2391
|
+
}
|
|
2392
|
+
function xe(i) {
|
|
2393
|
+
var o;
|
|
2394
|
+
const { rasterFunction: t, rasterFunctionArguments: e } = i, s = {};
|
|
2395
|
+
for (const r in e) {
|
|
2396
|
+
let a = e[r];
|
|
2397
|
+
const n = r.toLowerCase();
|
|
2398
|
+
if (n === "rasters" && Array.isArray(a))
|
|
2399
|
+
s.rasters = a.map((u) => es(u) ? xe(u) : u);
|
|
2400
|
+
else
|
|
2401
|
+
switch (es(a) && (a = xe(a)), n) {
|
|
2402
|
+
case "dra":
|
|
2403
|
+
s.dra = a;
|
|
2404
|
+
break;
|
|
2405
|
+
case "pspower":
|
|
2406
|
+
s.psPower = a;
|
|
2407
|
+
break;
|
|
2408
|
+
case "pszfactor":
|
|
2409
|
+
s.psZFactor = a;
|
|
2410
|
+
break;
|
|
2411
|
+
case "bandids":
|
|
2412
|
+
s.bandIds = a;
|
|
2413
|
+
break;
|
|
2414
|
+
default:
|
|
2415
|
+
s[r[0].toLowerCase() + r.slice(1)] = a;
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
return t !== "Local" || (o = s.rasters) != null && o.length || (s.rasters = ["$$"]), { ...i, rasterFunctionArguments: s };
|
|
2419
|
+
}
|
|
2420
|
+
function fs(i, t) {
|
|
2421
|
+
var f, g;
|
|
2422
|
+
const { rasterFunction: e, rasterFunctionArguments: s } = i, o = (f = i.outputPixelType) == null ? void 0 : f.toLowerCase();
|
|
2423
|
+
if (e == null || !M.has(e))
|
|
2424
|
+
throw new Bt("raster-function-helper", `unsupported raster function: ${e}`);
|
|
2425
|
+
const r = M.get(e), a = (typeof r.ctor == "function" ? r.ctor : r.ctor.default).fromJSON({ ...i, outputPixelType: o }), { rasterArgumentNames: n } = a, u = [], l = po(s, n), p = n[0] === "rasters", h = [];
|
|
2426
|
+
for (let x = 0; x < l.length; x++) {
|
|
2427
|
+
const y = l[x];
|
|
2428
|
+
let d;
|
|
2429
|
+
y == null || typeof y == "string" && y.startsWith("$") ? u.push(t == null ? void 0 : t.raster) : typeof y == "string" ? t[y] && u.push(t[y]) : typeof y != "number" && "rasterFunction" in y && (d = fs(y, t), p || (a.functionArguments[n[x]] = d), u.push(d)), p && h.push(d ?? y);
|
|
2430
|
+
}
|
|
2431
|
+
if (p && (a.functionArguments.rasters = h), t) {
|
|
2432
|
+
a.sourceRasters = u;
|
|
2433
|
+
const x = (g = t.raster) == null ? void 0 : g.url;
|
|
2434
|
+
x && (a.mainPrimaryRasterId = x);
|
|
2435
|
+
}
|
|
2436
|
+
return a;
|
|
2437
|
+
}
|
|
2438
|
+
function ds(i, t) {
|
|
2439
|
+
if (i && t)
|
|
2440
|
+
for (const e in i) {
|
|
2441
|
+
const s = i[e];
|
|
2442
|
+
s && typeof s == "object" && "type" in s && (s.type === "RasterFunctionTemplate" ? ds(s.arguments, t) : s.type === "RasterFunctionVariable" && t[s.name] != null && (s.value = t[s.name]));
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2445
|
+
function ve(i, t) {
|
|
2446
|
+
var o;
|
|
2447
|
+
if (!i || typeof i != "object")
|
|
2448
|
+
return i;
|
|
2449
|
+
const { value: e } = i;
|
|
2450
|
+
if (!e || typeof e != "object")
|
|
2451
|
+
return i.isDataset ? "$$" : e;
|
|
2452
|
+
if (Array.isArray(e))
|
|
2453
|
+
return e.length === 0 ? [] : e.map((r) => typeof r == "object" && r.type === "RasterFunctionVariable" ? ve(r, t) : r);
|
|
2454
|
+
if ("value" in e && ["number", "string", "boolean"].includes(typeof e.value))
|
|
2455
|
+
return e.value;
|
|
2456
|
+
if (i.isDataset && e.type !== "Scalar")
|
|
2457
|
+
return "$$";
|
|
2458
|
+
if (!("type" in e))
|
|
2459
|
+
return e;
|
|
2460
|
+
let s = e;
|
|
2461
|
+
switch (e.type) {
|
|
2462
|
+
case "Scalar":
|
|
2463
|
+
s = e.value;
|
|
2464
|
+
break;
|
|
2465
|
+
case "AlgorithmicColorRamp":
|
|
2466
|
+
s = ss(e);
|
|
2467
|
+
break;
|
|
2468
|
+
case "MultiPartColorRamp":
|
|
2469
|
+
s = { type: "multipart", colorRamps: e.ArrayOfColorRamp.map(ss) };
|
|
2470
|
+
break;
|
|
2471
|
+
case "ArgumentArray":
|
|
2472
|
+
if ((o = e.elements) != null && o.length && e.elements[0].type !== "RasterStatistics") {
|
|
2473
|
+
const r = [];
|
|
2474
|
+
for (let a = 0; a < e.elements.length; a++) {
|
|
2475
|
+
const n = e.elements[a], { type: u } = n;
|
|
2476
|
+
if (u)
|
|
2477
|
+
if (u === "RasterFunctionTemplate") {
|
|
2478
|
+
const { renderingRule: l } = gs(n, t);
|
|
2479
|
+
r.push(l), n._object_id != null && t.set(n._object_id, l);
|
|
2480
|
+
} else {
|
|
2481
|
+
if (u !== "RasterFunctionVariable")
|
|
2482
|
+
throw new Bt("raster-function-helper", "unsupported raster function json.");
|
|
2483
|
+
{
|
|
2484
|
+
const l = ve(n, t);
|
|
2485
|
+
r.push(l), n._object_id != null && t.set(n._object_id, l);
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
else
|
|
2489
|
+
r.push(n);
|
|
2490
|
+
}
|
|
2491
|
+
s = r;
|
|
2492
|
+
} else
|
|
2493
|
+
s = e.elements;
|
|
2494
|
+
}
|
|
2495
|
+
return e._object_id != null && t.set(e._object_id, s), s;
|
|
2496
|
+
}
|
|
2497
|
+
function ss(i) {
|
|
2498
|
+
const t = i.algorithm ?? "esriHSVAlgorithm";
|
|
2499
|
+
let { FromColor: e, ToColor: s } = i;
|
|
2500
|
+
if (!Array.isArray(e)) {
|
|
2501
|
+
const { r: o, g: r, b: a } = _e({ h: e.Hue, s: e.Saturation, v: e.Value });
|
|
2502
|
+
e = [o, r, a, e.AlphaValue];
|
|
2503
|
+
}
|
|
2504
|
+
if (!Array.isArray(s)) {
|
|
2505
|
+
const { r: o, g: r, b: a } = _e({ h: s.Hue, s: s.Saturation, v: s.Value });
|
|
2506
|
+
s = [o, r, a, s.AlphaValue];
|
|
2507
|
+
}
|
|
2508
|
+
return { type: "algorithmic", algorithm: t, fromColor: e, toColor: s };
|
|
2509
|
+
}
|
|
2510
|
+
function gs(i, t, e) {
|
|
2511
|
+
e && ds(i, e);
|
|
2512
|
+
const s = { renderingRule: {}, templates: t };
|
|
2513
|
+
return ys(i, s), s;
|
|
2514
|
+
}
|
|
2515
|
+
function ys(i, t) {
|
|
2516
|
+
if (!i || !t.renderingRule)
|
|
2517
|
+
return;
|
|
2518
|
+
const { renderingRule: e, templates: s } = t, { function: o, arguments: r, _object_id: a } = i;
|
|
2519
|
+
if (!o || !r)
|
|
2520
|
+
return;
|
|
2521
|
+
a != null && s.set(a, e), e.rasterFunction = o.type.replace("Function", ""), e.outputPixelType = o.pixelType;
|
|
2522
|
+
const n = {};
|
|
2523
|
+
e.rasterFunctionArguments = n;
|
|
2524
|
+
for (const u in r) {
|
|
2525
|
+
if (u === "type" || u === "object_id" || u === "_object_ref_id")
|
|
2526
|
+
continue;
|
|
2527
|
+
const l = r[u];
|
|
2528
|
+
l && typeof l == "object" && "type" in l && (l.type === "RasterFunctionTemplate" || l.type === "RasterFunctionVariable") ? (l.type === "RasterFunctionVariable" ? n[u] = ve(l, s) : (e.rasterFunctionArguments[u] = {}, ys(l, { renderingRule: e.rasterFunctionArguments[u], templates: s })), l._object_id != null && s.set(l._object_id, n[u])) : n[u] = l;
|
|
2529
|
+
}
|
|
2530
|
+
switch (n.DEM && !n.Raster && (n.Raster = n.DEM, delete n.DEM), e.rasterFunction) {
|
|
2531
|
+
case "Stretch":
|
|
2532
|
+
ho(n);
|
|
2533
|
+
break;
|
|
2534
|
+
case "Colormap":
|
|
2535
|
+
mo(n);
|
|
2536
|
+
break;
|
|
2537
|
+
case "Convolution":
|
|
2538
|
+
fo(n);
|
|
2539
|
+
break;
|
|
2540
|
+
case "Mask":
|
|
2541
|
+
go(n);
|
|
2542
|
+
}
|
|
2543
|
+
}
|
|
2544
|
+
function we(i) {
|
|
2545
|
+
const { renderingRule: t, templates: e } = i;
|
|
2546
|
+
if (typeof t != "object" || !(t != null && t.rasterFunctionArguments) || !e.size)
|
|
2547
|
+
return;
|
|
2548
|
+
const { rasterFunctionArguments: s } = t;
|
|
2549
|
+
for (const o in s) {
|
|
2550
|
+
const r = s[o], a = o === "_object_ref_id" ? r : r && typeof r == "object" && "_object_ref_id" in r ? r._object_ref_id : null;
|
|
2551
|
+
if (a == null)
|
|
2552
|
+
r && typeof r == "object" && (r.rasterFunctionArguments && we({ renderingRule: r, templates: e }), Array.isArray(r) && r.forEach((n, u) => {
|
|
2553
|
+
if (typeof n == "object")
|
|
2554
|
+
if (n._object_ref_id != null) {
|
|
2555
|
+
if (!e.has(n._object_ref_id))
|
|
2556
|
+
throw new Bt("raster-function-helper", `unsupported raster function json. _object_ref_id: ${r} does not exist`);
|
|
2557
|
+
const l = e.get(a);
|
|
2558
|
+
l && typeof l == "object" ? Object.assign(n, l) : r[u] = l;
|
|
2559
|
+
} else
|
|
2560
|
+
we({ renderingRule: n, templates: e });
|
|
2561
|
+
}));
|
|
2562
|
+
else {
|
|
2563
|
+
if (!e.has(a))
|
|
2564
|
+
throw new Bt("raster-function-helper", `unsupported raster function json. _object_ref_id: ${a} does not exist`);
|
|
2565
|
+
const n = e.get(a);
|
|
2566
|
+
o !== "_object_ref_id" ? s[o] = n : n && typeof n == "object" && Object.assign(s, n);
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
function ho(i) {
|
|
2571
|
+
var t;
|
|
2572
|
+
(t = i.Statistics) != null && t.length && typeof i.Statistics == "object" && (i.Statistics = i.Statistics.map((e) => [e.min, e.max, e.mean, e.standardDeviation])), i.NumberOfStandardDeviation != null && (i.NumberOfStandardDeviations = i.NumberOfStandardDeviation, delete i.NumberOfStandardDeviation);
|
|
2573
|
+
}
|
|
2574
|
+
function mo(i) {
|
|
2575
|
+
var t, e;
|
|
2576
|
+
((e = (t = i.ColorRamp) == null ? void 0 : t.type) == null ? void 0 : e.toLowerCase()) === "randomcolorramp" && (delete i.ColorRamp, i.ColormapName = "Random"), i.ColorSchemeType === 0 && delete i.ColorRamp;
|
|
2577
|
+
}
|
|
2578
|
+
function fo(i) {
|
|
2579
|
+
i.ConvolutionType != null && (i.Type = i.ConvolutionType, delete i.ConvolutionType);
|
|
2580
|
+
}
|
|
2581
|
+
function go(i) {
|
|
2582
|
+
var t;
|
|
2583
|
+
(t = i.NoDataValues) != null && t.length && typeof i.NoDataValues[0] == "string" && (i.NoDataValues = i.NoDataValues.filter((e) => e !== "").map((e) => Number(e)));
|
|
2584
|
+
}
|
|
2585
|
+
M.set("Arithmetic", { desc: "Arithmetic Function", ctor: Bn, rasterArgumentNames: ["rasters"] }), M.set("Aspect", { desc: "Aspect Function", ctor: Sn, rasterArgumentNames: ["raster"] }), M.set("BandArithmetic", { desc: "Band Arithmetic Function", ctor: ur, rasterArgumentNames: ["raster"] }), M.set("Colormap", { desc: "Colormap Function", ctor: wr, rasterArgumentNames: ["raster"] }), M.set("CompositeBand", { desc: "CompositeBand Function", ctor: Ar, rasterArgumentNames: ["rasters"] }), M.set("Convolution", { desc: "Convolution Function", ctor: Cr, rasterArgumentNames: ["raster"] }), M.set("ContrastBrightness", { desc: "Contrast Brightness Function", ctor: Pr, rasterArgumentNames: ["raster"] }), M.set("ExtractBand", { desc: "ExtractBand Function", ctor: Sr, rasterArgumentNames: ["raster"] }), M.set("Curvature", { desc: "Curvature Function", ctor: Br, rasterArgumentNames: ["raster"] }), M.set("Grayscale", { desc: "Grayscale Function", ctor: Dr, rasterArgumentNames: ["raster"] }), M.set("Clip", { desc: "Clip Function", ctor: cr, rasterArgumentNames: ["raster"] }), M.set("Local", { desc: "Local Function", ctor: zr, rasterArgumentNames: ["rasters"] }), M.set("Mask", { desc: "Mask Function", ctor: Vr, rasterArgumentNames: ["raster"] }), M.set("NDVI", { desc: "NDVI Function", ctor: Lr, rasterArgumentNames: ["raster"] }), M.set("Remap", { desc: "Remap Function", ctor: qr, rasterArgumentNames: ["raster"] }), M.set("Slope", { desc: "Slope Function", ctor: Jr, rasterArgumentNames: ["raster"] }), M.set("Statistics", { desc: "Focal Statistics Function", ctor: so, rasterArgumentNames: ["raster"] }), M.set("StatisticsHistogram", { desc: "Statistics Histogram Function", ctor: ro, rasterArgumentNames: ["raster"] }), M.set("Stretch", { desc: "Stretch Function", ctor: ao, rasterArgumentNames: ["raster"] }), M.set("Table", { desc: "Attribute Table Function", ctor: lo, rasterArgumentNames: ["raster"] });
|
|
2586
|
+
let zt = class extends $e {
|
|
2587
|
+
get affectsPixelSize() {
|
|
2588
|
+
return !1;
|
|
2589
|
+
}
|
|
2590
|
+
forwardTransform(i) {
|
|
2591
|
+
return i;
|
|
2592
|
+
}
|
|
2593
|
+
inverseTransform(i) {
|
|
2594
|
+
return i;
|
|
2595
|
+
}
|
|
2596
|
+
};
|
|
2597
|
+
c([m()], zt.prototype, "affectsPixelSize", null), c([m({ json: { write: !0 } })], zt.prototype, "spatialReference", void 0), zt = c([A("esri.layers.support.rasterTransforms.BaseRasterTransform")], zt);
|
|
2598
|
+
const Ce = zt;
|
|
2599
|
+
var be;
|
|
2600
|
+
let Et = be = class extends Ce {
|
|
2601
|
+
constructor() {
|
|
2602
|
+
super(...arguments), this.type = "gcs-shift", this.tolerance = 1e-8;
|
|
2603
|
+
}
|
|
2604
|
+
forwardTransform(i) {
|
|
2605
|
+
return (i = i.clone()).type === "point" ? (i.x > 180 + this.tolerance && (i.x -= 360), i) : (i.xmin >= 180 - this.tolerance ? (i.xmax -= 360, i.xmin -= 360) : i.xmax > 180 + this.tolerance && (i.xmin = -180, i.xmax = 180), i);
|
|
2606
|
+
}
|
|
2607
|
+
inverseTransform(i) {
|
|
2608
|
+
return (i = i.clone()).type === "point" ? (i.x < -this.tolerance && (i.x += 360), i) : (i.xmin < -this.tolerance && (i.xmin += 360, i.xmax += 360), i);
|
|
2609
|
+
}
|
|
2610
|
+
clone() {
|
|
2611
|
+
return new be({ tolerance: this.tolerance });
|
|
2612
|
+
}
|
|
2613
|
+
};
|
|
2614
|
+
c([Y({ GCSShiftXform: "gcs-shift" })], Et.prototype, "type", void 0), c([m()], Et.prototype, "tolerance", void 0), Et = be = c([A("esri.layers.support.rasterTransforms.GCSShiftTransform")], Et);
|
|
2615
|
+
const yo = Et;
|
|
2616
|
+
var Ae;
|
|
2617
|
+
let qt = Ae = class extends Ce {
|
|
2618
|
+
constructor() {
|
|
2619
|
+
super(...arguments), this.type = "identity";
|
|
2620
|
+
}
|
|
2621
|
+
clone() {
|
|
2622
|
+
return new Ae();
|
|
2623
|
+
}
|
|
2624
|
+
};
|
|
2625
|
+
c([Y({ IdentityXform: "identity" })], qt.prototype, "type", void 0), qt = Ae = c([A("esri.layers.support.rasterTransforms.IdentityTransform")], qt);
|
|
2626
|
+
const xo = qt;
|
|
2627
|
+
var Te;
|
|
2628
|
+
function Pe(i, t, e) {
|
|
2629
|
+
const { x: s, y: o } = t;
|
|
2630
|
+
if (e < 2)
|
|
2631
|
+
return { x: i[0] + s * i[2] + o * i[4], y: i[1] + s * i[3] + o * i[5] };
|
|
2632
|
+
if (e === 2) {
|
|
2633
|
+
const f = s * s, g = o * o, x = s * o;
|
|
2634
|
+
return { x: i[0] + s * i[2] + o * i[4] + f * i[6] + x * i[8] + g * i[10], y: i[1] + s * i[3] + o * i[5] + f * i[7] + x * i[9] + g * i[11] };
|
|
2635
|
+
}
|
|
2636
|
+
const r = s * s, a = o * o, n = s * o, u = r * s, l = r * o, p = s * a, h = o * a;
|
|
2637
|
+
return { x: i[0] + s * i[2] + o * i[4] + r * i[6] + n * i[8] + a * i[10] + u * i[12] + l * i[14] + p * i[16] + h * i[18], y: i[1] + s * i[3] + o * i[5] + r * i[7] + n * i[9] + a * i[11] + u * i[13] + l * i[15] + p * i[17] + h * i[19] };
|
|
2638
|
+
}
|
|
2639
|
+
function ns(i, t, e) {
|
|
2640
|
+
const { xmin: s, ymin: o, xmax: r, ymax: a, spatialReference: n } = t;
|
|
2641
|
+
let u = [];
|
|
2642
|
+
if (e < 2)
|
|
2643
|
+
u.push({ x: s, y: a }), u.push({ x: r, y: a }), u.push({ x: s, y: o }), u.push({ x: r, y: o });
|
|
2644
|
+
else {
|
|
2645
|
+
let h = 10;
|
|
2646
|
+
for (let f = 0; f < h; f++)
|
|
2647
|
+
u.push({ x: s, y: o + (a - o) * f / (h - 1) }), u.push({ x: r, y: o + (a - o) * f / (h - 1) });
|
|
2648
|
+
h = 8;
|
|
2649
|
+
for (let f = 1; f <= h; f++)
|
|
2650
|
+
u.push({ x: s + (r - s) * f / h, y: o }), u.push({ x: s + (r - s) * f / h, y: a });
|
|
2651
|
+
}
|
|
2652
|
+
u = u.map((h) => Pe(i, h, e));
|
|
2653
|
+
const l = u.map((h) => h.x), p = u.map((h) => h.y);
|
|
2654
|
+
return new bs({ xmin: Math.min.apply(null, l), xmax: Math.max.apply(null, l), ymin: Math.min.apply(null, p), ymax: Math.max.apply(null, p), spatialReference: n });
|
|
2655
|
+
}
|
|
2656
|
+
function vo(i) {
|
|
2657
|
+
const [t, e, s, o, r, a] = i, n = s * a - r * o, u = r * o - s * a;
|
|
2658
|
+
return [(r * e - t * a) / n, (s * e - t * o) / u, a / n, o / u, -r / n, -s / u];
|
|
2659
|
+
}
|
|
2660
|
+
let q = Te = class extends Ce {
|
|
2661
|
+
constructor() {
|
|
2662
|
+
super(...arguments), this.polynomialOrder = 1, this.type = "polynomial";
|
|
2663
|
+
}
|
|
2664
|
+
readForwardCoefficients(i, t) {
|
|
2665
|
+
const { coeffX: e, coeffY: s } = t;
|
|
2666
|
+
if (!(e != null && e.length) || !(s != null && s.length) || e.length !== s.length)
|
|
2667
|
+
return null;
|
|
2668
|
+
const o = [];
|
|
2669
|
+
for (let r = 0; r < e.length; r++)
|
|
2670
|
+
o.push(e[r]), o.push(s[r]);
|
|
2671
|
+
return o;
|
|
2672
|
+
}
|
|
2673
|
+
writeForwardCoefficients(i, t, e) {
|
|
2674
|
+
const s = [], o = [];
|
|
2675
|
+
for (let r = 0; r < (i == null ? void 0 : i.length); r++)
|
|
2676
|
+
r % 2 == 0 ? s.push(i[r]) : o.push(i[r]);
|
|
2677
|
+
t.coeffX = s, t.coeffY = o;
|
|
2678
|
+
}
|
|
2679
|
+
get inverseCoefficients() {
|
|
2680
|
+
let i = this._get("inverseCoefficients");
|
|
2681
|
+
const t = this._get("forwardCoefficients");
|
|
2682
|
+
return !i && t && this.polynomialOrder < 2 && (i = vo(t)), i;
|
|
2683
|
+
}
|
|
2684
|
+
set inverseCoefficients(i) {
|
|
2685
|
+
this._set("inverseCoefficients", i);
|
|
2686
|
+
}
|
|
2687
|
+
readInverseCoefficients(i, t) {
|
|
2688
|
+
const { inverseCoeffX: e, inverseCoeffY: s } = t;
|
|
2689
|
+
if (!(e != null && e.length) || !(s != null && s.length) || e.length !== s.length)
|
|
2690
|
+
return null;
|
|
2691
|
+
const o = [];
|
|
2692
|
+
for (let r = 0; r < e.length; r++)
|
|
2693
|
+
o.push(e[r]), o.push(s[r]);
|
|
2694
|
+
return o;
|
|
2695
|
+
}
|
|
2696
|
+
writeInverseCoefficients(i, t, e) {
|
|
2697
|
+
const s = [], o = [];
|
|
2698
|
+
for (let r = 0; r < (i == null ? void 0 : i.length); r++)
|
|
2699
|
+
r % 2 == 0 ? s.push(i[r]) : o.push(i[r]);
|
|
2700
|
+
t.inverseCoeffX = s, t.inverseCoeffY = o;
|
|
2701
|
+
}
|
|
2702
|
+
get affectsPixelSize() {
|
|
2703
|
+
return this.polynomialOrder > 0;
|
|
2704
|
+
}
|
|
2705
|
+
forwardTransform(i) {
|
|
2706
|
+
if (i.type === "point") {
|
|
2707
|
+
const t = Pe(this.forwardCoefficients, i, this.polynomialOrder);
|
|
2708
|
+
return new Be({ x: t.x, y: t.y, spatialReference: i.spatialReference });
|
|
2709
|
+
}
|
|
2710
|
+
return ns(this.forwardCoefficients, i, this.polynomialOrder);
|
|
2711
|
+
}
|
|
2712
|
+
inverseTransform(i) {
|
|
2713
|
+
if (i.type === "point") {
|
|
2714
|
+
const t = Pe(this.inverseCoefficients, i, this.polynomialOrder);
|
|
2715
|
+
return new Be({ x: t.x, y: t.y, spatialReference: i.spatialReference });
|
|
2716
|
+
}
|
|
2717
|
+
return ns(this.inverseCoefficients, i, this.polynomialOrder);
|
|
2718
|
+
}
|
|
2719
|
+
clone() {
|
|
2720
|
+
return new Te({ polynomialOrder: this.polynomialOrder, forwardCoefficients: this.forwardCoefficients ? [...this.forwardCoefficients] : null, inverseCoefficients: this.inverseCoefficients ? [...this.inverseCoefficients] : null });
|
|
2721
|
+
}
|
|
2722
|
+
};
|
|
2723
|
+
c([m({ json: { write: !0 } })], q.prototype, "polynomialOrder", void 0), c([m()], q.prototype, "forwardCoefficients", void 0), c([Ct("forwardCoefficients", ["coeffX", "coeffY"])], q.prototype, "readForwardCoefficients", null), c([_t("forwardCoefficients")], q.prototype, "writeForwardCoefficients", null), c([m({ json: { write: !0 } })], q.prototype, "inverseCoefficients", null), c([Ct("inverseCoefficients", ["inverseCoeffX", "inverseCoeffY"])], q.prototype, "readInverseCoefficients", null), c([_t("inverseCoefficients")], q.prototype, "writeInverseCoefficients", null), c([m()], q.prototype, "affectsPixelSize", null), c([Y({ PolynomialXform: "polynomial" })], q.prototype, "type", void 0), q = Te = c([A("esri.layers.support.rasterTransforms.PolynomialTransform")], q);
|
|
2724
|
+
const wo = q, xs = { GCSShiftXform: yo, IdentityXform: xo, PolynomialXform: wo }, bo = Object.keys(xs);
|
|
2725
|
+
function Ko(i) {
|
|
2726
|
+
const t = i == null ? void 0 : i.type;
|
|
2727
|
+
return !i || bo.includes(t);
|
|
2728
|
+
}
|
|
2729
|
+
function Yo(i) {
|
|
2730
|
+
if (!(i == null ? void 0 : i.type))
|
|
2731
|
+
return null;
|
|
2732
|
+
const e = xs[i == null ? void 0 : i.type];
|
|
2733
|
+
if (e) {
|
|
2734
|
+
const s = new e();
|
|
2735
|
+
return s.read(i), s;
|
|
2736
|
+
}
|
|
2737
|
+
return null;
|
|
2738
|
+
}
|
|
2739
|
+
export {
|
|
2740
|
+
co as N,
|
|
2741
|
+
Jo as R,
|
|
2742
|
+
yo as c,
|
|
2743
|
+
Ko as f,
|
|
2744
|
+
Yo as i,
|
|
2745
|
+
wo as y
|
|
2746
|
+
};
|