bruce-models 4.6.6 → 4.6.7
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/bruce-models.es5.js +16 -11
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +16 -11
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/common/geometry.js +15 -10
- package/dist/lib/common/geometry.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -4520,8 +4520,9 @@
|
|
|
4520
4520
|
// Converts polygons to GeoJSON coordinates.
|
|
4521
4521
|
// This will close the polygon if it's not already closed and remove consecutive duplicates.
|
|
4522
4522
|
const coordinates = closePolygonCoordinates(sortedPolygons.map(polygon => {
|
|
4523
|
-
|
|
4524
|
-
|
|
4523
|
+
const points = ParsePoints(polygon.LinearRing);
|
|
4524
|
+
return removeConsecutiveDuplicates(points.map(coord => {
|
|
4525
|
+
const { longitude: lon, latitude: lat, altitude: alt } = coord;
|
|
4525
4526
|
return (altitude != null ? [lon, lat, altitude] : [lon, lat, alt !== undefined ? alt : 0]);
|
|
4526
4527
|
}));
|
|
4527
4528
|
}));
|
|
@@ -4533,8 +4534,9 @@
|
|
|
4533
4534
|
}
|
|
4534
4535
|
}
|
|
4535
4536
|
if (!jGeometry && geometry.LineString) {
|
|
4536
|
-
const
|
|
4537
|
-
|
|
4537
|
+
const points = ParsePoints(geometry.LineString);
|
|
4538
|
+
const coordinates = removeConsecutiveDuplicates(points.map(coord => {
|
|
4539
|
+
const { longitude: lon, latitude: lat, altitude: alt } = coord;
|
|
4538
4540
|
return (altitude != null ? [lon, lat, altitude] : [lon, lat, alt !== undefined ? alt : 0]);
|
|
4539
4541
|
}));
|
|
4540
4542
|
if (coordinates.length >= 2) {
|
|
@@ -4545,12 +4547,15 @@
|
|
|
4545
4547
|
}
|
|
4546
4548
|
}
|
|
4547
4549
|
if (!jGeometry && geometry.Point) {
|
|
4548
|
-
const
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
coordinates:
|
|
4552
|
-
|
|
4553
|
-
|
|
4550
|
+
const points = ParsePoints(geometry.Point);
|
|
4551
|
+
if (points.length) {
|
|
4552
|
+
const { longitude: lon, latitude: lat, altitude: alt } = points[0];
|
|
4553
|
+
const coordinates = altitude != null ? [lon, lat, altitude] : [lon, lat, alt !== undefined ? alt : 0];
|
|
4554
|
+
jGeometry = {
|
|
4555
|
+
coordinates: coordinates,
|
|
4556
|
+
type: exports.GeoJson.EType.Point
|
|
4557
|
+
};
|
|
4558
|
+
}
|
|
4554
4559
|
}
|
|
4555
4560
|
if (jGeometry) {
|
|
4556
4561
|
collection.push(jGeometry);
|
|
@@ -13746,7 +13751,7 @@
|
|
|
13746
13751
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
13747
13752
|
|
|
13748
13753
|
// This is updated with the package.json version on build.
|
|
13749
|
-
const VERSION = "4.6.
|
|
13754
|
+
const VERSION = "4.6.7";
|
|
13750
13755
|
|
|
13751
13756
|
exports.VERSION = VERSION;
|
|
13752
13757
|
exports.AbstractApi = AbstractApi;
|