├── .npmrc
├── src
├── moduleIdSymbol.ts
├── vectorCluster
│ ├── vectorClusterSymbols.ts
│ ├── vectorClusterGroupCollection.ts
│ ├── vectorClusterGroupOpenlayersImpl.ts
│ └── vectorClusterGroupObliqueImpl.ts
├── cesium
│ ├── clippingPolygonCollection.ts
│ ├── cesium3DTilePointFeature.ts
│ ├── entity.ts
│ ├── cesium3DTileFeature.ts
│ ├── clippingPolygon.ts
│ └── wallpaperMaterial.js
├── map
│ ├── mapState.ts
│ └── navigation
│ │ ├── openlayersNavigation.ts
│ │ ├── viewHelper.ts
│ │ ├── easingHelper.ts
│ │ ├── navigationImpl.ts
│ │ └── controller
│ │ └── controller.ts
├── layer
│ ├── layerState.ts
│ ├── featureStoreLayerState.ts
│ ├── cesium
│ │ ├── resourceHelper.ts
│ │ ├── openStreetMapCesiumImpl.ts
│ │ ├── vcsTile
│ │ │ ├── vcsNoDataTile.ts
│ │ │ └── vcsChildTile.ts
│ │ ├── cogCesiumImpl.ts
│ │ ├── singleImageCesiumImpl.ts
│ │ ├── tmsCesiumImpl.ts
│ │ ├── terrainCesiumImpl.ts
│ │ └── wmsCesiumImpl.ts
│ ├── layerSymbols.ts
│ ├── openlayers
│ │ ├── openStreetMapOpenlayersImpl.ts
│ │ ├── loadFunctionHelpers.ts
│ │ ├── tileDebugOpenlayersImpl.ts
│ │ ├── rasterLayerOpenlayersImpl.ts
│ │ ├── wmsOpenlayersImpl.ts
│ │ ├── cogOpenlayersImpl.ts
│ │ ├── tmsOpenlayersImpl.ts
│ │ └── singleImageOpenlayersImpl.ts
│ ├── oblique
│ │ └── layerObliqueImpl.ts
│ ├── panorama
│ │ └── panoramaDatasetPanoramaImpl.ts
│ ├── featureStoreFeatureVisibility.ts
│ ├── tileProvider
│ │ ├── staticFeatureTileProvider.ts
│ │ └── staticGeojsonTileProvider.ts
│ ├── tileLoadedHelper.ts
│ ├── flatGeobufLayer.ts
│ ├── vectorSymbols.ts
│ └── layerImplementation.ts
├── util
│ ├── locale.ts
│ ├── urlHelpers.ts
│ ├── editor
│ │ ├── editorSymbols.ts
│ │ ├── validateGeoemetry.ts
│ │ ├── interactions
│ │ │ ├── removeVertexInteraction.ts
│ │ │ ├── rightClickInteraction.ts
│ │ │ ├── translateVertexInteraction.ts
│ │ │ ├── createPointInteraction.ts
│ │ │ ├── ensureHandlerSelectionInteraction.ts
│ │ │ └── editFeaturesMouseOverInteraction.ts
│ │ └── transformation
│ │ │ └── transformationTypes.ts
│ ├── hiddenObjects.ts
│ ├── fetch.ts
│ ├── featureconverter
│ │ └── arcToCesium.ts
│ ├── isMobile.ts
│ ├── flight
│ │ └── flightCollection.ts
│ └── clipping
│ │ └── clippingPolygonHelper.ts
├── style
│ ├── modelFill.ts
│ ├── styleFactory.ts
│ ├── writeStyle.ts
│ └── shapesCategory.ts
├── featureProvider
│ ├── featureProviderSymbols.ts
│ └── tileProviderFeatureProvider.ts
├── global.d.ts
├── oblique
│ ├── obliqueViewDirection.ts
│ └── defaultObliqueCollection.ts
├── ol
│ ├── geojson.d.ts
│ ├── source
│ │ ├── ClusterEnhancedVectorSource.ts
│ │ └── VcsCluster.ts
│ └── geom
│ │ └── circle.ts
├── interaction
│ ├── interactionType.ts
│ ├── panoramaImageSelection.ts
│ └── featureProviderInteraction.ts
├── panorama
│ └── panoramaTileCache.ts
├── workers
│ └── panoramaImageWorker.ts
├── vcsObject.ts
└── vcsEvent.ts
├── tests
├── data
│ ├── tile.pbf
│ ├── cog
│ │ ├── test_rgb.tif
│ │ ├── test_grey_world.tif
│ │ └── test_rgb_world.tif
│ ├── wgs84Points.fgb
│ ├── panorama
│ │ ├── badPosition.tif
│ │ ├── lowOverview.tif
│ │ ├── noVersionRgb.tif
│ │ ├── badOrientation.tif
│ │ ├── noVersionDepth.tif
│ │ ├── testDepthGeotiff.tif
│ │ └── testRgbGeotiff.tif
│ ├── terrain
│ │ ├── 13
│ │ │ ├── 8800
│ │ │ │ ├── 6485.terrain
│ │ │ │ └── 6486.terrain
│ │ │ └── 8801
│ │ │ │ ├── 6485.terrain
│ │ │ │ └── 6486.terrain
│ │ └── layer.json
│ └── dynamicPointCzml.json
├── setupJsdom.js
├── unit
│ ├── helpers
│ │ ├── getFileNameFromUrl.js
│ │ ├── importJSON.js
│ │ ├── flatGeobufHelpers.ts
│ │ ├── openlayersHelpers.js
│ │ ├── imageHelpers.js
│ │ ├── terrain
│ │ │ └── terrainData.js
│ │ └── helpers.ts
│ ├── util
│ │ ├── flight
│ │ │ ├── getDummyFlightInstance.ts
│ │ │ └── flightHelpers.spec.ts
│ │ ├── urlHelpers.spec.ts
│ │ └── editor
│ │ │ ├── interactions
│ │ │ ├── editFeaturesMouseOverInteraction.spec.js
│ │ │ └── ensureHandlerSelectionInteraction.spec.js
│ │ │ └── transformation
│ │ │ └── setupTransformationHandler.ts
│ ├── ol
│ │ ├── render
│ │ │ └── canvas
│ │ │ │ └── canvasTileRenderer.spec.js
│ │ └── geom
│ │ │ └── circle.spec.js
│ ├── map
│ │ └── navigation
│ │ │ ├── openlayersNavigation.spec.ts
│ │ │ ├── cesiumNavigation.spec.ts
│ │ │ ├── easingHelper.spec.ts
│ │ │ └── viewHelper.spec.ts
│ ├── layer
│ │ ├── cesium
│ │ │ ├── vcsTile
│ │ │ │ └── vcsTileHelpers.spec.ts
│ │ │ ├── getDummyCesium3DTileset.js
│ │ │ └── dataSourceCesiumImpl.spec.js
│ │ ├── terrainLayer.spec.js
│ │ ├── tmsLayer.spec.js
│ │ ├── terrainHelpers.spec.js
│ │ ├── wfsLayer.spec.ts
│ │ ├── cogLayer.spec.ts
│ │ ├── pointCloudLayer.spec.js
│ │ └── singleImageLayer.spec.js
│ ├── oblique
│ │ └── obliqueImageMeta.spec.js
│ ├── vectorCluster
│ │ ├── vectorClusterGroupCollection.spec.ts
│ │ └── vectorClusterGroupImpl.spec.ts
│ ├── style
│ │ ├── styleFactory.spec.ts
│ │ └── writeStyle.spec.js
│ └── interaction
│ │ ├── coordinateAtPixel.spec.js
│ │ └── abstractInteraction.spec.js
├── tsconfig.json
├── vcs.js
└── setup.js
├── .madgerc
├── documentation
├── VcsLayer.png
├── vcsApp.md
└── renderScreenshot.md
├── .idea
├── .gitignore
├── codeStyles
│ └── codeStyleConfig.xml
├── misc.xml
├── vcs.xml
├── jsLibraryMappings.xml
├── inspectionProfiles
│ └── Project_Default.xml
├── modules.xml
├── prettier.xml
└── vcmap-core.iml
├── .prettierignore
├── .gitignore
├── jsconfig.json
├── types
├── rbush-knn.d.ts
└── geotiff.d.ts
├── typedoc.json
├── tsconfig.json
├── LICENSE.md
└── eslint.config.js
/.npmrc:
--------------------------------------------------------------------------------
1 | registry=https://registry.npmjs.org
2 |
--------------------------------------------------------------------------------
/src/moduleIdSymbol.ts:
--------------------------------------------------------------------------------
1 | export const moduleIdSymbol: unique symbol = Symbol('moduleId');
2 |
--------------------------------------------------------------------------------
/tests/data/tile.pbf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/tile.pbf
--------------------------------------------------------------------------------
/.madgerc:
--------------------------------------------------------------------------------
1 | {
2 | "detectiveOptions": {
3 | "ts": {
4 | "skipTypeImports": true
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/documentation/VcsLayer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/documentation/VcsLayer.png
--------------------------------------------------------------------------------
/src/vectorCluster/vectorClusterSymbols.ts:
--------------------------------------------------------------------------------
1 | export const vectorClusterGroupName = Symbol('vectorClusterGroupName');
2 |
--------------------------------------------------------------------------------
/tests/data/cog/test_rgb.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/cog/test_rgb.tif
--------------------------------------------------------------------------------
/tests/data/wgs84Points.fgb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/wgs84Points.fgb
--------------------------------------------------------------------------------
/tests/data/cog/test_grey_world.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/cog/test_grey_world.tif
--------------------------------------------------------------------------------
/tests/data/cog/test_rgb_world.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/cog/test_rgb_world.tif
--------------------------------------------------------------------------------
/tests/data/panorama/badPosition.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/panorama/badPosition.tif
--------------------------------------------------------------------------------
/tests/data/panorama/lowOverview.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/panorama/lowOverview.tif
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | index.d.ts
2 | build/types/vcs.d.ts
3 | build/types/Cesium_module.d.ts
4 | coverage/
5 | docs/
6 | dist/
7 | .tests/
8 |
--------------------------------------------------------------------------------
/tests/data/panorama/noVersionRgb.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/panorama/noVersionRgb.tif
--------------------------------------------------------------------------------
/tests/data/panorama/badOrientation.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/panorama/badOrientation.tif
--------------------------------------------------------------------------------
/tests/data/panorama/noVersionDepth.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/panorama/noVersionDepth.tif
--------------------------------------------------------------------------------
/tests/data/panorama/testDepthGeotiff.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/panorama/testDepthGeotiff.tif
--------------------------------------------------------------------------------
/tests/data/panorama/testRgbGeotiff.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/panorama/testRgbGeotiff.tif
--------------------------------------------------------------------------------
/tests/data/terrain/13/8800/6485.terrain:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/terrain/13/8800/6485.terrain
--------------------------------------------------------------------------------
/tests/data/terrain/13/8800/6486.terrain:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/terrain/13/8800/6486.terrain
--------------------------------------------------------------------------------
/tests/data/terrain/13/8801/6485.terrain:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/terrain/13/8801/6485.terrain
--------------------------------------------------------------------------------
/tests/data/terrain/13/8801/6486.terrain:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualcitySYSTEMS/map-core/HEAD/tests/data/terrain/13/8801/6486.terrain
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | node_modules/
3 | build/types/vcs.d.ts
4 | build/types/Cesium_module.d.ts
5 | test-results.xml
6 | docs/
7 | dist/
8 | .tests/
9 | *.shader.ts
10 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/tests/setupJsdom.js:
--------------------------------------------------------------------------------
1 | import jsdomGlobal from 'jsdom-global';
2 |
3 | jsdomGlobal(undefined, {
4 | pretendToBeVisual: true,
5 | url: 'http://localhost',
6 | referrer: 'http://localhost',
7 | });
8 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/cesium/clippingPolygonCollection.ts:
--------------------------------------------------------------------------------
1 | import { ClippingPolygonCollection } from '@vcmap-cesium/engine';
2 |
3 | ClippingPolygonCollection.prototype.setDirty = function setDirty(): void {
4 | this._totalPositions = -1;
5 | };
6 |
--------------------------------------------------------------------------------
/.idea/jsLibraryMappings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/map/mapState.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * The state of a map.
3 | * State machine: inactive <-> loading -> active -> inactive
4 | */
5 | enum MapState {
6 | INACTIVE = 1,
7 | ACTIVE = 2,
8 | LOADING = 4,
9 | }
10 |
11 | export default MapState;
12 |
--------------------------------------------------------------------------------
/src/layer/layerState.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Enumeration of possible layer states.
3 | * State machine: inactive <-> loading -> active -> inactive
4 | */
5 | enum LayerState {
6 | INACTIVE = 1,
7 | ACTIVE = 2,
8 | LOADING = 4,
9 | }
10 |
11 | export default LayerState;
12 |
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "es6",
4 | "target": "es6",
5 | "baseUrl": "./",
6 | "moduleResolution": "node",
7 | "paths": {
8 | "@vcmap/core": ["index.js"]
9 | }
10 | },
11 | "include": ["./src/**/*", "index"]
12 | }
13 |
--------------------------------------------------------------------------------
/src/util/locale.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * returns the default browserLocale, if not possible 'en'
3 | */
4 | export function detectBrowserLocale(): string {
5 | if (navigator.language) {
6 | const lang = navigator.language;
7 | return lang.substring(0, 2);
8 | }
9 | return 'en';
10 | }
11 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/layer/featureStoreLayerState.ts:
--------------------------------------------------------------------------------
1 | export const featureStoreStateSymbol = Symbol('vcsFeatureType');
2 |
3 | /**
4 | * Enumeration of feature store item states
5 | */
6 | export type FeatureStoreLayerState =
7 | | 'dynamic'
8 | | 'static'
9 | | 'edited'
10 | | 'deleted'
11 | | 'removed';
12 |
--------------------------------------------------------------------------------
/types/rbush-knn.d.ts:
--------------------------------------------------------------------------------
1 | declare module 'rbush-knn' {
2 | import type RTree from 'rbush';
3 |
4 | export default function knn(
5 | tree: RTree,
6 | x: number,
7 | y: number,
8 | z: number,
9 | predicate?: (item: T) => boolean,
10 | maxDistance?: number,
11 | ): T[];
12 | }
13 |
--------------------------------------------------------------------------------
/src/layer/cesium/resourceHelper.ts:
--------------------------------------------------------------------------------
1 | import { Resource } from '@vcmap-cesium/engine';
2 |
3 | export function getResourceOrUrl(
4 | url: string,
5 | headers?: Record,
6 | ): string | Resource {
7 | if (headers) {
8 | return new Resource({
9 | url,
10 | headers,
11 | });
12 | }
13 | return url;
14 | }
15 |
--------------------------------------------------------------------------------
/.idea/prettier.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/layer/layerSymbols.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Symbol to declare a layers name on its visualizations, e.g. ol.layer.Layer, Cesium.Cesium3DTileset*
3 | */
4 | export const vcsLayerName: unique symbol = Symbol('vcsLayerName');
5 |
6 | /**
7 | * Symbol added to Cesium3DTilesets to suppress picking.
8 | */
9 | export const allowPicking: unique symbol = Symbol('allowPicking');
10 |
--------------------------------------------------------------------------------
/tests/unit/helpers/getFileNameFromUrl.js:
--------------------------------------------------------------------------------
1 | import path from 'path';
2 | import { fileURLToPath } from 'url';
3 |
4 | /**
5 | * @param {string} url
6 | * @param {string} fileName
7 | * @returns {string}
8 | */
9 | export default function getFileNameFromUrl(url, fileName) {
10 | const dirName = fileURLToPath(url);
11 | return path.join(dirName, fileName);
12 | }
13 |
--------------------------------------------------------------------------------
/src/style/modelFill.ts:
--------------------------------------------------------------------------------
1 | import { Fill } from 'ol/style.js';
2 |
3 | class ModelFill extends Fill {
4 | static fromFill(fill: Fill): ModelFill {
5 | return new ModelFill({ color: fill.getColor() });
6 | }
7 |
8 | toFill(result?: Fill): Fill {
9 | const fill = result ?? new Fill();
10 | fill.setColor(this.getColor());
11 | return fill;
12 | }
13 | }
14 |
15 | export default ModelFill;
16 |
--------------------------------------------------------------------------------
/types/geotiff.d.ts:
--------------------------------------------------------------------------------
1 | import type { BaseDecoder, Pool } from 'geotiff';
2 |
3 | declare module 'geotiff' {
4 | interface GeoTIFFImage {
5 | getTileOrStrip(
6 | x: number,
7 | y: number,
8 | samplesPerPixel: number,
9 | decoder: BaseDecoder | Pool,
10 | abortSignal?: AbortSignal,
11 | ): Promise<{ x: number; y: number; sample: number; data: ArrayBuffer }>;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tests/unit/helpers/importJSON.js:
--------------------------------------------------------------------------------
1 | import fs from 'fs';
2 |
3 | /**
4 | * @param {string} fileName
5 | * @returns {Promise