@arcgis/core 5.0.0-next.69 → 5.0.0-next.70

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.
Files changed (310) hide show
  1. package/Map.d.ts +3 -1
  2. package/analysis/Analysis.d.ts +1 -0
  3. package/analysis/Dimension/types.d.ts +1 -0
  4. package/analysis/DimensionAnalysis.d.ts +10 -10
  5. package/analysis/DimensionSimpleStyle.d.ts +14 -13
  6. package/analysis/DirectLineMeasurementAnalysis.d.ts +1 -1
  7. package/analysis/DistanceMeasurementAnalysis.d.ts +2 -1
  8. package/analysis/ElevationProfile/ElevationProfileLineScene.d.ts +3 -3
  9. package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +1 -1
  10. package/analysis/ElevationProfile/types.d.ts +2 -0
  11. package/analysis/LengthDimension.d.ts +22 -21
  12. package/analysis/LineOfSightAnalysis.d.ts +2 -2
  13. package/analysis/ShadowCast/MinDurationOptions.d.ts +2 -2
  14. package/analysis/ShadowCast/types.d.ts +6 -2
  15. package/analysis/Slice/types.d.ts +1 -0
  16. package/analysis/Viewshed.d.ts +22 -20
  17. package/analysis/ViewshedAnalysis.d.ts +13 -13
  18. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +1 -2
  19. package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +2 -2
  20. package/analysis/VolumeMeasurement/types.d.ts +1 -0
  21. package/analysis/VolumeMeasurementAnalysis.d.ts +1 -0
  22. package/analysis/types.d.ts +5 -0
  23. package/arcade.d.ts +2 -2
  24. package/assets/esri/core/workers/RemoteClient.js +1 -1
  25. package/assets/esri/core/workers/chunks/04364f3dd7578c2acb71.js +1 -0
  26. package/assets/esri/core/workers/chunks/18ed69d563986dc2eb21.js +1 -0
  27. package/assets/esri/core/workers/chunks/{4c04c54330b693892cfc.js → 1a45b4b4803337f4b99f.js} +2 -2
  28. package/assets/esri/core/workers/chunks/{60c7f896f2246a8aa6d7.js → 244006d4b0547d574401.js} +53 -53
  29. package/assets/esri/core/workers/chunks/329b10897c6965948b84.js +1 -0
  30. package/assets/esri/core/workers/chunks/4387aaf9d5e8f6d1833d.js +1 -0
  31. package/assets/esri/core/workers/chunks/{944dfa9309da8f49a616.js → 6a3d66d7c92f90cc2a17.js} +1 -1
  32. package/assets/esri/core/workers/chunks/760a759f9697adde6dd4.js +1 -0
  33. package/assets/esri/core/workers/chunks/798d227205bd958de6a7.js +1 -0
  34. package/assets/esri/core/workers/chunks/{9d88b4ba8e511da64583.js → 98d68b145226e7527c84.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{8ad6595ad44c2d60c1ce.js → a79fad422d41019c8232.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{10e474d664b20adcd917.js → db4661fd82dc61162115.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{1d1e25bb61eeeee8ee94.js → df2ba5f9d57080fca183.js} +1 -1
  38. package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +5 -3
  39. package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +15 -11
  40. package/assets/esri/themes/dark/main.css +1 -1
  41. package/assets/esri/themes/light/main.css +1 -1
  42. package/assets/esri/themes/light/view.css +1 -1
  43. package/chunks/ComponentShader.glsl.js +43 -43
  44. package/chunks/DefaultMaterial.glsl.js +1 -1
  45. package/config.js +1 -1
  46. package/form/elements/inputs/attachments/Input.d.ts +6 -6
  47. package/geometry/Mesh.d.ts +20 -21
  48. package/geometry/Polygon.d.ts +1 -8
  49. package/geometry/Polygon.js +1 -1
  50. package/geometry/geometryEngine.d.ts +19 -19
  51. package/geometry/support/MeshComponent.d.ts +3 -3
  52. package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +2 -2
  53. package/geometry/support/MeshLocalVertexSpace.d.ts +2 -2
  54. package/geometry/support/MeshMaterial.d.ts +8 -8
  55. package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
  56. package/geometry/support/MeshTexture.d.ts +3 -3
  57. package/geometry/support/MeshTextureTransform.d.ts +3 -3
  58. package/geometry/support/MeshTransform.d.ts +1 -1
  59. package/geometry/support/MeshVertexAttributes.d.ts +13 -5
  60. package/geometry/support/intersects.js +1 -1
  61. package/geometry/support/intersectsBase.js +1 -1
  62. package/geometry/support/meshUtils/centerAt.js +1 -1
  63. package/geometry/support/meshUtils/geographicUtils.js +1 -1
  64. package/geometry/support/meshUtils/georeference.js +1 -1
  65. package/geometry/support/meshUtils/rotate.js +1 -1
  66. package/geometry/support/meshUtils/scale.js +1 -1
  67. package/geometry/support/meshUtils/types.d.ts +44 -52
  68. package/geometry/support/meshUtils.d.ts +6 -50
  69. package/geometry/support/meshUtils.js +1 -1
  70. package/interfaces.d.ts +5 -151
  71. package/kernel.js +1 -1
  72. package/layers/BaseDynamicLayer.d.ts +2 -2
  73. package/layers/BaseElevationLayer.d.ts +2 -2
  74. package/layers/BuildingSceneLayer.d.ts +2 -2
  75. package/layers/CSVLayer.d.ts +2 -2
  76. package/layers/CatalogLayer.d.ts +2 -2
  77. package/layers/DimensionLayer.d.ts +2 -2
  78. package/layers/ElevationLayer.d.ts +2 -2
  79. package/layers/FeatureLayer.d.ts +2 -2
  80. package/layers/GeoJSONLayer.d.ts +2 -2
  81. package/layers/GeoRSSLayer.d.ts +2 -2
  82. package/layers/GraphicsLayer.d.ts +2 -2
  83. package/layers/GroupLayer.d.ts +2 -2
  84. package/layers/ImageryLayer.d.ts +2 -2
  85. package/layers/ImageryTileLayer.d.ts +2 -2
  86. package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -2
  87. package/layers/IntegratedMeshLayer.d.ts +2 -2
  88. package/layers/KMLLayer.d.ts +2 -2
  89. package/layers/Layer.d.ts +9 -7
  90. package/layers/LineOfSightLayer.d.ts +3 -3
  91. package/layers/MapImageLayer.d.ts +2 -2
  92. package/layers/MapNotesLayer.d.ts +2 -2
  93. package/layers/MediaLayer.d.ts +2 -2
  94. package/layers/OGCFeatureLayer.d.ts +2 -2
  95. package/layers/OrientedImageryLayer.d.ts +2 -2
  96. package/layers/ParquetLayer.d.ts +2 -2
  97. package/layers/PointCloudLayer.d.ts +2 -2
  98. package/layers/RouteLayer.d.ts +2 -2
  99. package/layers/SceneLayer.d.ts +2 -2
  100. package/layers/SubtypeGroupLayer.d.ts +2 -2
  101. package/layers/TileLayer.d.ts +2 -2
  102. package/layers/UnknownLayer.d.ts +2 -2
  103. package/layers/UnsupportedLayer.d.ts +2 -2
  104. package/layers/VectorTileLayer.d.ts +2 -2
  105. package/layers/VideoLayer.d.ts +2 -2
  106. package/layers/ViewshedLayer.d.ts +2 -2
  107. package/layers/VoxelLayer.d.ts +2 -2
  108. package/layers/WCSLayer.d.ts +2 -2
  109. package/layers/WFSLayer.d.ts +2 -2
  110. package/layers/WMSLayer.d.ts +2 -2
  111. package/layers/WMTSLayer.d.ts +2 -2
  112. package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -2
  113. package/layers/catalog/CatalogFootprintLayer.d.ts +2 -2
  114. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
  115. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  116. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  117. package/layers/orientedImagery/transformations/utils.js +1 -1
  118. package/layers/raster/types.d.ts +8 -1
  119. package/layers/support/PixelBlock.d.ts +7 -7
  120. package/layers/support/RasterInfo.d.ts +2 -9
  121. package/layers/types.d.ts +77 -2
  122. package/networks/support/CircuitSection.d.ts +20 -2
  123. package/networks/support/CircuitSection.js +1 -1
  124. package/networks/support/Subcircuit.d.ts +12 -10
  125. package/networks/support/Subcircuit.js +1 -1
  126. package/networks/support/typeUtils.d.ts +2 -0
  127. package/networks/support/typeUtils.js +1 -1
  128. package/package.json +2 -2
  129. package/rest/support/AttributeBinsQuery.d.ts +7 -1
  130. package/rest/support/NormalizationBinParametersMixin.d.ts +29 -9
  131. package/support/revision.js +1 -1
  132. package/symbols/patterns/LinePattern3D.d.ts +3 -3
  133. package/symbols/patterns/Pattern3D.d.ts +3 -3
  134. package/unionTypes.d.ts +17 -17
  135. package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +6 -5
  136. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +7 -6
  137. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  138. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  139. package/views/2d/types.d.ts +1 -1
  140. package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +2 -2
  141. package/views/3d/analysis/DirectLineMeasurement/types.d.ts +1 -0
  142. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  143. package/views/3d/analysis/VolumeMeasurement/types.d.ts +1 -0
  144. package/views/3d/analysis/types.d.ts +2 -0
  145. package/views/3d/constraints/Constraints.d.ts +2 -2
  146. package/views/3d/environment/ChapmanApproximation.glsl.js +1 -1
  147. package/views/3d/environment/CloudsComposition.js +1 -1
  148. package/views/3d/environment/Fog.js +1 -1
  149. package/views/3d/layers/DimensionLayerView3D.js +1 -1
  150. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  151. package/views/3d/layers/I3SMeshView3D.js +1 -1
  152. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  153. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  154. package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
  155. package/views/3d/layers/ViewshedLayerView3D.js +1 -1
  156. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  157. package/views/3d/support/LayerPerformanceInfo.d.ts +1 -1
  158. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  159. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  160. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  161. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  162. package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
  163. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  164. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  165. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  166. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js +1 -1
  167. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  168. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
  169. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +7 -7
  170. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  171. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  172. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  173. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  174. package/views/3d/webgl-engine/materials/ViewingModeConfiguration.js +5 -0
  175. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +2 -2
  176. package/views/BreakpointsOwner.d.ts +9 -10
  177. package/views/MapView.d.ts +18 -17
  178. package/views/SceneView.d.ts +30 -89
  179. package/views/SceneView.js +1 -1
  180. package/views/View2D.d.ts +0 -37
  181. package/views/View2D.js +1 -1
  182. package/views/ViewAnimation.d.ts +2 -3
  183. package/views/analysis/ElevationProfile/types.d.ts +7 -6
  184. package/views/analysis/types.d.ts +1 -0
  185. package/views/animation/types.d.ts +3 -1
  186. package/views/layers/DimensionLayerView.d.ts +97 -4
  187. package/views/layers/DimensionLayerView.js +1 -1
  188. package/views/layers/HighlightLayerViewMixin.d.ts +1 -59
  189. package/views/layers/HighlightLayerViewMixin.js +1 -1
  190. package/views/layers/ImageryLayerViewMixin.d.ts +1 -55
  191. package/views/layers/LineOfSightLayerView.d.ts +77 -4
  192. package/views/layers/LineOfSightLayerView.js +1 -1
  193. package/views/layers/ViewshedLayerView.d.ts +96 -5
  194. package/views/layers/ViewshedLayerView.js +1 -1
  195. package/views/navigation/Navigation.d.ts +1 -22
  196. package/views/navigation/Navigation.js +1 -1
  197. package/views/support/Scheduler.js +1 -1
  198. package/views/types.d.ts +75 -5
  199. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +4 -4
  200. package/widgets/AreaMeasurement3D.d.ts +2 -2
  201. package/widgets/BasemapGallery.d.ts +1 -1
  202. package/widgets/BasemapToggle.d.ts +1 -1
  203. package/widgets/Bookmarks.d.ts +1 -1
  204. package/widgets/BuildingExplorer/BuildingExplorerViewModel.d.ts +2 -2
  205. package/widgets/BuildingExplorer/BuildingLevel.d.ts +2 -2
  206. package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.d.ts +2 -2
  207. package/widgets/BuildingExplorer/BuildingPhase.d.ts +2 -2
  208. package/widgets/BuildingExplorer.d.ts +3 -3
  209. package/widgets/Compass.d.ts +1 -1
  210. package/widgets/CoordinateConversion.d.ts +1 -1
  211. package/widgets/Daylight/DaylightViewModel.d.ts +3 -3
  212. package/widgets/Daylight/VisibleElements.d.ts +2 -2
  213. package/widgets/Daylight/types.d.ts +2 -2
  214. package/widgets/Daylight.d.ts +3 -3
  215. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +4 -4
  216. package/widgets/DirectLineMeasurement3D.d.ts +2 -2
  217. package/widgets/DirectionalPad.d.ts +1 -1
  218. package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
  219. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
  220. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
  221. package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
  222. package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +3 -3
  223. package/widgets/ElevationProfile/ElevationProfileViewModel.d.ts +2 -2
  224. package/widgets/ElevationProfile/ElevationProfileVisibleElements.d.ts +2 -2
  225. package/widgets/ElevationProfile/types.d.ts +9 -9
  226. package/widgets/ElevationProfile.d.ts +2 -2
  227. package/widgets/Expand/ExpandViewModel.d.ts +1 -1
  228. package/widgets/Expand.d.ts +1 -1
  229. package/widgets/Feature.d.ts +1 -1
  230. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -1
  231. package/widgets/Features.d.ts +1 -1
  232. package/widgets/Fullscreen/FullscreenViewModel.d.ts +1 -1
  233. package/widgets/Fullscreen.d.ts +1 -1
  234. package/widgets/Home.d.ts +1 -1
  235. package/widgets/LayerList.d.ts +12 -0
  236. package/widgets/Legend.d.ts +1 -1
  237. package/widgets/LineOfSight/LineOfSightTarget.d.ts +2 -2
  238. package/widgets/LineOfSight/LineOfSightViewModel.d.ts +2 -2
  239. package/widgets/LineOfSight.d.ts +2 -2
  240. package/widgets/Locate/LocateViewModel.d.ts +1 -1
  241. package/widgets/Locate.d.ts +1 -1
  242. package/widgets/NavigationToggle/NavigationToggleViewModel.d.ts +1 -1
  243. package/widgets/NavigationToggle.d.ts +1 -1
  244. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  245. package/widgets/OrientedImageryViewer/components/Arrow.js +1 -1
  246. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  247. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  248. package/widgets/OrientedImageryViewer/components/NavigationNode.js +1 -1
  249. package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
  250. package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +1 -1
  251. package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +1 -1
  252. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  253. package/widgets/OrientedImageryViewer/constants.js +1 -1
  254. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  255. package/widgets/OrientedImageryViewer/navigation/NavigationManagerPanoramic.js +1 -1
  256. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  257. package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +5 -0
  258. package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
  259. package/widgets/OrientedImageryViewer/support/NonPanoramicMediaCollection.js +1 -1
  260. package/widgets/OrientedImageryViewer/support/resolveMediaProps.js +5 -0
  261. package/widgets/OrientedImageryViewer/utils.js +1 -1
  262. package/widgets/OrientedImageryViewer.js +1 -1
  263. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  264. package/widgets/PanoramicViewer.js +1 -1
  265. package/widgets/Print/CustomTemplate.d.ts +1 -1
  266. package/widgets/Print/PrintViewModel.d.ts +1 -1
  267. package/widgets/Print.d.ts +1 -1
  268. package/widgets/ScaleBar.d.ts +1 -1
  269. package/widgets/Search.d.ts +1 -1
  270. package/widgets/ShadowCast/DiscreteOptions.d.ts +2 -2
  271. package/widgets/ShadowCast/DurationOptions.d.ts +2 -2
  272. package/widgets/ShadowCast/ShadowCastViewModel.d.ts +3 -3
  273. package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +2 -2
  274. package/widgets/ShadowCast/ThresholdOptions.d.ts +2 -2
  275. package/widgets/ShadowCast/types.d.ts +2 -2
  276. package/widgets/ShadowCast.d.ts +1 -1
  277. package/widgets/Slice/SliceViewModel.d.ts +2 -2
  278. package/widgets/Slice.d.ts +2 -2
  279. package/widgets/Swipe.d.ts +1 -1
  280. package/widgets/TimeZoneLabel.d.ts +1 -1
  281. package/widgets/Track.d.ts +1 -1
  282. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  283. package/widgets/VideoPlayer.d.ts +1 -1
  284. package/widgets/VideoPlayer.js +1 -1
  285. package/widgets/Weather/VisibleElements.d.ts +2 -2
  286. package/widgets/Weather/WeatherViewModel.d.ts +2 -2
  287. package/widgets/Weather/types.d.ts +1 -1
  288. package/widgets/Weather.d.ts +2 -2
  289. package/widgets/Zoom.d.ts +1 -1
  290. package/widgets/support/GridControls.d.ts +1 -1
  291. package/assets/esri/core/workers/chunks/35961e71f69ae1d24b9e.js +0 -1
  292. package/assets/esri/core/workers/chunks/3cce8e894bf37c3e598e.js +0 -1
  293. package/assets/esri/core/workers/chunks/7ee68f67f9cc48a328f0.js +0 -1
  294. package/assets/esri/core/workers/chunks/a931515a2569713e743b.js +0 -1
  295. package/assets/esri/core/workers/chunks/bb4574a87ca21e719f0d.js +0 -1
  296. package/assets/esri/core/workers/chunks/c9f868f85d740ee32715.js +0 -1
  297. package/geometry.d.ts +0 -136
  298. package/geometry.js +0 -5
  299. package/pointCloudRenderers.d.ts +0 -112
  300. package/pointCloudRenderers.js +0 -5
  301. package/rasterRenderers.d.ts +0 -151
  302. package/rasterRenderers.js +0 -5
  303. package/renderers.d.ts +0 -166
  304. package/renderers.js +0 -5
  305. package/views/layers/DimensionLayerViewMixin.d.ts +0 -1
  306. package/views/layers/DimensionLayerViewMixin.js +0 -5
  307. package/views/layers/LineOfSightLayerViewMixin.d.ts +0 -1
  308. package/views/layers/LineOfSightLayerViewMixin.js +0 -5
  309. package/views/layers/ViewshedLayerViewMixin.d.ts +0 -98
  310. package/views/layers/ViewshedLayerViewMixin.js +0 -5
@@ -321,8 +321,8 @@ export default class ImageryLayer extends ImageryLayerSuperclass {
321
321
  */
322
322
  accessor screenSizePerspectiveEnabled: boolean;
323
323
  /**
324
- * The layer type provides a convenient way to check the type of the layer
325
- * without the need to import specific layer modules.
324
+ *
325
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
326
326
  */
327
327
  get type(): "imagery";
328
328
  /**
@@ -704,8 +704,8 @@ export default class ImageryTileLayer extends ImageryTileLayerSuperclass {
704
704
  */
705
705
  accessor title: string | null | undefined;
706
706
  /**
707
- * The layer type provides a convenient way to check the type of the layer
708
- * without the need to import specific layer modules.
707
+ *
708
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
709
709
  */
710
710
  get type(): "imagery-tile";
711
711
  /**
@@ -180,8 +180,8 @@ export default class IntegratedMesh3DTilesLayer extends IntegratedMesh3DTilesLay
180
180
  */
181
181
  accessor title: string | null | undefined;
182
182
  /**
183
- * The layer type provides a convenient way to check the type of the layer
184
- * without the need to import specific layer modules.
183
+ *
184
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
185
185
  */
186
186
  get type(): "integrated-mesh-3dtiles";
187
187
  /** The URL of the root json file. */
@@ -179,8 +179,8 @@ export default class IntegratedMeshLayer extends IntegratedMeshLayerSuperclass {
179
179
  */
180
180
  accessor title: string | null | undefined;
181
181
  /**
182
- * The layer type provides a convenient way to check the type of the layer
183
- * without the need to import specific layer modules.
182
+ *
183
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
184
184
  */
185
185
  get type(): "integrated-mesh";
186
186
  /**
@@ -55,8 +55,8 @@ export default class KMLLayer extends KMLLayerSuperclass {
55
55
  /** The title of the layer used to identify it in places such as the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. */
56
56
  accessor title: string | null | undefined;
57
57
  /**
58
- * The layer type provides a convenient way to check the type of the layer
59
- * without the need to import specific layer modules.
58
+ *
59
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
60
60
  */
61
61
  get type(): "kml";
62
62
  /** The publicly accessible URL for a .kml or .kmz file. */
package/layers/Layer.d.ts CHANGED
@@ -309,14 +309,16 @@ export default abstract class Layer extends LayerSuperclass {
309
309
  */
310
310
  accessor id: string;
311
311
  /**
312
+ *
312
313
  * Indicates how the layer should display in the [Layer List](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-layer-list/) component.
313
314
  * The possible values are listed below.
314
315
  *
315
- * Value | Description
316
- * ------|------------
317
- * show | The layer is visible in the table of contents.
318
- * hide | The layer is hidden in the table of contents.
319
- * hide-children | If the layer is a [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html), [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html), [MapImageLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html), [SubtypeGroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SubtypeGroupLayer.html), [TileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html), or [WMSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WMSLayer.html), hide the children layers from the table of contents.
316
+ * alue | Description
317
+ * -----|------------
318
+ * show | The layer is visible in the table of contents.
319
+ * hide | The layer is hidden in the table of contents.
320
+ * hide-children | If the layer is a [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html), [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html), [MapImageLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html), [SubtypeGroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SubtypeGroupLayer.html), [TileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html), or [WMSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WMSLayer.html), hide the children layers from the table of contents.
321
+ *
320
322
  *
321
323
  * @default "show"
322
324
  */
@@ -372,8 +374,8 @@ export default abstract class Layer extends LayerSuperclass {
372
374
  */
373
375
  accessor title: string | null | undefined;
374
376
  /**
375
- * The layer type provides a convenient way to check the type of the layer
376
- * without the need to import specific layer modules.
377
+ *
378
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
377
379
  */
378
380
  get type(): LayerType;
379
381
  /**
@@ -83,7 +83,7 @@ export interface LineOfSightLayerProperties extends LayerProperties, Operational
83
83
  * ```
84
84
  *
85
85
  * To create lines of sight interactively, use the
86
- * {@link views/layers/LineOfSightLayerView#place} method.
86
+ * [LineOfSightLayerView#place()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LineOfSightLayerView.html#place) method.
87
87
  *
88
88
  * ```js
89
89
  * const abortController = new AbortController();
@@ -161,8 +161,8 @@ export default class LineOfSightLayer extends LineOfSightLayerSuperclass {
161
161
  get targets(): Collection<LineOfSightAnalysisTarget> | null | undefined;
162
162
  set targets(value: ReadonlyArrayOrCollection<LineOfSightAnalysisTargetProperties> | null);
163
163
  /**
164
- * The layer type provides a convenient way to check the type of the layer
165
- * without the need to import specific layer modules.
164
+ *
165
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
166
166
  */
167
167
  get type(): "line-of-sight";
168
168
  }
@@ -612,8 +612,8 @@ export default class MapImageLayer extends MapImageLayerSuperclass {
612
612
  */
613
613
  accessor title: string | null | undefined;
614
614
  /**
615
- * The layer type provides a convenient way to check the type of the layer
616
- * without the need to import specific layer modules.
615
+ *
616
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
617
617
  */
618
618
  get type(): "map-image";
619
619
  /**
@@ -172,8 +172,8 @@ export default class MapNotesLayer extends MapNotesLayerSuperclass {
172
172
  */
173
173
  accessor title: string | null | undefined;
174
174
  /**
175
- * The layer type provides a convenient way to check the type of the layer
176
- * without the need to import specific layer modules.
175
+ *
176
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
177
177
  */
178
178
  get type(): "map-notes";
179
179
  }
@@ -171,8 +171,8 @@ export default class MediaLayer extends MediaLayerSuperclass {
171
171
  get spatialReference(): SpatialReference;
172
172
  set spatialReference(value: SpatialReferenceProperties);
173
173
  /**
174
- * The layer type provides a convenient way to check the type of the layer
175
- * without the need to import specific layer modules.
174
+ *
175
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
176
176
  */
177
177
  get type(): "media";
178
178
  /**
@@ -413,8 +413,8 @@ export default class OGCFeatureLayer extends OGCFeatureLayerSuperclass {
413
413
  */
414
414
  accessor title: string | null | undefined;
415
415
  /**
416
- * The layer type provides a convenient way to check the type of the layer
417
- * without the need to import specific layer modules.
416
+ *
417
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
418
418
  */
419
419
  get type(): "ogc-feature";
420
420
  /**
@@ -768,8 +768,8 @@ export default class OrientedImageryLayer extends __FeatureLayerSansType {
768
768
  */
769
769
  accessor timeIntervalUnit: TimeIntervalUnit;
770
770
  /**
771
- * The layer type provides a convenient way to check the type of the layer
772
- * without the need to import specific layer modules.
771
+ *
772
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
773
773
  */
774
774
  get type(): "oriented-imagery";
775
775
  /**
@@ -506,8 +506,8 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
506
506
  get spatialReference(): SpatialReference;
507
507
  set spatialReference(value: SpatialReferenceProperties);
508
508
  /**
509
- * The layer type provides a convenient way to check the type of the layer
510
- * without the need to import specific layer modules.
509
+ *
510
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
511
511
  */
512
512
  get type(): "parquet";
513
513
  /**
@@ -341,8 +341,8 @@ export default class PointCloudLayer extends PointCloudLayerSuperclass {
341
341
  */
342
342
  accessor title: string | null | undefined;
343
343
  /**
344
- * The layer type provides a convenient way to check the type of the layer
345
- * without the need to import specific layer modules.
344
+ *
345
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
346
346
  */
347
347
  get type(): "point-cloud";
348
348
  /**
@@ -239,8 +239,8 @@ export default class RouteLayer extends RouteLayerSuperclass {
239
239
  */
240
240
  accessor title: string | null | undefined;
241
241
  /**
242
- * The layer type provides a convenient way to check the type of the layer
243
- * without the need to import specific layer modules.
242
+ *
243
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
244
244
  */
245
245
  get type(): "route";
246
246
  /**
@@ -1056,8 +1056,8 @@ export default class SceneLayer extends SceneLayerSuperclass {
1056
1056
  */
1057
1057
  accessor title: string | null | undefined;
1058
1058
  /**
1059
- * The layer type provides a convenient way to check the type of the layer
1060
- * without the need to import specific layer modules.
1059
+ *
1060
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
1061
1061
  */
1062
1062
  get type(): "scene";
1063
1063
  /**
@@ -287,8 +287,8 @@ export default class SubtypeGroupLayer extends SubtypeGroupLayerSuperclass {
287
287
  get sublayers(): Collection<SubtypeSublayer>;
288
288
  set sublayers(value: ReadonlyArrayOrCollection<SubtypeSublayerProperties>);
289
289
  /**
290
- * The layer type provides a convenient way to check the type of the layer
291
- * without the need to import specific layer modules.
290
+ *
291
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
292
292
  */
293
293
  get type(): "subtype-group";
294
294
  /**
@@ -168,8 +168,8 @@ export default class TileLayer extends TileLayerSuperclass {
168
168
  */
169
169
  accessor title: string | null | undefined;
170
170
  /**
171
- * The layer type provides a convenient way to check the type of the layer
172
- * without the need to import specific layer modules.
171
+ *
172
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
173
173
  */
174
174
  get type(): "tile";
175
175
  /**
@@ -22,8 +22,8 @@ export interface UnknownLayerProperties extends LayerProperties, PortalLayerProp
22
22
  export default class UnknownLayer extends UnknownLayerSuperclass {
23
23
  constructor(properties?: UnknownLayerProperties);
24
24
  /**
25
- * The layer type provides a convenient way to check the type of the layer
26
- * without the need to import specific layer modules.
25
+ *
26
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
27
27
  */
28
28
  get type(): "unknown";
29
29
  }
@@ -26,8 +26,8 @@ export default class UnsupportedLayer extends UnsupportedLayerSuperclass {
26
26
  */
27
27
  get persistenceEnabled(): boolean;
28
28
  /**
29
- * The layer type provides a convenient way to check the type of the layer
30
- * without the need to import specific layer modules.
29
+ *
30
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
31
31
  */
32
32
  get type(): "unsupported";
33
33
  }
@@ -590,8 +590,8 @@ export default class VectorTileLayer extends VectorTileLayerSuperclass {
590
590
  */
591
591
  accessor title: string | null | undefined;
592
592
  /**
593
- * The layer type provides a convenient way to check the type of the layer
594
- * without the need to import specific layer modules.
593
+ *
594
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
595
595
  */
596
596
  get type(): "vector-tile";
597
597
  /**
@@ -514,8 +514,8 @@ export default class VideoLayer extends VideoLayerSuperclass {
514
514
  */
515
515
  accessor title: string | null | undefined;
516
516
  /**
517
- * The layer type provides a convenient way to check the type of the layer
518
- * without the need to import specific layer modules.
517
+ *
518
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
519
519
  */
520
520
  get type(): "video";
521
521
  /** The URL to the REST endpoint of the video service. */
@@ -124,8 +124,8 @@ export default class ViewshedLayer extends ViewshedLayerSuperclass {
124
124
  */
125
125
  accessor title: string | null | undefined;
126
126
  /**
127
- * The layer type provides a convenient way to check the type of the layer
128
- * without the need to import specific layer modules.
127
+ *
128
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
129
129
  */
130
130
  get type(): "viewshed";
131
131
  }
@@ -539,8 +539,8 @@ export default class VoxelLayer extends VoxelLayerSuperclass {
539
539
  get timeOffset(): TimeInterval | null | undefined;
540
540
  set timeOffset(value: TimeIntervalProperties | null | undefined);
541
541
  /**
542
- * The layer type provides a convenient way to check the type of the layer
543
- * without the need to import specific layer modules.
542
+ *
543
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
544
544
  */
545
545
  get type(): "voxel";
546
546
  /**
@@ -217,8 +217,8 @@ export default class WCSLayer extends WCSLayerSuperclass {
217
217
  type: "flow";
218
218
  }) | null | undefined);
219
219
  /**
220
- * The layer type provides a convenient way to check the type of the layer
221
- * without the need to import specific layer modules.
220
+ *
221
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
222
222
  */
223
223
  get type(): "wcs";
224
224
  /** The URL of the WCS service endpoint of the layer. */
@@ -596,8 +596,8 @@ export default class WFSLayer extends WFSLayerSuperclass {
596
596
  */
597
597
  accessor title: string | null | undefined;
598
598
  /**
599
- * The layer type provides a convenient way to check the type of the layer
600
- * without the need to import specific layer modules.
599
+ *
600
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
601
601
  */
602
602
  get type(): "wfs";
603
603
  /**
@@ -779,8 +779,8 @@ export default class WMSLayer extends WMSLayerSuperclass {
779
779
  */
780
780
  accessor title: string | null | undefined;
781
781
  /**
782
- * The layer type provides a convenient way to check the type of the layer
783
- * without the need to import specific layer modules.
782
+ *
783
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
784
784
  */
785
785
  get type(): "wms";
786
786
  /** The URL of the WMS service. */
@@ -72,8 +72,8 @@ export default class WMTSLayer extends WMTSLayerSuperclass {
72
72
  get sublayers(): Collection<WMTSSublayer> | null | undefined;
73
73
  set sublayers(value: ReadonlyArrayOrCollection<WMTSSublayerProperties> | null | undefined);
74
74
  /**
75
- * The layer type provides a convenient way to check the type of the layer
76
- * without the need to import specific layer modules.
75
+ *
76
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
77
77
  */
78
78
  get type(): "wmts";
79
79
  /**
@@ -52,8 +52,8 @@ export default class CatalogDynamicGroupLayer extends CatalogDynamicGroupLayerSu
52
52
  */
53
53
  get persistenceEnabled(): boolean;
54
54
  /**
55
- * The layer type provides a convenient way to check the type of the layer
56
- * without the need to import specific layer modules.
55
+ *
56
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
57
57
  */
58
58
  get type(): "catalog-dynamic-group";
59
59
  }
@@ -434,8 +434,8 @@ export default class CatalogFootprintLayer extends CatalogFootprintLayerSupercla
434
434
  */
435
435
  get timeOffset(): TimeInterval | null | undefined;
436
436
  /**
437
- * The layer type provides a convenient way to check the type of the layer
438
- * without the need to import specific layer modules.
437
+ *
438
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
439
439
  */
440
440
  get type(): "catalog-footprint";
441
441
  /**
@@ -537,8 +537,8 @@ export default class KnowledgeGraphSublayer extends KnowledgeGraphSublayerSuperc
537
537
  get templates(): FeatureTemplate[] | null | undefined;
538
538
  set templates(value: FeatureTemplateProperties[] | null | undefined);
539
539
  /**
540
- * The layer type provides a convenient way to check the type of the layer
541
- * without the need to import specific layer modules.
540
+ *
541
+ * The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules.
542
542
  */
543
543
  get type(): "knowledge-graph-sublayer";
544
544
  /**
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../../core/Clonable.js";import r from"../../../core/Error.js";import{JSONSupport as o}from"../../../core/JSONSupport.js";import a from"../../../core/Logger.js";import{property as i,cast as n,subclass as s}from"../../../core/accessorSupport/decorators.js";import p from"../../../geometry/Point.js";import{getGeometryZScaler as l}from"../../../geometry/support/zscale.js";import c from"./CameraOrientation.js";import m from"./cameraOrientationFactory.js";import{appendPrefixAndSuffix as u,getEffectiveElevationSource as y,getArcGISServerUrl as d,getMetersPerUnitOfSR as f,orientedImageryTypeMap as g}from"./utils.js";import{ltpToGeographic as h}from"../transformations/utils.js";import{reader as v}from"../../../core/accessorSupport/decorators/reader.js";import{writer as w}from"../../../core/accessorSupport/decorators/writer.js";import{enumeration as O}from"../../../core/accessorSupport/decorators/enumeration.js";function b(e){throw new r("exposure-point:missing-default-value",`a value for ${e} is missing in default properties`)}function j(e,t){throw new r("exposure-point:missing-attribute-value",`a value for ${e} is missing in attribute table`,{exposurePoint:t})}const S=e=>({cast:e=>{const t=parseFloat(e);return Number.isFinite(t)?t:void 0},json:{name:e,write:{writer:(e,t,r)=>{t[r]=Number.isFinite(e)?e:void 0}}}}),I=e=>({cast:e=>"string"==typeof e?e.split(";").map(Number):e,json:{default:e,write:{writer:(e,t,r)=>{t[r]=e?.join(";")}}}}),N="$virtualCacheDirectory:";let F=class extends(t(o)){constructor(e){super(e),this._geometry=null,this.cameraOrientation=null,this.elevation=null,this.elevationSource=null,this.name=null,this.sourceMap=null}read(e,t){const r={},{attributes:o,geometry:a}=e,i={};for(const s in o)r[s.toLowerCase()]=o[s],i[s.toLowerCase()]=s;const n=e.layer??{};n.sequenceOrderField?.length&&(r.sequenceorder=o[n.sequenceOrderField],i.sequenceorder=n.sequenceOrderField),super.read({geometry:a,layer:n,sourceMap:i,...r},t)}write(e,t){const r=super.write(e,t),{sourceMap:o}=this;if(!o||!r)return r;const a={};for(const i in r){const e=o[i.toLowerCase()];e&&(a[e]=r[i])}return a}readCameraHeading(e,t){const{cameraheading:r,camheading:o,layer:a}=t;return r??o??a.cameraHeading}readCameraHeight(e,t){const{cameraheight:r,avghtag:o,layer:a}=t;return r??o??a.cameraHeight}readCamOffset(e,t){const{cameraoffset:r,camoffset:o}=t;return r?.split(";").map(Number)??o?.split(";").map(Number)??null}writeCameraOffset(e,t){e&&(t.cameraOffset=e.join(";"))}readCameraOrientation(e,t){const{cameraorientation:r,camori:o}=t;return r??o}readCameraPitch(e,t){const{camerapitch:r,campitch:o,layer:a}=t;return r??o??a.cameraPitch}readCameraRoll(e,t){const{cameraroll:r,camroll:o,layer:a}=t;return r??o??a.cameraRoll}readDepthImage(e,t){const{depthimage:r,depthimg:o,layer:a}=t,i=r??o??null,{depthImagePathPrefix:n,depthImagePathSuffix:s}=a??{};return u(i,n,s)}readElevationSource(e,t){const{elevationsource:r,layer:o}=t,{demPathSuffix:a,demPathPrefix:i}=o;if(r){const e=this._parseIfJSON(r);return y(e,i,a)}return o.effectiveElevationSource}readFarDistance(e,t){const{fardistance:r,fardist:o,layer:a}=t;return r??o??a.farDistance}get geometry(){const e=this._geometry.clone();if(!e)return null;const{cameraOffset:t}=this;if(t){const[r,o,a]=t;e.x+=r,e.y+=o,null!=e.z&&null!=a&&(e.z+=a)}return e}set geometry(e){this._geometry=e}writeGeometry(e,t){t.geometry=this._geometry.toJSON()}readHFOV(e,t){const{horizontalfieldofview:r,hfov:o,layer:a}=t;return r??o??a.horizontalFieldOfView}readImageURL(e,t){const{imagepath:r,layer:o}=t;r||j("imagePath",this);const{imagePathPrefix:a,imagePathSuffix:i}=o;if(r.startsWith(N)){return`${d(o.url)}${r.replace(N,o.virtualCacheDirectory+"/")}`}return u(r,a,i)}readImageRotation(e,t){const{imagerotation:r,imgrot:o,layer:a}=t;return r??o??a.imageRotation}get isHorizontal(){return"horizontal"===this.orientedImageryType}get isInspection(){return"inspection"===this.orientedImageryType}get isNadir(){return"nadir"===this.orientedImageryType}get isOblique(){return"oblique"===this.orientedImageryType}get isSpherical(){return this.orientedImageryType?.includes("360")??!1}get location(){const{cameraOrientation:e,cameraHeight:t,elevation:r}=this;if(e){const{type:t,x:r,y:o,z:a,horizontalWKID:i,verticalWKID:n}=e,s="number"==typeof i?{wkid:i}:{wkt:i};if(4===t){const{latitude:t,longitude:r,ellipsoidRadius:o,squaredEccentricity:a,properties:i}=e,{x:n,y:s,z:l}=i;return new p(h([n,s,l],[t,r,o,a]))}const c=new p({x:r,y:o,z:a,spatialReference:s}),m=n?l("point",{wkid:n},s):null;return m&&m(c),c}if("number"!=typeof t)throw b("cameraHeight");const o=this.geometry.clone(),i=(r??0)+t/f(o.spatialReference);if("360"===this.orientedImageryType&&o.hasZ){const e=i-o.z;return null!=r&&Math.abs(e)>.001&&(a.getLogger(this).warnOnce("The elevation value is different from the geometry's z value. The geometry's z value will be updated.",{elevation:r,geometryZ:o.z}),o.z=i),o}return o.z=o.hasZ?o.z:i,o}set matrix(e){if(e)return 9!==e.length?(a.getLogger(this).warnOnce("Ignoring rotation matrix because it doesn't have 9 values",{value:e}),void this._set("matrix",null)):void this._set("matrix",e)}readNearDistance(e,t){const{neardistance:r,neardist:o,layer:a}=t;return r??o??a.nearDistance}readOffsetFromStart(e,t){return t.offsetfromstart??null}readOrientationAccuracy(e,t){const{accuracy:r,orientationaccuracy:o}=t;return o?.split(";").map(Number)??r?.split(";").map(Number)??null}writeOrientationAccuracy(e,t){e&&(t.orientationAccuracy=e.join(";"))}readOIType(e,t){const{orientedimagerytype:r,oitype:o,camerapitch:a,campitch:i,layer:n}=t,s=g.read(r??o??n.orientedImageryType),p=a??i??n.cameraPitch;return"oblique"===s?p<10?"nadir":"oblique":s}set radial(e){if(e){if("string"==typeof e){const[t,r,o]=e.split(";").map(Number);return void this._set("radial",[t??0,r??0,o??0])}this._set("radial",e)}else this._set("radial",[0,0,0])}readSequenceOrder(e,t){const{layer:r}=t;return t[r.sequenceOrderField.toLowerCase()]}writeSequenceOrder(e,t){if(!e)return;const{sourceMap:r}=this;if(r){t[r.sequenceorder]=e}}set tangential(e){if(e){if("string"==typeof e){const[t,r]=e.split(";").map(Number);return void this._set("tangential",[t??0,r??0])}this._set("tangential",e)}else this._set("tangential",[0,0])}readVFOV(e,t){const{verticalfieldofview:r,vfov:o,layer:a}=t;return r??o??a.verticalFieldOfView}_parseIfJSON(e){let t=null;try{t=JSON.parse(e)}catch(r){a.getLogger(this).error("couldn't parse the given elevation source JSON",e,r)}return t}clone(){const e=super.clone();return e._geometry=this._geometry.clone(),e}};e([i()],F.prototype,"_geometry",void 0),e([i(S())],F.prototype,"a0",void 0),e([i(S())],F.prototype,"a1",void 0),e([i(S())],F.prototype,"a2",void 0),e([i({type:Date,json:{write:{enabled:!0,target:"acquisitionDate"},name:"acquisitiondate"}})],F.prototype,"acquisitionDate",void 0),e([i(S())],F.prototype,"b0",void 0),e([i(S())],F.prototype,"b1",void 0),e([i(S())],F.prototype,"b2",void 0),e([i({type:Number,json:{write:!0,read:{source:["cameraheading","camheading","layer.cameraHeading"]}}})],F.prototype,"cameraHeading",void 0),e([v("cameraHeading")],F.prototype,"readCameraHeading",null),e([i({type:Number,json:{write:!0}})],F.prototype,"cameraHeight",void 0),e([v("cameraHeight",["cameraheight","avghtag","layer.cameraHeight"])],F.prototype,"readCameraHeight",null),e([i()],F.prototype,"cameraOffset",void 0),e([v("cameraOffset",["cameraoffset","camoffset"])],F.prototype,"readCamOffset",null),e([w("cameraOffset")],F.prototype,"writeCameraOffset",null),e([i({json:{write:{writer:(e,t,r)=>{t[r]=e.toString()}}},type:c}),n(e=>e?m.getCameraOrientation(e):null)],F.prototype,"cameraOrientation",void 0),e([v("cameraOrientation",["cameraorientation","camori"])],F.prototype,"readCameraOrientation",null),e([i({type:Number,json:{write:!0}})],F.prototype,"cameraPitch",void 0),e([v("cameraPitch",["camerapitch","campitch","layer.cameraPitch"])],F.prototype,"readCameraPitch",null),e([i({type:Number,json:{write:!0}})],F.prototype,"cameraRoll",void 0),e([v("cameraRoll",["cameraroll","camroll","layer.cameraRoll"])],F.prototype,"readCameraRoll",null),e([i({json:{write:!0},type:String})],F.prototype,"depthImage",void 0),e([v("depthImage",["depthimage","depthimg"])],F.prototype,"readDepthImage",null),e([i({type:Number,json:{write:!0}})],F.prototype,"elevation",void 0),e([i({json:{write:!0},clonable:"reference"})],F.prototype,"elevationSource",void 0),e([v("elevationSource",["elevationsource","layer.effectiveElevationSource"])],F.prototype,"readElevationSource",null),e([i({json:{name:"exposurestationid",write:{target:"exposureStationId"}},type:String})],F.prototype,"exposureStationId",void 0),e([i({type:Number,json:{write:!0}})],F.prototype,"farDistance",void 0),e([v("farDistance",["fardistance","fardist","layer.farDistance"])],F.prototype,"readFarDistance",null),e([i(S("focallength"))],F.prototype,"focalLength",void 0),e([i({type:p,json:{name:"geometry"}})],F.prototype,"geometry",null),e([w("geometry")],F.prototype,"writeGeometry",null),e([i({type:Number,json:{write:!0}})],F.prototype,"horizontalFieldOfView",void 0),e([v("horizontalFieldOfView",["horizontalfieldofview","hfov","layer.horizontalFieldOfView"])],F.prototype,"readHFOV",null),e([i({json:{write:!0},type:String})],F.prototype,"imagePath",void 0),e([v("imagePath",["imagepath"])],F.prototype,"readImageURL",null),e([i({type:Number,json:{write:!0}})],F.prototype,"imageRotation",void 0),e([v("imageRotation",["imagerotation","imgrot","layer.imageRotation"])],F.prototype,"readImageRotation",null),e([i()],F.prototype,"isHorizontal",null),e([i()],F.prototype,"isInspection",null),e([i()],F.prototype,"isNadir",null),e([i()],F.prototype,"isOblique",null),e([i()],F.prototype,"isSpherical",null),e([i()],F.prototype,"location",null),e([i(I())],F.prototype,"matrix",null),e([i({json:{write:!0},type:String})],F.prototype,"name",void 0),e([i({type:Number,json:{write:!0}})],F.prototype,"nearDistance",void 0),e([v("nearDistance",["neardistance","neardist","layer.nearDistance"])],F.prototype,"readNearDistance",null),e([i({json:{write:!0,name:"objectid"},type:Number})],F.prototype,"objectId",void 0),e([i({type:Number,json:{write:!0}})],F.prototype,"offsetFromStart",void 0),e([v("offsetFromStart",["offsetfromstart"])],F.prototype,"readOffsetFromStart",null),e([i()],F.prototype,"orientationAccuracy",void 0),e([v("orientationAccuracy",["accuracy","orientationaccuracy"])],F.prototype,"readOrientationAccuracy",null),e([w("orientationAccuracy")],F.prototype,"writeOrientationAccuracy",null),e([O(g)],F.prototype,"orientedImageryType",void 0),e([v("orientedImageryType",["orientedimagerytype","oitype","layer.orientedImageryType"])],F.prototype,"readOIType",null),e([i({type:Number,json:{write:!0,read:{source:"principalx"}}})],F.prototype,"principalX",void 0),e([i({type:Number,json:{write:!0,read:{source:"principaly"}}})],F.prototype,"principalY",void 0),e([i(I([0,0,0]))],F.prototype,"radial",null),e([i({type:String})],F.prototype,"sequenceOrder",void 0),e([v("sequenceOrder",["sequenceorder","layer.sequenceOrderField"])],F.prototype,"readSequenceOrder",null),e([w("sequenceOrder")],F.prototype,"writeSequenceOrder",null),e([i({type:Object})],F.prototype,"sourceMap",void 0),e([i(I([0,0]))],F.prototype,"tangential",null),e([i({type:Number,json:{write:!0}})],F.prototype,"verticalFieldOfView",void 0),e([v("verticalFieldOfView",["verticalfieldofview","vfov","layer.verticalFieldOfView"])],F.prototype,"readVFOV",null),F=e([s("esri.layers.orientedImagery.core.ExposurePoint")],F);export{F as default};
5
+ import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../../core/Clonable.js";import r from"../../../core/Error.js";import{JSONSupport as o}from"../../../core/JSONSupport.js";import a from"../../../core/Logger.js";import{property as i,cast as n,subclass as s}from"../../../core/accessorSupport/decorators.js";import p from"../../../geometry/Point.js";import{getGeometryZScaler as l}from"../../../geometry/support/zscale.js";import c from"./CameraOrientation.js";import m from"./cameraOrientationFactory.js";import{appendPrefixAndSuffix as u,getEffectiveElevationSource as y,getArcGISServerUrl as d,getMetersPerUnitOfSR as f,orientedImageryTypeMap as g}from"./utils.js";import{ltpToGeographic as h}from"../transformations/utils.js";import{reader as v}from"../../../core/accessorSupport/decorators/reader.js";import{writer as w}from"../../../core/accessorSupport/decorators/writer.js";import{enumeration as O}from"../../../core/accessorSupport/decorators/enumeration.js";function b(e){throw new r("exposure-point:missing-default-value",`a value for ${e} is missing in default properties`)}function j(e,t){throw new r("exposure-point:missing-attribute-value",`a value for ${e} is missing in attribute table`,{exposurePoint:t})}const S=e=>({cast:e=>{const t=parseFloat(e);return Number.isFinite(t)?t:void 0},json:{name:e,write:{writer:(e,t,r)=>{t[r]=Number.isFinite(e)?e:void 0}}}}),I=e=>({cast:e=>"string"==typeof e?e.split(";").map(Number):e,json:{default:e,write:{writer:(e,t,r)=>{t[r]=e?.join(";")}}}}),N="$virtualCacheDirectory:";let F=class extends(t(o)){constructor(e){super(e),this._geometry=null,this.cameraOrientation=null,this.elevation=null,this.elevationSource=null,this.name=null,this.sourceMap=null}read(e,t){const r={},{attributes:o,geometry:a}=e,i={};for(const s in o)r[s.toLowerCase()]=o[s],i[s.toLowerCase()]=s;const n=e.layer??{};n.sequenceOrderField?.length&&(r.sequenceorder=o[n.sequenceOrderField],i.sequenceorder=n.sequenceOrderField),super.read({geometry:a,layer:n,sourceMap:i,...r},t)}write(e,t){const r=super.write(e,t),{sourceMap:o}=this;if(!o||!r)return r;const a={};for(const i in r){const e=o[i.toLowerCase()];e&&(a[e]=r[i])}return a}readCameraHeading(e,t){const{cameraheading:r,camheading:o,layer:a}=t;return r??o??a.cameraHeading}readCameraHeight(e,t){const{cameraheight:r,avghtag:o,layer:a}=t;return r??o??a.cameraHeight}readCamOffset(e,t){const{cameraoffset:r,camoffset:o}=t;return r?.split(";").map(Number)??o?.split(";").map(Number)??null}writeCameraOffset(e,t){e&&(t.cameraOffset=e.join(";"))}readCameraOrientation(e,t){const{cameraorientation:r,camori:o}=t;return r??o}readCameraPitch(e,t){const{camerapitch:r,campitch:o,layer:a}=t;return r??o??a.cameraPitch}readCameraRoll(e,t){const{cameraroll:r,camroll:o,layer:a}=t;return r??o??a.cameraRoll}readDepthImage(e,t){const{depthimage:r,depthimg:o,layer:a}=t,i=r??o??null,{depthImagePathPrefix:n,depthImagePathSuffix:s}=a??{};return u(i,n,s)}readElevationSource(e,t){const{elevationsource:r,layer:o}=t,{demPathSuffix:a,demPathPrefix:i}=o;if(r){const e=this._parseIfJSON(r);return y(e,i,a)}return o.effectiveElevationSource}readFarDistance(e,t){const{fardistance:r,fardist:o,layer:a}=t;return r??o??a.farDistance}get geometry(){const e=this._geometry.clone();if(!e)return null;const{cameraOffset:t}=this;if(t){const[r,o,a]=t;e.x+=r,e.y+=o,null!=e.z&&null!=a&&(e.z+=a)}return e}set geometry(e){this._geometry=e}writeGeometry(e,t){t.geometry=this._geometry.toJSON()}readHFOV(e,t){const{horizontalfieldofview:r,hfov:o,layer:a}=t;return r??o??a.horizontalFieldOfView}readImageURL(e,t){const{imagepath:r,layer:o}=t;r||j("imagePath",this);const{imagePathPrefix:a,imagePathSuffix:i}=o;if(r.startsWith(N)){return`${d(o.url)}${r.replace(N,o.virtualCacheDirectory+"/")}`}return u(r,a,i)}readImageRotation(e,t){const{imagerotation:r,imgrot:o,layer:a}=t;return r??o??a.imageRotation}get isHorizontal(){return"horizontal"===this.orientedImageryType}get isInspection(){return"inspection"===this.orientedImageryType}get isNadir(){return"nadir"===this.orientedImageryType}get isOblique(){return"oblique"===this.orientedImageryType}get isSpherical(){return this.orientedImageryType?.includes("360")??!1}get location(){const{cameraOrientation:e,cameraHeight:t,elevation:r}=this;if(e){const{type:t,x:r,y:o,z:a,horizontalWKID:i,verticalWKID:n}=e,s="number"==typeof i?{wkid:i}:{wkt:i};if(4===t){const{latitude:t,longitude:r,ellipsoidRadius:o,squaredEccentricity:a,properties:i}=e,{x:n,y:s,z:l}=i;return new p(h([n,s,l],[t,r,o,a]))}const c=new p({x:r,y:o,z:a,spatialReference:s}),m=n?l("point",{wkid:n},s):null;return m&&m(c),c}if("number"!=typeof t)throw b("cameraHeight");const o=this.geometry.clone(),i=(r??0)+t/f(o.spatialReference);if("360"===this.orientedImageryType&&o.hasZ){const e=i-o.z;return null!=r&&Math.abs(e)>.001&&(a.getLogger(this).warnOnce("The elevation value is different from the geometry's z value. The geometry's z value will be updated.",{elevation:r,geometryZ:o.z}),o.z=i),o}return o.z=o.hasZ?o.z:i,o}set matrix(e){if(e)return 9!==e.length?(a.getLogger(this).warnOnce("Ignoring rotation matrix because it doesn't have 9 values",{value:e}),void this._set("matrix",null)):void this._set("matrix",e)}readNearDistance(e,t){const{neardistance:r,neardist:o,layer:a}=t;return r??o??a.nearDistance}readOffsetFromStart(e,t){return t.offsetfromstart??null}readOrientationAccuracy(e,t){const{accuracy:r,orientationaccuracy:o}=t;return o?.split(";").map(Number)??r?.split(";").map(Number)??null}writeOrientationAccuracy(e,t){e&&(t.orientationAccuracy=e.join(";"))}readOIType(e,t){const{orientedimagerytype:r,oitype:o,camerapitch:a,campitch:i,layer:n}=t,s=g.read(r??o??n.orientedImageryType),p=a??i??n.cameraPitch;return"oblique"===s?p<10?"nadir":"oblique":s}set radial(e){if(e){if("string"==typeof e){const[t,r,o]=e.split(";").map(Number);return void this._set("radial",[t??0,r??0,o??0])}this._set("radial",e)}else this._set("radial",[0,0,0])}readSequenceOrder(e,t){const{layer:r}=t;return t[r.sequenceOrderField.toLowerCase()]}writeSequenceOrder(e,t){if(!e)return;const{sourceMap:r}=this;if(r){t[r.sequenceorder]=e}}set tangential(e){if(e){if("string"==typeof e){const[t,r]=e.split(";").map(Number);return void this._set("tangential",[t??0,r??0])}this._set("tangential",e)}else this._set("tangential",[0,0])}readVFOV(e,t){const{verticalfieldofview:r,vfov:o,layer:a}=t;return r??o??a.verticalFieldOfView}_parseIfJSON(e){let t=null;try{t=JSON.parse(e)}catch(r){a.getLogger(this).error("couldn't parse the given elevation source JSON",e,r)}return t}clone(){const e=super.clone();return e._geometry=this._geometry.clone(),e}};e([i()],F.prototype,"_geometry",void 0),e([i(S())],F.prototype,"a0",void 0),e([i(S())],F.prototype,"a1",void 0),e([i(S())],F.prototype,"a2",void 0),e([i({type:Date,json:{write:{enabled:!0,target:"acquisitionDate"},name:"acquisitiondate"}})],F.prototype,"acquisitionDate",void 0),e([i(S())],F.prototype,"b0",void 0),e([i(S())],F.prototype,"b1",void 0),e([i(S())],F.prototype,"b2",void 0),e([i({type:Number,json:{write:!0,read:{source:["cameraheading","camheading","layer.cameraHeading"]}}})],F.prototype,"cameraHeading",void 0),e([v("cameraHeading")],F.prototype,"readCameraHeading",null),e([i({type:Number,json:{write:!0}})],F.prototype,"cameraHeight",void 0),e([v("cameraHeight",["cameraheight","avghtag","layer.cameraHeight"])],F.prototype,"readCameraHeight",null),e([i()],F.prototype,"cameraOffset",void 0),e([v("cameraOffset",["cameraoffset","camoffset"])],F.prototype,"readCamOffset",null),e([w("cameraOffset")],F.prototype,"writeCameraOffset",null),e([i({json:{write:{writer:(e,t,r)=>{t[r]=e.toString()}}},type:c}),n(e=>e?m.getCameraOrientation(e):null)],F.prototype,"cameraOrientation",void 0),e([v("cameraOrientation",["cameraorientation","camori"])],F.prototype,"readCameraOrientation",null),e([i({type:Number,json:{write:!0}})],F.prototype,"cameraPitch",void 0),e([v("cameraPitch",["camerapitch","campitch","layer.cameraPitch"])],F.prototype,"readCameraPitch",null),e([i({type:Number,json:{write:!0}})],F.prototype,"cameraRoll",void 0),e([v("cameraRoll",["cameraroll","camroll","layer.cameraRoll"])],F.prototype,"readCameraRoll",null),e([i({json:{write:!0},type:String})],F.prototype,"depthImage",void 0),e([v("depthImage",["depthimage","depthimg"])],F.prototype,"readDepthImage",null),e([i({type:Number,json:{write:!0}})],F.prototype,"elevation",void 0),e([i({json:{write:!0},clonable:"reference"})],F.prototype,"elevationSource",void 0),e([v("elevationSource",["elevationsource","layer.effectiveElevationSource"])],F.prototype,"readElevationSource",null),e([i({json:{name:"exposurestationid",write:{target:"exposureStationId"}},type:String})],F.prototype,"exposureStationId",void 0),e([i({type:Number,json:{write:!0}})],F.prototype,"farDistance",void 0),e([v("farDistance",["fardistance","fardist","layer.farDistance"])],F.prototype,"readFarDistance",null),e([i(S("focallength"))],F.prototype,"focalLength",void 0),e([i({type:p,json:{name:"geometry"}})],F.prototype,"geometry",null),e([w("geometry")],F.prototype,"writeGeometry",null),e([i({type:Number,json:{write:!0}})],F.prototype,"horizontalFieldOfView",void 0),e([v("horizontalFieldOfView",["horizontalfieldofview","hfov","layer.horizontalFieldOfView"])],F.prototype,"readHFOV",null),e([i({json:{write:!0},type:String})],F.prototype,"imagePath",void 0),e([v("imagePath",["imagepath"])],F.prototype,"readImageURL",null),e([i({type:Number,json:{write:!0}})],F.prototype,"imageRotation",void 0),e([v("imageRotation",["imagerotation","imgrot","layer.imageRotation"])],F.prototype,"readImageRotation",null),e([i()],F.prototype,"isHorizontal",null),e([i()],F.prototype,"isInspection",null),e([i()],F.prototype,"isNadir",null),e([i()],F.prototype,"isOblique",null),e([i()],F.prototype,"isSpherical",null),e([i()],F.prototype,"location",null),e([i(I())],F.prototype,"matrix",null),e([i({json:{write:!0},type:String})],F.prototype,"name",void 0),e([i({type:Number,json:{write:!0}})],F.prototype,"nearDistance",void 0),e([v("nearDistance",["neardistance","neardist","layer.nearDistance"])],F.prototype,"readNearDistance",null),e([i({json:{write:!0,name:"objectid"},type:Number})],F.prototype,"objectId",void 0),e([i({type:Number,json:{write:!0}})],F.prototype,"offsetFromStart",void 0),e([v("offsetFromStart",["offsetfromstart"])],F.prototype,"readOffsetFromStart",null),e([i()],F.prototype,"orientationAccuracy",void 0),e([v("orientationAccuracy",["accuracy","orientationaccuracy"])],F.prototype,"readOrientationAccuracy",null),e([w("orientationAccuracy")],F.prototype,"writeOrientationAccuracy",null),e([O(g)],F.prototype,"orientedImageryType",void 0),e([v("orientedImageryType",["orientedimagerytype","oitype","layer.orientedImageryType"])],F.prototype,"readOIType",null),e([i({type:Number,json:{write:!0,read:{source:"principalx"}}})],F.prototype,"principalX",void 0),e([i({type:Number,json:{write:!0,read:{source:"principaly"}}})],F.prototype,"principalY",void 0),e([i(I([0,0,0]))],F.prototype,"radial",null),e([i({type:String})],F.prototype,"sequenceOrder",void 0),e([v("sequenceOrder",["sequenceorder","layer.sequenceOrderField"])],F.prototype,"readSequenceOrder",null),e([w("sequenceOrder")],F.prototype,"writeSequenceOrder",null),e([i({type:Object})],F.prototype,"sourceMap",void 0),e([i(I([0,0]))],F.prototype,"tangential",null),e([i({type:Number,json:{write:!0}})],F.prototype,"verticalFieldOfView",void 0),e([v("verticalFieldOfView",["verticalfieldofview","vfov","layer.verticalFieldOfView"])],F.prototype,"readVFOV",null),F=e([s("esri.layers.orientedImagery.core.ExposurePoint")],F);const q=F;export{q as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{throwIfAborted as e}from"../../../core/promiseUtils.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{zeros as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{transpose as n}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{a as o,i as a}from"../../../chunks/vec32.js";import i from"../../../geometry/Circle.js";import s from"../../../geometry/Mesh.js";import c from"../../../geometry/Multipoint.js";import f from"../../../geometry/Polygon.js";import{projectAsync as l}from"../../../geometry/projectionUtils.js";import m from"../../../geometry/SpatialReference.js";import{polygonCentroidPoint as u}from"../../../geometry/support/centroid.js";import{earth as p}from"../../../geometry/support/Ellipsoid.js";import h from"../../../geometry/support/MeshComponent.js";import y from"../../../geometry/support/MeshVertexAttributes.js";import{create as g,fromArray as x,intersectRay as d}from"../../../geometry/support/plane.js";import{isWebMercator as w}from"../../../geometry/support/spatialReferenceUtils.js";import{convertToSRUnits as M,getWebMercatorScalingFactor as R,createRotationMatrixFromHPR as j,transformMat3 as v,scaleAndAddWithFactor as P,scaleWithFactor as D,computeHFOVAndVFOV as b,projectiveTransform as A}from"../transformations/utils.js";const I=Math.PI/180;function z(e){const t=M(e,e.geometry.spatialReference);return e.isSpherical?S(t):V(t)}function V(e){const{horizontalFieldOfView:t,verticalFieldOfView:r,geometry:n,cameraHeading:o}=e,a=R(n.y,n.spatialReference);let i=e.cameraPitch,s=e.cameraRoll??0,c=150;t>150&&(i=90,s=0,c=5);const l=Math.ceil(t/c),m=F(l,o,t);let u=e.farDistance?e.farDistance*a:e.cameraHeight*a/Math.cos(i*I);e.cameraPitch+r/2>=90&&(u=(e.farDistance||20)*a);const p=new f({spatialReference:n?.spatialReference});p.imageID=e.objectId;let h=null;for(const f of m)h=H(f,i,e.cameraHeight,n,u,a,r,t,l,p,s,e.nearDistance);return h.imageID=e.objectId,{polygon:p,frustum:h}}function F(e,t,r){const n=[];if(e%2==0)for(let o=0;o<e/2;o++)n.push(t-r/e*(o+.5),t+r/e*(o+.5));else{n.push(t);for(let o=1;o<e/2;o++)n.push(t-r/e*o,t+r/e*o)}return n.sort(),n}function H(e,i,s,c,f,l,m,u,p,h,y=0,g=0){const x=n(t(),j([e,i,y??0])),d=U({cameraHeight:s,cameraPitch:i,farDistance:f,location:c,horizontalFieldOfView:u,nearDistance:g,verticalFieldOfView:m},x),w=v([0,0,-1],x),{x:M,y:R}=c,b=P([M,R,s],w,f,l),A=2*Math.tan(m*I/2)*f,z=2*Math.tan(u/p*I/2)*f,V=v([0,1,0],x),F=v([1,0,0],x),H=D(V,A/2,l),S=D(F,z/2,l),q=o(r(),H,S),C=a(r(),H,S),E=O([a(r(),b,q),a(r(),b,C),o(r(),b,q),o(r(),b,C)],s,c,l);return E.push(E[0]),h.addRing(E),d}function O(e,t,r,n){return e.map(e=>E(e,t,r,n))}function S(e){const{geometry:t,farDistance:r,objectId:n,nearDistance:o,cameraHeight:a}=e,c=R(t.y,t.spatialReference),f=new i({center:t.clone(),radius:r*c});if(f.imageID=n,o){const e=new i({center:t.clone(),radius:o*c});f.addRing(e.rings[0])}const l=t.clone();l.z=a-r*c;const m=s.createSphere(l,{size:2*r*c});return m.imageID=n,{polygon:f,frustum:m}}function q(e,t){return e.contains(t)}function C(e,t){return Math.sign(e)!==Math.sign(t)}function U(e,t,n){const{cameraHeight:i,cameraPitch:c,farDistance:f,location:l,horizontalFieldOfView:m,nearDistance:u,verticalFieldOfView:p}=e,h=L(l),g=c+p/2>=90==!1,x=2*Math.tan(p*I/2)*u,d=2*Math.tan(m*I/2)*u,w=2*Math.tan(p*I/2)*f,M=2*Math.tan(m*I/2)*f;let R,j;j=[0,0,-1],j=v(j,t),R=P([l.x,l.y,i],j,f,h),g&&(R[2]=0);const b=P([l.x,l.y,i],j,u,h);let A=[0,1,0];A=v(A,t);let z=[1,0,0];z=v(z,t);let V=[],F=[];u?(F=[{faces:[4,0,3,4,7,3]},{faces:[5,1,2,5,6,2]},{faces:[4,0,1,4,5,1]},{faces:[6,2,3,6,7,3]}],V=V.concat(a(r(),b,o(r(),D(A,x/2,h),D(z,d/2,h)))),V=V.concat(a(r(),b,a(r(),D(A,x/2,h),D(z,d/2,h)))),V=V.concat(o(r(),b,o(r(),D(A,x/2,h),D(z,d/2,h)))),V=V.concat(o(r(),b,a(r(),D(A,x/2,h),D(z,d/2,h))))):(V=[l.x,l.y,i],F=[{faces:[0,1,2,0,2,3,0,3,4,0,4,1]}]),V=V.concat(a(r(),R,o(r(),D(A,w/2,h),D(z,M/2,h)))),V=V.concat(a(r(),R,a(r(),D(A,w/2,h),D(z,M/2,h)))),V=V.concat(o(r(),R,o(r(),D(A,w/2,h),D(z,M/2,h)))),V=V.concat(o(r(),R,a(r(),D(A,w/2,h),D(z,M/2,h))));const H=new y({position:Float64Array.from(V)});return new s({vertexAttributes:H,components:F,spatialReference:l.spatialReference})}function E(e,t,n,a){{const i=Math.sqrt((e[2]-t)**2+(Math.sqrt((e[0]-n.x)**2+(e[1]-n.y)**2)/a)**2)*a,s=D(o(r(),[e[0],e[1],e[2]],[n.x,n.y,t]),1/i,1/a),c=t/(t-e[2]),f={x:(1-c)*n.x+c*e[0],y:(1-c)*n.y+c*e[1],z:(1-c)*t+c*e[2]},l=Math.sqrt((f.z-t)**2+(Math.sqrt((f.x-n.x)**2+(f.y-n.y)**2)/a)**2)*a,m=D(o(r(),[f.x,f.y,f.z],[n.x,n.y,t]),1/l,1/a);return C(s[0],m[0])&&C(s[1],m[1])&&C(s[2],m[2])||e[2]>=0?[e[0],e[1],0]:[f.x,f.y,f.z]}}function k(e){const{spatialReference:t,x:r,y:n}=e.geometry,{cameraHeading:o,cameraPitch:a,farDistance:i,nearDistance:s}=e,c=L(e.geometry),l=new f({spatialReference:t}),m=Math.abs(1.44*i*c);let u=Math.abs(1.44*s*c);(a<20||null==o)&&(u=m);const p=[];return p[0]={x:r+m*Math.sin((o-45)*I),y:n+m*Math.cos((o-45)*I)},p[1]={x:r+m*Math.sin((o+45)*I),y:n+m*Math.cos((o+45)*I)},p[2]={x:r+u*Math.sin((o+135)*I),y:n+u*Math.cos((o+135)*I)},p[3]={x:r+u*Math.sin((o+225)*I),y:n+u*Math.cos((o+225)*I)},l.addRing([[p[0].x,p[0].y,0],[p[1].x,p[1].y,0],[p[2].x,p[2].y,0],[p[3].x,p[3].y,0],[p[0].x,p[0].y,0]]),l}function L(e){return e&&w(e?.spatialReference)?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*e.y/p.radius))):1}function W(e,t){const n=1+t/100;if("esri.geometry.Circle"===e.declaredClass){const{radius:t,center:r}=e,o=new i({radius:t*n,center:r});return e.rings.length>1&&o.addRing(e.rings[1]),o}if("esri.geometry.Polygon"===e.declaredClass){const t=new f({spatialReference:e.spatialReference}),a=u(e);if(a){const i=[];for(let t=0;t<e.rings[0].length;t++){const s=Math.sqrt((a.x-e.rings[0][t][0])**2+(a.y-e.rings[0][t][1])**2),c=D(o(r(),[e.rings[0][t][0],e.rings[0][t][1],0],[a.x,a.y,0]),1/s,1),f=P([a.x,a.y,0],c,s*n,1);i.push({x:f[0],y:f[1]})}t.addRing([[i[0].x,i[0].y,0],[i[1].x,i[1].y,0],[i[2].x,i[2].y,0],[i[3].x,i[3].y,0],[i[0].x,i[0].y,0]])}return t}return e}async function B(e,t,r){const{cameraHeight:n,cameraLocation:o,cameraPitch:a,frustumVertices:i,horizontalFieldOfView:s,imageHeight:c,imageWidth:f,inSRS:l,outSRS:u,verticalFieldOfView:p,cameraRoll:h,options:y}=r,g=new m(l),x=new m(u),d=b(s,p,h??0),w=i.length>15;return a+d.vfov/2>=90?await Q(i,e,f,c,g,x,w,y):await G(i,e,t,o,n,w,g,x,y)}async function G(e,t,r,n,o,a,i,c,f){const l=J(e,t,r,n,o);if(!l)return;const{farPlane:m,nearPlane:u}=l,p=await T([...u?.vertexPositions??e.slice(0,3),...m.vertexPositions],i,c,f),h=_(p);return new s({vertexAttributes:new y({position:p}),components:$(a?Y(h,!0):Z(h,!0)),spatialReference:c})}function J(e,t,r,n,o){const a=X(e),i=X(e,"near");if(!a)return;const s=t.length;for(let c=0;c<s;c++){const e=Array.from(r[c]),t=[e[0]-n[0],e[1]-n[1],e[2]-(n[2]??o)];N(n,t,c,i),K(n,t,c,a)}return{farPlane:a,nearPlane:i}}function K(e,t,n,o){const{coefficients:a,vertexPositions:i}=o,s=r();d(a,{origin:e,direction:t},s)&&i.splice(3*n,3,...s)}function N(e,t,n,o){if(!o)return;const a=r();d(o.coefficients,{origin:e,direction:t},a)&&o.vertexPositions.splice(3*n,3,...a)}async function Q(e,t,r,n,o,a,i,c){let f,l=i?new Array:[e[0],e[1],e[2]],m=new Array;for(const s of t)i?(f=A([s[0],s[1],1],[[0,0,1],[r,0,1],[r,n,1],[0,n,1]],[[e[0],e[1],e[2]],[e[3],e[4],e[5]],[e[6],e[7],e[8]],[e[9],e[10],e[11]]]),l=l.concat(...f),f=A([s[0],s[1],1],[[0,0,1],[r,0,1],[r,n,1],[0,n,1]],[[e[12],e[13],e[14]],[e[15],e[16],e[17]],[e[18],e[19],e[20]],[e[21],e[22],e[23]]]),m=m.concat(...f)):(f=A([s[0],s[1],1],[[0,0,1],[r,0,1],[r,n,1],[0,n,1]],[[e[3],e[4],e[5]],[e[6],e[7],e[8]],[e[9],e[10],e[11]],[e[12],e[13],e[14]]]),l=l.concat(...f));l=l.concat(m);const u=await T(l,o,a,c),p=_(u);return new s({vertexAttributes:new y({position:u}),components:$(i?Y(p,!0):Z(p,!0)),spatialReference:a})}async function T(t,r,n,o){if(r.equals(n))return t;const a=t.reduce((e,t,r)=>{const n=Math.floor(r/3);return e[n]||(e[n]=new Array),e[n].push(t),e},new Array),{points:i}=await l(new c({points:a,spatialReference:r}),n,o);return e(o),i.flat()}function X(e,t="far"){const r=g();let n;switch(t){case"far":if(n=Array.from(15===e.length?e.slice(3):e.slice(12)),x(r,n,!1))return{coefficients:r,vertexPositions:n};break;case"near":if(n=Array.from(e.slice(0,12)),15===e.length||!x(r,n,!1))return;return{coefficients:r,vertexPositions:n}}}const Y=(e,t=!1)=>{if(t&&e-2<=4||e<=4||e%2!=0)throw new Error("Invalid number of vertices");const r=[],n=e/2,o=Math.round((t?e-2:e)/2);for(let a=0;a<o;a++){const o=a+n,i=t?o+1:o,s=i%e,c=(t?o:i+1)%e;r.push({faces:new Uint32Array([a,c,s,a,a+1,s])})}return r};function Z(e,t=!1){if(e<3||t&&e-1<3)throw new Error("Invalid number of vertices");const r=[],n=t?e-2:e-1;for(let o=0;o<n;o++)r.push({faces:new Uint32Array([0,o+1,o+2])});return r}const $=e=>e.map(e=>new h(e)),_=e=>e.length/3;export{q as checkIfPolygonContainsSelectedPoint,k as computePolygonForInspection,z as createCoveragePolygon,O as limitZToGround,T as projectVertices,W as resizePolygon,B as updateFrustum};
5
+ import{throwIfAborted as e}from"../../../core/promiseUtils.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{zeros as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{transpose as n}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{a as o,i as a}from"../../../chunks/vec32.js";import i from"../../../geometry/Circle.js";import s from"../../../geometry/Mesh.js";import c from"../../../geometry/Multipoint.js";import f from"../../../geometry/Polygon.js";import{projectAsync as l}from"../../../geometry/projectionUtils.js";import m from"../../../geometry/SpatialReference.js";import{polygonCentroidPoint as u}from"../../../geometry/support/centroid.js";import{earth as p}from"../../../geometry/support/Ellipsoid.js";import h from"../../../geometry/support/MeshComponent.js";import y from"../../../geometry/support/MeshVertexAttributes.js";import{create as g,fromArray as x,intersectRay as d}from"../../../geometry/support/plane.js";import{isWebMercator as w}from"../../../geometry/support/spatialReferenceUtils.js";import{computeHFOVAndVFOV as M,convertToSRUnits as R,scaleWithFactor as j,scaleAndAddWithFactor as v,projectiveTransform as P,getWebMercatorScalingFactor as D,createRotationMatrixFromHPR as b,transformMat3 as A}from"../transformations/utils.js";const I=Math.PI/180;function z(e){const t=R(e,e.geometry.spatialReference);return e.isSpherical?S(t):V(t)}function V(e){const{horizontalFieldOfView:t,verticalFieldOfView:r,geometry:n,cameraHeading:o}=e,a=D(n.y,n.spatialReference);let i=e.cameraPitch,s=e.cameraRoll??0,c=150;t>150&&(i=90,s=0,c=5);const l=Math.ceil(t/c),m=F(l,o,t);let u=e.farDistance?e.farDistance*a:e.cameraHeight*a/Math.cos(i*I);e.cameraPitch+r/2>=90&&(u=(e.farDistance||20)*a);const p=new f({spatialReference:n?.spatialReference});p.imageID=e.objectId;let h=null;for(const f of m)h=H(f,i,e.cameraHeight,n,u,a,r,t,l,p,s,e.nearDistance);return h.imageID=e.objectId,{polygon:p,frustum:h}}function F(e,t,r){const n=[];if(e%2==0)for(let o=0;o<e/2;o++)n.push(t-r/e*(o+.5),t+r/e*(o+.5));else{n.push(t);for(let o=1;o<e/2;o++)n.push(t-r/e*o,t+r/e*o)}return n.sort(),n}function H(e,i,s,c,f,l,m,u,p,h,y=0,g=0){const x=n(t(),b([e,i,y??0])),d=U({cameraHeight:s,cameraPitch:i,farDistance:f,location:c,horizontalFieldOfView:u,nearDistance:g,verticalFieldOfView:m},x),w=A([0,0,-1],x),{x:M,y:R}=c,P=v([M,R,s],w,f,l),D=2*Math.tan(m*I/2)*f,z=2*Math.tan(u/p*I/2)*f,V=A([0,1,0],x),F=A([1,0,0],x),H=j(V,D/2,l),S=j(F,z/2,l),q=o(r(),H,S),C=a(r(),H,S),E=O([a(r(),P,q),a(r(),P,C),o(r(),P,q),o(r(),P,C)],s,c,l);return E.push(E[0]),h.addRing(E),d}function O(e,t,r,n){return e.map(e=>E(e,t,r,n))}function S(e){const{geometry:t,farDistance:r,objectId:n,nearDistance:o,cameraHeight:a}=e,c=D(t.y,t.spatialReference),f=new i({center:t.clone(),radius:r*c});if(f.imageID=n,o){const e=new i({center:t.clone(),radius:o*c});f.addRing(e.rings[0])}const l=t.clone();l.z=a-r*c;const m=s.createSphere(l,{size:2*r*c});return m.imageID=n,{polygon:f,frustum:m}}function q(e,t){return e.contains(t)}function C(e,t){return Math.sign(e)!==Math.sign(t)}function U(e,t,n){const{cameraHeight:i,cameraPitch:c,farDistance:f,location:l,horizontalFieldOfView:m,nearDistance:u,verticalFieldOfView:p}=e,h=L(l),g=c+p/2>=90==!1,x=2*Math.tan(p*I/2)*u,d=2*Math.tan(m*I/2)*u,w=2*Math.tan(p*I/2)*f,M=2*Math.tan(m*I/2)*f;let R,P;P=[0,0,-1],P=A(P,t),R=v([l.x,l.y,i],P,f,h),g&&(R[2]=0);const D=v([l.x,l.y,i],P,u,h);let b=[0,1,0];b=A(b,t);let z=[1,0,0];z=A(z,t);let V=[],F=[];u?(F=[{faces:[4,0,3,4,7,3]},{faces:[5,1,2,5,6,2]},{faces:[4,0,1,4,5,1]},{faces:[6,2,3,6,7,3]}],V=V.concat(a(r(),D,o(r(),j(b,x/2,h),j(z,d/2,h)))),V=V.concat(a(r(),D,a(r(),j(b,x/2,h),j(z,d/2,h)))),V=V.concat(o(r(),D,o(r(),j(b,x/2,h),j(z,d/2,h)))),V=V.concat(o(r(),D,a(r(),j(b,x/2,h),j(z,d/2,h))))):(V=[l.x,l.y,i],F=[{faces:[0,1,2,0,2,3,0,3,4,0,4,1]}]),V=V.concat(a(r(),R,o(r(),j(b,w/2,h),j(z,M/2,h)))),V=V.concat(a(r(),R,a(r(),j(b,w/2,h),j(z,M/2,h)))),V=V.concat(o(r(),R,o(r(),j(b,w/2,h),j(z,M/2,h)))),V=V.concat(o(r(),R,a(r(),j(b,w/2,h),j(z,M/2,h))));const H=new y({position:Float64Array.from(V)});return new s({vertexAttributes:H,components:F,spatialReference:l.spatialReference})}function E(e,t,n,a){{const i=Math.sqrt((e[2]-t)**2+(Math.sqrt((e[0]-n.x)**2+(e[1]-n.y)**2)/a)**2)*a,s=j(o(r(),[e[0],e[1],e[2]],[n.x,n.y,t]),1/i,1/a),c=t/(t-e[2]),f={x:(1-c)*n.x+c*e[0],y:(1-c)*n.y+c*e[1],z:(1-c)*t+c*e[2]},l=Math.sqrt((f.z-t)**2+(Math.sqrt((f.x-n.x)**2+(f.y-n.y)**2)/a)**2)*a,m=j(o(r(),[f.x,f.y,f.z],[n.x,n.y,t]),1/l,1/a);return C(s[0],m[0])&&C(s[1],m[1])&&C(s[2],m[2])||e[2]>=0?[e[0],e[1],0]:[f.x,f.y,f.z]}}function k(e){const{spatialReference:t,x:r,y:n}=e.geometry,{cameraHeading:o,cameraPitch:a,farDistance:i,nearDistance:s}=e,c=L(e.geometry),l=new f({spatialReference:t}),m=Math.abs(1.44*i*c);let u=Math.abs(1.44*s*c);(a<20||null==o)&&(u=m);const p=[];return p[0]={x:r+m*Math.sin((o-45)*I),y:n+m*Math.cos((o-45)*I)},p[1]={x:r+m*Math.sin((o+45)*I),y:n+m*Math.cos((o+45)*I)},p[2]={x:r+u*Math.sin((o+135)*I),y:n+u*Math.cos((o+135)*I)},p[3]={x:r+u*Math.sin((o+225)*I),y:n+u*Math.cos((o+225)*I)},l.addRing([[p[0].x,p[0].y,0],[p[1].x,p[1].y,0],[p[2].x,p[2].y,0],[p[3].x,p[3].y,0],[p[0].x,p[0].y,0]]),l}function L(e){return e&&w(e?.spatialReference)?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*e.y/p.radius))):1}function W(e,t){const n=1+t/100;if("esri.geometry.Circle"===e.declaredClass){const{radius:t,center:r}=e,o=new i({radius:t*n,center:r});return e.rings.length>1&&o.addRing(e.rings[1]),o}if("esri.geometry.Polygon"===e.declaredClass){const t=new f({spatialReference:e.spatialReference}),a=u(e);if(a){const i=[];for(let t=0;t<e.rings[0].length;t++){const s=Math.sqrt((a.x-e.rings[0][t][0])**2+(a.y-e.rings[0][t][1])**2),c=j(o(r(),[e.rings[0][t][0],e.rings[0][t][1],0],[a.x,a.y,0]),1/s,1),f=v([a.x,a.y,0],c,s*n,1);i.push({x:f[0],y:f[1]})}t.addRing([[i[0].x,i[0].y,0],[i[1].x,i[1].y,0],[i[2].x,i[2].y,0],[i[3].x,i[3].y,0],[i[0].x,i[0].y,0]])}return t}return e}async function B(e,t,r){const{cameraHeight:n,cameraLocation:o,cameraPitch:a,frustumVertices:i,horizontalFieldOfView:s,imageHeight:c,imageWidth:f,inSRS:l,outSRS:u,verticalFieldOfView:p,cameraRoll:h,options:y}=r,g=new m(l),x=new m(u),d=M(s,p,h??0),w=i.length>15;return a+d.vfov/2>=90?await Q(i,e,f,c,g,x,w,y):await G(i,e,t,o,n,w,g,x,y)}async function G(e,t,r,n,o,a,i,c,f){const l=J(e,t,r,n,o);if(!l)return;const{farPlane:m,nearPlane:u}=l,p=await T([...u?.vertexPositions??e.slice(0,3),...m.vertexPositions],i,c,f),h=_(p);return new s({vertexAttributes:new y({position:p}),components:$(a?Y(h,!0):Z(h,!0)),spatialReference:c})}function J(e,t,r,n,o){const a=X(e),i=X(e,"near");if(!a)return;const s=t.length;for(let c=0;c<s;c++){const e=Array.from(r[c]),t=[e[0]-n[0],e[1]-n[1],e[2]-(n[2]??o)];N(n,t,c,i),K(n,t,c,a)}return{farPlane:a,nearPlane:i}}function K(e,t,n,o){const{coefficients:a,vertexPositions:i}=o,s=r();d(a,{origin:e,direction:t},s)&&i.splice(3*n,3,...s)}function N(e,t,n,o){if(!o)return;const a=r();d(o.coefficients,{origin:e,direction:t},a)&&o.vertexPositions.splice(3*n,3,...a)}async function Q(e,t,r,n,o,a,i,c){let f,l=i?new Array:[e[0],e[1],e[2]],m=new Array;for(const s of t)i?(f=P([s[0],s[1],1],[[0,0,1],[r,0,1],[r,n,1],[0,n,1]],[[e[0],e[1],e[2]],[e[3],e[4],e[5]],[e[6],e[7],e[8]],[e[9],e[10],e[11]]]),l=l.concat(...f),f=P([s[0],s[1],1],[[0,0,1],[r,0,1],[r,n,1],[0,n,1]],[[e[12],e[13],e[14]],[e[15],e[16],e[17]],[e[18],e[19],e[20]],[e[21],e[22],e[23]]]),m=m.concat(...f)):(f=P([s[0],s[1],1],[[0,0,1],[r,0,1],[r,n,1],[0,n,1]],[[e[3],e[4],e[5]],[e[6],e[7],e[8]],[e[9],e[10],e[11]],[e[12],e[13],e[14]]]),l=l.concat(...f));l=l.concat(m);const u=await T(l,o,a,c),p=_(u);return new s({vertexAttributes:new y({position:u}),components:$(i?Y(p,!0):Z(p,!0)),spatialReference:a})}async function T(t,r,n,o){if(r.equals(n))return t;const a=t.reduce((e,t,r)=>{const n=Math.floor(r/3);return e[n]||(e[n]=new Array),e[n].push(t),e},new Array),{points:i}=await l(new c({points:a,spatialReference:r}),n,o);return e(o),i.flat()}function X(e,t="far"){const r=g();let n;switch(t){case"far":if(n=Array.from(15===e.length?e.slice(3):e.slice(12)),x(r,n,!1))return{coefficients:r,vertexPositions:n};break;case"near":if(n=Array.from(e.slice(0,12)),15===e.length||!x(r,n,!1))return;return{coefficients:r,vertexPositions:n}}}const Y=(e,t=!1)=>{if(t&&e-2<=4||e<=4||e%2!=0)throw new Error("Invalid number of vertices");const r=[],n=e/2,o=Math.round((t?e-2:e)/2);for(let a=0;a<o;a++){const o=a+n,i=t?o+1:o,s=i%e,c=(t?o:i+1)%e;r.push({faces:new Uint32Array([a,c,s,a,a+1,s])})}return r};function Z(e,t=!1){if(e<3||t&&e-1<3)throw new Error("Invalid number of vertices");const r=[],n=t?e-2:e-1;for(let o=0;o<n;o++)r.push({faces:new Uint32Array([0,o+1,o+2])});return r}const $=e=>e.map(e=>new h(e)),_=e=>e.length/3;export{q as checkIfPolygonContainsSelectedPoint,k as computePolygonForInspection,z as createCoveragePolygon,O as limitZToGround,T as projectVertices,W as resizePolygon,B as updateFrustum};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../core/Error.js";import{rad2deg as n,deg2rad as a}from"../../../core/mathUtils.js";import{create as e}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as i,fromValues as o}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromArray as r}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{zeros as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{multiply as s,transpose as l}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{invertOrIdentity as f,mul as u}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{a as m,i as h}from"../../../chunks/vec32.js";import{isSerializable as p}from"../../../core/support/jsonUtils.js";import g from"../../../geometry/Point.js";import{projectAsync as v}from"../../../geometry/projectionUtils.js";import{earth as M}from"../../../geometry/support/Ellipsoid.js";import{isWebMercator as d}from"../../../geometry/support/spatialReferenceUtils.js";import{a as x}from"../../../chunks/vec3.js";import{isConstantElevation as w,ConstantElevation as y,isElevationSource as b}from"../core/ElevationSourceDefinitions.js";import{getMetersPerUnitOfSR as j}from"../core/utils.js";import{getElevationSampler as O}from"./updateElevationUtils.js";import{isNumber as z}from"../../../support/guards.js";import{defaultImageSphereSize as F}from"../../../widgets/PanoramicViewer/constants.js";function E(t,n,a){const[e,o,r,c]=n,[s,l,m,h]=a;P(e,o,r,c);const p=P(s,l,m,h),g=R(e,o,r,c),v=R(s,l,m,h),M=f(i(),g),d=u(i(),M,v),[x,w,y,b]=V(t,d);return[x/b,w/b,p?0:y/b]}function P(t,n,a,e){return 0===t[2]&&0===n[2]&&0===a[2]&&0===e[2]&&(t[2]=n[2]=a[2]=e[2]=1,!0)}function S(t){return 0===t?1:t}function V(t,n){const[a,e,i]=t,o=[0,0,0,0];return o[0]=a*n[0]+e*n[1]+i*n[2]+n[3],o[1]=a*n[4]+e*n[5]+i*n[6]+n[7],o[2]=a*n[8]+e*n[9]+i*n[10]+n[11],o[3]=S(a*n[12]+e*n[13]+i*n[14]+n[15]),o}function R(t,n,a,e){const c=N(r([...e,1]),f(new Array(16),o(t[0],n[0],a[0],0,t[1],n[1],a[1],0,t[2],n[2],a[2],0,1,1,1,1))),s=c[0],l=c[1],u=c[2],m=i();return m[0]=s*t[0],m[1]=l*n[0],m[2]=u*a[0],m[3]=0,m[4]=s*t[1],m[5]=l*n[1],m[6]=u*a[1],m[7]=0,m[8]=s*t[2],m[9]=l*n[2],m[10]=u*a[2],m[11]=0,m[12]=s,m[13]=l,m[14]=u,m[15]=1,m}function D(t,n,a,e,i=c()){return i[0]=t[0]+n[0]*a,i[1]=t[1]+n[1]*a,i[2]=t[2]+n[2]*(a/e),i}function H(t,n,a){const e=c();return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*(n/a),e}function L(t,n){const[a,e,i]=t,o=c();return o[0]=a*n[0]+e*n[3]+i*n[6],o[1]=a*n[1]+e*n[4]+i*n[7],o[2]=a*n[2]+e*n[5]+i*n[8],o}function N(t,n){const[a,e,i,o]=t,r=new Array(4);return r[0]=a*n[0]+e*n[1]+i*n[2]+o*n[3],r[1]=a*n[4]+e*n[5]+i*n[6]+o*n[7],r[2]=a*n[8]+e*n[9]+i*n[10]+o*n[11],r[3]=a*n[12]+e*n[13]+i*n[14]+o*n[15],r}function k(n,i,o,r=!0){if(!Number.isFinite(n))throw new t("InvalidRotationAngle","Please specify a valid angle for rotation");const c=o*(r?a(n):n),s=Math.cos(c),l=Math.sin(c),f=e();switch(i){case 0:f[4]=s,f[5]=-l,f[7]=l,f[8]=s;break;case 1:f[0]=s,f[2]=l,f[6]=-l,f[8]=s;break;case 2:f[0]=s,f[1]=-l,f[3]=l,f[4]=s;break;default:throw new t("InvalidRotationAxis","Please specify either 0, 1 or 2 for X, Y or Z axis respectively")}return f}const A={HPR:[[2,-1],[0,1],[2,-1]],OPK:[[0,1],[1,1],[2,1]]};function I(n,a,i=!0){if(3!==n?.length||3!==a?.length)throw new t("InvalidRotationAngles","Please specify three angles with config for rotation");const o=e();for(let t=0;t<3;t++){const[e,r]=a[t],c=k(n[t],e,r,i);s(o,c,o)}return o}function q(t,n=!0){return I(t,A.OPK,n)}function U(t,n=!0){return I(t,A.HPR,n)}function C(t,n,e){const i=Math.sin(a(e)),o=Math.cos(a(e)),r=[[t,0],[t,n],[0,n]];r.forEach((t,n)=>{r[n]=[o*t[0]-i*t[1],i*t[0]+o*t[1]]});const c={xmin:Math.min(0,r[0][0],r[1][0],r[2][0]),xmax:Math.max(0,r[0][0],r[1][0],r[2][0]),ymin:Math.min(0,r[0][1],r[1][1],r[2][1]),ymax:Math.max(0,r[0][1],r[1][1],r[2][1])};return{hfov:Math.abs(c.xmax-c.xmin),vfov:Math.abs(c.ymax-c.ymin)}}function K(t,e){const i=Number(t[0]),o=Number(t[1]),r=Number(t[2]),[c,s,l,f]=e,u=a(c),m=a(s),h=l/Math.sqrt(1-f*Math.sin(u)**2),p=i/h,g=o/h,v=r/h,M=Math.cos(u)-Math.sin(u)*g+Math.cos(u)*v,d=Math.sin(u)+Math.cos(u)*g+Math.sin(u)*v,x=Math.sqrt(M**2+p**2),w=f*h*Math.sin(u),y=(t,n=5)=>{if(0===n)return t;const a=y(t,n-1);return Math.atan(d/x-(w-f*(l/Math.sqrt(1-f*Math.sin(a)**2))*Math.sin(a))/(h*x))},b=y(u),j=Math.atan(i/(h*M))+m,O=n(b);return[n(j),O,i/(Math.cos(b)*Math.sin(j-m))-l/Math.sqrt(1-f*Math.sin(b)**2)]}function T(t,n,a){const e=360/n,i=180/a;return{heading:(t.x-n/2)*e,pitch:90-(t.y-a/2)*i}}function W(t,n,a,e=F/2){const{heading:i,pitch:o}=Y(t,e);return X(i,o,n,a)}function X(t,n,a,e){const i=t%360;return{x:a/2+(i<-180?i+360:i>180?i-360:i)/(360/a),y:e-n/(180/e),heading:t,pitch:n}}function Y(t,a){const e=n(Math.acos(-t.z/a));return{heading:n(Math.atan2(t.x,t.y)),pitch:e}}function Z(t,n,e=F/2){return[e*(Math.sin(a(t))*Math.sin(a(n))),e*(Math.cos(a(t))*Math.sin(a(n))),e*Math.cos(a(180-n))]}function G(t,n,a,e=F/2){const{heading:i,pitch:o}=T(t,n,a);return Z(i,o,e)}async function J(t,a,e){const i=await v(a,t.spatialReference,e);let o=n(Math.atan2(i.y-t.y,i.x-t.x));return o=o>=0&&o<=90?90-o:o>90&&o<=180?360-o+90:90+Math.abs(o),o}function $(t,n,a){const e=Math.cos(a),i=Math.sin(a),o=[1,0,0,1,0,0],r=o[0]*e+o[2]*i,c=o[1]*e+o[3]*i,s=-o[0]*i+o[2]*e,l=-o[1]*i+o[3]*e;o[0]=r,o[1]=c,o[2]=s,o[3]=l;return[t*o[0]+n*o[2]+o[4],t*o[1]+n*o[3]+o[5]]}const B=t=>t.toArray(),Q=(...t)=>t.some(t=>t);function _(t,n){if(Q(0===t.length,t.some(({x:t,y:n})=>Q(null==t,null==n)),!n.hasZ))throw new Error("Input pixels must have x, y and camera location must have z value")}function tt(t,n){if(t.some(t=>null==t.z)||null==n.z)throw new Error("Input points and camera location must have z value")}function nt(t){if(9!==t?.length)throw new Error("Rotation matrix is not provided or is not a valid 3x3 matrix")}function at(t,n){return d(n)?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*t/M.radius))):1}const et=t=>n=>new g(n,t),it=t=>null!=t&&"queryExtent"in t;function ot(t,n,a,e){return[[-n,-n],[+n,-n],[+n,+n],[-n,+n]].map(([n,i])=>E(x(c(),a,[n,i,0]),e,t))}function rt({a0:t,a1:n,a2:a,b0:e,b1:i,b2:o},r,c,s){const l=[t??r/2-.5,n,a??0,e??c/2-.5,i??0,o].map(ct);return null!=s&&st(l)?{affines:l,focalLength:s}:{affines:[r/2-.5,1,0,c/2-.5,0,-1]}}function ct(t,n){if(null==t)return null;const a=parseFloat(`${t}`);return isNaN(a)?null:a}function st(t){return null!=t[1]&&null!=t[5]}function lt(t,n,a){const{cameraHeight:e,cameraPitch:i,cameraRoll:o,elevation:r,farDistance:c,horizontalFieldOfView:s,location:l,verticalFieldOfView:f}=jt(t,t.location.spatialReference),u=r??(l.z??0)-e;return{...mt(t,n,a),averageElevation:u,cameraPitch:i,cameraRoll:o??0,farDistance:c,horizontalFieldOfView:s,verticalFieldOfView:f}}function ft(t,n,a,e){return wt(e)?q([e.omega,e.phi,e.kappa]):yt(e)?U([e.heading,e.pitch,e.roll]):U([t,n,a??0])}function ut(t,n,a){const{cameraHeading:e,cameraHeight:i,farDistance:o,horizontalFieldOfView:r,location:c,verticalFieldOfView:s}=jt(t,t.location.spatialReference);return{averageElevation:(c.z??0)-i,cameraLocation:c,cameraHeading:e,farDistance:o,horizontalFieldOfView:r,imageHeight:a,imageWidth:n,verticalFieldOfView:s}}function mt(t,n,a){const{a0:e,a1:i,a2:o,b0:r,b1:c,b2:s,cameraHeading:l,cameraOrientation:f,cameraPitch:u,cameraRoll:m,focalLength:h,horizontalFieldOfView:p,location:g,matrix:v,principalX:M,principalY:d,radial:x,tangential:w,verticalFieldOfView:y}=t,{affines:b,focalLength:j}=rt({a0:e,a1:i,a2:o,b0:r,b1:c,b2:s},n,a,h),O=v??ft(l,u,m,f),z=null!=M&&null!=d?[M,d]:void 0;return{affineTransformations:f?.affineTransformations??b,cameraLocation:g.clone(),focalLength:f?.focalLength??j,horizontalFieldOfView:p,imageHeight:a,imageWidth:n,principalOffsetPoint:f?.principalOffsetPoint??z,radialDistortionCoefficients:f?.radialDistortionCoefficients??x,rotationMatrix:O,tangentialDistortionCoefficients:f?.tangentialDistortionCoefficients??w,verticalFieldOfView:y}}const ht=t=>null!=t&&"elevationSample"in t&&null!=t.elevationSample,pt=t=>b(t?.elevationSource)&&null!=t?.extent,gt=t=>w(t?.elevationSource),vt=async(t,n,a,e,i)=>{const o=j(t),r=n-a/o;return gt(e)?(e.elevationSource=new y({constantElevation:e.elevationSource.constantElevation/o}),e):ht(e)?e:pt(e)?{elevationSample:await O({...p(e.elevationSource)?e.elevationSource.toJSON():e.elevationSource,extent:e.extent},i),elevationSource:new y({constantElevation:r})}:{averageGroundElevation:r,spatialReference:t}},Mt=t=>z(t?.heading)&&z(t?.pitch),dt=(t,n)=>[[-t,-n],[t,-n],[t,n],[-t,n]];function xt(t){const{cameraLocation:n,farDistance:i,horizontalFieldOfView:o,rotationMatrix:r,scalingFactor:s,verticalFieldOfView:f}=t,u=e();l(u,r);const p=2*Math.tan(a(f)/2)*i*s,g=2*Math.tan(a(o)/2)*i*s,v=L([0,0,-1],u),M=D([n.x,n.y,n.z],v,t.farDistance*s,s),d=L([0,1,0],u),x=L([1,0,0],u),w=H(d,p/2,s),y=H(x,g/2,s),b=m(c(),w,y),j=h(c(),w,y);return[h(c(),M,b),h(c(),M,j),m(c(),M,b),m(c(),M,j)]}const wt=t=>2===t?.type,yt=t=>1===t?.type;function bt(t,n,a){if("panoramic"===t){const[t,e]=a;return W({x:n.x,y:n.y,z:n.z},t,e)}return{x:n.x+.5,y:.5-n.y}}function jt(t,n,a=!0){const e=j(n),i=a?t.clone():t;return i.cameraHeight/=e,i.farDistance/=e,i.nearDistance/=e,w(i.elevationSource)&&(i.elevationSource.constantElevation/=e),i}export{xt as computeFarplaneVertices,C as computeHFOVAndVFOV,ot as computeNewReferenceCoordinates,Z as convertHeadingPitchToSphereVertex,X as convertOrientationToPixelLocation,G as convertPixelLocationToSphereVertex,T as convertPixelToHeadingPitch,Y as convertSphereVertexToOrientation,W as convertSphereVertexToPixelLocation,jt as convertToSRUnits,I as createRotationMatrix,U as createRotationMatrixFromHPR,q as createRotationMatrixFromOPK,rt as getAffinesAndFocalLength,ut as getImageToWorldPanoramicProperties,lt as getImageToWorldProperties,J as getInitialAngle,vt as getUpdateElevationProps,at as getWebMercatorScalingFactor,mt as getWorldToImageProperties,Mt as hasAngles,yt as hasHeadingPitchRoll,wt as hasOmegaPhiKappa,it as isElevationSampler,ht as isUpdateElevationWithElevationSampler,pt as isUpdateElevationWithElevationSource,gt as isUpdateUsingConstantElevation,st as isValidAffines,R as linearEquationSolve,K as ltpToGeographic,Q as or,B as pointToArray,E as projectiveTransform,dt as reducerFn,$ as rotatePixel,D as scaleAndAddWithFactor,H as scaleWithFactor,bt as transformGraphicCoordinatesToPixel,L as transformMat3,N as transformMat4,_ as validatePixelsToTransform,tt as validatePointsToTransform,nt as validateRotationMatrix,et as vecToPoint};
5
+ import t from"../../../core/Error.js";import{rad2deg as n,deg2rad as a}from"../../../core/mathUtils.js";import{create as e}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as i,fromValues as o}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromArray as r}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{zeros as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{transpose as s,multiply as l}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{invertOrIdentity as f,mul as u}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{a as m,i as h}from"../../../chunks/vec32.js";import{isSerializable as p}from"../../../core/support/jsonUtils.js";import g from"../../../geometry/Point.js";import{projectAsync as v}from"../../../geometry/projectionUtils.js";import{earth as M}from"../../../geometry/support/Ellipsoid.js";import{isWebMercator as d}from"../../../geometry/support/spatialReferenceUtils.js";import{a as x}from"../../../chunks/vec3.js";import{isConstantElevation as w,ConstantElevation as y,isElevationSource as b}from"../core/ElevationSourceDefinitions.js";import{getMetersPerUnitOfSR as j}from"../core/utils.js";import{getElevationSampler as O}from"./updateElevationUtils.js";import{isNumber as z}from"../../../support/guards.js";import{defaultImageSphereSize as F}from"../../../widgets/PanoramicViewer/constants.js";function E(t,n,a){const[e,o,r,c]=n,[s,l,m,h]=a;P(e,o,r,c);const p=P(s,l,m,h),g=R(e,o,r,c),v=R(s,l,m,h),M=f(i(),g),d=u(i(),M,v),[x,w,y,b]=V(t,d);return[x/b,w/b,p?0:y/b]}function P(t,n,a,e){return 0===t[2]&&0===n[2]&&0===a[2]&&0===e[2]&&(t[2]=n[2]=a[2]=e[2]=1,!0)}function S(t){return 0===t?1:t}function V(t,n){const[a,e,i]=t,o=[0,0,0,0];return o[0]=a*n[0]+e*n[1]+i*n[2]+n[3],o[1]=a*n[4]+e*n[5]+i*n[6]+n[7],o[2]=a*n[8]+e*n[9]+i*n[10]+n[11],o[3]=S(a*n[12]+e*n[13]+i*n[14]+n[15]),o}function R(t,n,a,e){const c=N(r([...e,1]),f(new Array(16),o(t[0],n[0],a[0],0,t[1],n[1],a[1],0,t[2],n[2],a[2],0,1,1,1,1))),s=c[0],l=c[1],u=c[2],m=i();return m[0]=s*t[0],m[1]=l*n[0],m[2]=u*a[0],m[3]=0,m[4]=s*t[1],m[5]=l*n[1],m[6]=u*a[1],m[7]=0,m[8]=s*t[2],m[9]=l*n[2],m[10]=u*a[2],m[11]=0,m[12]=s,m[13]=l,m[14]=u,m[15]=1,m}function D(t,n,a,e,i=c()){return i[0]=t[0]+n[0]*a,i[1]=t[1]+n[1]*a,i[2]=t[2]+n[2]*(a/e),i}function H(t,n,a){const e=c();return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*(n/a),e}function L(t,n){const[a,e,i]=t,o=c();return o[0]=a*n[0]+e*n[3]+i*n[6],o[1]=a*n[1]+e*n[4]+i*n[7],o[2]=a*n[2]+e*n[5]+i*n[8],o}function N(t,n){const[a,e,i,o]=t,r=new Array(4);return r[0]=a*n[0]+e*n[1]+i*n[2]+o*n[3],r[1]=a*n[4]+e*n[5]+i*n[6]+o*n[7],r[2]=a*n[8]+e*n[9]+i*n[10]+o*n[11],r[3]=a*n[12]+e*n[13]+i*n[14]+o*n[15],r}function k(n,i,o,r=!0){if(!Number.isFinite(n))throw new t("InvalidRotationAngle","Please specify a valid angle for rotation");const c=o*(r?a(n):n),s=Math.cos(c),l=Math.sin(c),f=e();switch(i){case 0:f[4]=s,f[5]=-l,f[7]=l,f[8]=s;break;case 1:f[0]=s,f[2]=l,f[6]=-l,f[8]=s;break;case 2:f[0]=s,f[1]=-l,f[3]=l,f[4]=s;break;default:throw new t("InvalidRotationAxis","Please specify either 0, 1 or 2 for X, Y or Z axis respectively")}return f}const A={HPR:[[2,-1],[0,1],[2,-1]],OPK:[[0,1],[1,1],[2,1]]};function I(n,a,i=!0){if(3!==n?.length||3!==a?.length)throw new t("InvalidRotationAngles","Please specify three angles with config for rotation");const o=e();for(let t=0;t<3;t++){const[e,r]=a[t],c=k(n[t],e,r,i);l(o,c,o)}return o}function q(t,n=!0){return I(t,A.OPK,n)}function U(t,n=!0){return I(t,A.HPR,n)}function C(t,n,e){const i=Math.sin(a(e)),o=Math.cos(a(e)),r=[[t,0],[t,n],[0,n]];r.forEach((t,n)=>{r[n]=[o*t[0]-i*t[1],i*t[0]+o*t[1]]});const c={xmin:Math.min(0,r[0][0],r[1][0],r[2][0]),xmax:Math.max(0,r[0][0],r[1][0],r[2][0]),ymin:Math.min(0,r[0][1],r[1][1],r[2][1]),ymax:Math.max(0,r[0][1],r[1][1],r[2][1])};return{hfov:Math.abs(c.xmax-c.xmin),vfov:Math.abs(c.ymax-c.ymin)}}function K(t,e){const i=Number(t[0]),o=Number(t[1]),r=Number(t[2]),[c,s,l,f]=e,u=a(c),m=a(s),h=l/Math.sqrt(1-f*Math.sin(u)**2),p=i/h,g=o/h,v=r/h,M=Math.cos(u)-Math.sin(u)*g+Math.cos(u)*v,d=Math.sin(u)+Math.cos(u)*g+Math.sin(u)*v,x=Math.sqrt(M**2+p**2),w=f*h*Math.sin(u),y=(t,n=5)=>{if(0===n)return t;const a=y(t,n-1);return Math.atan(d/x-(w-f*(l/Math.sqrt(1-f*Math.sin(a)**2))*Math.sin(a))/(h*x))},b=y(u),j=Math.atan(i/(h*M))+m,O=n(b);return[n(j),O,i/(Math.cos(b)*Math.sin(j-m))-l/Math.sqrt(1-f*Math.sin(b)**2)]}function T(t,n,a){const e=360/n,i=180/a;return{heading:(t.x-n/2)*e,pitch:90-(t.y-a/2)*i}}function W(t,n,a,e=F/2){const{heading:i,pitch:o}=Y(t,e);return X(i,o,n,a)}function X(t,n,a,e){const i=t%360;return{x:a/2+(i<-180?i+360:i>180?i-360:i)/(360/a),y:e-n/(180/e),heading:t,pitch:n}}function Y(t,a){const e=n(Math.acos(-t.z/a));return{heading:n(Math.atan2(t.x,t.y)),pitch:e}}function Z(t,n,e=F/2){return[e*(Math.sin(a(t))*Math.sin(a(n))),e*(Math.cos(a(t))*Math.sin(a(n))),e*Math.cos(a(180-n))]}function G(t,n,a,e=F/2){const{heading:i,pitch:o}=T(t,n,a);return Z(i,o,e)}async function J(t,a,e){const i=await v(a,t.spatialReference,e);let o=n(Math.atan2(i.y-t.y,i.x-t.x));return o=o>=0&&o<=90?90-o:o>90&&o<=180?360-o+90:90+Math.abs(o),o}function $(t,n,a){const e=Math.cos(a),i=Math.sin(a),o=[1,0,0,1,0,0],r=o[0]*e+o[2]*i,c=o[1]*e+o[3]*i,s=-o[0]*i+o[2]*e,l=-o[1]*i+o[3]*e;o[0]=r,o[1]=c,o[2]=s,o[3]=l;return[t*o[0]+n*o[2]+o[4],t*o[1]+n*o[3]+o[5]]}const B=t=>t.toArray(),Q=(...t)=>t.some(t=>t);function _(t,n){if(Q(0===t.length,t.some(({x:t,y:n})=>Q(null==t,null==n)),!n.hasZ))throw new Error("Input pixels must have x, y and camera location must have z value")}function tt(t,n){if(t.some(t=>null==t.z)||null==n.z)throw new Error("Input points and camera location must have z value")}function nt(t){if(9!==t?.length)throw new Error("Rotation matrix is not provided or is not a valid 3x3 matrix")}function at(t,n){return d(n)?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*t/M.radius))):1}const et=t=>n=>new g(n,t),it=t=>null!=t&&"queryExtent"in t;function ot(t,n,a,e){return[[-n,-n],[+n,-n],[+n,+n],[-n,+n]].map(([n,i])=>E(x(c(),a,[n,i,0]),e,t))}function rt({a0:t,a1:n,a2:a,b0:e,b1:i,b2:o},r,c,s){const l=[t??r/2-.5,n,a??0,e??c/2-.5,i??0,o].map(ct);return null!=s&&st(l)?{affines:l,focalLength:s}:{affines:[r/2-.5,1,0,c/2-.5,0,-1]}}function ct(t,n){if(null==t)return null;const a=parseFloat(`${t}`);return isNaN(a)?null:a}function st(t){return null!=t[1]&&null!=t[5]}function lt(t,n,a){const{cameraHeight:e,cameraPitch:i,cameraRoll:o,elevation:r,farDistance:c,horizontalFieldOfView:s,location:l,verticalFieldOfView:f}=jt(t,t.location.spatialReference),u=r??(l.z??0)-e;return{...mt(t,n,a),averageElevation:u,cameraPitch:i,cameraRoll:o??0,farDistance:c,horizontalFieldOfView:s,verticalFieldOfView:f}}function ft(t,n,a,e){return wt(e)?q([e.omega,e.phi,e.kappa]):yt(e)?U([e.heading,e.pitch,e.roll]):U([t,n,a??0])}function ut(t,n,a){const{cameraHeading:e,cameraHeight:i,farDistance:o,horizontalFieldOfView:r,location:c,verticalFieldOfView:s}=jt(t,t.location.spatialReference);return{averageElevation:(c.z??0)-i,cameraLocation:c,cameraHeading:e,farDistance:o,horizontalFieldOfView:r,imageHeight:a,imageWidth:n,verticalFieldOfView:s}}function mt(t,n,a){const{a0:e,a1:i,a2:o,b0:r,b1:c,b2:s,cameraHeading:l,cameraOrientation:f,cameraPitch:u,cameraRoll:m,focalLength:h,horizontalFieldOfView:p,location:g,matrix:v,principalX:M,principalY:d,radial:x,tangential:w,verticalFieldOfView:y}=t,{affines:b,focalLength:j}=rt({a0:e,a1:i,a2:o,b0:r,b1:c,b2:s},n,a,h),O=v??ft(l,u,m,f),z=null!=M&&null!=d?[M,d]:void 0;return{affineTransformations:f?.affineTransformations??b,cameraLocation:g.clone(),focalLength:f?.focalLength??j,horizontalFieldOfView:p,imageHeight:a,imageWidth:n,principalOffsetPoint:f?.principalOffsetPoint??z,radialDistortionCoefficients:f?.radialDistortionCoefficients??x,rotationMatrix:O,tangentialDistortionCoefficients:f?.tangentialDistortionCoefficients??w,verticalFieldOfView:y}}const ht=t=>null!=t&&"elevationSample"in t&&null!=t.elevationSample,pt=t=>b(t?.elevationSource)&&null!=t?.extent,gt=t=>w(t?.elevationSource),vt=async(t,n,a,e,i)=>{const o=j(t),r=n-a/o;return gt(e)?(e.elevationSource=new y({constantElevation:e.elevationSource.constantElevation/o}),e):ht(e)?e:pt(e)?{elevationSample:await O({...p(e.elevationSource)?e.elevationSource.toJSON():e.elevationSource,extent:e.extent},i),elevationSource:new y({constantElevation:r})}:{averageGroundElevation:r,spatialReference:t}},Mt=t=>z(t?.heading)&&z(t?.pitch),dt=(t,n)=>[[-t,-n],[t,-n],[t,n],[-t,n]];function xt(t){const{cameraLocation:n,farDistance:i,horizontalFieldOfView:o,rotationMatrix:r,scalingFactor:l,verticalFieldOfView:f}=t,u=e();s(u,r);const p=2*Math.tan(a(f)/2)*i*l,g=2*Math.tan(a(o)/2)*i*l,v=L([0,0,-1],u),M=D([n.x,n.y,n.z],v,t.farDistance*l,l),d=L([0,1,0],u),x=L([1,0,0],u),w=H(d,p/2,l),y=H(x,g/2,l),b=m(c(),w,y),j=h(c(),w,y);return[h(c(),M,b),h(c(),M,j),m(c(),M,b),m(c(),M,j)]}const wt=t=>2===t?.type,yt=t=>1===t?.type;function bt(t,n,a){if("panoramic"===t){const[t,e]=a;return W({x:n.x,y:n.y,z:n.z},t,e)}return{x:n.x+.5,y:.5-n.y}}function jt(t,n,a=!0){const e=j(n),i=a?t.clone():t;return i.cameraHeight/=e,i.farDistance/=e,i.nearDistance/=e,w(i.elevationSource)&&(i.elevationSource.constantElevation/=e),i}export{xt as computeFarplaneVertices,C as computeHFOVAndVFOV,ot as computeNewReferenceCoordinates,Z as convertHeadingPitchToSphereVertex,X as convertOrientationToPixelLocation,G as convertPixelLocationToSphereVertex,T as convertPixelToHeadingPitch,Y as convertSphereVertexToOrientation,W as convertSphereVertexToPixelLocation,jt as convertToSRUnits,I as createRotationMatrix,U as createRotationMatrixFromHPR,q as createRotationMatrixFromOPK,rt as getAffinesAndFocalLength,ut as getImageToWorldPanoramicProperties,lt as getImageToWorldProperties,J as getInitialAngle,vt as getUpdateElevationProps,at as getWebMercatorScalingFactor,mt as getWorldToImageProperties,Mt as hasAngles,yt as hasHeadingPitchRoll,wt as hasOmegaPhiKappa,it as isElevationSampler,ht as isUpdateElevationWithElevationSampler,pt as isUpdateElevationWithElevationSource,gt as isUpdateUsingConstantElevation,st as isValidAffines,R as linearEquationSolve,K as ltpToGeographic,Q as or,B as pointToArray,E as projectiveTransform,dt as reducerFn,$ as rotatePixel,D as scaleAndAddWithFactor,H as scaleWithFactor,bt as transformGraphicCoordinatesToPixel,L as transformMat3,N as transformMat4,_ as validatePixelsToTransform,tt as validatePointsToTransform,nt as validateRotationMatrix,et as vecToPoint};
@@ -12,4 +12,11 @@ export type RasterFormats = "lerc" | "jpg" | "jpgpng" | "png" | "png8" | "png24"
12
12
 
13
13
  export type RasterNoDataInterpretation = "any" | "all";
14
14
 
15
- export type RasterDataType = "generic" | "elevation" | "thematic" | "processed" | "scientific" | "standard-time" | "vector-uv" | "vector-u" | "vector-v" | "vector-magdir" | "vector-magnitude" | "vector-direction";
15
+ export type RasterDataType = "generic" | "elevation" | "thematic" | "processed" | "scientific" | "standard-time" | "vector-uv" | "vector-u" | "vector-v" | "vector-magdir" | "vector-magnitude" | "vector-direction";
16
+
17
+ export interface PixelSize {
18
+ /** Pixel size along the x axis. */
19
+ x: number;
20
+ /** Pixel size along the y axis. */
21
+ y: number;
22
+ }