@giro3d/piero 1.0.0-beta.0

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 (220) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +134 -0
  3. package/dist/Components.cjs.js +2 -0
  4. package/dist/Components.cjs.js.map +1 -0
  5. package/dist/Components.es.js +608 -0
  6. package/dist/Components.es.js.map +1 -0
  7. package/dist/assets/piero.css +9 -0
  8. package/dist/index.cjs.js +9 -0
  9. package/dist/index.cjs.js.map +1 -0
  10. package/dist/index.d.ts +2 -0
  11. package/dist/index.es.js +6971 -0
  12. package/dist/index.es.js.map +1 -0
  13. package/dist/modules.cjs.js +2 -0
  14. package/dist/modules.cjs.js.map +1 -0
  15. package/dist/modules.d.ts +2 -0
  16. package/dist/modules.es.js +856 -0
  17. package/dist/modules.es.js.map +1 -0
  18. package/dist/src/App.vue.d.ts +6 -0
  19. package/dist/src/api/BookmarkApi.d.ts +6 -0
  20. package/dist/src/api/DatasetApi.d.ts +61 -0
  21. package/dist/src/api/ViewApi.d.ts +4 -0
  22. package/dist/src/api/index.d.ts +4 -0
  23. package/dist/src/components/AlertToast.vue.d.ts +4 -0
  24. package/dist/src/components/AttributeGroup.vue.d.ts +7 -0
  25. package/dist/src/components/AttributeItem.vue.d.ts +6 -0
  26. package/dist/src/components/AttributePanel.vue.d.ts +14 -0
  27. package/dist/src/components/ColorFragment.vue.d.ts +6 -0
  28. package/dist/src/components/Configuration.d.ts +14 -0
  29. package/dist/src/components/CoordinateFragment.vue.d.ts +10 -0
  30. package/dist/src/components/DropdownView.vue.d.ts +13 -0
  31. package/dist/src/components/LinkFragment.vue.d.ts +10 -0
  32. package/dist/src/components/LoadingScreen.vue.d.ts +2 -0
  33. package/dist/src/components/MainView.vue.d.ts +5 -0
  34. package/dist/src/components/MinimapView.vue.d.ts +4 -0
  35. package/dist/src/components/ModalOverlay.vue.d.ts +25 -0
  36. package/dist/src/components/NavigationButtons.vue.d.ts +2 -0
  37. package/dist/src/components/OpacitySlider.vue.d.ts +10 -0
  38. package/dist/src/components/PanelContainer.vue.d.ts +10 -0
  39. package/dist/src/components/ProgressBar.vue.d.ts +14 -0
  40. package/dist/src/components/SearchOverlay.vue.d.ts +8 -0
  41. package/dist/src/components/SpinnerControl.vue.d.ts +2 -0
  42. package/dist/src/components/StatusBar.vue.d.ts +10 -0
  43. package/dist/src/components/SwitchToggle.vue.d.ts +25 -0
  44. package/dist/src/components/VisibilityControl.vue.d.ts +9 -0
  45. package/dist/src/components/atoms/ButtonArea.vue.d.ts +17 -0
  46. package/dist/src/components/atoms/ButtonWithIcon.vue.d.ts +11 -0
  47. package/dist/src/components/atoms/CompactList.vue.d.ts +17 -0
  48. package/dist/src/components/atoms/Icon.vue.d.ts +6 -0
  49. package/dist/src/components/atoms/IconList.vue.d.ts +17 -0
  50. package/dist/src/components/atoms/IconListButton.vue.d.ts +10 -0
  51. package/dist/src/components/atoms/ImportButton.vue.d.ts +13 -0
  52. package/dist/src/components/atoms/ListLabel.vue.d.ts +5 -0
  53. package/dist/src/components/atoms/ListLabelButton.vue.d.ts +11 -0
  54. package/dist/src/components/atoms/SectionCollapsible.vue.d.ts +30 -0
  55. package/dist/src/components/charts/BarChart.vue.d.ts +4 -0
  56. package/dist/src/components/charts/DoughnutChart.vue.d.ts +4 -0
  57. package/dist/src/components/panels/AboutPanel.vue.d.ts +2 -0
  58. package/dist/src/components/panels/AnalysisPanel.vue.d.ts +2 -0
  59. package/dist/src/components/panels/AnnotationItem.vue.d.ts +21 -0
  60. package/dist/src/components/panels/AnnotationPanel.vue.d.ts +2 -0
  61. package/dist/src/components/panels/BasemapItem.vue.d.ts +17 -0
  62. package/dist/src/components/panels/BookmarkItem.vue.d.ts +16 -0
  63. package/dist/src/components/panels/BookmarkPanel.vue.d.ts +2 -0
  64. package/dist/src/components/panels/DatagroupItem.vue.d.ts +18 -0
  65. package/dist/src/components/panels/DatasetItem.vue.d.ts +18 -0
  66. package/dist/src/components/panels/DatasetOrGroupItem.vue.d.ts +18 -0
  67. package/dist/src/components/panels/DatasetPanel.vue.d.ts +2 -0
  68. package/dist/src/components/panels/EmptyIndicator.vue.d.ts +6 -0
  69. package/dist/src/components/panels/LoadingIndicator.vue.d.ts +6 -0
  70. package/dist/src/components/panels/MeasurementItem.vue.d.ts +17 -0
  71. package/dist/src/components/panels/MeasurementPanel.vue.d.ts +2 -0
  72. package/dist/src/components/panels/OverlayItem.vue.d.ts +19 -0
  73. package/dist/src/components/panels/ShareBookmarkModal.vue.d.ts +5 -0
  74. package/dist/src/components/panels/analysis/ClippingBox.vue.d.ts +2 -0
  75. package/dist/src/components/panels/analysis/CrossSection.vue.d.ts +2 -0
  76. package/dist/src/components/panels/analysis/FloodingPlane.vue.d.ts +2 -0
  77. package/dist/src/components/panels/analysis/Statistics.vue.d.ts +2 -0
  78. package/dist/src/components/panels/analysis/ToolWrapper.vue.d.ts +28 -0
  79. package/dist/src/components/toolbar/ToolBar.vue.d.ts +9 -0
  80. package/dist/src/components/toolbar/ToolbarButton.vue.d.ts +12 -0
  81. package/dist/src/config-loader.d.ts +7 -0
  82. package/dist/src/constants.d.ts +7 -0
  83. package/dist/src/context.d.ts +35 -0
  84. package/dist/src/createPieroApp.d.ts +31 -0
  85. package/dist/src/events.d.ts +30 -0
  86. package/dist/src/giro3d/CameraControlsInspector.d.ts +17 -0
  87. package/dist/src/giro3d/EntityBuilder.d.ts +21 -0
  88. package/dist/src/giro3d/Graticule.d.ts +20 -0
  89. package/dist/src/giro3d/Grid.d.ts +11 -0
  90. package/dist/src/giro3d/LayerBuilder.d.ts +46 -0
  91. package/dist/src/giro3d/Measure3D.d.ts +20 -0
  92. package/dist/src/giro3d/Plane.d.ts +11 -0
  93. package/dist/src/giro3d/Skybox.d.ts +6 -0
  94. package/dist/src/giro3d/entities/FeatureCollectionEntity.d.ts +41 -0
  95. package/dist/src/giro3d/entities/PointCloudEntity.d.ts +45 -0
  96. package/dist/src/giro3d/entities/TiledPointCloudEntity.d.ts +13 -0
  97. package/dist/src/giro3d/entities/Tiles3dEntity.d.ts +11 -0
  98. package/dist/src/giro3d/entities/VectorLabelsEntity.d.ts +48 -0
  99. package/dist/src/giro3d/entities/VectorMeshEntity.d.ts +97 -0
  100. package/dist/src/giro3d/entities/VectorShapeEntity.d.ts +8 -0
  101. package/dist/src/giro3d/entities/flatPointCloud.d.ts +2 -0
  102. package/dist/src/giro3d/entities/tiledIfc.d.ts +2 -0
  103. package/dist/src/giro3d/entities/vector.d.ts +2 -0
  104. package/dist/src/giro3d/sources/GeopackageSource.d.ts +20 -0
  105. package/dist/src/giro3d/sources/ShapefileSource.d.ts +20 -0
  106. package/dist/src/giro3d/sources/mixins.d.ts +60 -0
  107. package/dist/src/index.d.ts +17 -0
  108. package/dist/src/loaders/csv.d.ts +3 -0
  109. package/dist/src/loaders/las.d.ts +3 -0
  110. package/dist/src/loaders/loader.d.ts +29 -0
  111. package/dist/src/loaders/loader.test.d.ts +1 -0
  112. package/dist/src/loaders/userData.d.ts +8 -0
  113. package/dist/src/loaders/vector.d.ts +4 -0
  114. package/dist/src/module.d.ts +11 -0
  115. package/dist/src/modules/IFCLoader.d.ts +9 -0
  116. package/dist/src/modules/PLYLoader.d.ts +9 -0
  117. package/dist/src/modules/PotreeLoader.d.ts +9 -0
  118. package/dist/src/modules/Tour.d.ts +17 -0
  119. package/dist/src/modules/ifc/IfcEntity.d.ts +84 -0
  120. package/dist/src/modules/ifc/IfcEntityInspector.d.ts +7 -0
  121. package/dist/src/modules/ifc/IfcPropertyView.vue.d.ts +6 -0
  122. package/dist/src/modules/ifc/IfcSubtree.vue.d.ts +7 -0
  123. package/dist/src/modules/index.d.ts +5 -0
  124. package/dist/src/modules/ply/PlyEntity.d.ts +33 -0
  125. package/dist/src/providers/Alticoding.d.ts +32 -0
  126. package/dist/src/providers/BanProvider.d.ts +11 -0
  127. package/dist/src/providers/Geocoding.d.ts +7 -0
  128. package/dist/src/providers/IgnProvider.d.ts +11 -0
  129. package/dist/src/services/AnalysisManager.d.ts +10 -0
  130. package/dist/src/services/AnnotationManager.d.ts +48 -0
  131. package/dist/src/services/CameraController.d.ts +99 -0
  132. package/dist/src/services/DatasetManager.d.ts +27 -0
  133. package/dist/src/services/Giro3DManager.d.ts +42 -0
  134. package/dist/src/services/Highlighter.d.ts +11 -0
  135. package/dist/src/services/LayerManager.d.ts +37 -0
  136. package/dist/src/services/MeasureTool.d.ts +13 -0
  137. package/dist/src/services/MeasurementManager.d.ts +31 -0
  138. package/dist/src/services/MinimapController.d.ts +19 -0
  139. package/dist/src/services/Picker.d.ts +53 -0
  140. package/dist/src/services/analysis/ClippingBoxManager.d.ts +41 -0
  141. package/dist/src/services/analysis/CrossSectionManager.d.ts +9 -0
  142. package/dist/src/services/analysis/FloodingPlaneManager.d.ts +11 -0
  143. package/dist/src/stores/analysis.d.ts +1571 -0
  144. package/dist/src/stores/annotations.d.ts +60 -0
  145. package/dist/src/stores/bookmarks.d.ts +21 -0
  146. package/dist/src/stores/camera.d.ts +39 -0
  147. package/dist/src/stores/datasets.d.ts +49 -0
  148. package/dist/src/stores/giro3d.d.ts +45 -0
  149. package/dist/src/stores/layers.d.ts +40 -0
  150. package/dist/src/stores/measurement.d.ts +45 -0
  151. package/dist/src/stores/modules.d.ts +11 -0
  152. package/dist/src/stores/notifications.d.ts +8 -0
  153. package/dist/src/stores/statistics.d.ts +8 -0
  154. package/dist/src/types/Annotation.d.ts +35 -0
  155. package/dist/src/types/AnnotationMode.d.ts +7 -0
  156. package/dist/src/types/BaseLayer.d.ts +30 -0
  157. package/dist/src/types/Bookmark.d.ts +19 -0
  158. package/dist/src/types/CameraPosition.d.ts +7 -0
  159. package/dist/src/types/Configuration.d.ts +106 -0
  160. package/dist/src/types/Dataset.d.ts +78 -0
  161. package/dist/src/types/Feature.d.ts +13 -0
  162. package/dist/src/types/FloodingPlane.d.ts +14 -0
  163. package/dist/src/types/IFCTypes.d.ts +5 -0
  164. package/dist/src/types/LayerObject.d.ts +20 -0
  165. package/dist/src/types/Measure.d.ts +20 -0
  166. package/dist/src/types/MeasurementMode.d.ts +7 -0
  167. package/dist/src/types/Named.d.ts +5 -0
  168. package/dist/src/types/NavigationMode.d.ts +2 -0
  169. package/dist/src/types/Notification.d.ts +8 -0
  170. package/dist/src/types/OLGeometry.d.ts +1 -0
  171. package/dist/src/types/Overlay.d.ts +24 -0
  172. package/dist/src/types/VectorStyle.d.ts +31 -0
  173. package/dist/src/types/Viewbox.d.ts +7 -0
  174. package/dist/src/types/configuration/analysis.d.ts +26 -0
  175. package/dist/src/types/configuration/bookmark.d.ts +16 -0
  176. package/dist/src/types/configuration/camera.d.ts +19 -0
  177. package/dist/src/types/configuration/color.d.ts +18 -0
  178. package/dist/src/types/configuration/datasets/cityjson.d.ts +9 -0
  179. package/dist/src/types/configuration/datasets/core.d.ts +49 -0
  180. package/dist/src/types/configuration/datasets/featureCollection.d.ts +6 -0
  181. package/dist/src/types/configuration/datasets/ifc.d.ts +10 -0
  182. package/dist/src/types/configuration/datasets/index.d.ts +27 -0
  183. package/dist/src/types/configuration/datasets/layer.d.ts +43 -0
  184. package/dist/src/types/configuration/datasets/ply.d.ts +10 -0
  185. package/dist/src/types/configuration/datasets/pointCloud.d.ts +12 -0
  186. package/dist/src/types/configuration/datasets/potreePointCloud.d.ts +10 -0
  187. package/dist/src/types/configuration/datasets/tiledIfc.d.ts +9 -0
  188. package/dist/src/types/configuration/datasets/tiledPointCloud.d.ts +9 -0
  189. package/dist/src/types/configuration/datasets/vector.d.ts +34 -0
  190. package/dist/src/types/configuration/features.d.ts +2 -0
  191. package/dist/src/types/configuration/geographic.d.ts +51 -0
  192. package/dist/src/types/configuration/layers/core.d.ts +50 -0
  193. package/dist/src/types/configuration/layers/index.d.ts +51 -0
  194. package/dist/src/types/configuration/sources/bingMaps.d.ts +5 -0
  195. package/dist/src/types/configuration/sources/core/baseConfig.d.ts +70 -0
  196. package/dist/src/types/configuration/sources/core/tiled.d.ts +19 -0
  197. package/dist/src/types/configuration/sources/core/vector.d.ts +13 -0
  198. package/dist/src/types/configuration/sources/core/vectorTile.d.ts +8 -0
  199. package/dist/src/types/configuration/sources/customVector.d.ts +7 -0
  200. package/dist/src/types/configuration/sources/customVectorTile.d.ts +8 -0
  201. package/dist/src/types/configuration/sources/geojson.d.ts +5 -0
  202. package/dist/src/types/configuration/sources/geotiff.d.ts +8 -0
  203. package/dist/src/types/configuration/sources/gpx.d.ts +5 -0
  204. package/dist/src/types/configuration/sources/kml.d.ts +5 -0
  205. package/dist/src/types/configuration/sources/mvt.d.ts +10 -0
  206. package/dist/src/types/configuration/sources/osm.d.ts +5 -0
  207. package/dist/src/types/configuration/sources/stadiaMaps.d.ts +5 -0
  208. package/dist/src/types/configuration/sources/wms.d.ts +15 -0
  209. package/dist/src/types/configuration/sources/wmts.d.ts +15 -0
  210. package/dist/src/types/configuration/sources/xyz.d.ts +9 -0
  211. package/dist/src/types/utilities.d.ts +5 -0
  212. package/dist/src/utils/Components.d.ts +8 -0
  213. package/dist/src/utils/Configuration.d.ts +15 -0
  214. package/dist/src/utils/Download.d.ts +11 -0
  215. package/dist/src/utils/Fetcher.d.ts +77 -0
  216. package/dist/src/utils/Measure.d.ts +7 -0
  217. package/dist/src/utils/OLFeatures.d.ts +57 -0
  218. package/dist/src/utils/Projections.d.ts +10 -0
  219. package/dist/src/utils/Types.d.ts +11 -0
  220. package/package.json +103 -0
@@ -0,0 +1,70 @@
1
+ import { ImageSourceOptions } from '@giro3d/giro3d/sources/ImageSource';
2
+ import { CRS, GeoVec3 } from '../../geographic';
3
+ import { UrlOrData } from '../../../../utils/Fetcher';
4
+ /** Mixin configuration for layers and overlays sources */
5
+ export interface ImageSourceConfigMixin extends Pick<ImageSourceOptions, 'colorSpace' | 'flipY' | 'is8bit'> {
6
+ /**
7
+ * The relative resolution of the layer.
8
+ * If greater than 1, the resolution will be greater, at the cost of performance and memory usage.
9
+ * @defaultValue 1
10
+ */
11
+ resolution?: number;
12
+ }
13
+ /** Base configuration for all sources (layers, overlays and datasets) */
14
+ export interface SourceConfigBase<TSourceType extends string> {
15
+ /** Type of source */
16
+ type: TSourceType;
17
+ }
18
+ /** Mixin configuration for sources that may require elevation configuration */
19
+ export interface SourceConfigElevationMixin {
20
+ /**
21
+ * Elevation of data
22
+ *
23
+ * @defaultValue 0
24
+ */
25
+ elevation?: number;
26
+ /**
27
+ * Fetch elevation from provider
28
+ *
29
+ * @defaultValue false
30
+ */
31
+ fetchElevation?: boolean;
32
+ /**
33
+ * Fetch elevation from map instead of API
34
+ *
35
+ * @defaultValue false
36
+ */
37
+ fetchElevationFast?: boolean;
38
+ /**
39
+ * When fetching elevation, add this offset
40
+ *
41
+ * @defaultValue 0.1
42
+ */
43
+ fetchElevationOffset?: number;
44
+ /**
45
+ * When fetching or setting elevation, consider this value as no data
46
+ *
47
+ * @defaultValue 0
48
+ */
49
+ noDataValue?: number;
50
+ }
51
+ /** Mixin configuration for sources that may set their geolocation */
52
+ export interface SourceConfigLocationMixin {
53
+ /** Location */
54
+ position?: GeoVec3;
55
+ }
56
+ /** Mixin configuration for sources that may have a data projection */
57
+ export interface SourceConfigProjectionMixin {
58
+ /** CRS of the source - must be registered first */
59
+ dataProjection?: CRS;
60
+ }
61
+ /** Mixin configuration for sources that require a URL */
62
+ export interface SourceConfigUrlMixin {
63
+ /** URL of the source */
64
+ url: string;
65
+ }
66
+ /** Mixin configuration for sources that require a URL or Blob */
67
+ export interface SourceConfigUrlOrDataMixin {
68
+ /** URL of the source */
69
+ url: UrlOrData;
70
+ }
@@ -0,0 +1,19 @@
1
+ import { TiledImageSourceOptions } from '@giro3d/giro3d/sources/TiledImageSource';
2
+ import { GeoExtent } from '../../geographic';
3
+ import { ImageSourceConfigMixin } from './baseConfig';
4
+ /** Format for decoding the data */
5
+ export type DecodingFormat = 'Bil' | 'GeoTIFF' | 'MapboxTerrain';
6
+ /** Mixin configuration for tiled layers */
7
+ export interface TiledImageSourceConfigMixin extends ImageSourceConfigMixin, Pick<TiledImageSourceOptions, 'httpTimeout' | 'noDataValue' | 'retries'> {
8
+ /** Restrict the extent of the data */
9
+ extent?: GeoExtent;
10
+ /** Mime-type (`image/png`, `image/jpg`, etc.) */
11
+ format?: string;
12
+ /** Decoding format. Required for Mapbox Terrain for instance. */
13
+ imageFormat?: DecodingFormat;
14
+ /**
15
+ * No data value, if any
16
+ * @deprecated Use `noDataValue` instead. Will be removed in v24.10
17
+ */
18
+ nodata?: number;
19
+ }
@@ -0,0 +1,13 @@
1
+ import { CRS } from '../../geographic';
2
+ import { VectorStyle } from '../../../VectorStyle';
3
+ import { ImageSourceConfigMixin, SourceConfigProjectionMixin, SourceConfigUrlOrDataMixin } from './baseConfig';
4
+ /** Mixin configuration for vector sources displayed as map layers */
5
+ export interface VectorAsLayerSourceConfigMixin extends ImageSourceConfigMixin, SourceConfigUrlOrDataMixin, VectorSourceConfigMixin {
6
+ /** Style */
7
+ style: VectorStyle;
8
+ }
9
+ /** Mixin configuration for vector sources, common to meshes and map layers */
10
+ export interface VectorSourceConfigMixin extends SourceConfigProjectionMixin {
11
+ /** @deprecated Use {@link dataProjection} instead, will be removed in 24.10 */
12
+ projection?: CRS;
13
+ }
@@ -0,0 +1,8 @@
1
+ import { VectorTileSourceOptions } from '@giro3d/giro3d/sources/VectorTileSource';
2
+ import { VectorStyle } from '../../../VectorStyle';
3
+ import { ImageSourceConfigMixin } from './baseConfig';
4
+ /** Mixin configuration for vector tiled layers */
5
+ export interface VectorTileSourceConfigMixin extends ImageSourceConfigMixin, Pick<VectorTileSourceOptions, 'backgroundColor' | 'url'> {
6
+ /** Style */
7
+ style: VectorStyle;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { default as FeatureFormat } from 'ol/format/Feature';
2
+ import { SourceConfigBase } from './core/baseConfig';
3
+ import { VectorAsLayerSourceConfigMixin } from './core/vector';
4
+ /** Vector source with custom format */
5
+ export interface CustomVectorSourceConfig extends SourceConfigBase<'vector'>, VectorAsLayerSourceConfigMixin {
6
+ format: FeatureFormat;
7
+ }
@@ -0,0 +1,8 @@
1
+ import { default as FeatureFormat } from 'ol/format/Feature';
2
+ import { default as RenderFeature } from 'ol/render/Feature';
3
+ import { SourceConfigBase } from './core/baseConfig';
4
+ import { VectorTileSourceConfigMixin } from './core/vectorTile';
5
+ /** VectorTile source with custom format */
6
+ export interface CustomVectorTileSourceConfig extends SourceConfigBase<'vector-tile'>, VectorTileSourceConfigMixin {
7
+ format: FeatureFormat<typeof RenderFeature>;
8
+ }
@@ -0,0 +1,5 @@
1
+ import { SourceConfigBase } from './core/baseConfig';
2
+ import { VectorAsLayerSourceConfigMixin } from './core/vector';
3
+ /** GeoJSON source configuration when displayed as a map layer */
4
+ export interface GeoJSONAsLayerSourceConfig extends SourceConfigBase<'geojson'>, VectorAsLayerSourceConfigMixin {
5
+ }
@@ -0,0 +1,8 @@
1
+ import { GeoTIFFSourceOptions } from '@giro3d/giro3d/sources/GeoTIFFSource';
2
+ import { CRS } from '../geographic';
3
+ import { ImageSourceConfigMixin, SourceConfigBase, SourceConfigProjectionMixin } from './core/baseConfig';
4
+ /** COG source configuration */
5
+ export interface GeoTIFFSourceConfig extends ImageSourceConfigMixin, Pick<GeoTIFFSourceOptions, 'channels' | 'url'>, SourceConfigBase<'cog'>, SourceConfigProjectionMixin {
6
+ /** @deprecated Use {@link dataProjection} instead, will be removed in 24.10 */
7
+ projection: CRS;
8
+ }
@@ -0,0 +1,5 @@
1
+ import { SourceConfigBase } from './core/baseConfig';
2
+ import { VectorAsLayerSourceConfigMixin } from './core/vector';
3
+ /** GPX source configuration when displayed as a map layer */
4
+ export interface GPXAsLayerSourceConfig extends SourceConfigBase<'gpx'>, VectorAsLayerSourceConfigMixin {
5
+ }
@@ -0,0 +1,5 @@
1
+ import { SourceConfigBase } from './core/baseConfig';
2
+ import { VectorAsLayerSourceConfigMixin } from './core/vector';
3
+ /** KML source configuration when displayed as a map layer */
4
+ export interface KMLAsLayerSourceConfig extends SourceConfigBase<'kml'>, VectorAsLayerSourceConfigMixin {
5
+ }
@@ -0,0 +1,10 @@
1
+ import { SourceConfigBase } from './core/baseConfig';
2
+ import { VectorTileSourceConfigMixin } from './core/vectorTile';
3
+ /** MVT source configuration */
4
+ export interface MVTSourceConfig extends SourceConfigBase<'mvt'>, VectorTileSourceConfigMixin {
5
+ /**
6
+ * URL of the source.
7
+ * Should include `{x},{y},{z}` components, e.g. `https://3d.oslandia.com/mysource/{z}/{x}/{y}.pbf`
8
+ * */
9
+ url: string;
10
+ }
@@ -0,0 +1,5 @@
1
+ import { Options as OSMOptions } from 'ol/source/OSM';
2
+ import { ImageSourceConfigMixin, SourceConfigBase } from './core/baseConfig';
3
+ /** OSM source configuration */
4
+ export interface OSMSourceConfig extends ImageSourceConfigMixin, Pick<OSMOptions, 'url'>, SourceConfigBase<'osm'> {
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Options as StadiaMapsOptions } from 'ol/source/StadiaMaps';
2
+ import { ImageSourceConfigMixin, SourceConfigBase } from './core/baseConfig';
3
+ /** StadiaMaps source configuration */
4
+ export interface StadiaMapsSourceConfig extends ImageSourceConfigMixin, Pick<StadiaMapsOptions, 'apiKey' | 'layer' | 'url'>, SourceConfigBase<'stadiamaps'> {
5
+ }
@@ -0,0 +1,15 @@
1
+ import { CRS } from '../geographic';
2
+ import { SourceConfigBase, SourceConfigProjectionMixin } from './core/baseConfig';
3
+ import { TiledImageSourceConfigMixin } from './core/tiled';
4
+ /** WMS source configuration */
5
+ export interface WMSSourceConfig extends SourceConfigBase<'wms'>, SourceConfigProjectionMixin, TiledImageSourceConfigMixin {
6
+ /** Name of the layer, as available in the `getCapabilities` of the source */
7
+ layer: string | string[];
8
+ /** @deprecated Use {@link dataProjection} instead, will be removed in 24.10 */
9
+ projection?: CRS;
10
+ /**
11
+ * URL of the source.
12
+ * Should be the endpoint without parameters, e.g. `'https://data.geopf.fr/wms-r'`
13
+ */
14
+ url: string;
15
+ }
@@ -0,0 +1,15 @@
1
+ import { CRS } from '../geographic';
2
+ import { SourceConfigBase, SourceConfigProjectionMixin } from './core/baseConfig';
3
+ import { TiledImageSourceConfigMixin } from './core/tiled';
4
+ /** WMTS source configuration */
5
+ export interface WMTSSourceConfig extends SourceConfigBase<'wmts'>, SourceConfigProjectionMixin, TiledImageSourceConfigMixin {
6
+ /** Name of the layer, as available in the `getCapabilities` of the source */
7
+ layer: string;
8
+ /** @deprecated Use {@link dataProjection} instead, will be removed in 24.10 */
9
+ projection?: CRS;
10
+ /**
11
+ * URL of the source.
12
+ * Should be the URL pointing to the `getCapabilities`, e.g. `https://data.geopf.fr/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities`,
13
+ */
14
+ url: string;
15
+ }
@@ -0,0 +1,9 @@
1
+ import { Options as XYZOptions } from 'ol/source/XYZ';
2
+ import { CRS } from '../geographic';
3
+ import { SourceConfigBase, SourceConfigProjectionMixin } from './core/baseConfig';
4
+ import { TiledImageSourceConfigMixin } from './core/tiled';
5
+ /** XYZ source configuration */
6
+ export interface XYZSourceConfig extends Pick<XYZOptions, 'url' | 'urls'>, SourceConfigBase<'xyz'>, SourceConfigProjectionMixin, TiledImageSourceConfigMixin {
7
+ /** @deprecated Use {@link dataProjection} instead, will be removed in 24.10 */
8
+ projection?: CRS;
9
+ }
@@ -0,0 +1,5 @@
1
+ export type ExtractOptional<T extends object> = Pick<T, OptionalPropertyOf<T>>;
2
+ /** Keys of optional properties of T */
3
+ export type OptionalPropertyOf<T extends object> = Exclude<{
4
+ [K in keyof T]: T extends Record<K, T[K]> ? never : K;
5
+ }[keyof T], undefined>;
@@ -0,0 +1,8 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * Stores reference and watches for changes on a property of an object
4
+ * @param object - Object
5
+ * @param propName - Property name
6
+ * @returns Watched reference to the property
7
+ */
8
+ export declare function refAndWatch<T, K extends keyof T>(object: T, propName: K): Ref<T[K]>;
@@ -0,0 +1,15 @@
1
+ import { default as ColorMap } from '@giro3d/giro3d/core/ColorMap';
2
+ import { default as Coordinates } from '@giro3d/giro3d/core/geographic/Coordinates';
3
+ import { default as Extent } from '@giro3d/giro3d/core/geographic/Extent';
4
+ import { ColorMapConfig } from '../types/configuration/color';
5
+ import { ExperimentalFeatures } from '../types/configuration/features';
6
+ import { GeoExtent, GeoVec3 } from '../types/configuration/geographic';
7
+ export declare function getColorMap(config: ColorMapConfig): ColorMap;
8
+ export declare function getCoordinates(): undefined;
9
+ export declare function getCoordinates(geovec3: GeoVec3): Coordinates;
10
+ export declare function getCoordinates(geovec3?: GeoVec3): Coordinates | undefined;
11
+ export declare function getExtent(): undefined;
12
+ export declare function getExtent(extent: GeoExtent): Extent;
13
+ export declare function getExtent(extent?: GeoExtent): Extent | undefined;
14
+ export declare function getPublicFolderUrl(url: string): string;
15
+ export declare function hasExperimentalFeature(feature: ExperimentalFeatures): boolean;
@@ -0,0 +1,11 @@
1
+ declare function downloadAsJson(object: object, filename: string): void;
2
+ declare function downloadBlob(object: Blob | MediaSource, filename: string): void;
3
+ declare function getBaseUrl(fallback?: string): string;
4
+ declare function setBaseUrl(url: string): void;
5
+ declare const _default: {
6
+ downloadAsJson: typeof downloadAsJson;
7
+ downloadBlob: typeof downloadBlob;
8
+ getBaseUrl: typeof getBaseUrl;
9
+ setBaseUrl: typeof setBaseUrl;
10
+ };
11
+ export default _default;
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Checks a host is parsable and starts with `http(s)://`.
3
+ * This is useful when passing hosts to Giro3D's HttpConfiguration.
4
+ *
5
+ * @param host - Host (e.g. https://example.com/foobar)
6
+ * @returns true if valid
7
+ */
8
+ declare function checkAbsoluteHost(host: string): boolean;
9
+ /**
10
+ * Fetches a url, Blob-like object and returns an ArrayBuffer object
11
+ * @param url - URL or Blob-like object
12
+ * @param fetchOptions - fetch options
13
+ * @returns ArrayBuffer
14
+ */
15
+ declare function fetchArrayBuffer(url: UrlOrData, fetchOptions?: RequestInit): Promise<ArrayBuffer>;
16
+ /**
17
+ * Fetcher that is able to fetch a URL (if string) or make a Response from a File-object.
18
+ *
19
+ * This redefines loaders.gl's fetch function to use Giro3D's fetcher.
20
+ *
21
+ * @param urlOrData - URL to fetch or Blob
22
+ * @param fetchOptions - fetch options
23
+ * @returns The response object
24
+ */
25
+ declare function fetchInternal(urlOrData: UrlOrData, fetchOptions?: RequestInit): Promise<Response>;
26
+ /**
27
+ * Fetches a url or Blob-like object and returns the content as a JSON object
28
+ * @param params - URL or Blob-like object
29
+ * @param fetchOptions - fetch options
30
+ * @returns Content as JSON object
31
+ * @typeParam T - Type of the JSON object returned
32
+ */
33
+ declare function fetchJson<T extends object = object>(url: UrlOrData, fetchOptions?: RequestInit): Promise<T>;
34
+ /**
35
+ * Fetches a url or Blob-like object and returns the content as a string
36
+ * @param url - URL or Blob-like object
37
+ * @param fetchOptions - fetch options
38
+ * @returns Content as string
39
+ */
40
+ declare function fetchText(url: UrlOrData, fetchOptions?: RequestInit): Promise<string>;
41
+ /**
42
+ * Gets the context from a url, Response or Blob-like object
43
+ * @param urlOrFetchedData - URL, Response or Blob-like object
44
+ * @returns Fetch context
45
+ */
46
+ declare function getContext(urlOrFetchedData: UrlOrFetchedData): FetchContext;
47
+ declare function toDataURL(url: UrlOrData): Promise<string>;
48
+ /**
49
+ * Info on a file.
50
+ * Inspired by loaders.gl LoaderContext
51
+ */
52
+ export interface FetchContext {
53
+ /** Full URL of the resource (without query string) */
54
+ baseUrl: string;
55
+ /** Directory name (`baseUrl` up to the filename) */
56
+ dirname: string;
57
+ /** File extension */
58
+ fileext?: string;
59
+ /** Filename */
60
+ filename: string;
61
+ /** Query string (beginning with the leading `?` character) */
62
+ queryString?: string;
63
+ }
64
+ /** URL to load or Blob (drag-and-drop) */
65
+ export type UrlOrData = Blob | string;
66
+ /** URL to load, or Response (already loaded), or Blob (drag-and-drop) */
67
+ export type UrlOrFetchedData = Blob | Response | string;
68
+ declare const _default: {
69
+ checkAbsoluteHost: typeof checkAbsoluteHost;
70
+ fetch: typeof fetchInternal;
71
+ fetchArrayBuffer: typeof fetchArrayBuffer;
72
+ fetchJson: typeof fetchJson;
73
+ fetchText: typeof fetchText;
74
+ getContext: typeof getContext;
75
+ toDataURL: typeof toDataURL;
76
+ };
77
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { default as Shape } from '@giro3d/giro3d/entities/Shape';
2
+ import { Vector3 } from '../../../../node_modules/three';
3
+ declare function getMinMaxAltitudes(coordsOrDrawing: Shape | Vector3[]): [number, number];
4
+ declare const _default: {
5
+ getMinMaxAltitudes: typeof getMinMaxAltitudes;
6
+ };
7
+ export default _default;
@@ -0,0 +1,57 @@
1
+ import { PolygonOptions } from '@giro3d/giro3d/renderer/geometries/GeometryConverter';
2
+ import { default as Feature, FeatureLike } from 'ol/Feature';
3
+ import { default as FeatureFormat } from 'ol/format/Feature';
4
+ import { LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon } from 'ol/geom';
5
+ import { Group } from '../../../../node_modules/three';
6
+ import { Alticoder } from '../providers/Alticoding';
7
+ declare function fetchZCoordinates(features: SimpleFeature[], featureProjection: string, alticoder: Alticoder, offset: number, noDataValue: number): Promise<void>;
8
+ declare function fillZCoordinates(features: SimpleFeature[], altitude: number, noDataValue: number): void;
9
+ /**
10
+ * Converts data into OpenLayers features
11
+ *
12
+ * @param data - Data
13
+ * @param format - OpenLayers format
14
+ * @param dataProjection - Projection used in the data (by default EPSG:4326)
15
+ * @param featureProjection - Output projection (typically the one used by Giro3D instance)
16
+ * @returns Features
17
+ */
18
+ declare function readFeatures(data: string, format: FeatureFormat, dataProjection: string | undefined, featureProjection: string): Promise<FeatureLike[]>;
19
+ /**
20
+ * Converts data into OpenLayers features
21
+ *
22
+ * @param data - Data
23
+ * @param format - OpenLayers format
24
+ * @param dataProjection - Projection used in the data (by default EPSG:4326)
25
+ * @param featureProjection - Output projection (typically the one used by Giro3D instance)
26
+ * @returns Features
27
+ */
28
+ declare function readSimpleFeatures(data: string, format: FeatureFormat, dataProjection: string, featureProjection: string): SimpleFeature[];
29
+ /**
30
+ * Converts a list of features into Threejs meshes.
31
+ * Meshes are automatically translated around their center to avoid weird side-effects.
32
+ *
33
+ * @param olFeatures - Features to convert
34
+ * @param polygonOptions - Options to pass to the geometry converter.
35
+ * @returns Group of meshes
36
+ */
37
+ declare function toMeshes(olFeatures: SimpleFeature[], polygonOptions?: PolygonOptions): Group;
38
+ /**
39
+ * Filters features read by {@link readFeatures} into {@link SimpleFeature} usable by `OlFeature2Mesh`.
40
+ * Unsupported features are simply ignored and filtered-out.
41
+ *
42
+ * @param features - Features
43
+ * @returns Simple features
44
+ */
45
+ declare function toSimpleFeatures(features: FeatureLike[]): SimpleFeature[];
46
+ export type SimpleFeature = Feature<SimpleGeometry>;
47
+ export type SimpleGeometry = LineString | MultiLineString | MultiPoint | MultiPolygon | Point | Polygon;
48
+ export type SimpleGeometryType = 'LineString' | 'MultiLineString' | 'MultiPoint' | 'MultiPolygon' | 'Point' | 'Polygon';
49
+ declare const _default: {
50
+ fetchZCoordinates: typeof fetchZCoordinates;
51
+ fillZCoordinates: typeof fillZCoordinates;
52
+ readFeatures: typeof readFeatures;
53
+ readSimpleFeatures: typeof readSimpleFeatures;
54
+ toMeshes: typeof toMeshes;
55
+ toSimpleFeatures: typeof toSimpleFeatures;
56
+ };
57
+ export default _default;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Loads a Projection info and registers it in Giro3D if needed
3
+ * @param projection - Projection code
4
+ * @returns EPSG string (e.g. `EPSG:2154`)
5
+ */
6
+ declare function loadProjCrsIfNeeded(projection: string): Promise<string>;
7
+ declare const _default: {
8
+ loadProjCrsIfNeeded: typeof loadProjCrsIfNeeded;
9
+ };
10
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { Color, Vector3 } from '../../../../node_modules/three';
2
+ type Link = {
3
+ href: string;
4
+ title: string;
5
+ type?: string;
6
+ };
7
+ export declare const isObject: (obj: unknown) => obj is object;
8
+ export declare const isLink: (obj: unknown) => obj is Link;
9
+ export declare const isColor: (obj: unknown) => obj is Color;
10
+ export declare const isVector3: (obj: unknown) => obj is Vector3;
11
+ export {};
package/package.json ADDED
@@ -0,0 +1,103 @@
1
+ {
2
+ "name": "@giro3d/piero",
3
+ "type": "module",
4
+ "version": "1.0.0-beta.0",
5
+ "description": "A web application for 3D geospatial data visualization, powered by Giro3D",
6
+ "keywords": [
7
+ "front-end",
8
+ "web",
9
+ "framework",
10
+ "webgl",
11
+ "webgl2",
12
+ "geography",
13
+ "gis",
14
+ "geospatial",
15
+ "3d",
16
+ "3D",
17
+ "three",
18
+ "three.js",
19
+ "openlayers",
20
+ "map",
21
+ "layer",
22
+ "visualization",
23
+ "pointcloud",
24
+ "3dtiles",
25
+ "raster",
26
+ "vector",
27
+ "geojson",
28
+ "geometry",
29
+ "giro3d"
30
+ ],
31
+ "types": "dist/index.d.ts",
32
+ "main": "dist/index.cjs.js",
33
+ "module": "dist/index.es.js",
34
+ "exports": {
35
+ ".": {
36
+ "types": "./dist/index.d.ts",
37
+ "import": "./dist/index.es.js",
38
+ "require": "./dist/index.cjs.js"
39
+ },
40
+ "./modules": {
41
+ "types": "./dist/modules.d.ts",
42
+ "import": "./dist/modules.es.js",
43
+ "require": "./dist/modules.cjs.js"
44
+ },
45
+ "./piero.css": "./dist/assets/piero.css"
46
+ },
47
+ "files": [
48
+ "dist"
49
+ ],
50
+ "sideEffects": [
51
+ "**/*.css"
52
+ ],
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "git+https://gitlab.com/giro3d/piero.git"
56
+ },
57
+ "license": "MIT",
58
+ "bugs": {
59
+ "url": "https://gitlab.com/giro3d/piero/-/issues"
60
+ },
61
+ "publishConfig": {
62
+ "access": "public",
63
+ "registry": "https://registry.npmjs.org/"
64
+ },
65
+ "homepage": "https://piero.giro3d.org/",
66
+ "scripts": {
67
+ "prepublishOnly": "npm run build-library",
68
+ "build-library": "NODE_OPTIONS=--max-old-space-size=8192 vite build",
69
+ "package-library": "npm run build-library && npm pack"
70
+ },
71
+ "peerDependencies": {
72
+ "@giro3d/giro3d": "^0.43.0",
73
+ "ol": "^9.2.4",
74
+ "three": "^0.170.0",
75
+ "vue": "^3.4.20"
76
+ },
77
+ "dependencies": {
78
+ "@loaders.gl/core": "^4.1.1",
79
+ "@loaders.gl/csv": "^4.1.1",
80
+ "@loaders.gl/geopackage": "^4.1.1",
81
+ "@loaders.gl/las": "^4.1.1",
82
+ "@loaders.gl/shapefile": "^4.1.1",
83
+ "@popperjs/core": "^2.11.8",
84
+ "@tarekraafat/autocomplete.js": "^10.2.7",
85
+ "bootstrap": "^5.3.3",
86
+ "bootstrap-icons": "^1.11.3",
87
+ "camera-controls": "^2.10.1",
88
+ "chart.js": "^3.9.1",
89
+ "chroma-js": "^2.4.2",
90
+ "d3-dsv": "^1.2.0",
91
+ "font-gis": "^1.0.5",
92
+ "openbim-components": "1.1.5",
93
+ "pinia": "^2.1.7",
94
+ "proj4": "^2.9.0",
95
+ "regenerator-runtime": "^0.14.1",
96
+ "shepherd.js": "^11.2.0",
97
+ "web-ifc": "^0.0.44"
98
+ },
99
+ "devDependencies": {
100
+ "@types/semver": "^7.7.1",
101
+ "semver": "^7.7.2"
102
+ }
103
+ }