@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.
- package/LICENSE +9 -0
- package/README.md +134 -0
- package/dist/Components.cjs.js +2 -0
- package/dist/Components.cjs.js.map +1 -0
- package/dist/Components.es.js +608 -0
- package/dist/Components.es.js.map +1 -0
- package/dist/assets/piero.css +9 -0
- package/dist/index.cjs.js +9 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +6971 -0
- package/dist/index.es.js.map +1 -0
- package/dist/modules.cjs.js +2 -0
- package/dist/modules.cjs.js.map +1 -0
- package/dist/modules.d.ts +2 -0
- package/dist/modules.es.js +856 -0
- package/dist/modules.es.js.map +1 -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 +25 -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 +25 -0
- package/dist/src/components/VisibilityControl.vue.d.ts +9 -0
- package/dist/src/components/atoms/ButtonArea.vue.d.ts +17 -0
- package/dist/src/components/atoms/ButtonWithIcon.vue.d.ts +11 -0
- package/dist/src/components/atoms/CompactList.vue.d.ts +17 -0
- package/dist/src/components/atoms/Icon.vue.d.ts +6 -0
- package/dist/src/components/atoms/IconList.vue.d.ts +17 -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 +30 -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 +28 -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 +20 -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/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/ifc/IfcEntity.d.ts +84 -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 +5 -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 +39 -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 +106 -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 +51 -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/package.json +103 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EventDispatcher } from '../../../../node_modules/three';
|
|
2
|
+
type LayerObjectEventMap = {
|
|
3
|
+
delete: {};
|
|
4
|
+
isLoading: {};
|
|
5
|
+
opacity: {};
|
|
6
|
+
visible: {};
|
|
7
|
+
};
|
|
8
|
+
export default abstract class LayerObject extends EventDispatcher<LayerObjectEventMap> {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly uuid: string;
|
|
11
|
+
get opacity(): number;
|
|
12
|
+
set opacity(v: number);
|
|
13
|
+
get visible(): boolean;
|
|
14
|
+
set visible(v: boolean);
|
|
15
|
+
private _opacity;
|
|
16
|
+
private _visible;
|
|
17
|
+
constructor(name: string);
|
|
18
|
+
delete(): void;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EventDispatcher } from '../../../../node_modules/three';
|
|
2
|
+
import { default as Measure3D } from '../giro3d/Measure3D';
|
|
3
|
+
type MeasureEventMap = {
|
|
4
|
+
visible: {};
|
|
5
|
+
};
|
|
6
|
+
export default class Measure extends EventDispatcher<MeasureEventMap> {
|
|
7
|
+
properties: object;
|
|
8
|
+
readonly title: string;
|
|
9
|
+
readonly uuid: string;
|
|
10
|
+
get object(): Measure3D;
|
|
11
|
+
set object(obj: Measure3D);
|
|
12
|
+
get visible(): boolean;
|
|
13
|
+
set visible(v: boolean);
|
|
14
|
+
private _object;
|
|
15
|
+
private _visible;
|
|
16
|
+
constructor(title: string, object: Measure3D, properties?: object);
|
|
17
|
+
static toCollection(measures: Measure[]): GeoJSON.FeatureCollection;
|
|
18
|
+
toGeoJSON(): GeoJSON.Feature;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type NotificationLevel = 'error' | 'info' | 'success' | 'warning';
|
|
2
|
+
export default class Notification {
|
|
3
|
+
readonly level: NotificationLevel;
|
|
4
|
+
readonly text: string;
|
|
5
|
+
readonly title: string;
|
|
6
|
+
constructor(title: string, text: string, level?: NotificationLevel);
|
|
7
|
+
static empty(): Notification;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type OLGeometry = 'Circle' | 'GeometryCollection' | 'LinearRing' | 'LineString' | 'MultiLineString' | 'MultiPoint' | 'MultiPolygon' | 'Point' | 'Polygon';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EventDispatcher } from '../../../../node_modules/three';
|
|
2
|
+
import { OverlayConfig, OverlaySourceConfig } from './configuration/layers';
|
|
3
|
+
import { default as LayerObject } from './LayerObject';
|
|
4
|
+
export interface Overlay extends EventDispatcher {
|
|
5
|
+
name: string;
|
|
6
|
+
options: OverlayOptions;
|
|
7
|
+
source: OverlaySourceConfig;
|
|
8
|
+
uuid: string;
|
|
9
|
+
get isLoading(): boolean;
|
|
10
|
+
set isLoading(v: boolean);
|
|
11
|
+
get opacity(): number;
|
|
12
|
+
set opacity(v: number);
|
|
13
|
+
get visible(): boolean;
|
|
14
|
+
set visible(v: boolean);
|
|
15
|
+
}
|
|
16
|
+
export type OverlayOptions = Omit<OverlayConfig, 'name' | 'source'>;
|
|
17
|
+
export declare class OverlayObject extends LayerObject implements Overlay {
|
|
18
|
+
readonly options: OverlayOptions;
|
|
19
|
+
readonly source: OverlaySourceConfig;
|
|
20
|
+
get isLoading(): boolean;
|
|
21
|
+
set isLoading(v: boolean);
|
|
22
|
+
private _loading;
|
|
23
|
+
constructor({ name, source, ...options }: OverlayConfig);
|
|
24
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Style } from 'ol/style';
|
|
2
|
+
import { StyleFunction } from 'ol/style/Style';
|
|
3
|
+
export type DynamicStyleCollection = Record<DynamicStyleId, Style | StyleFunction>;
|
|
4
|
+
export type DynamicStyleId = string;
|
|
5
|
+
export interface FillStyle {
|
|
6
|
+
color: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PointStyle {
|
|
9
|
+
fill: FillStyle;
|
|
10
|
+
radius: number;
|
|
11
|
+
stroke: StrokeStyle;
|
|
12
|
+
}
|
|
13
|
+
/** Static vector style */
|
|
14
|
+
export interface StaticVectorStyle {
|
|
15
|
+
/** Fill style (for polygons) */
|
|
16
|
+
fill?: FillStyle;
|
|
17
|
+
/** Point style (for points) */
|
|
18
|
+
point?: PointStyle;
|
|
19
|
+
/** Stroke style (for lines and polygons) */
|
|
20
|
+
stroke?: StrokeStyle;
|
|
21
|
+
}
|
|
22
|
+
export interface StrokeStyle {
|
|
23
|
+
color: string;
|
|
24
|
+
width: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Vector style.
|
|
28
|
+
*
|
|
29
|
+
* Either an entry of the [Style configuration](../style.ts), or a static configuration
|
|
30
|
+
*/
|
|
31
|
+
export type VectorStyle = 'default' | DynamicStyleId | StaticVectorStyle;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Vector3, BufferGeometry, LineBasicMaterial, LineSegments } from '../../../../node_modules/three';
|
|
2
|
+
export default class Viewbox {
|
|
3
|
+
geometry: BufferGeometry;
|
|
4
|
+
object3D: LineSegments<BufferGeometry, LineBasicMaterial>;
|
|
5
|
+
constructor();
|
|
6
|
+
setCorners(ul: Vector3, ur: Vector3, lr: Vector3, ll: Vector3): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { GeoVec2, GeoVec3, Vec3 } from './geographic';
|
|
2
|
+
export interface AnalysisConfig {
|
|
3
|
+
/** Clipping box configuration */
|
|
4
|
+
clipping_box: {
|
|
5
|
+
/** Default center of the clipping box */
|
|
6
|
+
center: GeoVec3;
|
|
7
|
+
/** Default settings for floor presets */
|
|
8
|
+
floor_preset: {
|
|
9
|
+
/** Altitude of the ground of floor 0 */
|
|
10
|
+
altitude: number;
|
|
11
|
+
/** Default floor number */
|
|
12
|
+
floor: number;
|
|
13
|
+
/** Height of a floor */
|
|
14
|
+
size: number;
|
|
15
|
+
};
|
|
16
|
+
/** Default size of the clipping box */
|
|
17
|
+
size: Vec3;
|
|
18
|
+
};
|
|
19
|
+
/** Cross section configuration */
|
|
20
|
+
cross_section: {
|
|
21
|
+
/** Default orientation in degrees of the cross section plane */
|
|
22
|
+
orientation: number;
|
|
23
|
+
/** Default pivot point */
|
|
24
|
+
pivot: GeoVec2;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Vec3 } from './geographic';
|
|
2
|
+
/**
|
|
3
|
+
* Bookmark configuration.
|
|
4
|
+
*
|
|
5
|
+
* The easiest way to define a bookmark is actually to set it in the app, export it and copy the values from the JSON file.
|
|
6
|
+
*/
|
|
7
|
+
export interface BookmarkConfig {
|
|
8
|
+
/** Focal offset of the camera */
|
|
9
|
+
focalOffset: Vec3;
|
|
10
|
+
/** 3D position of the camera, in `default_crs` */
|
|
11
|
+
position: Vec3;
|
|
12
|
+
/** 3D position of the camera target, in `default_crs` */
|
|
13
|
+
target: Vec3;
|
|
14
|
+
/** Name of the bookmark displayed in the UI */
|
|
15
|
+
title: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GeoVec2, GeoVec3 } from './geographic';
|
|
2
|
+
/** Camera configuration */
|
|
3
|
+
export interface CameraConfig {
|
|
4
|
+
/** Initial camera target - if not provided, will use the center of the extent */
|
|
5
|
+
lookAt?: GeoVec3;
|
|
6
|
+
/** Initial camera position */
|
|
7
|
+
position: GeoVec3;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Deprecated camera configuration
|
|
11
|
+
*
|
|
12
|
+
* @deprecated - Use CameraConfig instead. Will be removed in release v24.7.
|
|
13
|
+
*/
|
|
14
|
+
export interface CameraConfigDeprecated {
|
|
15
|
+
/** Initial camera altitude */
|
|
16
|
+
altitude: number;
|
|
17
|
+
/** Initial camera position */
|
|
18
|
+
position: [number, number] | GeoVec2;
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as ColorMapMode } from '@giro3d/giro3d/core/ColorMapMode';
|
|
2
|
+
/**
|
|
3
|
+
* Color map configuration for Elevation layer, used when it's the only layer displayed
|
|
4
|
+
*/
|
|
5
|
+
export interface ColorMapConfig {
|
|
6
|
+
/** Value mapped to the end of the color ramp */
|
|
7
|
+
max: number;
|
|
8
|
+
/** Value mapped to the start of the color ramp */
|
|
9
|
+
min: number;
|
|
10
|
+
/** Color map mode */
|
|
11
|
+
mode?: ColorMapMode;
|
|
12
|
+
/** Color ramp */
|
|
13
|
+
ramp: ColorRamp;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Color ramp name, as supported by [chroma.js](https://gka.github.io/chroma.js/#chroma-brewer)
|
|
17
|
+
*/
|
|
18
|
+
export type ColorRamp = string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DataProjectionMixin, UrlOrDataMixin } from '../../../giro3d/sources/mixins';
|
|
2
|
+
import { DatasetConfigBase, DatasetConfigMaskingMixin } from './core';
|
|
3
|
+
/** CityJSON dataset configuration */
|
|
4
|
+
export interface CityJSONDatasetConfig extends DatasetConfigBase<'cityjson'>, DatasetConfigMaskingMixin {
|
|
5
|
+
source: CityJSONDatasetSourceConfig;
|
|
6
|
+
}
|
|
7
|
+
/** CityJSON source configuration */
|
|
8
|
+
export interface CityJSONDatasetSourceConfig extends DataProjectionMixin, UrlOrDataMixin {
|
|
9
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { default as Entity3D } from '@giro3d/giro3d/entities/Entity3D';
|
|
2
|
+
import { LayerType } from '../layers';
|
|
3
|
+
import { SourceConfigElevationMixin, SourceConfigLocationMixin, SourceConfigProjectionMixin } from '../sources/core/baseConfig';
|
|
4
|
+
import { DatasetOrGroup } from '../../Dataset';
|
|
5
|
+
/** Configuration that can be set on groups and cascade to children */
|
|
6
|
+
export interface DatasetCascadingConfig extends SourceConfigElevationMixin, SourceConfigLocationMixin, SourceConfigProjectionMixin {
|
|
7
|
+
}
|
|
8
|
+
/** Base configuration for all datasets */
|
|
9
|
+
export interface DatasetConfigBase<TDatasetType extends string> {
|
|
10
|
+
/** Name of the dataset, as displayed in the UI */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Callback which is called when the dataset is preloaded into the app */
|
|
13
|
+
onObjectPreloaded?: OnObjectPreloaded;
|
|
14
|
+
/**
|
|
15
|
+
* Default opacity (between 0 and 1; 0: transparent, 1: opaque)
|
|
16
|
+
* @defaultValue 1
|
|
17
|
+
*/
|
|
18
|
+
opacity?: number;
|
|
19
|
+
/** Type of dataset */
|
|
20
|
+
type: TDatasetType;
|
|
21
|
+
/**
|
|
22
|
+
* Loads the dataset by default when opening the app
|
|
23
|
+
* @defaultValue false
|
|
24
|
+
*/
|
|
25
|
+
visible?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/** Mixin configuration for datasets that support masking the basemap */
|
|
28
|
+
export interface DatasetConfigMaskingMixin {
|
|
29
|
+
/** Indicates whether this dataset can mask the basemap */
|
|
30
|
+
canMaskBasemap?: boolean;
|
|
31
|
+
/** Indicates whether this dataset is by default masking the basemap when loaded */
|
|
32
|
+
isMaskingBasemap?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/** Giro3D layer types support for datasets */
|
|
35
|
+
export type DatasetLayerType = Exclude<LayerType, 'elevation'>;
|
|
36
|
+
/** Base configuration for all dataset sources */
|
|
37
|
+
export interface DatasetSourceConfigBase<TDatasetType extends string> {
|
|
38
|
+
/** Type of dataset */
|
|
39
|
+
type: TDatasetType;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Callback which is called when the dataset is preloaded into the app.
|
|
43
|
+
*
|
|
44
|
+
* This can be useful for post-processing your data (transformation, rotation, etc.).
|
|
45
|
+
*
|
|
46
|
+
* @param dataset - Dataset created
|
|
47
|
+
* @param entity - Giro3D entity created
|
|
48
|
+
*/
|
|
49
|
+
export type OnObjectPreloaded = (dataset: DatasetOrGroup, entity: Entity3D) => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FeatureCollectionEntityOptions } from '../../../giro3d/entities/FeatureCollectionEntity';
|
|
2
|
+
import { DatasetConfigBase } from './core';
|
|
3
|
+
/** Buildings dataset configuration */
|
|
4
|
+
export interface FeatureCollectionDatasetConfig extends DatasetConfigBase<'featureCollection'> {
|
|
5
|
+
source: FeatureCollectionEntityOptions['source'];
|
|
6
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UrlOrDataMixin } from '../../../giro3d/sources/mixins';
|
|
2
|
+
import { SourceConfigLocationMixin } from '../sources/core/baseConfig';
|
|
3
|
+
import { DatasetConfigBase, DatasetConfigMaskingMixin } from './core';
|
|
4
|
+
/** IFC dataset configuration */
|
|
5
|
+
export interface IFCDatasetConfig extends DatasetConfigBase<'ifc'>, DatasetConfigMaskingMixin {
|
|
6
|
+
source: IFCDatasetSourceConfig;
|
|
7
|
+
}
|
|
8
|
+
/** IFC source configuration */
|
|
9
|
+
export interface IFCDatasetSourceConfig extends SourceConfigLocationMixin, UrlOrDataMixin {
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CityJSONDatasetConfig } from './cityjson';
|
|
2
|
+
import { DatasetCascadingConfig, DatasetConfigBase, DatasetConfigMaskingMixin } from './core';
|
|
3
|
+
import { FeatureCollectionDatasetConfig } from './featureCollection';
|
|
4
|
+
import { IFCDatasetConfig } from './ifc';
|
|
5
|
+
import { ColorLayerDatasetConfig, ElevationLayerDatasetConfig, MaskLayerDatasetConfig } from './layer';
|
|
6
|
+
import { PLYDatasetConfig } from './ply';
|
|
7
|
+
import { PointCloudDatasetConfig } from './pointCloud';
|
|
8
|
+
import { PotreePointCloudDatasetConfig } from './potreePointCloud';
|
|
9
|
+
import { TiledIfcDatasetConfig } from './tiledIfc';
|
|
10
|
+
import { TiledPointCloudDatasetConfig } from './tiledPointCloud';
|
|
11
|
+
import { VectorLabelsDatasetConfig, VectorMeshDatasetConfig, VectorShapeDatasetConfig } from './vector';
|
|
12
|
+
/** Configuration for a group of datasets */
|
|
13
|
+
export interface DatagroupConfig extends DatasetCascadingConfig, DatasetConfigBase<'group'>, DatasetConfigMaskingMixin {
|
|
14
|
+
/** Datasets contained in this group */
|
|
15
|
+
children: DatasetOrGroupConfig[];
|
|
16
|
+
}
|
|
17
|
+
export type DatasetAsLayerConfig = ColorLayerDatasetConfig | ElevationLayerDatasetConfig | MaskLayerDatasetConfig;
|
|
18
|
+
export type DatasetAsMeshConfig = CityJSONDatasetConfig | FeatureCollectionDatasetConfig | IFCDatasetConfig | PLYDatasetConfig | PointCloudDatasetConfig | PotreePointCloudDatasetConfig | TiledIfcDatasetConfig | TiledPointCloudDatasetConfig | VectorLabelsDatasetConfig | VectorMeshDatasetConfig | VectorShapeDatasetConfig;
|
|
19
|
+
/** All supported datasets */
|
|
20
|
+
export type DatasetConfig = DatasetAsLayerConfig | DatasetAsMeshConfig;
|
|
21
|
+
export type DatasetConfigImportable = Extract<DatasetConfig, CityJSONDatasetConfig | ColorLayerDatasetConfig | IFCDatasetConfig | PointCloudDatasetConfig | VectorLabelsDatasetConfig | VectorMeshDatasetConfig | VectorShapeDatasetConfig>;
|
|
22
|
+
/** Configuration for dataset hierarchy */
|
|
23
|
+
export type DatasetOrGroupConfig = DatagroupConfig | DatasetConfig;
|
|
24
|
+
/** List of all dataset types */
|
|
25
|
+
export type DatasetType = DatasetConfig['type'];
|
|
26
|
+
/** List of dataset types that can be imported into the app */
|
|
27
|
+
export type DatasetTypeImportable = DatasetConfigImportable['type'];
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ColorLayerOptions } from '@giro3d/giro3d/core/layer/ColorLayer';
|
|
2
|
+
import { ElevationLayerOptions } from '@giro3d/giro3d/core/layer/ElevationLayer';
|
|
3
|
+
import { Mode as InterpretationMode, InterpretationOptions } from '@giro3d/giro3d/core/layer/Interpretation';
|
|
4
|
+
import { LayerOptions } from '@giro3d/giro3d/core/layer/Layer';
|
|
5
|
+
import { MaskLayerOptions } from '@giro3d/giro3d/core/layer/MaskLayer';
|
|
6
|
+
import { ColorMapConfig } from '../color';
|
|
7
|
+
import { GeoExtent } from '../geographic';
|
|
8
|
+
import { LayerSourceConfig } from '../layers';
|
|
9
|
+
import { DatasetConfigBase } from './core';
|
|
10
|
+
/** Mixin configuration for color layer options */
|
|
11
|
+
export interface ColorLayerConfigMixin extends Pick<ColorLayerOptions, 'elevationRange' | 'magFilter' | 'minFilter' | 'opacity'> {
|
|
12
|
+
}
|
|
13
|
+
/** Color layer configuration */
|
|
14
|
+
export interface ColorLayerDatasetConfig extends ColorLayerConfigMixin, LayerDatasetConfigBase<'colorLayer'> {
|
|
15
|
+
}
|
|
16
|
+
/** Mixin configuration for elevation layer options */
|
|
17
|
+
export interface ElevationLayerConfigMixin extends Pick<ElevationLayerOptions, 'minmax'> {
|
|
18
|
+
}
|
|
19
|
+
/** Elevation layer configuration */
|
|
20
|
+
export interface ElevationLayerDatasetConfig extends ElevationLayerConfigMixin, LayerDatasetConfigBase<'elevationLayer'> {
|
|
21
|
+
}
|
|
22
|
+
/** Mixin configuration for layer options */
|
|
23
|
+
export interface LayerConfigMixin extends Pick<LayerOptions, 'noDataOptions' | 'preloadImages' | 'resolutionFactor' | 'showEmptyTextures' | 'showTileBorders'> {
|
|
24
|
+
/** Background color of the layer */
|
|
25
|
+
backgroundColor?: string;
|
|
26
|
+
/** Color map for displaying the layer */
|
|
27
|
+
colorMap?: ColorMapConfig;
|
|
28
|
+
/** Restrict the extent of the data */
|
|
29
|
+
extent?: GeoExtent;
|
|
30
|
+
/** Interpretation mode of the data */
|
|
31
|
+
interpretation?: InterpretationOptions & {
|
|
32
|
+
mode: InterpretationMode;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface LayerDatasetConfigBase<TDatasetType extends string> extends DatasetConfigBase<TDatasetType>, LayerConfigMixin {
|
|
36
|
+
source: LayerSourceConfig;
|
|
37
|
+
}
|
|
38
|
+
/** Mixin configuration for mask layer options */
|
|
39
|
+
export interface MaskLayerConfigMixin extends Pick<MaskLayerOptions, 'maskMode'> {
|
|
40
|
+
}
|
|
41
|
+
/** Mask layer configuration */
|
|
42
|
+
export interface MaskLayerDatasetConfig extends LayerDatasetConfigBase<'maskLayer'>, MaskLayerConfigMixin {
|
|
43
|
+
}
|
|
@@ -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 dataset configuration */
|
|
5
|
+
export interface PLYDatasetConfig extends DatasetConfigBase<'ply'> {
|
|
6
|
+
source: PLYDatasetSourceConfig;
|
|
7
|
+
}
|
|
8
|
+
/** PLY source configuration */
|
|
9
|
+
export interface PLYDatasetSourceConfig extends Required<SourceConfigLocationMixin>, UrlOrDataMixin {
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PointCloudSourceOptions } from '../../../giro3d/entities/PointCloudEntity';
|
|
2
|
+
import { DatasetConfigBase, DatasetConfigMaskingMixin, DatasetSourceConfigBase } from './core';
|
|
3
|
+
export interface COPCPointCloudSourceConfig extends DatasetSourceConfigBase<'copc'>, PointCloudSourceOptions {
|
|
4
|
+
}
|
|
5
|
+
export interface CSVPointCloudSourceConfig extends DatasetSourceConfigBase<'csv'>, PointCloudSourceOptions {
|
|
6
|
+
}
|
|
7
|
+
export interface LASPointCloudSourceConfig extends DatasetSourceConfigBase<'las'>, PointCloudSourceOptions {
|
|
8
|
+
}
|
|
9
|
+
export interface PointCloudDatasetConfig extends DatasetConfigBase<'flatPointcloud'>, DatasetConfigMaskingMixin {
|
|
10
|
+
source: PointCloudSourceConfig;
|
|
11
|
+
}
|
|
12
|
+
export type PointCloudSourceConfig = COPCPointCloudSourceConfig | CSVPointCloudSourceConfig | LASPointCloudSourceConfig;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SourceConfigUrlMixin } from '../sources/core/baseConfig';
|
|
2
|
+
import { DatasetConfigBase, DatasetSourceConfigBase } from './core';
|
|
3
|
+
/** Potree PointCloud dataset configuration */
|
|
4
|
+
export interface PotreePointCloudDatasetConfig extends DatasetConfigBase<'potree'> {
|
|
5
|
+
source: PotreePointCloudDatasetSourceConfig;
|
|
6
|
+
}
|
|
7
|
+
/** Potree PointCloud source configuration */
|
|
8
|
+
export interface PotreePointCloudDatasetSourceConfig extends DatasetSourceConfigBase<'potree'>, SourceConfigUrlMixin {
|
|
9
|
+
filename?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Tiles3dSource } from '../../../giro3d/entities/Tiles3dEntity';
|
|
2
|
+
import { DatasetConfigBase } from './core';
|
|
3
|
+
/** 3DTiles IFC dataset configuration */
|
|
4
|
+
export interface TiledIfcDatasetConfig extends DatasetConfigBase<'tiledIfc'> {
|
|
5
|
+
source: TiledIfcDatasetSourceConfig;
|
|
6
|
+
}
|
|
7
|
+
/** 3DTiles IFC source configuration */
|
|
8
|
+
export interface TiledIfcDatasetSourceConfig extends Tiles3dSource {
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TiledPointCloudSource } from '../../../giro3d/entities/TiledPointCloudEntity';
|
|
2
|
+
import { DatasetConfigBase, DatasetConfigMaskingMixin } from './core';
|
|
3
|
+
/** 3D-Tiles PointCloud dataset configuration */
|
|
4
|
+
export interface TiledPointCloudDatasetConfig extends DatasetConfigBase<'pointcloud'>, DatasetConfigMaskingMixin {
|
|
5
|
+
source: TiledPointCloudSourceConfig;
|
|
6
|
+
}
|
|
7
|
+
/** 3D-Tiles PointCloud source configuration */
|
|
8
|
+
export interface TiledPointCloudSourceConfig extends Omit<TiledPointCloudSource, 'name'> {
|
|
9
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as FeatureFormat } from 'ol/format/Feature';
|
|
2
|
+
import { VectorLabelOptions } from '../../../giro3d/entities/VectorLabelsEntity';
|
|
3
|
+
import { VectorMeshSourceOptions } from '../../../giro3d/entities/VectorMeshEntity';
|
|
4
|
+
import { GeopackageSourceParameters } from '../../../giro3d/sources/GeopackageSource';
|
|
5
|
+
import { ShapefileSourceParameters } from '../../../giro3d/sources/ShapefileSource';
|
|
6
|
+
import { DatasetConfigBase, DatasetSourceConfigBase } from './core';
|
|
7
|
+
export interface GeoJsonMeshSourceConfig extends DatasetSourceConfigBase<'geojson'>, Omit<VectorMeshSourceOptions, 'featureProjection'> {
|
|
8
|
+
}
|
|
9
|
+
export interface GeopackageMeshSourceConfig extends DatasetSourceConfigBase<'geopackage'>, Omit<GeopackageSourceParameters, 'featureProjection'> {
|
|
10
|
+
}
|
|
11
|
+
export interface GpxMeshSourceConfig extends DatasetSourceConfigBase<'gpx'>, Omit<VectorMeshSourceOptions, 'featureProjection'> {
|
|
12
|
+
}
|
|
13
|
+
export interface KmlMeshSourceConfig extends DatasetSourceConfigBase<'kml'>, Omit<VectorMeshSourceOptions, 'featureProjection'> {
|
|
14
|
+
}
|
|
15
|
+
export interface OlMeshSourceConfig extends DatasetSourceConfigBase<'ol'>, Omit<VectorMeshSourceOptions, 'featureProjection'> {
|
|
16
|
+
format: FeatureFormat;
|
|
17
|
+
}
|
|
18
|
+
export interface ShapefileMeshSourceConfig extends DatasetSourceConfigBase<'shapefile'>, Omit<ShapefileSourceParameters, 'featureProjection'> {
|
|
19
|
+
}
|
|
20
|
+
export type VectorDatasetConfig = VectorLabelsDatasetConfig | VectorMeshDatasetConfig | VectorShapeDatasetConfig;
|
|
21
|
+
export type VectorDatasetRendering = NonNullable<VectorDatasetConfig['rendering']>;
|
|
22
|
+
export interface VectorLabelsDatasetConfig extends DatasetConfigBase<'vector'>, VectorLabelOptions {
|
|
23
|
+
rendering: 'label';
|
|
24
|
+
source: VectorMeshDatasetSourceConfig | VectorMeshDatasetSourceConfig[];
|
|
25
|
+
}
|
|
26
|
+
export interface VectorMeshDatasetConfig extends DatasetConfigBase<'vector'> {
|
|
27
|
+
rendering?: 'mesh';
|
|
28
|
+
source: VectorMeshDatasetSourceConfig | VectorMeshDatasetSourceConfig[];
|
|
29
|
+
}
|
|
30
|
+
export type VectorMeshDatasetSourceConfig = GeoJsonMeshSourceConfig | GeopackageMeshSourceConfig | GpxMeshSourceConfig | KmlMeshSourceConfig | OlMeshSourceConfig | ShapefileMeshSourceConfig;
|
|
31
|
+
export interface VectorShapeDatasetConfig extends DatasetConfigBase<'vector'> {
|
|
32
|
+
rendering: 'shape';
|
|
33
|
+
source: VectorMeshDatasetSourceConfig;
|
|
34
|
+
}
|
|
@@ -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
|
+
/**
|
|
10
|
+
* Extent
|
|
11
|
+
*
|
|
12
|
+
* If the CRS is not provided, we use `default_crs`
|
|
13
|
+
*
|
|
14
|
+
* @example `{ crs: 'EPSG:2154', west: -111629.52, east: 1275028.84, south: 5976033.79, north: 7230161.64 }`
|
|
15
|
+
*/
|
|
16
|
+
export interface GeoExtent {
|
|
17
|
+
crs?: string;
|
|
18
|
+
east: number;
|
|
19
|
+
north: number;
|
|
20
|
+
south: number;
|
|
21
|
+
west: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 2D Position
|
|
25
|
+
*
|
|
26
|
+
* If the CRS is not provided, we use `default_crs`
|
|
27
|
+
*
|
|
28
|
+
* @example `{ crs: 'EPSG:2154', x: 842022, y: 6516602 }`
|
|
29
|
+
*/
|
|
30
|
+
export interface GeoVec2 extends Vec2 {
|
|
31
|
+
crs?: CRS;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 3D Position
|
|
35
|
+
*
|
|
36
|
+
* If the CRS is not provided, we use `default_crs`
|
|
37
|
+
*
|
|
38
|
+
* @example `{ crs: 'EPSG:2154', x: 842022, y: 6516602, z: 725 }`
|
|
39
|
+
*/
|
|
40
|
+
export interface GeoVec3 extends Vec3 {
|
|
41
|
+
crs?: CRS;
|
|
42
|
+
}
|
|
43
|
+
export interface Vec2 {
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
}
|
|
47
|
+
export interface Vec3 {
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
z: number;
|
|
51
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ColorLayerOptions } from '@giro3d/giro3d/core/layer/ColorLayer';
|
|
2
|
+
import { ElevationLayerOptions } from '@giro3d/giro3d/core/layer/ElevationLayer';
|
|
3
|
+
import { Mode as InterpretationMode, InterpretationOptions } from '@giro3d/giro3d/core/layer/Interpretation';
|
|
4
|
+
import { LayerOptions } from '@giro3d/giro3d/core/layer/Layer';
|
|
5
|
+
import { MaskLayerOptions } from '@giro3d/giro3d/core/layer/MaskLayer';
|
|
6
|
+
import { ColorMapConfig } from '../color';
|
|
7
|
+
import { GeoExtent } from '../geographic';
|
|
8
|
+
import { LayerSourceConfig } from '.';
|
|
9
|
+
/** Color layer configuration */
|
|
10
|
+
export interface ColorLayerConfig extends ColorLayerConfigMixin, LayerConfigBase<'color'> {
|
|
11
|
+
}
|
|
12
|
+
/** Mixin configuration for color layer options */
|
|
13
|
+
export interface ColorLayerConfigMixin extends Pick<ColorLayerOptions, 'elevationRange' | 'magFilter' | 'minFilter' | 'opacity'> {
|
|
14
|
+
}
|
|
15
|
+
/** Elevation layer configuration */
|
|
16
|
+
export interface ElevationLayerConfig extends ElevationLayerConfigMixin, LayerConfigBase<'elevation'> {
|
|
17
|
+
}
|
|
18
|
+
/** Mixin configuration for elevation layer options */
|
|
19
|
+
export interface ElevationLayerConfigMixin extends Pick<ElevationLayerOptions, 'minmax'> {
|
|
20
|
+
}
|
|
21
|
+
/** Basemap layer configuration */
|
|
22
|
+
export interface LayerConfigBase<TLayerType extends string> extends LayerConfigMixin {
|
|
23
|
+
/** Name of the layer displayed in the UI */
|
|
24
|
+
name: string;
|
|
25
|
+
/** Source configuration */
|
|
26
|
+
source: LayerSourceConfig;
|
|
27
|
+
/** Type of layer */
|
|
28
|
+
type: TLayerType;
|
|
29
|
+
/** Indicates if the layer should be loaded by default */
|
|
30
|
+
visible: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** Mixin configuration for layer options */
|
|
33
|
+
export interface LayerConfigMixin extends Pick<LayerOptions, 'magFilter' | 'minFilter' | 'noDataOptions' | 'preloadImages' | 'resolutionFactor' | 'showEmptyTextures' | 'showTileBorders'> {
|
|
34
|
+
/** Background color of the layer */
|
|
35
|
+
backgroundColor?: string;
|
|
36
|
+
/** Color map for displaying the layer */
|
|
37
|
+
colorMap?: ColorMapConfig;
|
|
38
|
+
/** Restrict the extent of the data */
|
|
39
|
+
extent?: GeoExtent;
|
|
40
|
+
/** Interpretation mode of the data */
|
|
41
|
+
interpretation?: InterpretationOptions & {
|
|
42
|
+
mode: InterpretationMode;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/** Mask layer configuration */
|
|
46
|
+
export interface MaskLayerConfig extends LayerConfigBase<'mask'>, MaskLayerConfigMixin {
|
|
47
|
+
}
|
|
48
|
+
/** Mixin configuration for mask layer options */
|
|
49
|
+
export interface MaskLayerConfigMixin extends Pick<MaskLayerOptions, 'maskMode'> {
|
|
50
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
type OverlayVectorSourceConfig = GeoJSONAsLayerSourceConfig | GPXAsLayerSourceConfig | KMLAsLayerSourceConfig;
|
|
16
|
+
/** Available configuration for layer sources */
|
|
17
|
+
export type BasemapLayerSourceConfig = LayerSourceConfig;
|
|
18
|
+
/** Layer configuration */
|
|
19
|
+
export type LayerConfig = ColorLayerConfig | ElevationLayerConfig | MaskLayerConfig;
|
|
20
|
+
/** Supported layer sources */
|
|
21
|
+
export type LayerSourceConfig = BingMapsSourceConfig | CustomVectorSourceConfig | CustomVectorTileSourceConfig | GeoJSONAsLayerSourceConfig | GeoTIFFSourceConfig | GPXAsLayerSourceConfig | KMLAsLayerSourceConfig | MVTSourceConfig | OSMSourceConfig | StadiaMapsSourceConfig | WMSSourceConfig | WMTSSourceConfig | XYZSourceConfig;
|
|
22
|
+
/** Supported layer source types */
|
|
23
|
+
export type LayerSourceType = LayerSourceConfig['type'];
|
|
24
|
+
/** Supported Giro3D layer types */
|
|
25
|
+
export type LayerType = LayerConfig['type'];
|
|
26
|
+
/** Overlay configuration */
|
|
27
|
+
export interface OverlayConfig extends Omit<ColorLayerConfig, 'type'> {
|
|
28
|
+
/** Source configuration */
|
|
29
|
+
source: OverlaySourceConfig;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Raster overlay configuration
|
|
33
|
+
*
|
|
34
|
+
* @deprecated Use 'source' field instead. Will be removed in release v24.7.
|
|
35
|
+
*/
|
|
36
|
+
export type OverlayRasterConfigDeprecated = OverlayConfig & (WMSSourceConfig | WMTSSourceConfig);
|
|
37
|
+
/** Available configuration for overlay sources */
|
|
38
|
+
export type OverlaySourceConfig = LayerSourceConfig;
|
|
39
|
+
/**
|
|
40
|
+
* Vector overlay configuration
|
|
41
|
+
*
|
|
42
|
+
* @deprecated Use 'source' field instead. Will be removed in release v24.7.
|
|
43
|
+
*/
|
|
44
|
+
export type OverlayVectorConfigDeprecated = Omit<OverlayConfig, 'source'> & OverlayVectorSourceConfig;
|
|
45
|
+
/**
|
|
46
|
+
* Vector tile overlay configuration
|
|
47
|
+
*
|
|
48
|
+
* @deprecated Use 'source' field instead. Will be removed in release v24.7.
|
|
49
|
+
*/
|
|
50
|
+
export type OverlayVectorTileConfigDeprecated = MVTSourceConfig & Omit<OverlayConfig, 'source'>;
|
|
51
|
+
export {};
|
|
@@ -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 ImageSourceConfigMixin, Pick<BingMapsOptions, 'culture' | 'hidpi' | 'imagerySet' | 'key'>, SourceConfigBase<'bingmaps'> {
|
|
5
|
+
}
|