@vcmap/core 6.0.0-rc.4 → 6.0.0-rc.6
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/dist/cesium.d.ts +11 -0
- package/dist/index.d.ts +23 -16
- package/dist/index.js +21 -14
- package/dist/index.js.map +1 -1
- package/dist/ol.d.ts +15 -2
- package/dist/src/layer/cesium/clusterContext.d.ts +8 -14
- package/dist/src/layer/cesium/clusterContext.js +62 -41
- package/dist/src/layer/cesium/clusterContext.js.map +1 -1
- package/dist/src/layer/cesium/vectorCesiumImpl.d.ts +2 -3
- package/dist/src/layer/cesium/vectorCesiumImpl.js +16 -10
- package/dist/src/layer/cesium/vectorCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorContext.d.ts +10 -53
- package/dist/src/layer/cesium/vectorContext.js +88 -172
- package/dist/src/layer/cesium/vectorContext.js.map +1 -1
- package/dist/src/layer/geojsonHelpers.d.ts +1 -1
- package/dist/src/layer/geojsonHelpers.js +5 -10
- package/dist/src/layer/geojsonHelpers.js.map +1 -1
- package/dist/src/layer/oblique/obliqueHelpers.js +6 -6
- package/dist/src/layer/oblique/obliqueHelpers.js.map +1 -1
- package/dist/src/layer/vectorLayer.d.ts +0 -37
- package/dist/src/layer/vectorLayer.js.map +1 -1
- package/dist/src/layer/vectorProperties.d.ts +8 -3
- package/dist/src/layer/vectorProperties.js +30 -5
- package/dist/src/layer/vectorProperties.js.map +1 -1
- package/dist/src/map/baseOLMap.js +1 -1
- package/dist/src/map/baseOLMap.js.map +1 -1
- package/dist/src/map/obliqueMap.d.ts +3 -0
- package/dist/src/map/obliqueMap.js +27 -6
- package/dist/src/map/obliqueMap.js.map +1 -1
- package/dist/src/map/vcsMap.d.ts +8 -0
- package/dist/src/map/vcsMap.js +11 -0
- package/dist/src/map/vcsMap.js.map +1 -1
- package/dist/src/oblique/helpers.js +5 -5
- package/dist/src/oblique/helpers.js.map +1 -1
- package/dist/src/oblique/obliqueDataSet.js +4 -4
- package/dist/src/oblique/obliqueDataSet.js.map +1 -1
- package/dist/src/ol/geom/geometryCollection.js +19 -2
- package/dist/src/ol/geom/geometryCollection.js.map +1 -1
- package/dist/src/style/arcStyle.js +1 -0
- package/dist/src/style/arcStyle.js.map +1 -1
- package/dist/src/util/editor/createFeatureSession.d.ts +5 -1
- package/dist/src/util/editor/createFeatureSession.js +48 -4
- package/dist/src/util/editor/createFeatureSession.js.map +1 -1
- package/dist/src/util/editor/editFeaturesSession.d.ts +10 -4
- package/dist/src/util/editor/editFeaturesSession.js +74 -37
- package/dist/src/util/editor/editFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/editGeometrySession.d.ts +5 -1
- package/dist/src/util/editor/editGeometrySession.js +77 -55
- package/dist/src/util/editor/editGeometrySession.js.map +1 -1
- package/dist/src/util/editor/editorHelpers.d.ts +12 -6
- package/dist/src/util/editor/editorHelpers.js +47 -20
- package/dist/src/util/editor/editorHelpers.js.map +1 -1
- package/dist/src/util/editor/editorSessionHelpers.d.ts +5 -0
- package/dist/src/util/editor/editorSessionHelpers.js +1 -0
- package/dist/src/util/editor/editorSessionHelpers.js.map +1 -1
- package/dist/src/util/editor/editorSymbols.d.ts +1 -1
- package/dist/src/util/editor/editorSymbols.js +1 -1
- package/dist/src/util/editor/editorSymbols.js.map +1 -1
- package/dist/src/util/editor/interactions/createBBoxInteraction.d.ts +1 -0
- package/dist/src/util/editor/interactions/createBBoxInteraction.js +20 -16
- package/dist/src/util/editor/interactions/createBBoxInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createCircleInteraction.js +1 -1
- package/dist/src/util/editor/interactions/createCircleInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createLineStringInteraction.js +3 -3
- package/dist/src/util/editor/interactions/createLineStringInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createPointInteraction.js +1 -1
- package/dist/src/util/editor/interactions/createPointInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createPolygonInteraction.d.ts +4 -0
- package/dist/src/util/editor/interactions/createPolygonInteraction.js +9 -3
- package/dist/src/util/editor/interactions/createPolygonInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/creationSnapping.d.ts +26 -0
- package/dist/src/util/editor/interactions/creationSnapping.js +139 -0
- package/dist/src/util/editor/interactions/creationSnapping.js.map +1 -0
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.js +3 -2
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/insertVertexInteraction.d.ts +3 -1
- package/dist/src/util/editor/interactions/insertVertexInteraction.js +14 -6
- package/dist/src/util/editor/interactions/insertVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/layerSnapping.d.ts +19 -0
- package/dist/src/util/editor/interactions/layerSnapping.js +87 -0
- package/dist/src/util/editor/interactions/layerSnapping.js.map +1 -0
- package/dist/src/util/editor/interactions/translateVertexInteraction.js +2 -2
- package/dist/src/util/editor/interactions/translateVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/translationSnapping.d.ts +25 -0
- package/dist/src/util/editor/interactions/translationSnapping.js +179 -0
- package/dist/src/util/editor/interactions/translationSnapping.js.map +1 -0
- package/dist/src/util/editor/snappingHelpers.d.ts +44 -0
- package/dist/src/util/editor/snappingHelpers.js +329 -0
- package/dist/src/util/editor/snappingHelpers.js.map +1 -0
- package/dist/src/util/editor/transformation/create2DHandlers.js +26 -26
- package/dist/src/util/editor/transformation/create2DHandlers.js.map +1 -1
- package/dist/src/util/editor/transformation/create3DHandlers.js +65 -14
- package/dist/src/util/editor/transformation/create3DHandlers.js.map +1 -1
- package/dist/src/util/editor/transformation/scaleInteraction.js +27 -5
- package/dist/src/util/editor/transformation/scaleInteraction.js.map +1 -1
- package/dist/src/util/editor/transformation/transformationHandler.js +56 -38
- package/dist/src/util/editor/transformation/transformationHandler.js.map +1 -1
- package/dist/src/util/editor/transformation/transformationTypes.d.ts +2 -0
- package/dist/src/util/editor/transformation/transformationTypes.js +4 -0
- package/dist/src/util/editor/transformation/transformationTypes.js.map +1 -1
- package/dist/src/util/featureconverter/arcToCesium.d.ts +5 -19
- package/dist/src/util/featureconverter/arcToCesium.js +15 -42
- package/dist/src/util/featureconverter/arcToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/circleToCesium.d.ts +2 -27
- package/dist/src/util/featureconverter/circleToCesium.js +84 -63
- package/dist/src/util/featureconverter/circleToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/clampedPrimitive.d.ts +2 -0
- package/dist/src/util/featureconverter/clampedPrimitive.js +29 -0
- package/dist/src/util/featureconverter/clampedPrimitive.js.map +1 -0
- package/dist/src/util/featureconverter/convert.d.ts +26 -7
- package/dist/src/util/featureconverter/convert.js +221 -44
- package/dist/src/util/featureconverter/convert.js.map +1 -1
- package/dist/src/util/featureconverter/extent3D.d.ts +4 -3
- package/dist/src/util/featureconverter/extent3D.js +4 -3
- package/dist/src/util/featureconverter/extent3D.js.map +1 -1
- package/dist/src/util/featureconverter/lineStringToCesium.d.ts +12 -27
- package/dist/src/util/featureconverter/lineStringToCesium.js +85 -107
- package/dist/src/util/featureconverter/lineStringToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/pointHelpers.d.ts +8 -11
- package/dist/src/util/featureconverter/pointHelpers.js +134 -120
- package/dist/src/util/featureconverter/pointHelpers.js.map +1 -1
- package/dist/src/util/featureconverter/pointToCesium.d.ts +14 -17
- package/dist/src/util/featureconverter/pointToCesium.js +47 -96
- package/dist/src/util/featureconverter/pointToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/polygonToCesium.d.ts +2 -26
- package/dist/src/util/featureconverter/polygonToCesium.js +62 -72
- package/dist/src/util/featureconverter/polygonToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/storeyHelpers.d.ts +17 -0
- package/dist/src/util/featureconverter/storeyHelpers.js +78 -0
- package/dist/src/util/featureconverter/storeyHelpers.js.map +1 -0
- package/dist/src/util/featureconverter/vectorGeometryFactory.d.ts +54 -0
- package/dist/src/util/featureconverter/vectorGeometryFactory.js +278 -0
- package/dist/src/util/featureconverter/vectorGeometryFactory.js.map +1 -0
- package/dist/src/util/featureconverter/vectorHeightInfo.d.ts +86 -0
- package/dist/src/util/featureconverter/vectorHeightInfo.js +242 -0
- package/dist/src/util/featureconverter/vectorHeightInfo.js.map +1 -0
- package/dist/src/util/geometryHelpers.d.ts +22 -1
- package/dist/src/util/geometryHelpers.js +65 -2
- package/dist/src/util/geometryHelpers.js.map +1 -1
- package/dist/src/util/mapCollection.js +8 -0
- package/dist/src/util/mapCollection.js.map +1 -1
- package/dist/src/util/math.d.ts +6 -2
- package/dist/src/util/math.js +34 -12
- package/dist/src/util/math.js.map +1 -1
- package/dist/tests/unit/helpers/cesiumHelpers.js +3 -1
- package/dist/tests/unit/helpers/cesiumHelpers.js.map +1 -1
- package/dist/tests/unit/helpers/helpers.d.ts +2 -9
- package/dist/tests/unit/helpers/helpers.js +2 -8
- package/dist/tests/unit/helpers/helpers.js.map +1 -1
- package/index.ts +74 -35
- package/package.json +3 -3
- package/src/cesium/cesium.d.ts +11 -0
- package/src/layer/cesium/clusterContext.ts +82 -91
- package/src/layer/cesium/vectorCesiumImpl.ts +17 -11
- package/src/layer/cesium/vectorContext.ts +120 -348
- package/src/layer/geojsonHelpers.ts +9 -12
- package/src/layer/oblique/obliqueHelpers.ts +6 -6
- package/src/layer/vectorLayer.ts +0 -71
- package/src/layer/vectorProperties.ts +46 -9
- package/src/map/baseOLMap.ts +1 -1
- package/src/map/obliqueMap.ts +46 -6
- package/src/map/vcsMap.ts +20 -2
- package/src/oblique/helpers.ts +11 -5
- package/src/oblique/obliqueDataSet.ts +4 -4
- package/src/ol/geom/geometryCollection.js +21 -2
- package/src/ol/ol.d.ts +15 -2
- package/src/style/arcStyle.ts +1 -0
- package/src/util/editor/createFeatureSession.ts +64 -6
- package/src/util/editor/editFeaturesSession.ts +105 -39
- package/src/util/editor/editGeometrySession.ts +118 -75
- package/src/util/editor/editorHelpers.ts +78 -30
- package/src/util/editor/editorSessionHelpers.ts +7 -0
- package/src/util/editor/editorSymbols.ts +1 -1
- package/src/util/editor/interactions/createBBoxInteraction.ts +25 -16
- package/src/util/editor/interactions/createCircleInteraction.ts +1 -1
- package/src/util/editor/interactions/createLineStringInteraction.ts +9 -3
- package/src/util/editor/interactions/createPointInteraction.ts +1 -1
- package/src/util/editor/interactions/createPolygonInteraction.ts +16 -3
- package/src/util/editor/interactions/creationSnapping.ts +226 -0
- package/src/util/editor/interactions/editGeometryMouseOverInteraction.ts +3 -2
- package/src/util/editor/interactions/insertVertexInteraction.ts +27 -7
- package/src/util/editor/interactions/layerSnapping.ts +136 -0
- package/src/util/editor/interactions/translateVertexInteraction.ts +8 -2
- package/src/util/editor/interactions/translationSnapping.ts +302 -0
- package/src/util/editor/snappingHelpers.ts +490 -0
- package/src/util/editor/transformation/create2DHandlers.ts +38 -26
- package/src/util/editor/transformation/create3DHandlers.ts +84 -22
- package/src/util/editor/transformation/scaleInteraction.ts +28 -5
- package/src/util/editor/transformation/transformationHandler.ts +72 -41
- package/src/util/editor/transformation/transformationTypes.ts +5 -0
- package/src/util/featureconverter/arcToCesium.ts +25 -95
- package/src/util/featureconverter/circleToCesium.ts +127 -113
- package/src/util/featureconverter/clampedPrimitive.ts +70 -0
- package/src/util/featureconverter/convert.ts +446 -114
- package/src/util/featureconverter/extent3D.ts +13 -6
- package/src/util/featureconverter/lineStringToCesium.ts +132 -179
- package/src/util/featureconverter/pointHelpers.ts +271 -214
- package/src/util/featureconverter/pointToCesium.ts +111 -175
- package/src/util/featureconverter/polygonToCesium.ts +98 -117
- package/src/util/featureconverter/storeyHelpers.ts +104 -0
- package/src/util/featureconverter/vectorGeometryFactory.ts +601 -0
- package/src/util/featureconverter/vectorHeightInfo.ts +393 -0
- package/src/util/geometryHelpers.ts +79 -5
- package/src/util/mapCollection.ts +8 -0
- package/src/util/math.ts +59 -12
- package/dist/src/util/featureconverter/featureconverterHelper.d.ts +0 -35
- package/dist/src/util/featureconverter/featureconverterHelper.js +0 -404
- package/dist/src/util/featureconverter/featureconverterHelper.js.map +0 -1
- package/src/util/featureconverter/featureconverterHelper.ts +0 -672
|
@@ -1,76 +1,253 @@
|
|
|
1
1
|
import { Polygon, LineString, Circle, Point, MultiPoint, MultiLineString, MultiPolygon, } from 'ol/geom.js';
|
|
2
|
+
import { ClassificationPrimitive, GroundPolylinePrimitive, GroundPrimitive, } from '@vcmap-cesium/engine';
|
|
2
3
|
import Style from 'ol/style/Style.js';
|
|
3
4
|
import GeometryCollection from 'ol/geom/GeometryCollection.js';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
5
|
+
import { getPolygonGeometryFactory } from './polygonToCesium.js';
|
|
6
|
+
import { getCircleGeometryFactory } from './circleToCesium.js';
|
|
7
|
+
import { getArrowHeadPrimitives, getLineStringGeometryFactory, } from './lineStringToCesium.js';
|
|
8
|
+
import { getPointPrimitives, validatePoint, } from './pointToCesium.js';
|
|
9
|
+
import { getArcGeometryFactory } from './arcToCesium.js';
|
|
10
|
+
import { featureArcStruct } from '../../style/arcStyle.js';
|
|
11
|
+
import { setupClampedPrimitive } from './clampedPrimitive.js';
|
|
12
|
+
import { getHeightInfo, isClampedHeightReference, isRelativeHeightReference, } from './vectorHeightInfo.js';
|
|
13
|
+
import { createClassificationPrimitiveItem, createGroundLinePrimitiveItem, createGroundPrimitiveItem, createLinePrimitiveItem, createOutlinePrimitiveItem, createSolidPrimitiveItem, getCesiumGeometriesOptions, } from './vectorGeometryFactory.js';
|
|
14
|
+
import ArrowStyle from '../../style/arrowStyle.js';
|
|
15
|
+
export function getStylesArray(style, feature, resolution = 1) {
|
|
16
|
+
const styles = [];
|
|
17
|
+
if (typeof style === 'function') {
|
|
18
|
+
styles.push(...getStylesArray(style(feature, resolution), feature, resolution));
|
|
19
|
+
}
|
|
20
|
+
else if (Array.isArray(style)) {
|
|
21
|
+
style.forEach((currentStyle) => {
|
|
22
|
+
styles.push(...getStylesArray(currentStyle, feature, resolution));
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
else if (style instanceof Style) {
|
|
26
|
+
styles.push(style);
|
|
27
|
+
}
|
|
28
|
+
return styles;
|
|
29
|
+
}
|
|
30
|
+
function getSingleGeometriesFromGeometry(geometry) {
|
|
31
|
+
if (geometry instanceof Point ||
|
|
32
|
+
geometry instanceof Polygon ||
|
|
33
|
+
geometry instanceof LineString ||
|
|
34
|
+
geometry instanceof Circle) {
|
|
35
|
+
return [geometry];
|
|
36
|
+
}
|
|
37
|
+
if (geometry instanceof MultiPoint) {
|
|
38
|
+
return geometry.getPoints();
|
|
39
|
+
}
|
|
40
|
+
else if (geometry instanceof MultiPolygon) {
|
|
41
|
+
return geometry.getPolygons();
|
|
42
|
+
}
|
|
43
|
+
else if (geometry instanceof MultiLineString) {
|
|
44
|
+
return geometry.getLineStrings();
|
|
45
|
+
}
|
|
46
|
+
else if (geometry instanceof GeometryCollection) {
|
|
47
|
+
return geometry
|
|
48
|
+
.getGeometriesArray()
|
|
49
|
+
.map(getSingleGeometriesFromGeometry)
|
|
50
|
+
.flat();
|
|
51
|
+
}
|
|
52
|
+
throw new Error('Not an implemented geometry');
|
|
53
|
+
}
|
|
54
|
+
async function getCesiumOptionsForSingleGeometry(feature, geometry, style, vectorProperties, scene) {
|
|
55
|
+
const heightInfo = getHeightInfo(feature, geometry, vectorProperties);
|
|
11
56
|
if (geometry instanceof Point) {
|
|
12
|
-
|
|
57
|
+
if ((!style.getImage() && !style.getText()?.getText()) ||
|
|
58
|
+
!validatePoint(geometry)) {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
const pointPrimitives = await getPointPrimitives(feature, geometry, style, vectorProperties, scene, heightInfo);
|
|
62
|
+
return pointPrimitives;
|
|
13
63
|
}
|
|
14
|
-
|
|
15
|
-
|
|
64
|
+
let geometryFactory;
|
|
65
|
+
let arcStyle;
|
|
66
|
+
if (geometry instanceof Polygon) {
|
|
67
|
+
geometryFactory = getPolygonGeometryFactory();
|
|
16
68
|
}
|
|
17
69
|
else if (geometry instanceof LineString) {
|
|
18
|
-
if (style instanceof
|
|
19
|
-
|
|
70
|
+
if (style instanceof ArrowStyle) {
|
|
71
|
+
if (feature[featureArcStruct]?.coordinates) {
|
|
72
|
+
geometryFactory = getArcGeometryFactory(feature[featureArcStruct]?.coordinates, heightInfo.heightReference);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
geometryFactory = getLineStringGeometryFactory();
|
|
76
|
+
}
|
|
77
|
+
arcStyle = style;
|
|
20
78
|
}
|
|
21
79
|
else {
|
|
22
|
-
|
|
80
|
+
geometryFactory = getLineStringGeometryFactory();
|
|
23
81
|
}
|
|
24
82
|
}
|
|
25
|
-
else
|
|
26
|
-
|
|
83
|
+
else {
|
|
84
|
+
geometryFactory = getCircleGeometryFactory();
|
|
27
85
|
}
|
|
28
|
-
|
|
29
|
-
|
|
86
|
+
if ((!style.getFill() && !style.getStroke()) ||
|
|
87
|
+
!geometryFactory.validateGeometry(geometry)) {
|
|
88
|
+
return [];
|
|
30
89
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
await lineStringToCesium(feature, style, geometry.getLineStrings(), vectorProperties, scene, context);
|
|
90
|
+
const geometryOptions = getCesiumGeometriesOptions(style, geometry, geometryFactory, heightInfo);
|
|
91
|
+
let convertedItems = [];
|
|
92
|
+
if (arcStyle) {
|
|
93
|
+
convertedItems = getArrowHeadPrimitives(feature, arcStyle, geometry, vectorProperties, scene, feature[featureArcStruct]?.coordinates);
|
|
36
94
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
95
|
+
return [...geometryOptions, ...convertedItems];
|
|
96
|
+
}
|
|
97
|
+
function createPrimitiveBatches() {
|
|
98
|
+
return {
|
|
99
|
+
classificationPrimitive: [],
|
|
100
|
+
groundPrimitive: [],
|
|
101
|
+
solidPrimitive: [],
|
|
102
|
+
outlinePrimitive: [],
|
|
103
|
+
linePrimitive: [],
|
|
104
|
+
groundLinePrimitive: [],
|
|
105
|
+
clampedPrimitives: new Map(),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function addRelativeGeometryOptions(item, origin, clampedPrimitivesMap) {
|
|
109
|
+
const clampOriginHash = `${origin.join(':')}:${item.heightInfo.heightReference}`;
|
|
110
|
+
if (!clampedPrimitivesMap.has(clampOriginHash)) {
|
|
111
|
+
clampedPrimitivesMap.set(clampOriginHash, []);
|
|
41
112
|
}
|
|
113
|
+
clampedPrimitivesMap.get(clampOriginHash).push(item);
|
|
42
114
|
}
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
115
|
+
function getPrimitiveBatches(items, feature, vectorProperties, scene) {
|
|
116
|
+
const convertedItems = [];
|
|
117
|
+
const batches = createPrimitiveBatches();
|
|
118
|
+
const classification = vectorProperties.getClassificationType(feature);
|
|
119
|
+
const classificationSupported = ClassificationPrimitive.isSupported(scene);
|
|
120
|
+
const groundPrimitiveSupported = GroundPrimitive.isSupported(scene);
|
|
121
|
+
const groundLinePrimitiveSupported = GroundPolylinePrimitive.isSupported(scene);
|
|
122
|
+
items.forEach((item) => {
|
|
123
|
+
if (item.type === 'primitive' ||
|
|
124
|
+
item.type === 'billboard' ||
|
|
125
|
+
item.type === 'label') {
|
|
126
|
+
convertedItems.push(item);
|
|
127
|
+
}
|
|
128
|
+
else if (item.type === 'groundLine') {
|
|
129
|
+
if (groundLinePrimitiveSupported) {
|
|
130
|
+
batches.groundLinePrimitive.push(item);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
const options = item;
|
|
135
|
+
const { heightReference } = options.heightInfo;
|
|
136
|
+
if (isRelativeHeightReference(heightReference) &&
|
|
137
|
+
options.heightInfo
|
|
138
|
+
.clampOrigin) {
|
|
139
|
+
addRelativeGeometryOptions(options, options.heightInfo
|
|
140
|
+
.clampOrigin, batches.clampedPrimitives);
|
|
141
|
+
}
|
|
142
|
+
else if (item.type === 'fill' || item.type === 'solid') {
|
|
143
|
+
if (isClampedHeightReference(heightReference)) {
|
|
144
|
+
if (groundPrimitiveSupported) {
|
|
145
|
+
batches.groundPrimitive.push(item);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
else if (classification != null) {
|
|
149
|
+
if (classificationSupported) {
|
|
150
|
+
batches.classificationPrimitive.push(item);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
batches.solidPrimitive.push(item);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
else if (item.type === 'outline') {
|
|
158
|
+
// never clamped, never classified
|
|
159
|
+
batches.outlinePrimitive.push(item);
|
|
160
|
+
}
|
|
161
|
+
else if (item.type === 'line') {
|
|
162
|
+
// never clamped, never classified
|
|
163
|
+
batches.linePrimitive.push(item);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
return { batches, convertedItems };
|
|
168
|
+
}
|
|
169
|
+
function getClampedPrimitiveBatches(options) {
|
|
170
|
+
const batches = createPrimitiveBatches();
|
|
171
|
+
options.forEach((item) => {
|
|
172
|
+
if (item.type === 'solid' || item.type === 'fill') {
|
|
173
|
+
batches.solidPrimitive.push(item);
|
|
174
|
+
}
|
|
175
|
+
else if (item.type === 'outline') {
|
|
176
|
+
batches.outlinePrimitive.push(item);
|
|
177
|
+
}
|
|
178
|
+
else if (item.type === 'line') {
|
|
179
|
+
batches.linePrimitive.push(item);
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
return batches;
|
|
183
|
+
}
|
|
184
|
+
function batchPrimitives(batches, feature, style, vectorProperties, scene) {
|
|
185
|
+
const convertedItems = [];
|
|
186
|
+
if (batches.classificationPrimitive.length) {
|
|
187
|
+
convertedItems.push(createClassificationPrimitiveItem(feature, style, vectorProperties, batches.classificationPrimitive));
|
|
47
188
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
styles.push(...getStylesArray(currentStyle, feature, resolution));
|
|
51
|
-
});
|
|
189
|
+
if (batches.solidPrimitive.length) {
|
|
190
|
+
convertedItems.push(createSolidPrimitiveItem(feature, style, vectorProperties, scene, batches.solidPrimitive));
|
|
52
191
|
}
|
|
53
|
-
|
|
54
|
-
|
|
192
|
+
if (batches.outlinePrimitive.length) {
|
|
193
|
+
convertedItems.push(createOutlinePrimitiveItem(feature, style, vectorProperties, batches.outlinePrimitive));
|
|
55
194
|
}
|
|
56
|
-
|
|
195
|
+
if (batches.linePrimitive.length) {
|
|
196
|
+
convertedItems.push(createLinePrimitiveItem(feature, style, vectorProperties, batches.linePrimitive));
|
|
197
|
+
}
|
|
198
|
+
if (batches.groundLinePrimitive.length) {
|
|
199
|
+
convertedItems.push(createGroundLinePrimitiveItem(feature, style, vectorProperties, batches.groundLinePrimitive));
|
|
200
|
+
}
|
|
201
|
+
if (batches.groundPrimitive.length) {
|
|
202
|
+
convertedItems.push(createGroundPrimitiveItem(feature, style, vectorProperties, scene, batches.groundPrimitive));
|
|
203
|
+
}
|
|
204
|
+
batches.clampedPrimitives.forEach((options, originHash) => {
|
|
205
|
+
const [x, y, heightReference] = originHash.split(':').map(Number);
|
|
206
|
+
const clampedBatches = getClampedPrimitiveBatches(options);
|
|
207
|
+
const clampedItems = batchPrimitives(clampedBatches, feature, style, vectorProperties, scene);
|
|
208
|
+
clampedItems.forEach(({ item }) => {
|
|
209
|
+
setupClampedPrimitive(scene, item, [x, y], heightReference);
|
|
210
|
+
});
|
|
211
|
+
convertedItems.push(...clampedItems);
|
|
212
|
+
});
|
|
213
|
+
return convertedItems;
|
|
57
214
|
}
|
|
58
215
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
216
|
+
* Converts a feature and all its associated geometries to items which can be added to
|
|
217
|
+
* cesium collections directly: Primitives, BillboardOptions or LabelOptions. This is
|
|
218
|
+
* an internal API, typically it is enough to simple use a `VectorLayer` to handle conversions for you.
|
|
219
|
+
* 1. All styles provided by the style like are flattened.
|
|
220
|
+
* 2. All single OL geometries which should be rendered with each style are extracted
|
|
221
|
+
* 3. Cesium geometry options are extracted from each OL geometry based on the geometry, feature & vector properties
|
|
222
|
+
* 4. Cesium geometries which can be batched into a single primitive (for instance, an extruded volume would have all its solids batched and all its outlines batched
|
|
223
|
+
* In case of relativeTo* altitude modes, primitives are batched based _on the clamp origin_
|
|
224
|
+
* 5. The converted items are returned, typically to the vector context which called convert in the first place.
|
|
61
225
|
* @param feature
|
|
62
226
|
* @param style
|
|
63
227
|
* @param vectorProperties
|
|
64
|
-
* @param context
|
|
65
228
|
* @param scene
|
|
66
229
|
*/
|
|
67
|
-
export default async function convert(feature, style, vectorProperties,
|
|
230
|
+
export default async function convert(feature, style, vectorProperties, scene) {
|
|
68
231
|
const styles = getStylesArray(feature.getStyle() || style, feature, 0);
|
|
69
|
-
|
|
232
|
+
const styledGeometries = styles.map((currentStyle) => {
|
|
70
233
|
const geometry = currentStyle.getGeometryFunction()(feature);
|
|
71
234
|
if (geometry) {
|
|
72
|
-
|
|
235
|
+
return {
|
|
236
|
+
style: currentStyle,
|
|
237
|
+
geometries: getSingleGeometriesFromGeometry(geometry),
|
|
238
|
+
};
|
|
73
239
|
}
|
|
74
|
-
|
|
240
|
+
return {
|
|
241
|
+
style: currentStyle,
|
|
242
|
+
geometries: [],
|
|
243
|
+
};
|
|
244
|
+
});
|
|
245
|
+
return (await Promise.all(styledGeometries.map(async ({ geometries, style: currentStyle }) => {
|
|
246
|
+
const itemArrays = await Promise.all(geometries.map((geometry) => getCesiumOptionsForSingleGeometry(feature, geometry, currentStyle, vectorProperties, scene)));
|
|
247
|
+
const items = itemArrays.flat();
|
|
248
|
+
const { batches, convertedItems } = getPrimitiveBatches(items, feature, vectorProperties, scene);
|
|
249
|
+
convertedItems.push(...batchPrimitives(batches, feature, currentStyle, vectorProperties, scene));
|
|
250
|
+
return convertedItems;
|
|
251
|
+
}))).flat();
|
|
75
252
|
}
|
|
76
253
|
//# sourceMappingURL=convert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert.js","sourceRoot":"","sources":["../../../../src/util/featureconverter/convert.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,OAAO,EACP,UAAU,EACV,MAAM,EACN,KAAK,EACL,UAAU,EACV,eAAe,EACf,YAAY,GACb,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"convert.js","sourceRoot":"","sources":["../../../../src/util/featureconverter/convert.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,OAAO,EACP,UAAU,EACV,MAAM,EACN,KAAK,EACL,UAAU,EACV,eAAe,EACf,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,eAAe,GAIhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAyB,MAAM,mBAAmB,CAAC;AAE1D,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EACL,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,kBAAkB,EAElB,aAAa,GACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,yBAAyB,GAG1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,iCAAiC,EACjC,6BAA6B,EAC7B,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,E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ACJ,CAAC,CAAC,CAAC;IAEL,OAAO,CACL,MAAM,OAAO,CAAC,GAAG,CACf,gBAAgB,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE;QACjE,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,GAAG,CAClC,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAC1B,iCAAiC,CAC/B,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,KAAK,CACN,CACF,CACF,CAAC;QAEF,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;QAChC,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,mBAAmB,CACrD,KAAK,EACL,OAAO,EACP,gBAAgB,EAChB,KAAK,CACN,CAAC;QAEF,cAAc,CAAC,IAAI,CACjB,GAAG,eAAe,CAChB,OAAO,EACP,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,KAAK,CACN,CACF,CAAC;QACF,OAAO,cAAc,CAAC;IACxB,CAAC,CAAC,CACH,CACF,CAAC,IAAI,EAAE,CAAC;AACX,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { Geometry } from 'ol/geom.js';
|
|
2
2
|
import type { Extent } from 'ol/extent.js';
|
|
3
3
|
import type { Coordinate } from 'ol/coordinate.js';
|
|
4
|
-
import {
|
|
4
|
+
import { HeightReference } from '@vcmap-cesium/engine';
|
|
5
|
+
import { VectorHeightInfo } from './vectorHeightInfo.js';
|
|
5
6
|
declare class Extent3D {
|
|
6
7
|
static fromArray(array: [number, number, number, number, number, number]): Extent3D;
|
|
7
8
|
static fromGeometry(geometry?: Geometry): Extent3D;
|
|
8
9
|
/**
|
|
9
10
|
* @param heightInfo
|
|
10
11
|
*/
|
|
11
|
-
static fromHeightInfo(heightInfo: VectorHeightInfo): Extent3D;
|
|
12
|
+
static fromHeightInfo(heightInfo: VectorHeightInfo<HeightReference.NONE>): Extent3D;
|
|
12
13
|
static fromCoordinates(coordinates: Coordinate[]): Extent3D;
|
|
13
14
|
minX: number;
|
|
14
15
|
minY: number;
|
|
@@ -18,7 +19,7 @@ declare class Extent3D {
|
|
|
18
19
|
maxZ: number;
|
|
19
20
|
constructor(minX?: number, minY?: number, minZ?: number, maxX?: number, maxY?: number, maxZ?: number);
|
|
20
21
|
extendWithGeometry(geometry?: Geometry): void;
|
|
21
|
-
extendWithHeightInfo(heightInfo: VectorHeightInfo): void;
|
|
22
|
+
extendWithHeightInfo(heightInfo: VectorHeightInfo<HeightReference.NONE>): void;
|
|
22
23
|
extendXYZ(x: number, y: number, z: number): void;
|
|
23
24
|
extendXY(x: number, y: number): void;
|
|
24
25
|
extendZ(z: number): void;
|
|
@@ -67,12 +67,12 @@ class Extent3D {
|
|
|
67
67
|
}
|
|
68
68
|
extendWithHeightInfo(heightInfo) {
|
|
69
69
|
if (heightInfo.extruded) {
|
|
70
|
-
const calculatedFeatureMaxHeight = heightInfo.
|
|
70
|
+
const calculatedFeatureMaxHeight = heightInfo.groundLevelOrMinHeight +
|
|
71
71
|
heightInfo.storeyHeightsAboveGround.reduce((accumulator, currentValue) => {
|
|
72
72
|
return accumulator + currentValue;
|
|
73
73
|
}, 0);
|
|
74
74
|
this.extendZ(calculatedFeatureMaxHeight);
|
|
75
|
-
const calculatedFeatureMinHeight = heightInfo.
|
|
75
|
+
const calculatedFeatureMinHeight = heightInfo.groundLevelOrMinHeight -
|
|
76
76
|
heightInfo.storeyHeightsBelowGround.reduce((accumulator, currentValue) => {
|
|
77
77
|
return accumulator + currentValue;
|
|
78
78
|
}, 0);
|
|
@@ -126,10 +126,11 @@ class Extent3D {
|
|
|
126
126
|
if (this.isEmpty()) {
|
|
127
127
|
return [0, 0, 0];
|
|
128
128
|
}
|
|
129
|
+
const minZ = this.minZ + (this.maxZ - this.minZ) / 2;
|
|
129
130
|
return [
|
|
130
131
|
this.minX + (this.maxX - this.minX) / 2,
|
|
131
132
|
this.minY + (this.maxY - this.minY) / 2,
|
|
132
|
-
|
|
133
|
+
Number.isFinite(minZ) ? minZ : 0,
|
|
133
134
|
];
|
|
134
135
|
}
|
|
135
136
|
getSize() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extent3D.js","sourceRoot":"","sources":["../../../../src/util/featureconverter/extent3D.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"extent3D.js","sourceRoot":"","sources":["../../../../src/util/featureconverter/extent3D.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAavC,MAAM,QAAQ;IACZ,MAAM,CAAC,SAAS,CACd,KAAuD;QAEvD,KAAK,CAAC,KAAyD,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;QAC3E,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACvB,OAAO,IAAI,QAAQ,CACjB,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,CACT,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,QAAmB;QACrC,MAAM,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC9B,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QACpC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,cAAc,CACnB,UAAkD;QAElD,MAAM,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC9B,MAAM,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;QACxC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,eAAe,CAAC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-
import {
|
|
1
|
+
import { type Scene } from '@vcmap-cesium/engine';
|
|
2
2
|
import { Feature } from 'ol';
|
|
3
3
|
import { type LineString } from 'ol/geom.js';
|
|
4
4
|
import type { Coordinate } from 'ol/coordinate.js';
|
|
5
5
|
import type { Style } from 'ol/style.js';
|
|
6
6
|
import ArrowStyle from '../../style/arrowStyle.js';
|
|
7
7
|
import type VectorProperties from '../../layer/vectorProperties.js';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export declare function
|
|
15
|
-
export declare function
|
|
16
|
-
export declare function createFillGeometries(_options: LineGeometryOptions, _height: number, _perPositionHeight: boolean): PolygonGeometry[];
|
|
17
|
-
export declare function createGroundLineGeometries(options: LineGeometryOptions, style: Style): GroundPolylineGeometry[];
|
|
18
|
-
export declare function createLineGeometries(options: LineGeometryOptions, style: Style): PolylineGeometry[];
|
|
8
|
+
import { ConvertedItem } from './convert.js';
|
|
9
|
+
import { VectorHeightInfo } from './vectorHeightInfo.js';
|
|
10
|
+
import { CesiumGeometryOption, PolylineGeometryOptions, VectorGeometryFactory } from './vectorGeometryFactory.js';
|
|
11
|
+
export declare function getArrowHeadPrimitives(feature: Feature, style: ArrowStyle, geometry: LineString, vectorProperties: VectorProperties, scene: Scene, inputCoordinates?: Coordinate[]): ConvertedItem<'primitive'>[];
|
|
12
|
+
export declare function createSolidGeometries(options: PolylineGeometryOptions, heightInfo: VectorHeightInfo, height: number, perPositionHeight: boolean, extrudedHeight?: number): CesiumGeometryOption<'solid'>[];
|
|
13
|
+
export declare function createOutlineGeometries(options: PolylineGeometryOptions, heightInfo: VectorHeightInfo, height: number, perPositionHeight: boolean, extrudedHeight?: number): CesiumGeometryOption<'outline'>[];
|
|
14
|
+
export declare function createGroundLineGeometries(options: PolylineGeometryOptions, heightInfo: VectorHeightInfo, style: Style): CesiumGeometryOption<'groundLine'>[];
|
|
15
|
+
export declare function createLineGeometries(options: PolylineGeometryOptions, heightInfo: VectorHeightInfo, style: Style): CesiumGeometryOption<'line'>[];
|
|
19
16
|
/**
|
|
20
17
|
* Creates the positions array for PolylineGeometry
|
|
21
18
|
* @param geometry
|
|
22
|
-
* @param
|
|
23
|
-
* @param perPositionHeight
|
|
24
|
-
* @param groundLevelOrMinHeight
|
|
19
|
+
* @param heightInfo
|
|
25
20
|
* @private
|
|
26
21
|
*/
|
|
27
|
-
export declare function getGeometryOptions(geometry: LineString,
|
|
28
|
-
export declare function getCoordinates(geometries: LineString[]): Coordinate[];
|
|
22
|
+
export declare function getGeometryOptions(geometry: LineString, heightInfo: VectorHeightInfo): PolylineGeometryOptions;
|
|
29
23
|
/**
|
|
30
24
|
* validates if a lineString is renderable
|
|
31
25
|
* @param lineString
|
|
32
26
|
*/
|
|
33
27
|
export declare function validateLineString(lineString: LineString): boolean;
|
|
34
|
-
|
|
35
|
-
* converts a linestring to a a cesium primitive, with optional labels
|
|
36
|
-
* @param feature
|
|
37
|
-
* @param style
|
|
38
|
-
* @param geometries
|
|
39
|
-
* @param vectorProperties
|
|
40
|
-
* @param scene
|
|
41
|
-
* @param context
|
|
42
|
-
*/
|
|
43
|
-
export default function lineStringToCesium(feature: Feature, style: Style, geometries: LineString[], vectorProperties: VectorProperties, scene: Scene, context: AsyncCesiumVectorContext): Promise<void>;
|
|
28
|
+
export declare function getLineStringGeometryFactory(): VectorGeometryFactory<'lineString'>;
|