raain-model 2.6.10 → 3.0.1
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/CHANGELOG.md +94 -7
- package/README.md +14 -13
- package/RELEASE_PROCESS.md +91 -4
- package/cartesian/CartesianMeasureValue.d.ts +46 -0
- package/{src/cartesian/CartesianMeasureValue.ts → cartesian/CartesianMeasureValue.js} +41 -73
- package/cartesian/CartesianMeasureValue.js.map +1 -0
- package/cartesian/CartesianTools.d.ts +32 -0
- package/{src/cartesian/CartesianTools.ts → cartesian/CartesianTools.js} +69 -130
- package/cartesian/CartesianTools.js.map +1 -0
- package/cartesian/CartesianValue.d.ts +14 -0
- package/cartesian/CartesianValue.js +17 -0
- package/cartesian/CartesianValue.js.map +1 -0
- package/cartesian/EarthMap.d.ts +5 -0
- package/cartesian/EarthMap.js +3 -0
- package/cartesian/EarthMap.js.map +1 -0
- package/cartesian/ICartesianMeasureValue.d.ts +23 -0
- package/cartesian/ICartesianMeasureValue.js +3 -0
- package/cartesian/ICartesianMeasureValue.js.map +1 -0
- package/cartesian/LatLng.d.ts +16 -0
- package/cartesian/LatLng.js +34 -0
- package/cartesian/LatLng.js.map +1 -0
- package/cartesian/RadarCartesianMeasureValue.d.ts +27 -0
- package/cartesian/RadarCartesianMeasureValue.js +24 -0
- package/cartesian/RadarCartesianMeasureValue.js.map +1 -0
- package/cartesian/RainCartesianMeasureValue.d.ts +25 -0
- package/cartesian/RainCartesianMeasureValue.js +25 -0
- package/cartesian/RainCartesianMeasureValue.js.map +1 -0
- package/cartesian/index.js +25 -0
- package/cartesian/index.js.map +1 -0
- package/gauge/GaugeMeasure.d.ts +30 -0
- package/gauge/GaugeMeasure.js +30 -0
- package/gauge/GaugeMeasure.js.map +1 -0
- package/gauge/GaugeNode.d.ts +95 -0
- package/{src/gauge/GaugeNode.ts → gauge/GaugeNode.js} +28 -54
- package/gauge/GaugeNode.js.map +1 -0
- package/gauge/GaugeNodeMap.d.ts +35 -0
- package/gauge/GaugeNodeMap.js +42 -0
- package/gauge/GaugeNodeMap.js.map +1 -0
- package/gauge/index.js +20 -0
- package/gauge/index.js.map +1 -0
- package/index.js +24 -0
- package/index.js.map +1 -0
- package/organization/EventNode.d.ts +30 -0
- package/organization/EventNode.js +30 -0
- package/organization/EventNode.js.map +1 -0
- package/organization/IVersion.js +3 -0
- package/organization/IVersion.js.map +1 -0
- package/organization/Link.d.ts +16 -0
- package/{src/organization/Link.ts → organization/Link.js} +15 -15
- package/organization/Link.js.map +1 -0
- package/organization/Measure.d.ts +30 -0
- package/organization/Measure.js +51 -0
- package/organization/Measure.js.map +1 -0
- package/organization/PeopleNode.d.ts +23 -0
- package/{src/organization/PeopleNode.ts → organization/PeopleNode.js} +10 -20
- package/organization/PeopleNode.js.map +1 -0
- package/organization/RaainNode.d.ts +95 -0
- package/{src/organization/RaainNode.ts → organization/RaainNode.js} +38 -63
- package/organization/RaainNode.js.map +1 -0
- package/organization/TeamNode.d.ts +51 -0
- package/organization/TeamNode.js +52 -0
- package/organization/TeamNode.js.map +1 -0
- package/organization/index.js +24 -0
- package/organization/index.js.map +1 -0
- package/package.json +4 -2
- package/polar/AbstractPolarMeasureValue.d.ts +31 -0
- package/{src/polar/AbstractPolarMeasureValue.ts → polar/AbstractPolarMeasureValue.js} +34 -62
- package/polar/AbstractPolarMeasureValue.js.map +1 -0
- package/polar/IPolarMeasureValue.d.ts +19 -0
- package/polar/IPolarMeasureValue.js +3 -0
- package/polar/IPolarMeasureValue.js.map +1 -0
- package/polar/MeasureValuePolarContainer.d.ts +24 -0
- package/{src/polar/MeasureValuePolarContainer.ts → polar/MeasureValuePolarContainer.js} +13 -29
- package/polar/MeasureValuePolarContainer.js.map +1 -0
- package/polar/PolarFilter.d.ts +16 -0
- package/polar/PolarFilter.js +45 -0
- package/polar/PolarFilter.js.map +1 -0
- package/polar/PolarMeasureValue.d.ts +51 -0
- package/{src/polar/PolarMeasureValue.ts → polar/PolarMeasureValue.js} +62 -125
- package/polar/PolarMeasureValue.js.map +1 -0
- package/polar/PolarMeasureValueMap.d.ts +45 -0
- package/{src/polar/PolarMeasureValueMap.ts → polar/PolarMeasureValueMap.js} +88 -165
- package/polar/PolarMeasureValueMap.js.map +1 -0
- package/polar/PolarValue.d.ts +10 -0
- package/polar/PolarValue.js +12 -0
- package/polar/PolarValue.js.map +1 -0
- package/polar/RadarPolarMeasureValue.d.ts +33 -0
- package/{src/polar/RadarPolarMeasureValue.ts → polar/RadarPolarMeasureValue.js} +31 -39
- package/polar/RadarPolarMeasureValue.js.map +1 -0
- package/polar/RainPolarMeasureValue.d.ts +24 -0
- package/polar/RainPolarMeasureValue.js +46 -0
- package/polar/RainPolarMeasureValue.js.map +1 -0
- package/polar/index.js +25 -0
- package/polar/index.js.map +1 -0
- package/quality/QualityPoint.d.ts +37 -0
- package/{src/quality/QualityPoint.ts → quality/QualityPoint.js} +33 -56
- package/quality/QualityPoint.js.map +1 -0
- package/quality/SpeedMatrix.d.ts +83 -0
- package/{src/quality/SpeedMatrix.ts → quality/SpeedMatrix.js} +76 -117
- package/quality/SpeedMatrix.js.map +1 -0
- package/quality/SpeedMatrixContainer.d.ts +102 -0
- package/{src/quality/SpeedMatrixContainer.ts → quality/SpeedMatrixContainer.js} +103 -210
- package/quality/SpeedMatrixContainer.js.map +1 -0
- package/quality/history/CartesianGaugeHistory.d.ts +15 -0
- package/quality/history/CartesianGaugeHistory.js +14 -0
- package/quality/history/CartesianGaugeHistory.js.map +1 -0
- package/quality/history/CartesianRainHistory.d.ts +9 -0
- package/quality/history/CartesianRainHistory.js +11 -0
- package/quality/history/CartesianRainHistory.js.map +1 -0
- package/quality/history/PositionHistory.d.ts +20 -0
- package/quality/history/PositionHistory.js +17 -0
- package/quality/history/PositionHistory.js.map +1 -0
- package/{src/quality/index.ts → quality/index.d.ts} +0 -3
- package/quality/index.js +26 -0
- package/quality/index.js.map +1 -0
- package/quality/position/Position.d.ts +22 -0
- package/quality/position/Position.js +50 -0
- package/quality/position/Position.js.map +1 -0
- package/quality/position/PositionValue.d.ts +9 -0
- package/quality/position/PositionValue.js +12 -0
- package/quality/position/PositionValue.js.map +1 -0
- package/quality/tools/QualityTools.d.ts +9 -0
- package/{src/quality/tools/QualityTools.ts → quality/tools/QualityTools.js} +17 -18
- package/quality/tools/QualityTools.js.map +1 -0
- package/radar/RadarMeasure.d.ts +38 -0
- package/radar/RadarMeasure.js +33 -0
- package/radar/RadarMeasure.js.map +1 -0
- package/radar/RadarNode.d.ts +41 -0
- package/radar/RadarNode.js +58 -0
- package/radar/RadarNode.js.map +1 -0
- package/radar/RadarNodeMap.d.ts +51 -0
- package/radar/RadarNodeMap.js +50 -0
- package/radar/RadarNodeMap.js.map +1 -0
- package/radar/index.js +20 -0
- package/radar/index.js.map +1 -0
- package/rain/MergeStrategy.d.ts +13 -0
- package/rain/MergeStrategy.js +11 -0
- package/rain/MergeStrategy.js.map +1 -0
- package/rain/RainComputation.d.ts +59 -0
- package/rain/RainComputation.js +68 -0
- package/rain/RainComputation.js.map +1 -0
- package/rain/RainComputationAbstract.d.ts +89 -0
- package/rain/RainComputationAbstract.js +207 -0
- package/rain/RainComputationAbstract.js.map +1 -0
- package/rain/RainComputationMap.d.ts +113 -0
- package/{src/rain/RainComputationMap.ts → rain/RainComputationMap.js} +26 -60
- package/rain/RainComputationMap.js.map +1 -0
- package/rain/RainComputationQuality.d.ts +58 -0
- package/{src/rain/RainComputationQuality.ts → rain/RainComputationQuality.js} +52 -89
- package/rain/RainComputationQuality.js.map +1 -0
- package/rain/RainMeasure.d.ts +17 -0
- package/rain/RainMeasure.js +18 -0
- package/rain/RainMeasure.js.map +1 -0
- package/rain/RainNode.d.ts +60 -0
- package/rain/RainNode.js +198 -0
- package/rain/RainNode.js.map +1 -0
- package/{src/rain/index.ts → rain/index.d.ts} +1 -0
- package/rain/index.js +24 -0
- package/rain/index.js.map +1 -0
- package/.cursorignore +0 -10
- package/.github/workflows/ci.yml +0 -29
- package/LICENSE +0 -21
- package/RELEASE.md +0 -19
- package/specs/REQUIREMENTS.md +0 -42
- package/specs/TECHNICAL.md +0 -57
- package/specs/cartesian/Cartesian.spec.ts +0 -82
- package/specs/cartesian/CartesianTools.spec.ts +0 -121
- package/specs/gauge/Gauge.spec.ts +0 -39
- package/specs/organization/Organization.spec.ts +0 -38
- package/specs/polar/Polar.spec.ts +0 -267
- package/specs/quality/Position.spec.ts +0 -18
- package/specs/quality/QualityPointEdgeCases.spec.ts +0 -215
- package/specs/quality/QualityTools.spec.ts +0 -67
- package/specs/quality/SpeedMatrix.spec.ts +0 -214
- package/specs/radar/Radar.spec.ts +0 -129
- package/specs/rain/Rain.spec.ts +0 -334
- package/specs/tsconfig.json +0 -12
- package/src/cartesian/CartesianValue.ts +0 -26
- package/src/cartesian/EarthMap.ts +0 -5
- package/src/cartesian/ICartesianMeasureValue.ts +0 -22
- package/src/cartesian/LatLng.ts +0 -43
- package/src/cartesian/RadarCartesianMeasureValue.ts +0 -32
- package/src/cartesian/RainCartesianMeasureValue.ts +0 -32
- package/src/gauge/GaugeMeasure.ts +0 -42
- package/src/gauge/GaugeNodeMap.ts +0 -55
- package/src/organization/EventNode.ts +0 -43
- package/src/organization/Measure.ts +0 -61
- package/src/organization/TeamNode.ts +0 -91
- package/src/polar/IPolarMeasureValue.ts +0 -21
- package/src/polar/PolarFilter.ts +0 -46
- package/src/polar/PolarValue.ts +0 -16
- package/src/polar/RainPolarMeasureValue.ts +0 -57
- package/src/quality/history/CartesianGaugeHistory.ts +0 -23
- package/src/quality/history/CartesianRainHistory.ts +0 -15
- package/src/quality/history/PositionHistory.ts +0 -31
- package/src/quality/position/Position.ts +0 -59
- package/src/quality/position/PositionValue.ts +0 -15
- package/src/radar/RadarMeasure.ts +0 -41
- package/src/radar/RadarNode.ts +0 -78
- package/src/radar/RadarNodeMap.ts +0 -61
- package/src/rain/MergeStrategy.ts +0 -15
- package/src/rain/RainComputation.ts +0 -96
- package/src/rain/RainComputationAbstract.ts +0 -262
- package/src/rain/RainMeasure.ts +0 -25
- package/src/rain/RainNode.ts +0 -235
- package/tsconfig.json +0 -17
- package/tslint.json +0 -79
- package/typedoc.json +0 -31
- /package/{src/cartesian/index.ts → cartesian/index.d.ts} +0 -0
- /package/{src/gauge/index.ts → gauge/index.d.ts} +0 -0
- /package/{src/index.ts → index.d.ts} +0 -0
- /package/{src/organization/IVersion.ts → organization/IVersion.d.ts} +0 -0
- /package/{src/organization/index.ts → organization/index.d.ts} +0 -0
- /package/{src/polar/index.ts → polar/index.d.ts} +0 -0
- /package/{src/radar/index.ts → radar/index.d.ts} +0 -0
|
@@ -1,143 +1,106 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
protected azimuthsCount: number;
|
|
10
|
-
protected polarEdgesCount: number;
|
|
11
|
-
|
|
12
|
-
constructor(json: {
|
|
13
|
-
measureValuePolarContainers: MeasureValuePolarContainer[] | string,
|
|
14
|
-
azimuthsCount?: number,
|
|
15
|
-
polarEdgesCount?: number,
|
|
16
|
-
} | string) {
|
|
17
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PolarMeasureValue = void 0;
|
|
4
|
+
const MeasureValuePolarContainer_1 = require("./MeasureValuePolarContainer");
|
|
5
|
+
const PolarValue_1 = require("./PolarValue");
|
|
6
|
+
const AbstractPolarMeasureValue_1 = require("./AbstractPolarMeasureValue");
|
|
7
|
+
class PolarMeasureValue {
|
|
8
|
+
constructor(json) {
|
|
18
9
|
if (typeof json === 'string') {
|
|
19
|
-
json = JSON.parse(json)
|
|
20
|
-
measureValuePolarContainers: MeasureValuePolarContainer[] | string,
|
|
21
|
-
azimuthsCount: number,
|
|
22
|
-
polarEdgesCount: number,
|
|
23
|
-
};
|
|
10
|
+
json = JSON.parse(json);
|
|
24
11
|
}
|
|
25
|
-
|
|
26
12
|
if (typeof json.measureValuePolarContainers === 'string') {
|
|
27
|
-
|
|
28
13
|
this.setPolarsAsString(json.measureValuePolarContainers);
|
|
29
|
-
|
|
30
|
-
|
|
14
|
+
}
|
|
15
|
+
else if (json.measureValuePolarContainers instanceof AbstractPolarMeasureValue_1.AbstractPolarMeasureValue
|
|
31
16
|
|| json.measureValuePolarContainers instanceof PolarMeasureValue) {
|
|
32
|
-
|
|
33
17
|
this.setPolarsAsContainer(json.measureValuePolarContainers.getPolars());
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
36
20
|
this.setPolarsAsContainer(json.measureValuePolarContainers);
|
|
37
21
|
}
|
|
38
|
-
|
|
39
|
-
if (!(json?.azimuthsCount >= 0) || !(json?.polarEdgesCount >= 0)) {
|
|
22
|
+
if (!((json === null || json === void 0 ? void 0 : json.azimuthsCount) >= 0) || !((json === null || json === void 0 ? void 0 : json.polarEdgesCount) >= 0)) {
|
|
40
23
|
// throw new Error('PolarMeasureValue needs valid azimuthsCount & polarEdgesCount');
|
|
41
24
|
this.countUnknown();
|
|
42
|
-
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
43
27
|
this.azimuthsCount = json.azimuthsCount;
|
|
44
28
|
this.polarEdgesCount = json.polarEdgesCount;
|
|
45
29
|
}
|
|
46
30
|
}
|
|
47
|
-
|
|
48
|
-
getAzimuthsCount(): number {
|
|
31
|
+
getAzimuthsCount() {
|
|
49
32
|
if (this.azimuthsCount < 0) {
|
|
50
33
|
this.count();
|
|
51
34
|
}
|
|
52
35
|
return this.azimuthsCount;
|
|
53
36
|
}
|
|
54
|
-
|
|
55
|
-
getPolarEdgesCount(): number {
|
|
37
|
+
getPolarEdgesCount() {
|
|
56
38
|
if (this.polarEdgesCount < 0) {
|
|
57
39
|
this.count();
|
|
58
40
|
}
|
|
59
41
|
return this.polarEdgesCount;
|
|
60
42
|
}
|
|
61
|
-
|
|
62
|
-
getPolarsStringified(): string {
|
|
43
|
+
getPolarsStringified() {
|
|
63
44
|
return JSON.stringify(this.getPolars());
|
|
64
45
|
}
|
|
65
|
-
|
|
66
|
-
getPolars(): MeasureValuePolarContainer[] {
|
|
46
|
+
getPolars() {
|
|
67
47
|
return this.measureValuePolarContainers;
|
|
68
48
|
}
|
|
69
|
-
|
|
70
|
-
setPolarsAsString(s: string): void {
|
|
49
|
+
setPolarsAsString(s) {
|
|
71
50
|
try {
|
|
72
51
|
let polars = JSON.parse(s);
|
|
73
|
-
|
|
74
52
|
if (polars && polars.measureValuePolarContainers) {
|
|
75
53
|
polars = polars.measureValuePolarContainers;
|
|
76
54
|
}
|
|
77
|
-
|
|
78
55
|
if (typeof polars === 'string') {
|
|
79
56
|
polars = JSON.parse(polars);
|
|
80
57
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
58
|
+
this.measureValuePolarContainers = polars.map(convertedPolar => new MeasureValuePolarContainer_1.MeasureValuePolarContainer(convertedPolar));
|
|
59
|
+
}
|
|
60
|
+
catch (e) {
|
|
84
61
|
// console.warn('setPolarsAsString pb: ', e, typeof s, s);
|
|
85
62
|
this.measureValuePolarContainers = [];
|
|
86
63
|
}
|
|
87
|
-
|
|
88
64
|
this.countUnknown();
|
|
89
65
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
options = {resetCount: true}): void {
|
|
93
|
-
let parsed: any = measureValuePolarContainers ? measureValuePolarContainers : [];
|
|
66
|
+
setPolarsAsContainer(measureValuePolarContainers, options = { resetCount: true }) {
|
|
67
|
+
let parsed = measureValuePolarContainers ? measureValuePolarContainers : [];
|
|
94
68
|
if (!('length' in parsed)) {
|
|
95
69
|
parsed = [];
|
|
96
70
|
}
|
|
97
71
|
this.measureValuePolarContainers = parsed;
|
|
98
|
-
|
|
99
72
|
if (options.resetCount) {
|
|
100
73
|
this.countUnknown();
|
|
101
74
|
}
|
|
102
75
|
}
|
|
103
|
-
|
|
104
|
-
getPolarValue(json: { azimuthInDegrees: number, distanceInMeters: number }): PolarValue {
|
|
105
|
-
|
|
76
|
+
getPolarValue(json) {
|
|
106
77
|
if (json.azimuthInDegrees < 0 || json.azimuthInDegrees > 360) {
|
|
107
78
|
console.warn('### raain-model > getPolarValue : strange azimuth:', json.azimuthInDegrees);
|
|
108
79
|
return null;
|
|
109
80
|
}
|
|
110
|
-
|
|
111
81
|
let edgeValue = 0;
|
|
112
82
|
let distance = this.getDefaultDistance();
|
|
113
|
-
|
|
114
83
|
const measureValuePolarContainersFound = this.measureValuePolarContainers
|
|
115
84
|
.filter(c => c.azimuth === json.azimuthInDegrees);
|
|
116
85
|
if (measureValuePolarContainersFound.length === 1) {
|
|
117
|
-
|
|
118
86
|
const measureValuePolarContainer = measureValuePolarContainersFound[0];
|
|
119
87
|
distance = measureValuePolarContainer.distance;
|
|
120
88
|
const edgeIndex = (json.distanceInMeters / distance) - 1 - measureValuePolarContainer.edgeOffset;
|
|
121
|
-
|
|
122
89
|
if (0 <= edgeIndex && edgeIndex < measureValuePolarContainer.polarEdges.length) {
|
|
123
90
|
edgeValue = measureValuePolarContainer.polarEdges[edgeIndex];
|
|
124
91
|
}
|
|
125
92
|
}
|
|
126
|
-
|
|
127
|
-
return new PolarValue({
|
|
93
|
+
return new PolarValue_1.PolarValue({
|
|
128
94
|
value: edgeValue,
|
|
129
95
|
polarAzimuthInDegrees: json.azimuthInDegrees,
|
|
130
96
|
polarDistanceInMeters: json.distanceInMeters
|
|
131
97
|
});
|
|
132
98
|
}
|
|
133
|
-
|
|
134
|
-
setPolarValue(json: { azimuthInDegrees: number, distanceInMeters: number, value: number }): void {
|
|
135
|
-
|
|
99
|
+
setPolarValue(json) {
|
|
136
100
|
if (json.azimuthInDegrees < 0 || json.azimuthInDegrees > 360) {
|
|
137
101
|
console.warn('### raain-model > setPolarValue : strange azimuth:', json.azimuthInDegrees);
|
|
138
102
|
return null;
|
|
139
103
|
}
|
|
140
|
-
|
|
141
104
|
let distance = this.getDefaultDistance();
|
|
142
105
|
const azimuth = json.azimuthInDegrees;
|
|
143
106
|
const found = this.measureValuePolarContainers.filter(c => c.azimuth === azimuth);
|
|
@@ -145,93 +108,71 @@ export class PolarMeasureValue implements IPolarMeasureValue {
|
|
|
145
108
|
const measureValuePolarContainer = found[0];
|
|
146
109
|
distance = measureValuePolarContainer.distance;
|
|
147
110
|
const edgeIndex = (json.distanceInMeters / distance) - 1 - measureValuePolarContainer.edgeOffset;
|
|
148
|
-
|
|
149
111
|
if (0 <= edgeIndex && edgeIndex < measureValuePolarContainer.polarEdges.length) {
|
|
150
112
|
measureValuePolarContainer.polarEdges[edgeIndex] = json.value;
|
|
151
|
-
}
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
152
115
|
console.warn('### raain-model > setPolarValue : extending polarEdges');
|
|
153
116
|
let diff = edgeIndex - measureValuePolarContainer.polarEdges.length;
|
|
154
117
|
if (edgeIndex < 0) {
|
|
155
118
|
diff = -1 - edgeIndex;
|
|
156
119
|
measureValuePolarContainer.edgeOffset += edgeIndex;
|
|
157
120
|
}
|
|
158
|
-
|
|
159
121
|
const arrayWithNullValuesToAdd = new Array(diff).fill(0);
|
|
160
|
-
|
|
161
122
|
if (edgeIndex < 0) {
|
|
162
|
-
measureValuePolarContainer.polarEdges = [json.value].concat(
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
measureValuePolarContainer.polarEdges = measureValuePolarContainer.polarEdges.concat(
|
|
166
|
-
arrayWithNullValuesToAdd.concat([json.value]));
|
|
123
|
+
measureValuePolarContainer.polarEdges = [json.value].concat(arrayWithNullValuesToAdd.concat(measureValuePolarContainer.polarEdges));
|
|
124
|
+
}
|
|
125
|
+
else if (edgeIndex > 0) {
|
|
126
|
+
measureValuePolarContainer.polarEdges = measureValuePolarContainer.polarEdges.concat(arrayWithNullValuesToAdd.concat([json.value]));
|
|
167
127
|
}
|
|
168
128
|
}
|
|
169
|
-
}
|
|
129
|
+
}
|
|
130
|
+
else if (found.length === 0) {
|
|
170
131
|
console.warn('### raain-model > setPolarValue : extending measureValuePolarContainers');
|
|
171
132
|
const polarEdges = [json.value];
|
|
172
133
|
const edgeOffset = json.distanceInMeters / distance - 1;
|
|
173
|
-
this.measureValuePolarContainers.push(new MeasureValuePolarContainer({azimuth, distance, polarEdges, edgeOffset}));
|
|
134
|
+
this.measureValuePolarContainers.push(new MeasureValuePolarContainer_1.MeasureValuePolarContainer({ azimuth, distance, polarEdges, edgeOffset }));
|
|
174
135
|
}
|
|
175
136
|
}
|
|
176
|
-
|
|
177
|
-
iterate(onEachValue: (
|
|
178
|
-
polarValue: PolarValue,
|
|
179
|
-
azimuthIndex: number,
|
|
180
|
-
edgeIndex: number,
|
|
181
|
-
valueSetter: (newValue: number) => void
|
|
182
|
-
) => void) {
|
|
183
|
-
|
|
137
|
+
iterate(onEachValue) {
|
|
184
138
|
for (const measureValuePolarContainer of this.measureValuePolarContainers) {
|
|
185
139
|
const azimuth = measureValuePolarContainer.azimuth;
|
|
186
140
|
const distance = measureValuePolarContainer.distance;
|
|
187
141
|
const polarEdges = measureValuePolarContainer.polarEdges;
|
|
188
|
-
|
|
189
142
|
const azimuthIndex = azimuth * this.getAzimuthsCount() / 360;
|
|
190
143
|
for (const [edgeIndex, value] of polarEdges.entries()) {
|
|
191
|
-
|
|
192
144
|
const edgeAbsoluteIndex = edgeIndex + measureValuePolarContainer.edgeOffset;
|
|
193
|
-
|
|
194
|
-
const valueSetter = (newValue: number) => {
|
|
145
|
+
const valueSetter = (newValue) => {
|
|
195
146
|
polarEdges[edgeIndex] = newValue;
|
|
196
147
|
};
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
polarDistanceInMeters: distance * (edgeAbsoluteIndex + 1)
|
|
203
|
-
}),
|
|
204
|
-
azimuthIndex,
|
|
205
|
-
edgeAbsoluteIndex,
|
|
206
|
-
valueSetter);
|
|
148
|
+
onEachValue(new PolarValue_1.PolarValue({
|
|
149
|
+
value,
|
|
150
|
+
polarAzimuthInDegrees: azimuth,
|
|
151
|
+
polarDistanceInMeters: distance * (edgeAbsoluteIndex + 1)
|
|
152
|
+
}), azimuthIndex, edgeAbsoluteIndex, valueSetter);
|
|
207
153
|
}
|
|
208
154
|
}
|
|
209
155
|
}
|
|
210
|
-
|
|
211
|
-
public toJSON() {
|
|
156
|
+
toJSON() {
|
|
212
157
|
return {
|
|
213
158
|
measureValuePolarContainers: this.getPolars(),
|
|
214
159
|
azimuthsCount: this.getAzimuthsCount(),
|
|
215
160
|
polarEdgesCount: this.getPolarEdgesCount(),
|
|
216
161
|
};
|
|
217
162
|
}
|
|
218
|
-
|
|
219
|
-
public toJSONWithPolarStringified() {
|
|
163
|
+
toJSONWithPolarStringified() {
|
|
220
164
|
return {
|
|
221
165
|
measureValuePolarContainers: this.getPolarsStringified(),
|
|
222
166
|
azimuthsCount: this.getAzimuthsCount(),
|
|
223
167
|
polarEdgesCount: this.getPolarEdgesCount(),
|
|
224
168
|
};
|
|
225
169
|
}
|
|
226
|
-
|
|
227
|
-
public getFiltered(options = {
|
|
170
|
+
getFiltered(options = {
|
|
228
171
|
nullValues: true,
|
|
229
172
|
ordered: false
|
|
230
|
-
})
|
|
231
|
-
|
|
173
|
+
}) {
|
|
232
174
|
const azimuthsCount = this.getAzimuthsCount();
|
|
233
175
|
const polarEdgesCount = this.getPolarEdgesCount();
|
|
234
|
-
|
|
235
176
|
let measureValuePolarContainers = [];
|
|
236
177
|
for (const measureValuePolarContainer of this.measureValuePolarContainers) {
|
|
237
178
|
let filteredMeasureValuePolarContainer = measureValuePolarContainer;
|
|
@@ -240,57 +181,53 @@ export class PolarMeasureValue implements IPolarMeasureValue {
|
|
|
240
181
|
if (options.nullValues && filteredMeasureValuePolarContainer.getNotNullValuesCount()) {
|
|
241
182
|
measureValuePolarContainers.push(filteredMeasureValuePolarContainer);
|
|
242
183
|
}
|
|
243
|
-
}
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
244
186
|
measureValuePolarContainers.push(filteredMeasureValuePolarContainer);
|
|
245
187
|
}
|
|
246
188
|
}
|
|
247
|
-
|
|
248
189
|
if (options.ordered) {
|
|
249
190
|
measureValuePolarContainers = measureValuePolarContainers.sort((a, b) => a.azimuth - b.azimuth);
|
|
250
191
|
}
|
|
251
|
-
|
|
252
|
-
return new PolarMeasureValue({measureValuePolarContainers, azimuthsCount, polarEdgesCount});
|
|
192
|
+
return new PolarMeasureValue({ measureValuePolarContainers, azimuthsCount, polarEdgesCount });
|
|
253
193
|
}
|
|
254
|
-
|
|
255
|
-
public getValuesCount(): number {
|
|
194
|
+
getValuesCount() {
|
|
256
195
|
return this.getAzimuthsCount() * this.getPolarEdgesCount();
|
|
257
196
|
}
|
|
258
|
-
|
|
259
|
-
public getNotNullValuesCount(): number {
|
|
197
|
+
getNotNullValuesCount() {
|
|
260
198
|
let count = 0;
|
|
261
199
|
for (const [a, measureValuePolarContainer] of this.getPolars().entries()) {
|
|
262
200
|
count += measureValuePolarContainer.getNotNullValuesCount();
|
|
263
201
|
}
|
|
264
202
|
return count;
|
|
265
203
|
}
|
|
266
|
-
|
|
267
|
-
public getDefaultDistance() {
|
|
204
|
+
getDefaultDistance() {
|
|
268
205
|
let distance = 1000;
|
|
269
206
|
if (this.measureValuePolarContainers.length > 0) {
|
|
270
207
|
distance = this.measureValuePolarContainers[0].distance;
|
|
271
208
|
}
|
|
272
209
|
return distance;
|
|
273
210
|
}
|
|
274
|
-
|
|
275
|
-
public getHash(hash?: (arg0: any) => number | string): string {
|
|
211
|
+
getHash(hash) {
|
|
276
212
|
if (!hash) {
|
|
277
213
|
return '' + this.getPolars();
|
|
278
214
|
}
|
|
279
215
|
return '' + hash(this.getPolars());
|
|
280
216
|
}
|
|
281
|
-
|
|
282
|
-
protected count() {
|
|
217
|
+
count() {
|
|
283
218
|
const measureValuePolarContainers = this.getPolars();
|
|
284
219
|
this.azimuthsCount = measureValuePolarContainers.length;
|
|
285
220
|
if (this.azimuthsCount > 0) {
|
|
286
221
|
this.polarEdgesCount = measureValuePolarContainers[0].polarEdges.length;
|
|
287
|
-
}
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
288
224
|
this.polarEdgesCount = 0;
|
|
289
225
|
}
|
|
290
226
|
}
|
|
291
|
-
|
|
292
|
-
protected countUnknown() {
|
|
227
|
+
countUnknown() {
|
|
293
228
|
this.azimuthsCount = -1;
|
|
294
229
|
this.polarEdgesCount = -1;
|
|
295
230
|
}
|
|
296
231
|
}
|
|
232
|
+
exports.PolarMeasureValue = PolarMeasureValue;
|
|
233
|
+
//# sourceMappingURL=PolarMeasureValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PolarMeasureValue.js","sourceRoot":"","sources":["../../src/polar/PolarMeasureValue.ts"],"names":[],"mappings":";;;AAAA,6EAAwE;AAExE,6CAAwC;AACxC,2EAAsE;AAEtE,MAAa,iBAAiB;IAM1B,YAAY,IAIF;QAEN,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC3B,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAIrB,CAAC;QACN,CAAC;QAED,IAAI,OAAO,IAAI,CAAC,2BAA2B,KAAK,QAAQ,EAAE,CAAC;YAEvD,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAE7D,CAAC;aAAM,IAAI,IAAI,CAAC,2BAA2B,YAAY,qDAAyB;eACzE,IAAI,CAAC,2BAA2B,YAAY,iBAAiB,EAAE,CAAC;YAEnE,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,2BAA2B,CAAC,SAAS,EAAE,CAAC,CAAC;QAE5E,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAChE,CAAC;QAED,IAAI,CAAC,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,aAAa,KAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA,IAAI,aAAJ,IAAI,uB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
|
|
|
1
|
+
import { MeasureValuePolarContainer } from './MeasureValuePolarContainer';
|
|
2
|
+
import { PolarValue } from './PolarValue';
|
|
3
|
+
import { PolarMeasureValue } from './PolarMeasureValue';
|
|
4
|
+
import { PolarFilter } from './PolarFilter';
|
|
5
|
+
/**
|
|
6
|
+
* PolarMeasureValue Map tools to optimize get/set
|
|
7
|
+
*/
|
|
8
|
+
export declare class PolarMeasureValueMap {
|
|
9
|
+
polarMeasureValue: PolarMeasureValue;
|
|
10
|
+
protected buildPolarFilter: PolarFilter;
|
|
11
|
+
protected builtMeasureValuePolarContainers: MeasureValuePolarContainer[];
|
|
12
|
+
constructor(polarMeasureValue: PolarMeasureValue, buildPolarFilter?: PolarFilter);
|
|
13
|
+
protected static UpdateIndex(arrayLength: number, index: number): number;
|
|
14
|
+
applyToPolar(): void;
|
|
15
|
+
duplicate(polarFilter?: PolarFilter): PolarMeasureValueMap;
|
|
16
|
+
getPolarValue(json: {
|
|
17
|
+
azimuthIndex: number;
|
|
18
|
+
edgeIndex: number;
|
|
19
|
+
}): PolarValue;
|
|
20
|
+
setPolarValue(json: {
|
|
21
|
+
azimuthIndex: number;
|
|
22
|
+
edgeIndex: number;
|
|
23
|
+
value: number;
|
|
24
|
+
}): void;
|
|
25
|
+
iterate(onEachValue: (polarValue: PolarValue, azimuthIndex: number, edgeIndex: number, valueSetter: (newValue: number) => void) => void, options?: {
|
|
26
|
+
iterateOnEachEdge?: boolean;
|
|
27
|
+
polarFilter?: PolarFilter;
|
|
28
|
+
}): void;
|
|
29
|
+
countPolar(): number;
|
|
30
|
+
countPolarWithEdgeFilter(filter: any): number;
|
|
31
|
+
filter(polarFilter: PolarFilter): void;
|
|
32
|
+
protected buildFromPolar(): any[];
|
|
33
|
+
protected updatedAzimuth(azimuthIndexToUpdate: number): {
|
|
34
|
+
azimuthIndex: number;
|
|
35
|
+
azimuthInDegrees: number;
|
|
36
|
+
};
|
|
37
|
+
protected updatedEdge(edgeIndexToUpdate: number, measureValuePolarContainer?: MeasureValuePolarContainer, options?: {
|
|
38
|
+
reverse: boolean;
|
|
39
|
+
}): {
|
|
40
|
+
edgeIndex: number;
|
|
41
|
+
distanceInMeters: number;
|
|
42
|
+
};
|
|
43
|
+
protected iterateOnEachAzimuth(azimuthMin: number, azimuthMax: number, edgeMin: number, edgeMax: number, onEachValue: (polarValue: PolarValue, azimuthIndex: number, edgeIndex: number, valueSetter: (newValue: number) => void) => void): void;
|
|
44
|
+
protected iterateOnEachEdge(azimuthMin: number, azimuthMax: number, edgeMin: number, edgeMax: number, onEachValue: (polarValue: PolarValue, azimuthIndex: number, edgeIndex: number, valueSetter: (newValue: number) => void) => void): void;
|
|
45
|
+
}
|