Skip to content

Commit

Permalink
Merge pull request #24 from geoblocks/building_permits_slicing
Browse files Browse the repository at this point in the history
Building permits slicing + measurements
  • Loading branch information
vladyslav-tk authored Jan 8, 2025
2 parents 0bb9a4e + e738f59 commit 90b8320
Show file tree
Hide file tree
Showing 15 changed files with 2,392 additions and 35 deletions.
19 changes: 14 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@microsoft/api-documenter": "7.25.22",
"@microsoft/api-extractor": "7.47.12",
"@trevoreyre/autocomplete-js": "3.0.3",
"@types/earcut": "^2.1.4",
"csstype": "^3.1.3",
"eslint": "9.15.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -46,6 +47,7 @@
},
"dependencies": {
"@shoelace-style/shoelace": "2.18.0",
"@types/geojson": "^7946.0.14"
"@types/geojson": "^7946.0.14",
"earcut": "^3.0.1"
}
}
8 changes: 4 additions & 4 deletions src/apps/permits/demoPermitConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ export const config: IPermitsConfig = {
'@demo': () => import('../../catalogs/demoCatalog.js'),
},
layers: {
// tilesets: ['@cesium/googlePhotorealistic'],
models: ['@demo/sofa', '@demo/thatopensmall'],
tiles3d: ['@geoadmin/buildings'], // @cesium/googlePhotorealistic
// models: ['@demo/sofa', '@demo/thatopensmall'],
imageries: ['@geoadmin/pixel-karte-farbe'],
// terrain: '@geoadmin/terrain',
terrain: '@geoadmin/terrain',
},
camera: {
position: [6.628484, 46.5, 100],
position: [6.628484, 46.5, 1000],
orientation: {
heading: 0,
pitch: -30.0,
Expand Down
13 changes: 13 additions & 0 deletions src/apps/permits/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import type {IPermitsConfig} from './ingv-config-permits.js';
import '../../plugins/cesium/ngv-plugin-cesium-widget';
import '../../plugins/cesium/ngv-plugin-cesium-upload';
import '../../plugins/cesium/ngv-plugin-cesium-model-interact';
import '../../plugins/cesium/ngv-plugin-cesium-slicing';
import '../../plugins/cesium/ngv-plugin-cesium-measure';
import type {CesiumWidget, DataSourceCollection} from '@cesium/engine';

import {PrimitiveCollection} from '@cesium/engine';
Expand Down Expand Up @@ -55,6 +57,7 @@ export class NgvAppPermits extends ABaseApp<IPermitsConfig> {
.viewer="${this.viewer}"
.dataSourceCollection="${this.dataSourceCollection}"
.primitiveCollection="${this.collections.models}"
.tiles3dCollection="${this.collections.tiles3d}"
.options="${{listTitle: 'Catalog'}}"
></ngv-plugin-cesium-model-interact>
<div
Expand All @@ -69,9 +72,19 @@ export class NgvAppPermits extends ABaseApp<IPermitsConfig> {
.viewer="${this.viewer}"
.dataSourceCollection="${this.dataSourceCollection}"
.primitiveCollection="${this.uploadedModelsCollection}"
.tiles3dCollection="${this.collections.tiles3d}"
.storeOptions="${this.storeOptions}"
.options="${{listTitle: 'Uploaded models'}}"
></ngv-plugin-cesium-model-interact>
<ngv-plugin-cesium-slicing
.viewer="${this.viewer}"
.tiles3dCollection="${this.collections.tiles3d}"
.dataSourceCollection="${this.dataSourceCollection}"
></ngv-plugin-cesium-slicing>
<ngv-plugin-cesium-measure
.viewer="${this.viewer}"
.dataSourceCollection="${this.dataSourceCollection}"
></ngv-plugin-cesium-measure>
`
: ''}
</div>
Expand Down
10 changes: 10 additions & 0 deletions src/icons/rotate-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/interfaces/cesium/ingv-layers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type {
Cesium3DTileset,
ClippingPolygon,
UrlTemplateImageryProvider,
WebMapServiceImageryProvider,
WebMapTileServiceImageryProvider,
Expand Down Expand Up @@ -42,6 +43,9 @@ export interface INGVCesiumModel extends Model {
id: {
dimensions?: Cartesian3;
name: string;
terrainClipping?: boolean;
tilesClipping?: boolean;
clippingPolygon?: ClippingPolygon;
};
}

Expand Down
Loading

0 comments on commit 90b8320

Please sign in to comment.