@giro3d/piero 25.10.0-beta.10
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/LICENSE +9 -0
- package/README.md +134 -0
- package/dist/Components.cjs.js +2605 -0
- package/dist/Components.es.js +43490 -0
- package/dist/assets/ParserWorker-Bd30oD5I.js +5 -0
- package/dist/assets/style.css +9 -0
- package/dist/basedecoder.cjs.js +1 -0
- package/dist/basedecoder.es.js +88 -0
- package/dist/decoder.cjs.js +1 -0
- package/dist/decoder.es.js +9 -0
- package/dist/deflate.cjs.js +1 -0
- package/dist/deflate.es.js +10 -0
- package/dist/index.cjs.js +93 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +65240 -0
- package/dist/jpeg.cjs.js +1 -0
- package/dist/jpeg.es.js +514 -0
- package/dist/lerc.cjs.js +1 -0
- package/dist/lerc.es.js +1027 -0
- package/dist/lzw.cjs.js +1 -0
- package/dist/lzw.es.js +84 -0
- package/dist/modules.cjs.js +2973 -0
- package/dist/modules.d.ts +2 -0
- package/dist/modules.es.js +87571 -0
- package/dist/packbits.cjs.js +1 -0
- package/dist/packbits.es.js +24 -0
- package/dist/pako.esm.cjs.js +1 -0
- package/dist/pako.esm.es.js +1053 -0
- package/dist/piero_logo.png +0 -0
- package/dist/piero_logo_compact.png +0 -0
- package/dist/raw.cjs.js +1 -0
- package/dist/raw.es.js +9 -0
- package/dist/sponsors/bpi_france.png +0 -0
- package/dist/sponsors/france_2030.png +0 -0
- package/dist/sponsors/france_relance.png +0 -0
- package/dist/sponsors/oslandia.png +0 -0
- package/dist/sponsors/ue_next_generation.png +0 -0
- package/dist/src/App.vue.d.ts +6 -0
- package/dist/src/api/BookmarkApi.d.ts +6 -0
- package/dist/src/api/DatasetApi.d.ts +61 -0
- package/dist/src/api/ViewApi.d.ts +4 -0
- package/dist/src/api/index.d.ts +4 -0
- package/dist/src/components/AlertToast.vue.d.ts +4 -0
- package/dist/src/components/AttributeGroup.vue.d.ts +7 -0
- package/dist/src/components/AttributeItem.vue.d.ts +6 -0
- package/dist/src/components/AttributePanel.vue.d.ts +14 -0
- package/dist/src/components/ColorFragment.vue.d.ts +6 -0
- package/dist/src/components/Configuration.d.ts +14 -0
- package/dist/src/components/CoordinateFragment.vue.d.ts +10 -0
- package/dist/src/components/DropdownView.vue.d.ts +13 -0
- package/dist/src/components/LinkFragment.vue.d.ts +10 -0
- package/dist/src/components/LoadingScreen.vue.d.ts +2 -0
- package/dist/src/components/MainView.vue.d.ts +5 -0
- package/dist/src/components/MinimapView.vue.d.ts +4 -0
- package/dist/src/components/ModalOverlay.vue.d.ts +17 -0
- package/dist/src/components/NavigationButtons.vue.d.ts +2 -0
- package/dist/src/components/OpacitySlider.vue.d.ts +10 -0
- package/dist/src/components/PanelContainer.vue.d.ts +10 -0
- package/dist/src/components/ProgressBar.vue.d.ts +14 -0
- package/dist/src/components/SearchOverlay.vue.d.ts +8 -0
- package/dist/src/components/SpinnerControl.vue.d.ts +2 -0
- package/dist/src/components/StatusBar.vue.d.ts +10 -0
- package/dist/src/components/SwitchToggle.vue.d.ts +17 -0
- package/dist/src/components/VisibilityControl.vue.d.ts +9 -0
- package/dist/src/components/atoms/ButtonArea.vue.d.ts +9 -0
- package/dist/src/components/atoms/ButtonWithIcon.vue.d.ts +11 -0
- package/dist/src/components/atoms/CompactList.vue.d.ts +9 -0
- package/dist/src/components/atoms/Icon.vue.d.ts +6 -0
- package/dist/src/components/atoms/IconList.vue.d.ts +9 -0
- package/dist/src/components/atoms/IconListButton.vue.d.ts +10 -0
- package/dist/src/components/atoms/ImportButton.vue.d.ts +13 -0
- package/dist/src/components/atoms/ListLabel.vue.d.ts +5 -0
- package/dist/src/components/atoms/ListLabelButton.vue.d.ts +11 -0
- package/dist/src/components/atoms/SectionCollapsible.vue.d.ts +20 -0
- package/dist/src/components/charts/BarChart.vue.d.ts +4 -0
- package/dist/src/components/charts/DoughnutChart.vue.d.ts +4 -0
- package/dist/src/components/panels/AboutPanel.vue.d.ts +2 -0
- package/dist/src/components/panels/AnalysisPanel.vue.d.ts +2 -0
- package/dist/src/components/panels/AnnotationItem.vue.d.ts +21 -0
- package/dist/src/components/panels/AnnotationPanel.vue.d.ts +2 -0
- package/dist/src/components/panels/BasemapItem.vue.d.ts +17 -0
- package/dist/src/components/panels/BookmarkItem.vue.d.ts +16 -0
- package/dist/src/components/panels/BookmarkPanel.vue.d.ts +2 -0
- package/dist/src/components/panels/DatagroupItem.vue.d.ts +18 -0
- package/dist/src/components/panels/DatasetItem.vue.d.ts +18 -0
- package/dist/src/components/panels/DatasetOrGroupItem.vue.d.ts +18 -0
- package/dist/src/components/panels/DatasetPanel.vue.d.ts +2 -0
- package/dist/src/components/panels/EmptyIndicator.vue.d.ts +6 -0
- package/dist/src/components/panels/LoadingIndicator.vue.d.ts +6 -0
- package/dist/src/components/panels/MeasurementItem.vue.d.ts +17 -0
- package/dist/src/components/panels/MeasurementPanel.vue.d.ts +2 -0
- package/dist/src/components/panels/OverlayItem.vue.d.ts +19 -0
- package/dist/src/components/panels/ShareBookmarkModal.vue.d.ts +5 -0
- package/dist/src/components/panels/analysis/ClippingBox.vue.d.ts +2 -0
- package/dist/src/components/panels/analysis/CrossSection.vue.d.ts +2 -0
- package/dist/src/components/panels/analysis/FloodingPlane.vue.d.ts +2 -0
- package/dist/src/components/panels/analysis/Statistics.vue.d.ts +2 -0
- package/dist/src/components/panels/analysis/ToolWrapper.vue.d.ts +20 -0
- package/dist/src/components/toolbar/ToolBar.vue.d.ts +9 -0
- package/dist/src/components/toolbar/ToolbarButton.vue.d.ts +12 -0
- package/dist/src/config-loader.d.ts +7 -0
- package/dist/src/constants.d.ts +7 -0
- package/dist/src/context.d.ts +35 -0
- package/dist/src/createPieroApp.d.ts +31 -0
- package/dist/src/events.d.ts +30 -0
- package/dist/src/giro3d/CameraControlsInspector.d.ts +17 -0
- package/dist/src/giro3d/EntityBuilder.d.ts +21 -0
- package/dist/src/giro3d/Graticule.d.ts +20 -0
- package/dist/src/giro3d/Grid.d.ts +11 -0
- package/dist/src/giro3d/LayerBuilder.d.ts +46 -0
- package/dist/src/giro3d/Measure3D.d.ts +19 -0
- package/dist/src/giro3d/Plane.d.ts +11 -0
- package/dist/src/giro3d/Skybox.d.ts +6 -0
- package/dist/src/giro3d/entities/FeatureCollectionEntity.d.ts +41 -0
- package/dist/src/giro3d/entities/PointCloudEntity.d.ts +45 -0
- package/dist/src/giro3d/entities/TiledPointCloudEntity.d.ts +13 -0
- package/dist/src/giro3d/entities/Tiles3dEntity.d.ts +11 -0
- package/dist/src/giro3d/entities/VectorLabelsEntity.d.ts +48 -0
- package/dist/src/giro3d/entities/VectorMeshEntity.d.ts +97 -0
- package/dist/src/giro3d/entities/VectorShapeEntity.d.ts +8 -0
- package/dist/src/giro3d/entities/flatPointCloud.d.ts +2 -0
- package/dist/src/giro3d/entities/tiledIfc.d.ts +2 -0
- package/dist/src/giro3d/entities/vector.d.ts +2 -0
- package/dist/src/giro3d/sources/GeopackageSource.d.ts +20 -0
- package/dist/src/giro3d/sources/ShapefileSource.d.ts +20 -0
- package/dist/src/giro3d/sources/mixins.d.ts +60 -0
- package/dist/src/index.d.ts +17 -0
- package/dist/src/loaders/csv.d.ts +3 -0
- package/dist/src/loaders/las.d.ts +3 -0
- package/dist/src/loaders/loader.d.ts +29 -0
- package/dist/src/loaders/loader.test.d.ts +1 -0
- package/dist/src/loaders/userData.d.ts +8 -0
- package/dist/src/loaders/vector.d.ts +4 -0
- package/dist/src/module.d.ts +11 -0
- package/dist/src/modules/CityJSONLoader.d.ts +10 -0
- package/dist/src/modules/IFCLoader.d.ts +9 -0
- package/dist/src/modules/PLYLoader.d.ts +9 -0
- package/dist/src/modules/PotreeLoader.d.ts +9 -0
- package/dist/src/modules/Tour.d.ts +17 -0
- package/dist/src/modules/cityjson/CityJSONEntity.d.ts +79 -0
- package/dist/src/modules/cityjson/CityJSONEntityInspector.d.ts +8 -0
- package/dist/src/modules/ifc/IfcEntity.d.ts +87 -0
- package/dist/src/modules/ifc/IfcEntityInspector.d.ts +7 -0
- package/dist/src/modules/ifc/IfcPropertyView.vue.d.ts +6 -0
- package/dist/src/modules/ifc/IfcSubtree.vue.d.ts +7 -0
- package/dist/src/modules/index.d.ts +6 -0
- package/dist/src/modules/ply/PlyEntity.d.ts +33 -0
- package/dist/src/providers/Alticoding.d.ts +32 -0
- package/dist/src/providers/BanProvider.d.ts +11 -0
- package/dist/src/providers/Geocoding.d.ts +7 -0
- package/dist/src/providers/IgnProvider.d.ts +11 -0
- package/dist/src/services/AnalysisManager.d.ts +10 -0
- package/dist/src/services/AnnotationManager.d.ts +48 -0
- package/dist/src/services/CameraController.d.ts +99 -0
- package/dist/src/services/DatasetManager.d.ts +27 -0
- package/dist/src/services/Giro3DManager.d.ts +42 -0
- package/dist/src/services/Highlighter.d.ts +11 -0
- package/dist/src/services/LayerManager.d.ts +37 -0
- package/dist/src/services/MeasureTool.d.ts +13 -0
- package/dist/src/services/MeasurementManager.d.ts +31 -0
- package/dist/src/services/MinimapController.d.ts +19 -0
- package/dist/src/services/Picker.d.ts +53 -0
- package/dist/src/services/analysis/ClippingBoxManager.d.ts +41 -0
- package/dist/src/services/analysis/CrossSectionManager.d.ts +9 -0
- package/dist/src/services/analysis/FloodingPlaneManager.d.ts +11 -0
- package/dist/src/stores/analysis.d.ts +1571 -0
- package/dist/src/stores/annotations.d.ts +60 -0
- package/dist/src/stores/bookmarks.d.ts +21 -0
- package/dist/src/stores/camera.d.ts +287 -0
- package/dist/src/stores/datasets.d.ts +49 -0
- package/dist/src/stores/giro3d.d.ts +45 -0
- package/dist/src/stores/layers.d.ts +40 -0
- package/dist/src/stores/measurement.d.ts +45 -0
- package/dist/src/stores/modules.d.ts +11 -0
- package/dist/src/stores/notifications.d.ts +8 -0
- package/dist/src/stores/statistics.d.ts +8 -0
- package/dist/src/types/Annotation.d.ts +35 -0
- package/dist/src/types/AnnotationMode.d.ts +7 -0
- package/dist/src/types/BaseLayer.d.ts +30 -0
- package/dist/src/types/Bookmark.d.ts +19 -0
- package/dist/src/types/CameraPosition.d.ts +7 -0
- package/dist/src/types/Configuration.d.ts +94 -0
- package/dist/src/types/Dataset.d.ts +78 -0
- package/dist/src/types/Feature.d.ts +13 -0
- package/dist/src/types/FloodingPlane.d.ts +14 -0
- package/dist/src/types/IFCTypes.d.ts +5 -0
- package/dist/src/types/LayerObject.d.ts +20 -0
- package/dist/src/types/Measure.d.ts +20 -0
- package/dist/src/types/MeasurementMode.d.ts +7 -0
- package/dist/src/types/Named.d.ts +5 -0
- package/dist/src/types/NavigationMode.d.ts +2 -0
- package/dist/src/types/Notification.d.ts +8 -0
- package/dist/src/types/OLGeometry.d.ts +1 -0
- package/dist/src/types/Overlay.d.ts +24 -0
- package/dist/src/types/VectorStyle.d.ts +31 -0
- package/dist/src/types/Viewbox.d.ts +7 -0
- package/dist/src/types/configuration/analysis.d.ts +26 -0
- package/dist/src/types/configuration/bookmark.d.ts +16 -0
- package/dist/src/types/configuration/camera.d.ts +19 -0
- package/dist/src/types/configuration/color.d.ts +18 -0
- package/dist/src/types/configuration/datasets/cityjson.d.ts +9 -0
- package/dist/src/types/configuration/datasets/core.d.ts +49 -0
- package/dist/src/types/configuration/datasets/featureCollection.d.ts +6 -0
- package/dist/src/types/configuration/datasets/ifc.d.ts +10 -0
- package/dist/src/types/configuration/datasets/index.d.ts +27 -0
- package/dist/src/types/configuration/datasets/layer.d.ts +43 -0
- package/dist/src/types/configuration/datasets/ply.d.ts +10 -0
- package/dist/src/types/configuration/datasets/pointCloud.d.ts +12 -0
- package/dist/src/types/configuration/datasets/potreePointCloud.d.ts +10 -0
- package/dist/src/types/configuration/datasets/tiledIfc.d.ts +9 -0
- package/dist/src/types/configuration/datasets/tiledPointCloud.d.ts +9 -0
- package/dist/src/types/configuration/datasets/vector.d.ts +34 -0
- package/dist/src/types/configuration/features.d.ts +2 -0
- package/dist/src/types/configuration/geographic.d.ts +51 -0
- package/dist/src/types/configuration/layers/core.d.ts +50 -0
- package/dist/src/types/configuration/layers/index.d.ts +49 -0
- package/dist/src/types/configuration/sources/bingMaps.d.ts +5 -0
- package/dist/src/types/configuration/sources/core/baseConfig.d.ts +70 -0
- package/dist/src/types/configuration/sources/core/tiled.d.ts +19 -0
- package/dist/src/types/configuration/sources/core/vector.d.ts +13 -0
- package/dist/src/types/configuration/sources/core/vectorTile.d.ts +8 -0
- package/dist/src/types/configuration/sources/customVector.d.ts +7 -0
- package/dist/src/types/configuration/sources/customVectorTile.d.ts +8 -0
- package/dist/src/types/configuration/sources/geojson.d.ts +5 -0
- package/dist/src/types/configuration/sources/geotiff.d.ts +8 -0
- package/dist/src/types/configuration/sources/gpx.d.ts +5 -0
- package/dist/src/types/configuration/sources/kml.d.ts +5 -0
- package/dist/src/types/configuration/sources/mvt.d.ts +10 -0
- package/dist/src/types/configuration/sources/osm.d.ts +5 -0
- package/dist/src/types/configuration/sources/stadiaMaps.d.ts +5 -0
- package/dist/src/types/configuration/sources/wms.d.ts +15 -0
- package/dist/src/types/configuration/sources/wmts.d.ts +15 -0
- package/dist/src/types/configuration/sources/xyz.d.ts +9 -0
- package/dist/src/types/utilities.d.ts +5 -0
- package/dist/src/utils/Components.d.ts +8 -0
- package/dist/src/utils/Configuration.d.ts +15 -0
- package/dist/src/utils/Download.d.ts +11 -0
- package/dist/src/utils/Fetcher.d.ts +77 -0
- package/dist/src/utils/Measure.d.ts +7 -0
- package/dist/src/utils/OLFeatures.d.ts +57 -0
- package/dist/src/utils/Projections.d.ts +10 -0
- package/dist/src/utils/Types.d.ts +11 -0
- package/dist/webimage.cjs.js +1 -0
- package/dist/webimage.es.js +19 -0
- package/package.json +100 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UrlOrDataMixin } from '../../../giro3d/sources/mixins';
|
|
2
|
+
import { SourceConfigLocationMixin } from '../sources/core/baseConfig';
|
|
3
|
+
import { DatasetConfigBase } from './core';
|
|
4
|
+
/** PLY source configuration */
|
|
5
|
+
export interface PLYDatasetSourceConfig extends UrlOrDataMixin, Required<SourceConfigLocationMixin> {
|
|
6
|
+
}
|
|
7
|
+
/** PLY dataset configuration */
|
|
8
|
+
export interface PLYDatasetConfig extends DatasetConfigBase<'ply'> {
|
|
9
|
+
source: PLYDatasetSourceConfig;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PointCloudSourceOptions } from '../../../giro3d/entities/PointCloudEntity';
|
|
2
|
+
import { DatasetConfigBase, DatasetConfigMaskingMixin, DatasetSourceConfigBase } from './core';
|
|
3
|
+
export interface CSVPointCloudSourceConfig extends DatasetSourceConfigBase<'csv'>, PointCloudSourceOptions {
|
|
4
|
+
}
|
|
5
|
+
export interface COPCPointCloudSourceConfig extends DatasetSourceConfigBase<'copc'>, PointCloudSourceOptions {
|
|
6
|
+
}
|
|
7
|
+
export interface LASPointCloudSourceConfig extends DatasetSourceConfigBase<'las'>, PointCloudSourceOptions {
|
|
8
|
+
}
|
|
9
|
+
export type PointCloudSourceConfig = CSVPointCloudSourceConfig | LASPointCloudSourceConfig | COPCPointCloudSourceConfig;
|
|
10
|
+
export interface PointCloudDatasetConfig extends DatasetConfigBase<'flatPointcloud'>, DatasetConfigMaskingMixin {
|
|
11
|
+
source: PointCloudSourceConfig;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SourceConfigUrlMixin } from '../sources/core/baseConfig';
|
|
2
|
+
import { DatasetConfigBase, DatasetSourceConfigBase } from './core';
|
|
3
|
+
/** Potree PointCloud source configuration */
|
|
4
|
+
export interface PotreePointCloudDatasetSourceConfig extends DatasetSourceConfigBase<'potree'>, SourceConfigUrlMixin {
|
|
5
|
+
filename?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Potree PointCloud dataset configuration */
|
|
8
|
+
export interface PotreePointCloudDatasetConfig extends DatasetConfigBase<'potree'> {
|
|
9
|
+
source: PotreePointCloudDatasetSourceConfig;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Tiles3dSource } from '../../../giro3d/entities/Tiles3dEntity';
|
|
2
|
+
import { DatasetConfigBase } from './core';
|
|
3
|
+
/** 3DTiles IFC source configuration */
|
|
4
|
+
export interface TiledIfcDatasetSourceConfig extends Tiles3dSource {
|
|
5
|
+
}
|
|
6
|
+
/** 3DTiles IFC dataset configuration */
|
|
7
|
+
export interface TiledIfcDatasetConfig extends DatasetConfigBase<'tiledIfc'> {
|
|
8
|
+
source: TiledIfcDatasetSourceConfig;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TiledPointCloudSource } from '../../../giro3d/entities/TiledPointCloudEntity';
|
|
2
|
+
import { DatasetConfigBase, DatasetConfigMaskingMixin } from './core';
|
|
3
|
+
/** 3D-Tiles PointCloud source configuration */
|
|
4
|
+
export interface TiledPointCloudSourceConfig extends Omit<TiledPointCloudSource, 'name'> {
|
|
5
|
+
}
|
|
6
|
+
/** 3D-Tiles PointCloud dataset configuration */
|
|
7
|
+
export interface TiledPointCloudDatasetConfig extends DatasetConfigBase<'pointcloud'>, DatasetConfigMaskingMixin {
|
|
8
|
+
source: TiledPointCloudSourceConfig;
|
|
9
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { VectorLabelOptions } from '../../../giro3d/entities/VectorLabelsEntity';
|
|
2
|
+
import { VectorMeshSourceOptions } from '../../../giro3d/entities/VectorMeshEntity';
|
|
3
|
+
import { GeopackageSourceParameters } from '../../../giro3d/sources/GeopackageSource';
|
|
4
|
+
import { ShapefileSourceParameters } from '../../../giro3d/sources/ShapefileSource';
|
|
5
|
+
import { default as FeatureFormat } from 'ol/format/Feature';
|
|
6
|
+
import { DatasetConfigBase, DatasetSourceConfigBase } from './core';
|
|
7
|
+
export interface OlMeshSourceConfig extends DatasetSourceConfigBase<'ol'>, Omit<VectorMeshSourceOptions, 'featureProjection'> {
|
|
8
|
+
format: FeatureFormat;
|
|
9
|
+
}
|
|
10
|
+
export interface GpxMeshSourceConfig extends DatasetSourceConfigBase<'gpx'>, Omit<VectorMeshSourceOptions, 'featureProjection'> {
|
|
11
|
+
}
|
|
12
|
+
export interface KmlMeshSourceConfig extends DatasetSourceConfigBase<'kml'>, Omit<VectorMeshSourceOptions, 'featureProjection'> {
|
|
13
|
+
}
|
|
14
|
+
export interface GeoJsonMeshSourceConfig extends DatasetSourceConfigBase<'geojson'>, Omit<VectorMeshSourceOptions, 'featureProjection'> {
|
|
15
|
+
}
|
|
16
|
+
export interface GeopackageMeshSourceConfig extends DatasetSourceConfigBase<'geopackage'>, Omit<GeopackageSourceParameters, 'featureProjection'> {
|
|
17
|
+
}
|
|
18
|
+
export interface ShapefileMeshSourceConfig extends DatasetSourceConfigBase<'shapefile'>, Omit<ShapefileSourceParameters, 'featureProjection'> {
|
|
19
|
+
}
|
|
20
|
+
export type VectorMeshDatasetSourceConfig = GpxMeshSourceConfig | KmlMeshSourceConfig | GeoJsonMeshSourceConfig | GeopackageMeshSourceConfig | ShapefileMeshSourceConfig | OlMeshSourceConfig;
|
|
21
|
+
export interface VectorMeshDatasetConfig extends DatasetConfigBase<'vector'> {
|
|
22
|
+
source: VectorMeshDatasetSourceConfig | VectorMeshDatasetSourceConfig[];
|
|
23
|
+
rendering?: 'mesh';
|
|
24
|
+
}
|
|
25
|
+
export interface VectorShapeDatasetConfig extends DatasetConfigBase<'vector'> {
|
|
26
|
+
source: VectorMeshDatasetSourceConfig;
|
|
27
|
+
rendering: 'shape';
|
|
28
|
+
}
|
|
29
|
+
export interface VectorLabelsDatasetConfig extends DatasetConfigBase<'vector'>, VectorLabelOptions {
|
|
30
|
+
source: VectorMeshDatasetSourceConfig | VectorMeshDatasetSourceConfig[];
|
|
31
|
+
rendering: 'label';
|
|
32
|
+
}
|
|
33
|
+
export type VectorDatasetConfig = VectorMeshDatasetConfig | VectorShapeDatasetConfig | VectorLabelsDatasetConfig;
|
|
34
|
+
export type VectorDatasetRendering = NonNullable<VectorDatasetConfig['rendering']>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CRS name.
|
|
3
|
+
*
|
|
4
|
+
* Requires the CRS to be registered in [`src/services/Giro3DManager.ts`](../services/Giro3DManager.ts)
|
|
5
|
+
* @example `EPSG:2154`
|
|
6
|
+
* @example `IGNF:WGS84G`
|
|
7
|
+
*/
|
|
8
|
+
export type CRS = string;
|
|
9
|
+
export interface Vec2 {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 2D Position
|
|
15
|
+
*
|
|
16
|
+
* If the CRS is not provided, we use `default_crs`
|
|
17
|
+
*
|
|
18
|
+
* @example `{ crs: 'EPSG:2154', x: 842022, y: 6516602 }`
|
|
19
|
+
*/
|
|
20
|
+
export interface GeoVec2 extends Vec2 {
|
|
21
|
+
crs?: CRS;
|
|
22
|
+
}
|
|
23
|
+
export interface Vec3 {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
z: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 3D Position
|
|
30
|
+
*
|
|
31
|
+
* If the CRS is not provided, we use `default_crs`
|
|
32
|
+
*
|
|
33
|
+
* @example `{ crs: 'EPSG:2154', x: 842022, y: 6516602, z: 725 }`
|
|
34
|
+
*/
|
|
35
|
+
export interface GeoVec3 extends Vec3 {
|
|
36
|
+
crs?: CRS;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Extent
|
|
40
|
+
*
|
|
41
|
+
* If the CRS is not provided, we use `default_crs`
|
|
42
|
+
*
|
|
43
|
+
* @example `{ crs: 'EPSG:2154', west: -111629.52, east: 1275028.84, south: 5976033.79, north: 7230161.64 }`
|
|
44
|
+
*/
|
|
45
|
+
export interface GeoExtent {
|
|
46
|
+
crs?: string;
|
|
47
|
+
west: number;
|
|
48
|
+
east: number;
|
|
49
|
+
south: number;
|
|
50
|
+
north: number;
|
|
51
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ColorMapConfig } from '../color';
|
|
2
|
+
import { GeoExtent } from '../geographic';
|
|
3
|
+
import { LayerSourceConfig } from '.';
|
|
4
|
+
import { ColorLayerOptions } from '@giro3d/giro3d/core/layer/ColorLayer';
|
|
5
|
+
import { ElevationLayerOptions } from '@giro3d/giro3d/core/layer/ElevationLayer';
|
|
6
|
+
import { Mode as InterpretationMode, InterpretationOptions } from '@giro3d/giro3d/core/layer/Interpretation';
|
|
7
|
+
import { LayerOptions } from '@giro3d/giro3d/core/layer/Layer';
|
|
8
|
+
import { MaskLayerOptions } from '@giro3d/giro3d/core/layer/MaskLayer';
|
|
9
|
+
/** Mixin configuration for layer options */
|
|
10
|
+
export interface LayerConfigMixin extends Pick<LayerOptions, 'showTileBorders' | 'showEmptyTextures' | 'noDataOptions' | 'preloadImages' | 'resolutionFactor' | 'minFilter' | 'magFilter'> {
|
|
11
|
+
/** Restrict the extent of the data */
|
|
12
|
+
extent?: GeoExtent;
|
|
13
|
+
/** Interpretation mode of the data */
|
|
14
|
+
interpretation?: InterpretationOptions & {
|
|
15
|
+
mode: InterpretationMode;
|
|
16
|
+
};
|
|
17
|
+
/** Color map for displaying the layer */
|
|
18
|
+
colorMap?: ColorMapConfig;
|
|
19
|
+
/** Background color of the layer */
|
|
20
|
+
backgroundColor?: string;
|
|
21
|
+
}
|
|
22
|
+
/** Basemap layer configuration */
|
|
23
|
+
export interface LayerConfigBase<TLayerType extends string> extends LayerConfigMixin {
|
|
24
|
+
/** Type of layer */
|
|
25
|
+
type: TLayerType;
|
|
26
|
+
/** Name of the layer displayed in the UI */
|
|
27
|
+
name: string;
|
|
28
|
+
/** Source configuration */
|
|
29
|
+
source: LayerSourceConfig;
|
|
30
|
+
/** Indicates if the layer should be loaded by default */
|
|
31
|
+
visible: boolean;
|
|
32
|
+
}
|
|
33
|
+
/** Mixin configuration for color layer options */
|
|
34
|
+
export interface ColorLayerConfigMixin extends Pick<ColorLayerOptions, 'elevationRange' | 'opacity' | 'minFilter' | 'magFilter'> {
|
|
35
|
+
}
|
|
36
|
+
/** Mixin configuration for elevation layer options */
|
|
37
|
+
export interface ElevationLayerConfigMixin extends Pick<ElevationLayerOptions, 'minmax'> {
|
|
38
|
+
}
|
|
39
|
+
/** Mixin configuration for mask layer options */
|
|
40
|
+
export interface MaskLayerConfigMixin extends Pick<MaskLayerOptions, 'maskMode'> {
|
|
41
|
+
}
|
|
42
|
+
/** Color layer configuration */
|
|
43
|
+
export interface ColorLayerConfig extends LayerConfigBase<'color'>, ColorLayerConfigMixin {
|
|
44
|
+
}
|
|
45
|
+
/** Elevation layer configuration */
|
|
46
|
+
export interface ElevationLayerConfig extends LayerConfigBase<'elevation'>, ElevationLayerConfigMixin {
|
|
47
|
+
}
|
|
48
|
+
/** Mask layer configuration */
|
|
49
|
+
export interface MaskLayerConfig extends LayerConfigBase<'mask'>, MaskLayerConfigMixin {
|
|
50
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { BingMapsSourceConfig } from '../sources/bingMaps';
|
|
2
|
+
import { CustomVectorSourceConfig } from '../sources/customVector';
|
|
3
|
+
import { CustomVectorTileSourceConfig } from '../sources/customVectorTile';
|
|
4
|
+
import { GeoJSONAsLayerSourceConfig } from '../sources/geojson';
|
|
5
|
+
import { GeoTIFFSourceConfig } from '../sources/geotiff';
|
|
6
|
+
import { GPXAsLayerSourceConfig } from '../sources/gpx';
|
|
7
|
+
import { KMLAsLayerSourceConfig } from '../sources/kml';
|
|
8
|
+
import { MVTSourceConfig } from '../sources/mvt';
|
|
9
|
+
import { OSMSourceConfig } from '../sources/osm';
|
|
10
|
+
import { StadiaMapsSourceConfig } from '../sources/stadiaMaps';
|
|
11
|
+
import { WMSSourceConfig } from '../sources/wms';
|
|
12
|
+
import { WMTSSourceConfig } from '../sources/wmts';
|
|
13
|
+
import { XYZSourceConfig } from '../sources/xyz';
|
|
14
|
+
import { ColorLayerConfig, ElevationLayerConfig, MaskLayerConfig } from './core';
|
|
15
|
+
/** Supported layer sources */
|
|
16
|
+
export type LayerSourceConfig = BingMapsSourceConfig | GeoTIFFSourceConfig | CustomVectorSourceConfig | CustomVectorTileSourceConfig | GeoJSONAsLayerSourceConfig | GPXAsLayerSourceConfig | KMLAsLayerSourceConfig | MVTSourceConfig | OSMSourceConfig | StadiaMapsSourceConfig | WMSSourceConfig | WMTSSourceConfig | XYZSourceConfig;
|
|
17
|
+
/** Supported layer source types */
|
|
18
|
+
export type LayerSourceType = LayerSourceConfig['type'];
|
|
19
|
+
/** Available configuration for layer sources */
|
|
20
|
+
export type BasemapLayerSourceConfig = LayerSourceConfig;
|
|
21
|
+
/** Available configuration for overlay sources */
|
|
22
|
+
export type OverlaySourceConfig = LayerSourceConfig;
|
|
23
|
+
/** Overlay configuration */
|
|
24
|
+
export interface OverlayConfig extends Omit<ColorLayerConfig, 'type'> {
|
|
25
|
+
/** Source configuration */
|
|
26
|
+
source: OverlaySourceConfig;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Vector overlay configuration
|
|
30
|
+
*
|
|
31
|
+
* @deprecated Use 'source' field instead. Will be removed in release v24.7.
|
|
32
|
+
*/
|
|
33
|
+
export type OverlayVectorConfigDeprecated = Omit<OverlayConfig, 'source'> & (GeoJSONAsLayerSourceConfig | GPXAsLayerSourceConfig | KMLAsLayerSourceConfig);
|
|
34
|
+
/**
|
|
35
|
+
* Vector tile overlay configuration
|
|
36
|
+
*
|
|
37
|
+
* @deprecated Use 'source' field instead. Will be removed in release v24.7.
|
|
38
|
+
*/
|
|
39
|
+
export type OverlayVectorTileConfigDeprecated = Omit<OverlayConfig, 'source'> & MVTSourceConfig;
|
|
40
|
+
/**
|
|
41
|
+
* Raster overlay configuration
|
|
42
|
+
*
|
|
43
|
+
* @deprecated Use 'source' field instead. Will be removed in release v24.7.
|
|
44
|
+
*/
|
|
45
|
+
export type OverlayRasterConfigDeprecated = OverlayConfig & (WMSSourceConfig | WMTSSourceConfig);
|
|
46
|
+
/** Layer configuration */
|
|
47
|
+
export type LayerConfig = ColorLayerConfig | ElevationLayerConfig | MaskLayerConfig;
|
|
48
|
+
/** Supported Giro3D layer types */
|
|
49
|
+
export type LayerType = LayerConfig['type'];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Options as BingMapsOptions } from 'ol/source/BingMaps';
|
|
2
|
+
import { ImageSourceConfigMixin, SourceConfigBase } from './core/baseConfig';
|
|
3
|
+
/** Bing maps source configuration */
|
|
4
|
+
export interface BingMapsSourceConfig extends SourceConfigBase<'bingmaps'>, ImageSourceConfigMixin, Pick<BingMapsOptions, 'hidpi' | 'culture' | 'key' | 'imagerySet'> {
|
|
5
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { CRS, GeoVec3 } from '../../geographic';
|
|
2
|
+
import { UrlOrData } from '../../../../utils/Fetcher';
|
|
3
|
+
import { ImageSourceOptions } from '@giro3d/giro3d/sources/ImageSource';
|
|
4
|
+
/** Base configuration for all sources (layers, overlays and datasets) */
|
|
5
|
+
export interface SourceConfigBase<TSourceType extends string> {
|
|
6
|
+
/** Type of source */
|
|
7
|
+
type: TSourceType;
|
|
8
|
+
}
|
|
9
|
+
/** Mixin configuration for sources that require a URL */
|
|
10
|
+
export interface SourceConfigUrlMixin {
|
|
11
|
+
/** URL of the source */
|
|
12
|
+
url: string;
|
|
13
|
+
}
|
|
14
|
+
/** Mixin configuration for sources that require a URL or Blob */
|
|
15
|
+
export interface SourceConfigUrlOrDataMixin {
|
|
16
|
+
/** URL of the source */
|
|
17
|
+
url: UrlOrData;
|
|
18
|
+
}
|
|
19
|
+
/** Mixin configuration for sources that may set their geolocation */
|
|
20
|
+
export interface SourceConfigLocationMixin {
|
|
21
|
+
/** Location */
|
|
22
|
+
position?: GeoVec3;
|
|
23
|
+
}
|
|
24
|
+
/** Mixin configuration for sources that may have a data projection */
|
|
25
|
+
export interface SourceConfigProjectionMixin {
|
|
26
|
+
/** CRS of the source - must be registered first */
|
|
27
|
+
dataProjection?: CRS;
|
|
28
|
+
}
|
|
29
|
+
/** Mixin configuration for sources that may require elevation configuration */
|
|
30
|
+
export interface SourceConfigElevationMixin {
|
|
31
|
+
/**
|
|
32
|
+
* Elevation of data
|
|
33
|
+
*
|
|
34
|
+
* @defaultValue 0
|
|
35
|
+
*/
|
|
36
|
+
elevation?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Fetch elevation from provider
|
|
39
|
+
*
|
|
40
|
+
* @defaultValue false
|
|
41
|
+
*/
|
|
42
|
+
fetchElevation?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Fetch elevation from map instead of API
|
|
45
|
+
*
|
|
46
|
+
* @defaultValue false
|
|
47
|
+
*/
|
|
48
|
+
fetchElevationFast?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* When fetching elevation, add this offset
|
|
51
|
+
*
|
|
52
|
+
* @defaultValue 0.1
|
|
53
|
+
*/
|
|
54
|
+
fetchElevationOffset?: number;
|
|
55
|
+
/**
|
|
56
|
+
* When fetching or setting elevation, consider this value as no data
|
|
57
|
+
*
|
|
58
|
+
* @defaultValue 0
|
|
59
|
+
*/
|
|
60
|
+
noDataValue?: number;
|
|
61
|
+
}
|
|
62
|
+
/** Mixin configuration for layers and overlays sources */
|
|
63
|
+
export interface ImageSourceConfigMixin extends Pick<ImageSourceOptions, 'flipY' | 'is8bit' | 'colorSpace'> {
|
|
64
|
+
/**
|
|
65
|
+
* The relative resolution of the layer.
|
|
66
|
+
* If greater than 1, the resolution will be greater, at the cost of performance and memory usage.
|
|
67
|
+
* @defaultValue 1
|
|
68
|
+
*/
|
|
69
|
+
resolution?: number;
|
|
70
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GeoExtent } from '../../geographic';
|
|
2
|
+
import { TiledImageSourceOptions } from '@giro3d/giro3d/sources/TiledImageSource';
|
|
3
|
+
import { ImageSourceConfigMixin } from './baseConfig';
|
|
4
|
+
/** Format for decoding the data */
|
|
5
|
+
export type DecodingFormat = 'Bil' | 'MapboxTerrain' | 'GeoTIFF';
|
|
6
|
+
/** Mixin configuration for tiled layers */
|
|
7
|
+
export interface TiledImageSourceConfigMixin extends ImageSourceConfigMixin, Pick<TiledImageSourceOptions, 'noDataValue' | 'httpTimeout' | 'retries'> {
|
|
8
|
+
/** Mime-type (`image/png`, `image/jpg`, etc.) */
|
|
9
|
+
format?: string;
|
|
10
|
+
/** Decoding format. Required for Mapbox Terrain for instance. */
|
|
11
|
+
imageFormat?: DecodingFormat;
|
|
12
|
+
/** Restrict the extent of the data */
|
|
13
|
+
extent?: GeoExtent;
|
|
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 { VectorStyle } from '../../../VectorStyle';
|
|
2
|
+
import { CRS } from '../../geographic';
|
|
3
|
+
import { ImageSourceConfigMixin, SourceConfigProjectionMixin, SourceConfigUrlOrDataMixin } from './baseConfig';
|
|
4
|
+
/** Mixin configuration for vector sources, common to meshes and map layers */
|
|
5
|
+
export interface VectorSourceConfigMixin extends SourceConfigProjectionMixin {
|
|
6
|
+
/** @deprecated Use {@link dataProjection} instead, will be removed in 24.10 */
|
|
7
|
+
projection?: CRS;
|
|
8
|
+
}
|
|
9
|
+
/** Mixin configuration for vector sources displayed as map layers */
|
|
10
|
+
export interface VectorAsLayerSourceConfigMixin extends VectorSourceConfigMixin, SourceConfigUrlOrDataMixin, ImageSourceConfigMixin {
|
|
11
|
+
/** Style */
|
|
12
|
+
style: VectorStyle;
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VectorStyle } from '../../../VectorStyle';
|
|
2
|
+
import { VectorTileSourceOptions } from '@giro3d/giro3d/sources/VectorTileSource';
|
|
3
|
+
import { ImageSourceConfigMixin } from './baseConfig';
|
|
4
|
+
/** Mixin configuration for vector tiled layers */
|
|
5
|
+
export interface VectorTileSourceConfigMixin extends Pick<VectorTileSourceOptions, 'url' | 'backgroundColor'>, ImageSourceConfigMixin {
|
|
6
|
+
/** Style */
|
|
7
|
+
style: VectorStyle;
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SourceConfigBase } from './core/baseConfig';
|
|
2
|
+
import { VectorAsLayerSourceConfigMixin } from './core/vector';
|
|
3
|
+
import { default as FeatureFormat } from 'ol/format/Feature';
|
|
4
|
+
/** Vector source with custom format */
|
|
5
|
+
export interface CustomVectorSourceConfig extends SourceConfigBase<'vector'>, VectorAsLayerSourceConfigMixin {
|
|
6
|
+
format: FeatureFormat;
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SourceConfigBase } from './core/baseConfig';
|
|
2
|
+
import { VectorTileSourceConfigMixin } from './core/vectorTile';
|
|
3
|
+
import { default as FeatureFormat } from 'ol/format/Feature';
|
|
4
|
+
import { default as RenderFeature } from 'ol/render/Feature';
|
|
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 { CRS } from '../geographic';
|
|
2
|
+
import { GeoTIFFSourceOptions } from '@giro3d/giro3d/sources/GeoTIFFSource';
|
|
3
|
+
import { ImageSourceConfigMixin, SourceConfigBase, SourceConfigProjectionMixin } from './core/baseConfig';
|
|
4
|
+
/** COG source configuration */
|
|
5
|
+
export interface GeoTIFFSourceConfig extends SourceConfigBase<'cog'>, ImageSourceConfigMixin, SourceConfigProjectionMixin, Pick<GeoTIFFSourceOptions, 'url' | 'channels'> {
|
|
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 SourceConfigBase<'osm'>, ImageSourceConfigMixin, Pick<OSMOptions, 'url'> {
|
|
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 SourceConfigBase<'stadiamaps'>, ImageSourceConfigMixin, Pick<StadiaMapsOptions, 'layer' | 'url' | 'apiKey'> {
|
|
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'>, TiledImageSourceConfigMixin, SourceConfigProjectionMixin {
|
|
6
|
+
/** @deprecated Use {@link dataProjection} instead, will be removed in 24.10 */
|
|
7
|
+
projection?: CRS;
|
|
8
|
+
/** Name of the layer, as available in the `getCapabilities` of the source */
|
|
9
|
+
layer: string | string[];
|
|
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'>, TiledImageSourceConfigMixin, SourceConfigProjectionMixin {
|
|
6
|
+
/** @deprecated Use {@link dataProjection} instead, will be removed in 24.10 */
|
|
7
|
+
projection?: CRS;
|
|
8
|
+
/** Name of the layer, as available in the `getCapabilities` of the source */
|
|
9
|
+
layer: string;
|
|
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 { CRS } from '../geographic';
|
|
2
|
+
import { Options as XYZOptions } from 'ol/source/XYZ';
|
|
3
|
+
import { SourceConfigBase, SourceConfigProjectionMixin } from './core/baseConfig';
|
|
4
|
+
import { TiledImageSourceConfigMixin } from './core/tiled';
|
|
5
|
+
/** XYZ source configuration */
|
|
6
|
+
export interface XYZSourceConfig extends SourceConfigBase<'xyz'>, TiledImageSourceConfigMixin, SourceConfigProjectionMixin, Pick<XYZOptions, 'url' | 'urls'> {
|
|
7
|
+
/** @deprecated Use {@link dataProjection} instead, will be removed in 24.10 */
|
|
8
|
+
projection?: CRS;
|
|
9
|
+
}
|
|
@@ -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 { ColorMapConfig } from '../types/configuration/color';
|
|
2
|
+
import { ExperimentalFeatures } from '../types/configuration/features';
|
|
3
|
+
import { GeoExtent, GeoVec3 } from '../types/configuration/geographic';
|
|
4
|
+
import { default as ColorMap } from '@giro3d/giro3d/core/ColorMap';
|
|
5
|
+
import { default as Coordinates } from '@giro3d/giro3d/core/geographic/Coordinates';
|
|
6
|
+
import { default as Extent } from '@giro3d/giro3d/core/geographic/Extent';
|
|
7
|
+
export declare function getPublicFolderUrl(url: string): string;
|
|
8
|
+
export declare function hasExperimentalFeature(feature: ExperimentalFeatures): boolean;
|
|
9
|
+
export declare function getColorMap(config: ColorMapConfig): ColorMap;
|
|
10
|
+
export declare function getCoordinates(geovec3: GeoVec3): Coordinates;
|
|
11
|
+
export declare function getCoordinates(): undefined;
|
|
12
|
+
export declare function getCoordinates(geovec3?: GeoVec3): Coordinates | undefined;
|
|
13
|
+
export declare function getExtent(extent: GeoExtent): Extent;
|
|
14
|
+
export declare function getExtent(): undefined;
|
|
15
|
+
export declare function getExtent(extent?: GeoExtent): Extent | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare function downloadBlob(object: Blob | MediaSource, filename: string): void;
|
|
2
|
+
declare function downloadAsJson(object: object, filename: string): void;
|
|
3
|
+
declare function setBaseUrl(url: string): void;
|
|
4
|
+
declare function getBaseUrl(fallback?: string): string;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
downloadBlob: typeof downloadBlob;
|
|
7
|
+
downloadAsJson: typeof downloadAsJson;
|
|
8
|
+
getBaseUrl: typeof getBaseUrl;
|
|
9
|
+
setBaseUrl: typeof setBaseUrl;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/** URL to load or Blob (drag-and-drop) */
|
|
2
|
+
export type UrlOrData = string | Blob;
|
|
3
|
+
/** URL to load, or Response (already loaded), or Blob (drag-and-drop) */
|
|
4
|
+
export type UrlOrFetchedData = string | Response | Blob;
|
|
5
|
+
/**
|
|
6
|
+
* Info on a file.
|
|
7
|
+
* Inspired by loaders.gl LoaderContext
|
|
8
|
+
*/
|
|
9
|
+
export interface FetchContext {
|
|
10
|
+
/** Full URL of the resource (without query string) */
|
|
11
|
+
baseUrl: string;
|
|
12
|
+
/** Query string (beginning with the leading `?` character) */
|
|
13
|
+
queryString?: string;
|
|
14
|
+
/** Directory name (`baseUrl` up to the filename) */
|
|
15
|
+
dirname: string;
|
|
16
|
+
/** Filename */
|
|
17
|
+
filename: string;
|
|
18
|
+
/** File extension */
|
|
19
|
+
fileext?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Checks a host is parsable and starts with `http(s)://`.
|
|
23
|
+
* This is useful when passing hosts to Giro3D's HttpConfiguration.
|
|
24
|
+
*
|
|
25
|
+
* @param host - Host (e.g. https://example.com/foobar)
|
|
26
|
+
* @returns true if valid
|
|
27
|
+
*/
|
|
28
|
+
declare function checkAbsoluteHost(host: string): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Fetcher that is able to fetch a URL (if string) or make a Response from a File-object.
|
|
31
|
+
*
|
|
32
|
+
* This redefines loaders.gl's fetch function to use Giro3D's fetcher.
|
|
33
|
+
*
|
|
34
|
+
* @param urlOrData - URL to fetch or Blob
|
|
35
|
+
* @param fetchOptions - fetch options
|
|
36
|
+
* @returns The response object
|
|
37
|
+
*/
|
|
38
|
+
declare function fetchInternal(urlOrData: UrlOrData, fetchOptions?: RequestInit): Promise<Response>;
|
|
39
|
+
declare function toDataURL(url: UrlOrData): Promise<string>;
|
|
40
|
+
/**
|
|
41
|
+
* Fetches a url, Blob-like object and returns an ArrayBuffer object
|
|
42
|
+
* @param url - URL or Blob-like object
|
|
43
|
+
* @param fetchOptions - fetch options
|
|
44
|
+
* @returns ArrayBuffer
|
|
45
|
+
*/
|
|
46
|
+
declare function fetchArrayBuffer(url: UrlOrData, fetchOptions?: RequestInit): Promise<ArrayBuffer>;
|
|
47
|
+
/**
|
|
48
|
+
* Fetches a url or Blob-like object and returns the content as a string
|
|
49
|
+
* @param url - URL or Blob-like object
|
|
50
|
+
* @param fetchOptions - fetch options
|
|
51
|
+
* @returns Content as string
|
|
52
|
+
*/
|
|
53
|
+
declare function fetchText(url: UrlOrData, fetchOptions?: RequestInit): Promise<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Fetches a url or Blob-like object and returns the content as a JSON object
|
|
56
|
+
* @param params - URL or Blob-like object
|
|
57
|
+
* @param fetchOptions - fetch options
|
|
58
|
+
* @returns Content as JSON object
|
|
59
|
+
* @typeParam T - Type of the JSON object returned
|
|
60
|
+
*/
|
|
61
|
+
declare function fetchJson<T extends object = object>(url: UrlOrData, fetchOptions?: RequestInit): Promise<T>;
|
|
62
|
+
/**
|
|
63
|
+
* Gets the context from a url, Response or Blob-like object
|
|
64
|
+
* @param urlOrFetchedData - URL, Response or Blob-like object
|
|
65
|
+
* @returns Fetch context
|
|
66
|
+
*/
|
|
67
|
+
declare function getContext(urlOrFetchedData: UrlOrFetchedData): FetchContext;
|
|
68
|
+
declare const _default: {
|
|
69
|
+
checkAbsoluteHost: typeof checkAbsoluteHost;
|
|
70
|
+
fetch: typeof fetchInternal;
|
|
71
|
+
fetchArrayBuffer: typeof fetchArrayBuffer;
|
|
72
|
+
fetchText: typeof fetchText;
|
|
73
|
+
fetchJson: typeof fetchJson;
|
|
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;
|