raain-model 2.4.7 → 2.5.2
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/README.md +2 -6
- package/RELEASE.md +1 -0
- package/cartesian/CartesianMeasureValue.d.ts +11 -2
- package/cartesian/CartesianMeasureValue.js +49 -9
- package/cartesian/CartesianMeasureValue.js.map +1 -1
- package/cartesian/ICartesianMeasureValue.d.ts +1 -6
- package/cartesian/RadarCartesianMeasureValue.d.ts +5 -1
- package/cartesian/RadarCartesianMeasureValue.js +3 -6
- package/cartesian/RadarCartesianMeasureValue.js.map +1 -1
- package/cartesian/RainCartesianMeasureValue.d.ts +6 -2
- package/cartesian/RainCartesianMeasureValue.js +3 -5
- package/cartesian/RainCartesianMeasureValue.js.map +1 -1
- package/index.d.ts +2 -1
- package/index.js +2 -1
- package/index.js.map +1 -1
- package/package.json +7 -2
- package/polar/AbstractPolarMeasureValue.d.ts +9 -9
- package/polar/AbstractPolarMeasureValue.js +40 -51
- package/polar/AbstractPolarMeasureValue.js.map +1 -1
- package/polar/IPolarMeasureValue.d.ts +7 -7
- package/polar/MeasureValuePolarContainer.d.ts +8 -0
- package/polar/MeasureValuePolarContainer.js +41 -0
- package/polar/MeasureValuePolarContainer.js.map +1 -1
- 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 +30 -9
- package/polar/PolarMeasureValue.js +156 -33
- package/polar/PolarMeasureValue.js.map +1 -1
- package/polar/PolarMeasureValueMap.d.ts +40 -0
- package/polar/PolarMeasureValueMap.js +233 -0
- package/polar/PolarMeasureValueMap.js.map +1 -0
- package/polar/RadarPolarMeasureValue.d.ts +3 -1
- package/polar/RadarPolarMeasureValue.js +18 -15
- package/polar/RadarPolarMeasureValue.js.map +1 -1
- package/polar/RainPolarMeasureValue.d.ts +4 -2
- package/polar/RainPolarMeasureValue.js +5 -9
- package/polar/RainPolarMeasureValue.js.map +1 -1
- package/quality/SpeedMatrix.d.ts +2 -2
- package/quality/SpeedMatrix.js +3 -6
- package/quality/SpeedMatrix.js.map +1 -1
- package/quality/SpeedMatrixContainer.d.ts +2 -1
- package/quality/SpeedMatrixContainer.js +7 -2
- package/quality/SpeedMatrixContainer.js.map +1 -1
- package/quality/tools/QualityTools.js +2 -2
- package/quality/tools/QualityTools.js.map +1 -1
- package/rain/RainComputation.d.ts +10 -1
- package/rain/RainComputation.js +14 -2
- package/rain/RainComputation.js.map +1 -1
- package/rain/RainComputationAbstract.d.ts +23 -0
- package/rain/RainComputationAbstract.js +83 -0
- package/rain/RainComputationAbstract.js.map +1 -1
- package/rain/RainComputationMap.d.ts +5 -1
- package/rain/RainComputationMap.js +8 -31
- package/rain/RainComputationMap.js.map +1 -1
- package/rain/RainMeasure.d.ts +1 -1
- package/rain/RainMeasure.js +1 -1
- package/rain/RainNode.d.ts +1 -0
- package/rain/RainNode.js +18 -0
- package/rain/RainNode.js.map +1 -1
- package/polar/GaugePolarMeasureValue.d.ts +0 -11
- package/polar/GaugePolarMeasureValue.js +0 -14
- package/polar/GaugePolarMeasureValue.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
# raain-model
|
|
2
2
|
|
|
3
|
-
> RAAIN model
|
|
3
|
+
> RAAIN model used in [radartorain.com](https://api.radartorain.com) services.
|
|
4
4
|
|
|
5
5
|
IN PROGRESS...
|
|
6
6
|
|
|
7
7
|
### Usage
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- [https://radartorain.com](https://radartorain.com)
|
|
12
|
-
- [node-raain-tools](https://github.com/raainio/node-raain-tools)
|
|
13
|
-
- [https://api.radartorain.com](https://api.radartorain.com)
|
|
9
|
+
See [Specs](./specs).
|
|
14
10
|
|
|
15
11
|
## History
|
|
16
12
|
|
package/RELEASE.md
CHANGED
|
@@ -4,19 +4,23 @@ import { LatLng } from './LatLng';
|
|
|
4
4
|
export declare class CartesianMeasureValue implements ICartesianMeasureValue {
|
|
5
5
|
protected cartesianValues: CartesianValue[];
|
|
6
6
|
protected cartesianPixelWidth: LatLng;
|
|
7
|
+
protected limitPoints: [LatLng, LatLng];
|
|
7
8
|
constructor(json: {
|
|
8
9
|
cartesianValues: string | CartesianValue[];
|
|
9
10
|
cartesianPixelWidth: {
|
|
10
11
|
lat: number;
|
|
11
12
|
lng: number;
|
|
12
13
|
} | LatLng;
|
|
14
|
+
limitPoints?: [LatLng, LatLng];
|
|
13
15
|
});
|
|
14
|
-
static From(obj: any): CartesianMeasureValue;
|
|
16
|
+
static From(obj: ICartesianMeasureValue | any): CartesianMeasureValue;
|
|
15
17
|
getCartesianValuesStringified(): string;
|
|
16
18
|
getCartesianValues(): CartesianValue[];
|
|
17
19
|
setCartesianValues(cartesianValues: CartesianValue[]): void;
|
|
18
20
|
setCartesianValuesAsString(s: string): void;
|
|
19
|
-
toJSON(
|
|
21
|
+
toJSON(options?: {
|
|
22
|
+
stringify: boolean;
|
|
23
|
+
}): any;
|
|
20
24
|
toJSONWithCartesianValuesStringified(): any;
|
|
21
25
|
getCartesianValue(json: {
|
|
22
26
|
lat: number;
|
|
@@ -37,5 +41,10 @@ export declare class CartesianMeasureValue implements ICartesianMeasureValue {
|
|
|
37
41
|
lat: number;
|
|
38
42
|
lng: number;
|
|
39
43
|
} | LatLng): void;
|
|
44
|
+
getLimitPoints(options?: {
|
|
45
|
+
forceCompute: boolean;
|
|
46
|
+
}): [LatLng, LatLng];
|
|
47
|
+
setLimitPoints(point1: LatLng, point2: LatLng): void;
|
|
40
48
|
protected setCartesianValuesAsAny(cartesianValues: any): void;
|
|
49
|
+
protected computeLimits(): void;
|
|
41
50
|
}
|
|
@@ -5,11 +5,15 @@ const CartesianValue_1 = require("./CartesianValue");
|
|
|
5
5
|
const LatLng_1 = require("./LatLng");
|
|
6
6
|
class CartesianMeasureValue {
|
|
7
7
|
constructor(json) {
|
|
8
|
+
var _a;
|
|
8
9
|
if (!(json === null || json === void 0 ? void 0 : json.cartesianValues) || !(json === null || json === void 0 ? void 0 : json.cartesianPixelWidth)) {
|
|
9
10
|
throw new Error('CartesianMeasureValue needs cartesianValues && cartesianPixelWidth');
|
|
10
11
|
}
|
|
11
12
|
this.setCartesianValuesAsAny(json.cartesianValues);
|
|
12
13
|
this.setCartesianPixelWidth(json.cartesianPixelWidth);
|
|
14
|
+
if (((_a = json.limitPoints) === null || _a === void 0 ? void 0 : _a.length) === 2) {
|
|
15
|
+
this.setLimitPoints(json.limitPoints[0], json.limitPoints[1]);
|
|
16
|
+
}
|
|
13
17
|
}
|
|
14
18
|
static From(obj) {
|
|
15
19
|
const created = new CartesianMeasureValue({
|
|
@@ -24,6 +28,9 @@ class CartesianMeasureValue {
|
|
|
24
28
|
typeof obj.cartesianPixelWidth.lng !== 'undefined') {
|
|
25
29
|
created.setCartesianPixelWidth(obj.cartesianPixelWidth);
|
|
26
30
|
}
|
|
31
|
+
if (Array.isArray(obj.limitPoints) && obj.limitPoints.length === 2) {
|
|
32
|
+
created.setLimitPoints(obj.limitPoints[0], obj.limitPoints[1]);
|
|
33
|
+
}
|
|
27
34
|
return created;
|
|
28
35
|
}
|
|
29
36
|
getCartesianValuesStringified() {
|
|
@@ -47,22 +54,19 @@ class CartesianMeasureValue {
|
|
|
47
54
|
});
|
|
48
55
|
}
|
|
49
56
|
}
|
|
50
|
-
toJSON(
|
|
57
|
+
toJSON(options = { stringify: false }) {
|
|
51
58
|
let cartesianValues = this.cartesianValues;
|
|
52
|
-
if (stringify) {
|
|
59
|
+
if (options.stringify) {
|
|
53
60
|
cartesianValues = JSON.stringify(this.cartesianValues);
|
|
54
61
|
}
|
|
55
|
-
|
|
62
|
+
return {
|
|
56
63
|
cartesianValues,
|
|
57
|
-
cartesianPixelWidth: this.
|
|
64
|
+
cartesianPixelWidth: this.getCartesianPixelWidth(),
|
|
65
|
+
limitPoints: this.getLimitPoints(),
|
|
58
66
|
};
|
|
59
|
-
return json;
|
|
60
67
|
}
|
|
61
68
|
toJSONWithCartesianValuesStringified() {
|
|
62
|
-
return {
|
|
63
|
-
cartesianValues: JSON.stringify(this.cartesianValues),
|
|
64
|
-
cartesianPixelWidth: this.cartesianPixelWidth,
|
|
65
|
-
};
|
|
69
|
+
return this.toJSON({ stringify: true });
|
|
66
70
|
}
|
|
67
71
|
getCartesianValue(json) {
|
|
68
72
|
for (const value of this.cartesianValues) {
|
|
@@ -93,6 +97,18 @@ class CartesianMeasureValue {
|
|
|
93
97
|
setCartesianPixelWidth(latLng) {
|
|
94
98
|
this.cartesianPixelWidth = new LatLng_1.LatLng(latLng);
|
|
95
99
|
}
|
|
100
|
+
getLimitPoints(options = { forceCompute: false }) {
|
|
101
|
+
if (options.forceCompute || !this.limitPoints || this.limitPoints.length !== 2) {
|
|
102
|
+
this.computeLimits();
|
|
103
|
+
}
|
|
104
|
+
return this.limitPoints;
|
|
105
|
+
}
|
|
106
|
+
setLimitPoints(point1, point2) {
|
|
107
|
+
this.limitPoints = [
|
|
108
|
+
new LatLng_1.LatLng({ lat: point1.lat, lng: point1.lng }),
|
|
109
|
+
new LatLng_1.LatLng({ lat: point2.lat, lng: point2.lng })
|
|
110
|
+
];
|
|
111
|
+
}
|
|
96
112
|
setCartesianValuesAsAny(cartesianValues) {
|
|
97
113
|
if (typeof cartesianValues === 'string') {
|
|
98
114
|
this.setCartesianValuesAsString(cartesianValues);
|
|
@@ -101,6 +117,30 @@ class CartesianMeasureValue {
|
|
|
101
117
|
this.setCartesianValues(cartesianValues);
|
|
102
118
|
}
|
|
103
119
|
}
|
|
120
|
+
computeLimits() {
|
|
121
|
+
this.limitPoints = undefined;
|
|
122
|
+
let p1Lat;
|
|
123
|
+
let p1Lng;
|
|
124
|
+
let p2Lat;
|
|
125
|
+
let p2Lng;
|
|
126
|
+
for (const cartesianValue of this.cartesianValues) {
|
|
127
|
+
if (!p1Lat || cartesianValue.lat < p1Lat) {
|
|
128
|
+
p1Lat = cartesianValue.lat;
|
|
129
|
+
}
|
|
130
|
+
if (!p1Lng || cartesianValue.lng < p1Lng) {
|
|
131
|
+
p1Lng = cartesianValue.lng;
|
|
132
|
+
}
|
|
133
|
+
if (!p2Lat || p2Lat < cartesianValue.lat) {
|
|
134
|
+
p2Lat = cartesianValue.lat;
|
|
135
|
+
}
|
|
136
|
+
if (!p2Lng || p2Lng < cartesianValue.lng) {
|
|
137
|
+
p2Lng = cartesianValue.lng;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (p1Lat && p1Lng && p2Lat && p2Lng) {
|
|
141
|
+
this.setLimitPoints(new LatLng_1.LatLng({ lat: p1Lat, lng: p1Lng }), new LatLng_1.LatLng({ lat: p2Lat, lng: p2Lng }));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
104
144
|
}
|
|
105
145
|
exports.CartesianMeasureValue = CartesianMeasureValue;
|
|
106
146
|
//# sourceMappingURL=CartesianMeasureValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartesianMeasureValue.js","sourceRoot":"","sources":["../../src/cartesian/CartesianMeasureValue.ts"],"names":[],"mappings":";;;AACA,qDAAgD;AAChD,qCAAgC;AAEhC,MAAa,qBAAqB;
|
|
1
|
+
{"version":3,"file":"CartesianMeasureValue.js","sourceRoot":"","sources":["../../src/cartesian/CartesianMeasureValue.ts"],"names":[],"mappings":";;;AACA,qDAAgD;AAChD,qCAAgC;AAEhC,MAAa,qBAAqB;IAM9B,YAAY,IAIC;;QAGT,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,eAAe,CAAA,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,mBAAmB,CAAA,EAAE;YACtD,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC,CAAC;SACzF;QAED,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACnD,IAAI,CAAC,sBAAsB,CAAC,IAAI,C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C;aAC9B;YACD,IAAI,CAAC,KAAK,IAAI,KAAK,GAAG,cAAc,CAAC,GAAG,EAAE;gBACtC,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC;aAC9B;SACJ;QAED,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,EAAE;YAClC,IAAI,CAAC,cAAc,CAAC,IAAI,eAAM,CAAC,EAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAC,CAAC,EACpD,IAAI,eAAM,CAAC,EAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAC,CAAC,CAAC,CAAC;SAC7C;IACL,CAAC;CACJ;AAlLD,sDAkLC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { CartesianValue } from './CartesianValue';
|
|
2
2
|
import { LatLng } from './LatLng';
|
|
3
3
|
export interface ICartesianMeasureValue {
|
|
4
|
+
getLimitPoints(): [LatLng, LatLng];
|
|
4
5
|
getCartesianValuesStringified(): string;
|
|
5
6
|
getCartesianValues(): CartesianValue[];
|
|
6
|
-
setCartesianValues(cartesianValues: CartesianValue[]): void;
|
|
7
|
-
setCartesianValuesAsString(s: string): void;
|
|
8
7
|
toJSON(): any;
|
|
9
8
|
toJSONWithCartesianValuesStringified(): any;
|
|
10
9
|
getCartesianValue(json: {
|
|
@@ -22,8 +21,4 @@ export interface ICartesianMeasureValue {
|
|
|
22
21
|
value: number;
|
|
23
22
|
}): void;
|
|
24
23
|
getCartesianPixelWidth(): LatLng;
|
|
25
|
-
setCartesianPixelWidth(json: {
|
|
26
|
-
lat: number;
|
|
27
|
-
lng: number;
|
|
28
|
-
}): void;
|
|
29
24
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CartesianValue } from './CartesianValue';
|
|
2
2
|
import { CartesianMeasureValue } from './CartesianMeasureValue';
|
|
3
|
+
import { LatLng } from './LatLng';
|
|
3
4
|
export declare class RadarCartesianMeasureValue extends CartesianMeasureValue {
|
|
4
5
|
angle: number;
|
|
5
6
|
axis: number;
|
|
@@ -11,7 +12,10 @@ export declare class RadarCartesianMeasureValue extends CartesianMeasureValue {
|
|
|
11
12
|
};
|
|
12
13
|
angle: number;
|
|
13
14
|
axis: number;
|
|
15
|
+
limitPoints: [LatLng, LatLng];
|
|
14
16
|
});
|
|
15
|
-
toJSON(
|
|
17
|
+
toJSON(options?: {
|
|
18
|
+
stringify: boolean;
|
|
19
|
+
}): any;
|
|
16
20
|
toJSONWithCartesianValuesStringified(): any;
|
|
17
21
|
}
|
|
@@ -8,17 +8,14 @@ class RadarCartesianMeasureValue extends CartesianMeasureValue_1.CartesianMeasur
|
|
|
8
8
|
this.angle = json.angle;
|
|
9
9
|
this.axis = json.axis;
|
|
10
10
|
}
|
|
11
|
-
toJSON(
|
|
12
|
-
const json = super.toJSON(
|
|
11
|
+
toJSON(options = { stringify: false }) {
|
|
12
|
+
const json = super.toJSON(options);
|
|
13
13
|
json.angle = this.angle;
|
|
14
14
|
json.axis = this.axis;
|
|
15
15
|
return json;
|
|
16
16
|
}
|
|
17
17
|
toJSONWithCartesianValuesStringified() {
|
|
18
|
-
|
|
19
|
-
json.angle = this.angle;
|
|
20
|
-
json.axis = this.axis;
|
|
21
|
-
return json;
|
|
18
|
+
return this.toJSON({ stringify: true });
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
21
|
exports.RadarCartesianMeasureValue = RadarCartesianMeasureValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadarCartesianMeasureValue.js","sourceRoot":"","sources":["../../src/cartesian/RadarCartesianMeasureValue.ts"],"names":[],"mappings":";;;AACA,mEAA8D;
|
|
1
|
+
{"version":3,"file":"RadarCartesianMeasureValue.js","sourceRoot":"","sources":["../../src/cartesian/RadarCartesianMeasureValue.ts"],"names":[],"mappings":";;;AACA,mEAA8D;AAG9D,MAAa,0BAA2B,SAAQ,6CAAqB;IAKjE,YAAY,IAMX;QAEG,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED,MAAM,CAAC,OAAO,GAAG,EAAC,SAAS,EAAE,KAAK,EAAC;QAC/B,MAAM,IAAI,GAAQ,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,oCAAoC;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;IAC1C,CAAC;CACJ;AA5BD,gEA4BC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IVersion } from '../organization/IVersion';
|
|
2
2
|
import { CartesianValue } from './CartesianValue';
|
|
3
3
|
import { CartesianMeasureValue } from './CartesianMeasureValue';
|
|
4
|
+
import { LatLng } from './LatLng';
|
|
4
5
|
export declare class RainCartesianMeasureValue extends CartesianMeasureValue implements IVersion {
|
|
5
6
|
private readonly version;
|
|
6
7
|
constructor(json: {
|
|
@@ -9,9 +10,12 @@ export declare class RainCartesianMeasureValue extends CartesianMeasureValue imp
|
|
|
9
10
|
lat: number;
|
|
10
11
|
lng: number;
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
limitPoints: [LatLng, LatLng];
|
|
14
|
+
version: string;
|
|
13
15
|
});
|
|
14
16
|
getVersion(): string;
|
|
15
|
-
toJSON(
|
|
17
|
+
toJSON(options?: {
|
|
18
|
+
stringify: boolean;
|
|
19
|
+
}): any;
|
|
16
20
|
toJSONWithCartesianValuesStringified(): any;
|
|
17
21
|
}
|
|
@@ -10,15 +10,13 @@ class RainCartesianMeasureValue extends CartesianMeasureValue_1.CartesianMeasure
|
|
|
10
10
|
getVersion() {
|
|
11
11
|
return this.version;
|
|
12
12
|
}
|
|
13
|
-
toJSON(
|
|
14
|
-
const json = super.toJSON(
|
|
13
|
+
toJSON(options = { stringify: false }) {
|
|
14
|
+
const json = super.toJSON(options);
|
|
15
15
|
json.version = this.getVersion();
|
|
16
16
|
return json;
|
|
17
17
|
}
|
|
18
18
|
toJSONWithCartesianValuesStringified() {
|
|
19
|
-
|
|
20
|
-
json.version = this.getVersion();
|
|
21
|
-
return json;
|
|
19
|
+
return this.toJSON({ stringify: true });
|
|
22
20
|
}
|
|
23
21
|
}
|
|
24
22
|
exports.RainCartesianMeasureValue = RainCartesianMeasureValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RainCartesianMeasureValue.js","sourceRoot":"","sources":["../../src/cartesian/RainCartesianMeasureValue.ts"],"names":[],"mappings":";;;AAEA,mEAA8D;
|
|
1
|
+
{"version":3,"file":"RainCartesianMeasureValue.js","sourceRoot":"","sources":["../../src/cartesian/RainCartesianMeasureValue.ts"],"names":[],"mappings":";;;AAEA,mEAA8D;AAG9D,MAAa,yBAA0B,SAAQ,6CAAqB;IAIhE,YAAY,IAKX;QACG,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAChC,CAAC;IAED,UAAU;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,MAAM,CAAC,OAAO,GAAG,EAAC,SAAS,EAAE,KAAK,EAAC;QAC/B,MAAM,IAAI,GAAQ,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,oCAAoC;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;IAC1C,CAAC;CACJ;AA3BD,8DA2BC"}
|
package/index.d.ts
CHANGED
|
@@ -24,10 +24,11 @@ export * from './rain/RainNode';
|
|
|
24
24
|
export * from './rain/RainComputationQuality';
|
|
25
25
|
export * from './rain/RainComputation';
|
|
26
26
|
export * from './rain/RainComputationMap';
|
|
27
|
-
export * from './polar/GaugePolarMeasureValue';
|
|
28
27
|
export * from './polar/MeasureValuePolarContainer';
|
|
29
28
|
export * from './polar/PolarMeasureValue';
|
|
29
|
+
export * from './polar/PolarMeasureValueMap';
|
|
30
30
|
export * from './polar/PolarValue';
|
|
31
|
+
export * from './polar/PolarFilter';
|
|
31
32
|
export * from './polar/RadarPolarMeasureValue';
|
|
32
33
|
export * from './polar/RainPolarMeasureValue';
|
|
33
34
|
export * from './polar/IPolarMeasureValue';
|
package/index.js
CHANGED
|
@@ -40,10 +40,11 @@ __exportStar(require("./rain/RainNode"), exports);
|
|
|
40
40
|
__exportStar(require("./rain/RainComputationQuality"), exports);
|
|
41
41
|
__exportStar(require("./rain/RainComputation"), exports);
|
|
42
42
|
__exportStar(require("./rain/RainComputationMap"), exports);
|
|
43
|
-
__exportStar(require("./polar/GaugePolarMeasureValue"), exports);
|
|
44
43
|
__exportStar(require("./polar/MeasureValuePolarContainer"), exports);
|
|
45
44
|
__exportStar(require("./polar/PolarMeasureValue"), exports);
|
|
45
|
+
__exportStar(require("./polar/PolarMeasureValueMap"), exports);
|
|
46
46
|
__exportStar(require("./polar/PolarValue"), exports);
|
|
47
|
+
__exportStar(require("./polar/PolarFilter"), exports);
|
|
47
48
|
__exportStar(require("./polar/RadarPolarMeasureValue"), exports);
|
|
48
49
|
__exportStar(require("./polar/RainPolarMeasureValue"), exports);
|
|
49
50
|
__exportStar(require("./polar/IPolarMeasureValue"), exports);
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,2DAAyC;AACzC,4DAA0C;AAC1C,sDAAoC;AACpC,2DAAyC;AACzC,0DAAwC;AAExC,yDAAuC;AACvC,wDAAsC;AACtC,iEAA+C;AAC/C,0EAAwD;AACxD,yEAAuD;AACvD,oEAAkD;AAClD,+DAA6C;AAC7C,8DAA4C;AAC5C,mEAAiD;AAEjD,oDAAkC;AAClC,uDAAqC;AACrC,uDAAqC;AAErC,uDAAqC;AACrC,uDAAqC;AACrC,oDAAkC;AAElC,qDAAmC;AACnC,kDAAgC;AAChC,gEAA8C;AAC9C,yDAAuC;AACvC,4DAA0C;AAE1C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,2DAAyC;AACzC,4DAA0C;AAC1C,sDAAoC;AACpC,2DAAyC;AACzC,0DAAwC;AAExC,yDAAuC;AACvC,wDAAsC;AACtC,iEAA+C;AAC/C,0EAAwD;AACxD,yEAAuD;AACvD,oEAAkD;AAClD,+DAA6C;AAC7C,8DAA4C;AAC5C,mEAAiD;AAEjD,oDAAkC;AAClC,uDAAqC;AACrC,uDAAqC;AAErC,uDAAqC;AACrC,uDAAqC;AACrC,oDAAkC;AAElC,qDAAmC;AACnC,kDAAgC;AAChC,gEAA8C;AAC9C,yDAAuC;AACvC,4DAA0C;AAE1C,qEAAmD;AACnD,4DAA0C;AAC1C,+DAA6C;AAC7C,qDAAmC;AACnC,sDAAoC;AACpC,iEAA+C;AAC/C,gEAA8C;AAC9C,6DAA2C;AAE3C,qDAAmC;AACnC,6DAA2C;AAC3C,oEAAkD;AAClD,yEAAuD;AACvD,wEAAsD;AACtD,qEAAmD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "raain-model",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"author": "contact@raain.io",
|
|
5
5
|
"homepage": "https://github.com/raainio/raain-model",
|
|
6
6
|
"description": "raain.io api model",
|
|
@@ -12,7 +12,12 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"main": "./index.js",
|
|
14
14
|
"types": "./index.d.ts",
|
|
15
|
-
"dependencies": {
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"hash-it": "^6.0.0"
|
|
17
|
+
},
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"hash-it": "^6.0.0"
|
|
20
|
+
},
|
|
16
21
|
"devDependencies": {
|
|
17
22
|
"@types/chai": "^4.3.10",
|
|
18
23
|
"@types/mocha": "^10.0.1",
|
|
@@ -9,21 +9,21 @@ export declare class AbstractPolarMeasureValue implements IPolarMeasureValue {
|
|
|
9
9
|
});
|
|
10
10
|
getPolarsStringified(): string;
|
|
11
11
|
getPolars(): MeasureValuePolarContainer[];
|
|
12
|
-
setPolarsAsString(
|
|
13
|
-
setPolarsAsContainer(
|
|
12
|
+
setPolarsAsString(measureValuePolarContainers: string, azimuthsCount: number, polarEdgesCount: number): void;
|
|
13
|
+
setPolarsAsContainer(measureValuePolarContainers: MeasureValuePolarContainer[], azimuthsCount: number, polarEdgesCount: number): void;
|
|
14
14
|
getPolarValue(json: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
strict?: boolean;
|
|
15
|
+
azimuthInDegrees: number;
|
|
16
|
+
distanceInMeters: number;
|
|
18
17
|
}): PolarValue;
|
|
19
18
|
setPolarValue(json: {
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
azimuthInDegrees: number;
|
|
20
|
+
distanceInMeters: number;
|
|
22
21
|
value: number;
|
|
23
22
|
}): void;
|
|
24
23
|
getAzimuthsCount(): number;
|
|
25
24
|
getPolarEdgesCount(): number;
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
toJSON(options?: {
|
|
26
|
+
stringify: boolean;
|
|
27
|
+
}): any;
|
|
28
28
|
toJSONWithPolarStringified(): any;
|
|
29
29
|
}
|
|
@@ -5,46 +5,45 @@ const PolarMeasureValue_1 = require("./PolarMeasureValue");
|
|
|
5
5
|
class AbstractPolarMeasureValue {
|
|
6
6
|
constructor(json) {
|
|
7
7
|
if (!(json === null || json === void 0 ? void 0 : json.polarMeasureValue)) {
|
|
8
|
-
throw new Error('
|
|
8
|
+
throw new Error('Needs one polarMeasureValue');
|
|
9
9
|
}
|
|
10
|
-
let
|
|
11
|
-
if (typeof
|
|
12
|
-
|
|
13
|
-
polarMeasureValue = JSON.parse(polarMeasureValue);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
this.setPolarsAsString(polarMeasureValue);
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
10
|
+
let polarMeasureValue1 = json.polarMeasureValue;
|
|
11
|
+
if (typeof polarMeasureValue1 === 'string') {
|
|
12
|
+
polarMeasureValue1 = JSON.parse(polarMeasureValue1);
|
|
19
13
|
}
|
|
20
|
-
if (
|
|
21
|
-
||
|
|
22
|
-
this.setPolarsAsContainer(
|
|
14
|
+
if (polarMeasureValue1 instanceof AbstractPolarMeasureValue
|
|
15
|
+
|| polarMeasureValue1 instanceof PolarMeasureValue_1.PolarMeasureValue) {
|
|
16
|
+
this.setPolarsAsContainer(polarMeasureValue1.getPolars(), polarMeasureValue1.getAzimuthsCount(), polarMeasureValue1.getPolarEdgesCount());
|
|
23
17
|
return;
|
|
24
18
|
}
|
|
25
|
-
let
|
|
26
|
-
if (polarMeasureValue
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
let polarMeasureValue2 = polarMeasureValue1;
|
|
20
|
+
if (polarMeasureValue1['polarMeasureValue']) {
|
|
21
|
+
if (typeof polarMeasureValue1['polarMeasureValue'] === 'string') {
|
|
22
|
+
polarMeasureValue2 = JSON.parse(polarMeasureValue1['polarMeasureValue']);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
polarMeasureValue2 = polarMeasureValue1['polarMeasureValue'];
|
|
26
|
+
}
|
|
33
27
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
let azimuthsCount;
|
|
29
|
+
let polarEdgesCount;
|
|
30
|
+
let measureValuePolarContainers = [];
|
|
31
|
+
if (polarMeasureValue2 && polarMeasureValue2['measureValuePolarContainers']) {
|
|
32
|
+
measureValuePolarContainers = polarMeasureValue2['measureValuePolarContainers'];
|
|
33
|
+
if (polarMeasureValue2['azimuthsCount'] && polarMeasureValue2['polarEdgesCount']) {
|
|
34
|
+
azimuthsCount = parseInt('' + polarMeasureValue2['azimuthsCount'], 10);
|
|
35
|
+
polarEdgesCount = parseInt('' + polarMeasureValue2['polarEdgesCount'], 10);
|
|
36
|
+
}
|
|
38
37
|
}
|
|
39
|
-
if (typeof
|
|
40
|
-
this.setPolarsAsString(
|
|
38
|
+
if (typeof measureValuePolarContainers === 'string') {
|
|
39
|
+
this.setPolarsAsString(measureValuePolarContainers, azimuthsCount, polarEdgesCount);
|
|
41
40
|
return;
|
|
42
41
|
}
|
|
43
|
-
if (Array.isArray(
|
|
44
|
-
this.setPolarsAsContainer(
|
|
42
|
+
if (Array.isArray(measureValuePolarContainers)) {
|
|
43
|
+
this.setPolarsAsContainer(measureValuePolarContainers, azimuthsCount, polarEdgesCount);
|
|
45
44
|
return;
|
|
46
45
|
}
|
|
47
|
-
throw new Error('
|
|
46
|
+
throw new Error('Needs valid polarMeasureValue');
|
|
48
47
|
}
|
|
49
48
|
getPolarsStringified() {
|
|
50
49
|
return this.polarMeasureValue.getPolarsStringified();
|
|
@@ -52,11 +51,11 @@ class AbstractPolarMeasureValue {
|
|
|
52
51
|
getPolars() {
|
|
53
52
|
return this.polarMeasureValue.getPolars();
|
|
54
53
|
}
|
|
55
|
-
setPolarsAsString(
|
|
56
|
-
this.polarMeasureValue = new PolarMeasureValue_1.PolarMeasureValue({ measureValuePolarContainers
|
|
54
|
+
setPolarsAsString(measureValuePolarContainers, azimuthsCount, polarEdgesCount) {
|
|
55
|
+
this.polarMeasureValue = new PolarMeasureValue_1.PolarMeasureValue({ measureValuePolarContainers, azimuthsCount, polarEdgesCount });
|
|
57
56
|
}
|
|
58
|
-
setPolarsAsContainer(
|
|
59
|
-
this.polarMeasureValue = new PolarMeasureValue_1.PolarMeasureValue({ measureValuePolarContainers
|
|
57
|
+
setPolarsAsContainer(measureValuePolarContainers, azimuthsCount, polarEdgesCount) {
|
|
58
|
+
this.polarMeasureValue = new PolarMeasureValue_1.PolarMeasureValue({ measureValuePolarContainers, azimuthsCount, polarEdgesCount });
|
|
60
59
|
}
|
|
61
60
|
getPolarValue(json) {
|
|
62
61
|
return this.polarMeasureValue.getPolarValue(json);
|
|
@@ -65,25 +64,16 @@ class AbstractPolarMeasureValue {
|
|
|
65
64
|
return this.polarMeasureValue.setPolarValue(json);
|
|
66
65
|
}
|
|
67
66
|
getAzimuthsCount() {
|
|
68
|
-
return this.polarMeasureValue.
|
|
67
|
+
return this.polarMeasureValue.getAzimuthsCount();
|
|
69
68
|
}
|
|
70
69
|
getPolarEdgesCount() {
|
|
71
|
-
|
|
72
|
-
if (polars.length > 0) {
|
|
73
|
-
return polars[0].polarEdges.length;
|
|
74
|
-
}
|
|
75
|
-
return 0;
|
|
76
|
-
}
|
|
77
|
-
getDistance() {
|
|
78
|
-
const polars = this.polarMeasureValue.getPolars();
|
|
79
|
-
if (polars.length > 0) {
|
|
80
|
-
return polars[0].distance;
|
|
81
|
-
}
|
|
82
|
-
return 1;
|
|
70
|
+
return this.polarMeasureValue.getPolarEdgesCount();
|
|
83
71
|
}
|
|
84
|
-
toJSON(
|
|
72
|
+
toJSON(options = {
|
|
73
|
+
stringify: false
|
|
74
|
+
}) {
|
|
85
75
|
let polarMeasureValue = this.polarMeasureValue;
|
|
86
|
-
if (stringify) {
|
|
76
|
+
if (options === null || options === void 0 ? void 0 : options.stringify) {
|
|
87
77
|
polarMeasureValue = JSON.stringify(this.polarMeasureValue.toJSONWithPolarStringified());
|
|
88
78
|
}
|
|
89
79
|
return {
|
|
@@ -91,8 +81,7 @@ class AbstractPolarMeasureValue {
|
|
|
91
81
|
};
|
|
92
82
|
}
|
|
93
83
|
toJSONWithPolarStringified() {
|
|
94
|
-
|
|
95
|
-
return { polarMeasureValue };
|
|
84
|
+
return this.toJSON({ stringify: true });
|
|
96
85
|
}
|
|
97
86
|
}
|
|
98
87
|
exports.AbstractPolarMeasureValue = AbstractPolarMeasureValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractPolarMeasureValue.js","sourceRoot":"","sources":["../../src/polar/AbstractPolarMeasureValue.ts"],"names":[],"mappings":";;;AAEA,2DAAsD;AAGtD,MAAa,yBAAyB;IAIlC,YAAY,IAEX;QAEG,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,iBAAiB,CAAA,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"AbstractPolarMeasureValue.js","sourceRoot":"","sources":["../../src/polar/AbstractPolarMeasureValue.ts"],"names":[],"mappings":";;;AAEA,2DAAsD;AAGtD,MAAa,yBAAyB;IAIlC,YAAY,IAEX;QAEG,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,iBAAiB,CAAA,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;SAClD;QAED,IAAI,kBAAkB,GAAQ,IAAI,CAAC,iBAAiB,CAAC;QACrD,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;YACxC,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;SACvD;QAED,IAAI,kBAAkB,YAAY,yBAAyB;eACpD,kBAAkB,YAAY,qCAAiB,EAAE;YACpD,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,SAAS,EAAE,EACpD,kBAAkB,CAAC,gBAAgB,EAAE,EACrC,kBAAkB,CAAC,kBAAkB,EAAE,CAAC,CAAC;Y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AAS,EAAE,IAAI,EAAC,CAAC,CAAC;IAC1C,CAAC;CACJ;AA5GD,8DA4GC"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { MeasureValuePolarContainer } from './MeasureValuePolarContainer';
|
|
2
2
|
import { PolarValue } from './PolarValue';
|
|
3
3
|
export interface IPolarMeasureValue {
|
|
4
|
+
getAzimuthsCount(): number;
|
|
5
|
+
getPolarEdgesCount(): number;
|
|
4
6
|
getPolarsStringified(): string;
|
|
5
7
|
getPolars(): MeasureValuePolarContainer[];
|
|
6
|
-
|
|
7
|
-
setPolarsAsContainer(s: MeasureValuePolarContainer[]): void;
|
|
8
|
-
toJSON(): any;
|
|
8
|
+
toJSON(options?: any): any;
|
|
9
9
|
toJSONWithPolarStringified(): any;
|
|
10
10
|
getPolarValue(json: {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
azimuthInDegrees: number;
|
|
12
|
+
distanceInMeters: number;
|
|
13
13
|
}): PolarValue;
|
|
14
14
|
setPolarValue(json: {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
azimuthInDegrees: number;
|
|
16
|
+
distanceInMeters: number;
|
|
17
17
|
value: number;
|
|
18
18
|
}): void;
|
|
19
19
|
}
|
|
@@ -2,10 +2,18 @@ export declare class MeasureValuePolarContainer {
|
|
|
2
2
|
azimuth: number;
|
|
3
3
|
distance: number;
|
|
4
4
|
polarEdges: number[];
|
|
5
|
+
edgeOffset: number;
|
|
5
6
|
constructor(json: {
|
|
6
7
|
azimuth: number;
|
|
7
8
|
distance: number;
|
|
8
9
|
polarEdges: number[];
|
|
10
|
+
edgeOffset?: number;
|
|
9
11
|
});
|
|
10
12
|
toJSON(): any;
|
|
13
|
+
getPolarEdgesCount(): number;
|
|
14
|
+
getNotNullValuesCount(): number;
|
|
15
|
+
getFiltered(options?: {
|
|
16
|
+
nullValues: boolean;
|
|
17
|
+
}): MeasureValuePolarContainer;
|
|
18
|
+
getDistance(): number;
|
|
11
19
|
}
|