@mapcatch/util 2.1.1 → 2.1.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/dist/catchUtil.min.cjs.js +3 -3
- package/dist/catchUtil.min.esm.js +12 -10
- package/dist/catchUtil.min.js +3 -3
- package/package.json +1 -1
|
@@ -53807,7 +53807,7 @@ const height_colors = ["rgb(0,18,238)", "rgb(0,33,224)", "rgb(0,48,207)", "rgb(0
|
|
|
53807
53807
|
"text-halo-width": 1.5
|
|
53808
53808
|
},
|
|
53809
53809
|
layout: {
|
|
53810
|
-
"text-field": ["concat", ["
|
|
53810
|
+
"text-field": ["concat", ["to-string", ["get", "distance2d"]], " m"],
|
|
53811
53811
|
"text-size": 12,
|
|
53812
53812
|
"text-anchor": "top",
|
|
53813
53813
|
"text-rotate": ["get", "angle"],
|
|
@@ -53829,7 +53829,7 @@ const height_colors = ["rgb(0,18,238)", "rgb(0,33,224)", "rgb(0,48,207)", "rgb(0
|
|
|
53829
53829
|
"text-halo-width": 1.5
|
|
53830
53830
|
},
|
|
53831
53831
|
layout: {
|
|
53832
|
-
"text-field": ["concat", ["
|
|
53832
|
+
"text-field": ["concat", ["to-string", ["get", "area2d"]], " \u33A1"],
|
|
53833
53833
|
"text-size": 12,
|
|
53834
53834
|
"text-anchor": "top",
|
|
53835
53835
|
"text-allow-overlap": !0,
|
|
@@ -61625,14 +61625,16 @@ function transformCoordinateToLngLat(e, r) {
|
|
|
61625
61625
|
return transformCoordinate(e, r, {
|
|
61626
61626
|
type: 2,
|
|
61627
61627
|
type_name: "Geographic",
|
|
61628
|
-
epsg_code: 4326
|
|
61628
|
+
epsg_code: 4326,
|
|
61629
|
+
wkt: "+proj=longlat +datum=WGS84"
|
|
61629
61630
|
});
|
|
61630
61631
|
}
|
|
61631
61632
|
function transformLnglat(e, r) {
|
|
61632
61633
|
return transformCoordinate(e, {
|
|
61633
61634
|
type: 2,
|
|
61634
61635
|
type_name: "Geographic",
|
|
61635
|
-
epsg_code: 4326
|
|
61636
|
+
epsg_code: 4326,
|
|
61637
|
+
wkt: "+proj=longlat +datum=WGS84"
|
|
61636
61638
|
}, r);
|
|
61637
61639
|
}
|
|
61638
61640
|
function geographicToCartesian(e) {
|
|
@@ -123104,16 +123106,16 @@ class Measurement {
|
|
|
123104
123106
|
let { data_type: s, geometry: u } = r, m = u.type, H = {};
|
|
123105
123107
|
if (m === "Point") {
|
|
123106
123108
|
let x = await this.getFloatValue(u.coordinates, r);
|
|
123107
|
-
s === "infrared" ? (H.temprature = _$1.round(x,
|
|
123109
|
+
s === "infrared" ? (H.temprature = _$1.round(x, 7), H.lng = u.coordinates[0], H.lat = u.coordinates[1]) : (u.coordinates[2] = x, H.height = x, H.lng = u.coordinates[0], H.lat = u.coordinates[1]);
|
|
123108
123110
|
} else if (m === "LineString") {
|
|
123109
123111
|
let x = u.coordinates, o = [], F = await Promise.all(x.map((_e) => this.getFloatValue(_e, r)));
|
|
123110
|
-
s === "infrared" ? (H.distance2d = this.getDistance2D(x), H.temprature_min = _$1.round(_$1.min(F),
|
|
123112
|
+
s === "infrared" ? (H.distance2d = this.getDistance2D(x), H.temprature_min = _$1.round(_$1.min(F), 7), H.temprature_max = _$1.round(_$1.max(F), 7)) : (x.forEach((_e, He) => {
|
|
123111
123113
|
_e[2] = F[He], He > 0 && o.push(this.getSlope(x[He - 1], x[He]));
|
|
123112
123114
|
}), H.distance2d = this.getDistance2D(x), H.distance3d = this.getDistance3D(x), H.height_min = _$1.min(F), H.height_max = _$1.max(F), H.slope_min = _$1.min(o), H.slope_max = _$1.max(o));
|
|
123113
123115
|
} else if (m === "Polygon") {
|
|
123114
123116
|
let x = u.coordinates[0], o = await Promise.all(x.map((F) => this.getFloatValue(F, r)));
|
|
123115
123117
|
if (s === "infrared")
|
|
123116
|
-
H.distance2d = this.getDistance2D(x), H.area2d = this.getArea(x).area2d, H.temprature_min = _$1.round(_$1.min(o),
|
|
123118
|
+
H.distance2d = this.getDistance2D(x), H.area2d = this.getArea(x).area2d, H.temprature_min = _$1.round(_$1.min(o), 7), H.temprature_max = _$1.round(_$1.max(o), 7);
|
|
123117
123119
|
else {
|
|
123118
123120
|
x.forEach((_e, He) => {
|
|
123119
123121
|
_e[2] = o[He];
|
|
@@ -123136,7 +123138,7 @@ class Measurement {
|
|
|
123136
123138
|
Math.pow(m[0] - H[0], 2) + Math.pow(m[1] - H[1], 2) + Math.pow(m[2] - H[2], 2)
|
|
123137
123139
|
);
|
|
123138
123140
|
}
|
|
123139
|
-
return _$1.round(s,
|
|
123141
|
+
return _$1.round(s, 7);
|
|
123140
123142
|
}
|
|
123141
123143
|
getDistance3D(r) {
|
|
123142
123144
|
let s = 0;
|
|
@@ -123146,7 +123148,7 @@ class Measurement {
|
|
|
123146
123148
|
Math.pow(m[0] - H[0], 2) + Math.pow(m[1] - H[1], 2) + Math.pow(m[2] - H[2], 2)
|
|
123147
123149
|
);
|
|
123148
123150
|
}
|
|
123149
|
-
return _$1.round(s,
|
|
123151
|
+
return _$1.round(s, 7);
|
|
123150
123152
|
}
|
|
123151
123153
|
getArea(r) {
|
|
123152
123154
|
let s = [], u, m = [r.map((F) => [F[0], F[1]]), r.map((F) => [F[0], F[2]]), r.map((F) => [F[1], F[2]])], H = m[0];
|
|
@@ -123165,7 +123167,7 @@ class Measurement {
|
|
|
123165
123167
|
[H[He][0], H[He][1], 0],
|
|
123166
123168
|
[H[Ue][0], H[Ue][1], 0]
|
|
123167
123169
|
), o += this.getTriangleArea(r[_e], r[He], r[Ue]);
|
|
123168
|
-
}), { area2d: _$1.round(x,
|
|
123170
|
+
}), { area2d: _$1.round(x, 7), area3d: _$1.round(o, 7) };
|
|
123169
123171
|
}
|
|
123170
123172
|
getTriangleArea(r, s, u) {
|
|
123171
123173
|
let m = this.getDistance3D([r, s]), H = this.getDistance3D([s, u]), x = this.getDistance3D([u, r]);
|