@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.
- package/Map.d.ts +3 -1
- package/analysis/Analysis.d.ts +1 -0
- package/analysis/Dimension/types.d.ts +1 -0
- package/analysis/DimensionAnalysis.d.ts +10 -10
- package/analysis/DimensionSimpleStyle.d.ts +14 -13
- package/analysis/DirectLineMeasurementAnalysis.d.ts +1 -1
- package/analysis/DistanceMeasurementAnalysis.d.ts +2 -1
- package/analysis/ElevationProfile/ElevationProfileLineScene.d.ts +3 -3
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +1 -1
- package/analysis/ElevationProfile/types.d.ts +2 -0
- package/analysis/LengthDimension.d.ts +22 -21
- package/analysis/LineOfSightAnalysis.d.ts +2 -2
- package/analysis/ShadowCast/MinDurationOptions.d.ts +2 -2
- package/analysis/ShadowCast/types.d.ts +6 -2
- package/analysis/Slice/types.d.ts +1 -0
- package/analysis/Viewshed.d.ts +22 -20
- package/analysis/ViewshedAnalysis.d.ts +13 -13
- package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +1 -2
- package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +2 -2
- package/analysis/VolumeMeasurement/types.d.ts +1 -0
- package/analysis/VolumeMeasurementAnalysis.d.ts +1 -0
- package/analysis/types.d.ts +5 -0
- package/arcade.d.ts +2 -2
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/04364f3dd7578c2acb71.js +1 -0
- package/assets/esri/core/workers/chunks/18ed69d563986dc2eb21.js +1 -0
- package/assets/esri/core/workers/chunks/{4c04c54330b693892cfc.js → 1a45b4b4803337f4b99f.js} +2 -2
- package/assets/esri/core/workers/chunks/{60c7f896f2246a8aa6d7.js → 244006d4b0547d574401.js} +53 -53
- package/assets/esri/core/workers/chunks/329b10897c6965948b84.js +1 -0
- package/assets/esri/core/workers/chunks/4387aaf9d5e8f6d1833d.js +1 -0
- package/assets/esri/core/workers/chunks/{944dfa9309da8f49a616.js → 6a3d66d7c92f90cc2a17.js} +1 -1
- package/assets/esri/core/workers/chunks/760a759f9697adde6dd4.js +1 -0
- package/assets/esri/core/workers/chunks/798d227205bd958de6a7.js +1 -0
- package/assets/esri/core/workers/chunks/{9d88b4ba8e511da64583.js → 98d68b145226e7527c84.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ad6595ad44c2d60c1ce.js → a79fad422d41019c8232.js} +1 -1
- package/assets/esri/core/workers/chunks/{10e474d664b20adcd917.js → db4661fd82dc61162115.js} +1 -1
- package/assets/esri/core/workers/chunks/{1d1e25bb61eeeee8ee94.js → df2ba5f9d57080fca183.js} +1 -1
- package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +5 -3
- package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +15 -11
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/ComponentShader.glsl.js +43 -43
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/config.js +1 -1
- package/form/elements/inputs/attachments/Input.d.ts +6 -6
- package/geometry/Mesh.d.ts +20 -21
- package/geometry/Polygon.d.ts +1 -8
- package/geometry/Polygon.js +1 -1
- package/geometry/geometryEngine.d.ts +19 -19
- package/geometry/support/MeshComponent.d.ts +3 -3
- package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +2 -2
- package/geometry/support/MeshLocalVertexSpace.d.ts +2 -2
- package/geometry/support/MeshMaterial.d.ts +8 -8
- package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
- package/geometry/support/MeshTexture.d.ts +3 -3
- package/geometry/support/MeshTextureTransform.d.ts +3 -3
- package/geometry/support/MeshTransform.d.ts +1 -1
- package/geometry/support/MeshVertexAttributes.d.ts +13 -5
- package/geometry/support/intersects.js +1 -1
- package/geometry/support/intersectsBase.js +1 -1
- package/geometry/support/meshUtils/centerAt.js +1 -1
- package/geometry/support/meshUtils/geographicUtils.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/geometry/support/meshUtils/types.d.ts +44 -52
- package/geometry/support/meshUtils.d.ts +6 -50
- package/geometry/support/meshUtils.js +1 -1
- package/interfaces.d.ts +5 -151
- package/kernel.js +1 -1
- package/layers/BaseDynamicLayer.d.ts +2 -2
- package/layers/BaseElevationLayer.d.ts +2 -2
- package/layers/BuildingSceneLayer.d.ts +2 -2
- package/layers/CSVLayer.d.ts +2 -2
- package/layers/CatalogLayer.d.ts +2 -2
- package/layers/DimensionLayer.d.ts +2 -2
- package/layers/ElevationLayer.d.ts +2 -2
- package/layers/FeatureLayer.d.ts +2 -2
- package/layers/GeoJSONLayer.d.ts +2 -2
- package/layers/GeoRSSLayer.d.ts +2 -2
- package/layers/GraphicsLayer.d.ts +2 -2
- package/layers/GroupLayer.d.ts +2 -2
- package/layers/ImageryLayer.d.ts +2 -2
- package/layers/ImageryTileLayer.d.ts +2 -2
- package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -2
- package/layers/IntegratedMeshLayer.d.ts +2 -2
- package/layers/KMLLayer.d.ts +2 -2
- package/layers/Layer.d.ts +9 -7
- package/layers/LineOfSightLayer.d.ts +3 -3
- package/layers/MapImageLayer.d.ts +2 -2
- package/layers/MapNotesLayer.d.ts +2 -2
- package/layers/MediaLayer.d.ts +2 -2
- package/layers/OGCFeatureLayer.d.ts +2 -2
- package/layers/OrientedImageryLayer.d.ts +2 -2
- package/layers/ParquetLayer.d.ts +2 -2
- package/layers/PointCloudLayer.d.ts +2 -2
- package/layers/RouteLayer.d.ts +2 -2
- package/layers/SceneLayer.d.ts +2 -2
- package/layers/SubtypeGroupLayer.d.ts +2 -2
- package/layers/TileLayer.d.ts +2 -2
- package/layers/UnknownLayer.d.ts +2 -2
- package/layers/UnsupportedLayer.d.ts +2 -2
- package/layers/VectorTileLayer.d.ts +2 -2
- package/layers/VideoLayer.d.ts +2 -2
- package/layers/ViewshedLayer.d.ts +2 -2
- package/layers/VoxelLayer.d.ts +2 -2
- package/layers/WCSLayer.d.ts +2 -2
- package/layers/WFSLayer.d.ts +2 -2
- package/layers/WMSLayer.d.ts +2 -2
- package/layers/WMTSLayer.d.ts +2 -2
- package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -2
- package/layers/catalog/CatalogFootprintLayer.d.ts +2 -2
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/raster/types.d.ts +8 -1
- package/layers/support/PixelBlock.d.ts +7 -7
- package/layers/support/RasterInfo.d.ts +2 -9
- package/layers/types.d.ts +77 -2
- package/networks/support/CircuitSection.d.ts +20 -2
- package/networks/support/CircuitSection.js +1 -1
- package/networks/support/Subcircuit.d.ts +12 -10
- package/networks/support/Subcircuit.js +1 -1
- package/networks/support/typeUtils.d.ts +2 -0
- package/networks/support/typeUtils.js +1 -1
- package/package.json +2 -2
- package/rest/support/AttributeBinsQuery.d.ts +7 -1
- package/rest/support/NormalizationBinParametersMixin.d.ts +29 -9
- package/support/revision.js +1 -1
- package/symbols/patterns/LinePattern3D.d.ts +3 -3
- package/symbols/patterns/Pattern3D.d.ts +3 -3
- package/unionTypes.d.ts +17 -17
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +6 -5
- package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +7 -6
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/types.d.ts +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +2 -2
- package/views/3d/analysis/DirectLineMeasurement/types.d.ts +1 -0
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/types.d.ts +1 -0
- package/views/3d/analysis/types.d.ts +2 -0
- package/views/3d/constraints/Constraints.d.ts +2 -2
- package/views/3d/environment/ChapmanApproximation.glsl.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/layers/DimensionLayerView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
- package/views/3d/layers/ViewshedLayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/support/LayerPerformanceInfo.d.ts +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +7 -7
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ViewingModeConfiguration.js +5 -0
- package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +2 -2
- package/views/BreakpointsOwner.d.ts +9 -10
- package/views/MapView.d.ts +18 -17
- package/views/SceneView.d.ts +30 -89
- package/views/SceneView.js +1 -1
- package/views/View2D.d.ts +0 -37
- package/views/View2D.js +1 -1
- package/views/ViewAnimation.d.ts +2 -3
- package/views/analysis/ElevationProfile/types.d.ts +7 -6
- package/views/analysis/types.d.ts +1 -0
- package/views/animation/types.d.ts +3 -1
- package/views/layers/DimensionLayerView.d.ts +97 -4
- package/views/layers/DimensionLayerView.js +1 -1
- package/views/layers/HighlightLayerViewMixin.d.ts +1 -59
- package/views/layers/HighlightLayerViewMixin.js +1 -1
- package/views/layers/ImageryLayerViewMixin.d.ts +1 -55
- package/views/layers/LineOfSightLayerView.d.ts +77 -4
- package/views/layers/LineOfSightLayerView.js +1 -1
- package/views/layers/ViewshedLayerView.d.ts +96 -5
- package/views/layers/ViewshedLayerView.js +1 -1
- package/views/navigation/Navigation.d.ts +1 -22
- package/views/navigation/Navigation.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/views/types.d.ts +75 -5
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +4 -4
- package/widgets/AreaMeasurement3D.d.ts +2 -2
- package/widgets/BasemapGallery.d.ts +1 -1
- package/widgets/BasemapToggle.d.ts +1 -1
- package/widgets/Bookmarks.d.ts +1 -1
- package/widgets/BuildingExplorer/BuildingExplorerViewModel.d.ts +2 -2
- package/widgets/BuildingExplorer/BuildingLevel.d.ts +2 -2
- package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.d.ts +2 -2
- package/widgets/BuildingExplorer/BuildingPhase.d.ts +2 -2
- package/widgets/BuildingExplorer.d.ts +3 -3
- package/widgets/Compass.d.ts +1 -1
- package/widgets/CoordinateConversion.d.ts +1 -1
- package/widgets/Daylight/DaylightViewModel.d.ts +3 -3
- package/widgets/Daylight/VisibleElements.d.ts +2 -2
- package/widgets/Daylight/types.d.ts +2 -2
- package/widgets/Daylight.d.ts +3 -3
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +4 -4
- package/widgets/DirectLineMeasurement3D.d.ts +2 -2
- package/widgets/DirectionalPad.d.ts +1 -1
- package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +3 -3
- package/widgets/ElevationProfile/ElevationProfileViewModel.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileVisibleElements.d.ts +2 -2
- package/widgets/ElevationProfile/types.d.ts +9 -9
- package/widgets/ElevationProfile.d.ts +2 -2
- package/widgets/Expand/ExpandViewModel.d.ts +1 -1
- package/widgets/Expand.d.ts +1 -1
- package/widgets/Feature.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -1
- package/widgets/Features.d.ts +1 -1
- package/widgets/Fullscreen/FullscreenViewModel.d.ts +1 -1
- package/widgets/Fullscreen.d.ts +1 -1
- package/widgets/Home.d.ts +1 -1
- package/widgets/LayerList.d.ts +12 -0
- package/widgets/Legend.d.ts +1 -1
- package/widgets/LineOfSight/LineOfSightTarget.d.ts +2 -2
- package/widgets/LineOfSight/LineOfSightViewModel.d.ts +2 -2
- package/widgets/LineOfSight.d.ts +2 -2
- package/widgets/Locate/LocateViewModel.d.ts +1 -1
- package/widgets/Locate.d.ts +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.d.ts +1 -1
- package/widgets/NavigationToggle.d.ts +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/Arrow.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationNode.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManagerPanoramic.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
- package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +5 -0
- package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
- package/widgets/OrientedImageryViewer/support/NonPanoramicMediaCollection.js +1 -1
- package/widgets/OrientedImageryViewer/support/resolveMediaProps.js +5 -0
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer.js +1 -1
- package/widgets/Print/CustomTemplate.d.ts +1 -1
- package/widgets/Print/PrintViewModel.d.ts +1 -1
- package/widgets/Print.d.ts +1 -1
- package/widgets/ScaleBar.d.ts +1 -1
- package/widgets/Search.d.ts +1 -1
- package/widgets/ShadowCast/DiscreteOptions.d.ts +2 -2
- package/widgets/ShadowCast/DurationOptions.d.ts +2 -2
- package/widgets/ShadowCast/ShadowCastViewModel.d.ts +3 -3
- package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +2 -2
- package/widgets/ShadowCast/ThresholdOptions.d.ts +2 -2
- package/widgets/ShadowCast/types.d.ts +2 -2
- package/widgets/ShadowCast.d.ts +1 -1
- package/widgets/Slice/SliceViewModel.d.ts +2 -2
- package/widgets/Slice.d.ts +2 -2
- package/widgets/Swipe.d.ts +1 -1
- package/widgets/TimeZoneLabel.d.ts +1 -1
- package/widgets/Track.d.ts +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/VideoPlayer.d.ts +1 -1
- package/widgets/VideoPlayer.js +1 -1
- package/widgets/Weather/VisibleElements.d.ts +2 -2
- package/widgets/Weather/WeatherViewModel.d.ts +2 -2
- package/widgets/Weather/types.d.ts +1 -1
- package/widgets/Weather.d.ts +2 -2
- package/widgets/Zoom.d.ts +1 -1
- package/widgets/support/GridControls.d.ts +1 -1
- package/assets/esri/core/workers/chunks/35961e71f69ae1d24b9e.js +0 -1
- package/assets/esri/core/workers/chunks/3cce8e894bf37c3e598e.js +0 -1
- package/assets/esri/core/workers/chunks/7ee68f67f9cc48a328f0.js +0 -1
- package/assets/esri/core/workers/chunks/a931515a2569713e743b.js +0 -1
- package/assets/esri/core/workers/chunks/bb4574a87ca21e719f0d.js +0 -1
- package/assets/esri/core/workers/chunks/c9f868f85d740ee32715.js +0 -1
- package/geometry.d.ts +0 -136
- package/geometry.js +0 -5
- package/pointCloudRenderers.d.ts +0 -112
- package/pointCloudRenderers.js +0 -5
- package/rasterRenderers.d.ts +0 -151
- package/rasterRenderers.js +0 -5
- package/renderers.d.ts +0 -166
- package/renderers.js +0 -5
- package/views/layers/DimensionLayerViewMixin.d.ts +0 -1
- package/views/layers/DimensionLayerViewMixin.js +0 -5
- package/views/layers/LineOfSightLayerViewMixin.d.ts +0 -1
- package/views/layers/LineOfSightLayerViewMixin.js +0 -5
- package/views/layers/ViewshedLayerViewMixin.d.ts +0 -98
- package/views/layers/ViewshedLayerViewMixin.js +0 -5
package/layers/ImageryLayer.d.ts
CHANGED
|
@@ -321,8 +321,8 @@ export default class ImageryLayer extends ImageryLayerSuperclass {
|
|
|
321
321
|
*/
|
|
322
322
|
accessor screenSizePerspectiveEnabled: boolean;
|
|
323
323
|
/**
|
|
324
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
/**
|
package/layers/KMLLayer.d.ts
CHANGED
|
@@ -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
|
-
*
|
|
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
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
}
|
package/layers/MediaLayer.d.ts
CHANGED
|
@@ -171,8 +171,8 @@ export default class MediaLayer extends MediaLayerSuperclass {
|
|
|
171
171
|
get spatialReference(): SpatialReference;
|
|
172
172
|
set spatialReference(value: SpatialReferenceProperties);
|
|
173
173
|
/**
|
|
174
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
/**
|
package/layers/ParquetLayer.d.ts
CHANGED
|
@@ -506,8 +506,8 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
|
|
|
506
506
|
get spatialReference(): SpatialReference;
|
|
507
507
|
set spatialReference(value: SpatialReferenceProperties);
|
|
508
508
|
/**
|
|
509
|
-
*
|
|
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
|
-
*
|
|
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
|
/**
|
package/layers/RouteLayer.d.ts
CHANGED
|
@@ -239,8 +239,8 @@ export default class RouteLayer extends RouteLayerSuperclass {
|
|
|
239
239
|
*/
|
|
240
240
|
accessor title: string | null | undefined;
|
|
241
241
|
/**
|
|
242
|
-
*
|
|
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
|
/**
|
package/layers/SceneLayer.d.ts
CHANGED
|
@@ -1056,8 +1056,8 @@ export default class SceneLayer extends SceneLayerSuperclass {
|
|
|
1056
1056
|
*/
|
|
1057
1057
|
accessor title: string | null | undefined;
|
|
1058
1058
|
/**
|
|
1059
|
-
*
|
|
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
|
-
*
|
|
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
|
/**
|
package/layers/TileLayer.d.ts
CHANGED
|
@@ -168,8 +168,8 @@ export default class TileLayer extends TileLayerSuperclass {
|
|
|
168
168
|
*/
|
|
169
169
|
accessor title: string | null | undefined;
|
|
170
170
|
/**
|
|
171
|
-
*
|
|
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
|
/**
|
package/layers/UnknownLayer.d.ts
CHANGED
|
@@ -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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
/**
|
package/layers/VideoLayer.d.ts
CHANGED
|
@@ -514,8 +514,8 @@ export default class VideoLayer extends VideoLayerSuperclass {
|
|
|
514
514
|
*/
|
|
515
515
|
accessor title: string | null | undefined;
|
|
516
516
|
/**
|
|
517
|
-
*
|
|
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
|
-
*
|
|
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
|
}
|
package/layers/VoxelLayer.d.ts
CHANGED
|
@@ -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
|
-
*
|
|
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
|
/**
|
package/layers/WCSLayer.d.ts
CHANGED
|
@@ -217,8 +217,8 @@ export default class WCSLayer extends WCSLayerSuperclass {
|
|
|
217
217
|
type: "flow";
|
|
218
218
|
}) | null | undefined);
|
|
219
219
|
/**
|
|
220
|
-
*
|
|
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. */
|
package/layers/WFSLayer.d.ts
CHANGED
|
@@ -596,8 +596,8 @@ export default class WFSLayer extends WFSLayerSuperclass {
|
|
|
596
596
|
*/
|
|
597
597
|
accessor title: string | null | undefined;
|
|
598
598
|
/**
|
|
599
|
-
*
|
|
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
|
/**
|
package/layers/WMSLayer.d.ts
CHANGED
|
@@ -779,8 +779,8 @@ export default class WMSLayer extends WMSLayerSuperclass {
|
|
|
779
779
|
*/
|
|
780
780
|
accessor title: string | null | undefined;
|
|
781
781
|
/**
|
|
782
|
-
*
|
|
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. */
|
package/layers/WMTSLayer.d.ts
CHANGED
|
@@ -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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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{
|
|
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};
|
package/layers/raster/types.d.ts
CHANGED
|
@@ -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
|
+
}
|