dgeoutils 2.4.7 → 2.4.10
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/cjs/DPoint.d.ts +8 -0
- package/dist/cjs/DPoint.js +41 -1
- package/dist/es2015/DPoint.js +25 -1
- package/dist/esm/DPoint.js +41 -1
- package/dist/umd/dgeoutils.js +42 -2
- package/dist/umd/dgeoutils.min.js +1 -1
- package/dist/umd/dgeoutils.min.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/DPoint.d.ts
CHANGED
|
@@ -102,6 +102,14 @@ export declare class DPoint {
|
|
|
102
102
|
get yPoint(): DPoint;
|
|
103
103
|
get wPoint(): DPoint;
|
|
104
104
|
get hPoint(): DPoint;
|
|
105
|
+
get lat(): number;
|
|
106
|
+
set lat(v: number);
|
|
107
|
+
get lng(): number;
|
|
108
|
+
set lng(v: number);
|
|
109
|
+
get lon(): number;
|
|
110
|
+
set lon(v: number);
|
|
111
|
+
get alt(): number | undefined;
|
|
112
|
+
set alt(v: number | undefined);
|
|
105
113
|
simple(xKey?: string, yKey?: string): {
|
|
106
114
|
[key: string]: number;
|
|
107
115
|
};
|
package/dist/cjs/DPoint.js
CHANGED
|
@@ -61,7 +61,7 @@ var DPoint = (function () {
|
|
|
61
61
|
if (format === void 0) { format = 'xyz'; }
|
|
62
62
|
var _a = c, lat = _a.lat, lon = _a.lon, _b = _a.lng, lng = _b === void 0 ? lon : _b, alt = _a.alt;
|
|
63
63
|
if (lat && lng) {
|
|
64
|
-
return new DPoint(
|
|
64
|
+
return new DPoint(lng, lat, alt !== null && alt !== void 0 ? alt : 0);
|
|
65
65
|
}
|
|
66
66
|
var t = c;
|
|
67
67
|
if (c.type === 'Point') {
|
|
@@ -595,6 +595,46 @@ var DPoint = (function () {
|
|
|
595
595
|
enumerable: false,
|
|
596
596
|
configurable: true
|
|
597
597
|
});
|
|
598
|
+
Object.defineProperty(DPoint.prototype, "lat", {
|
|
599
|
+
get: function () {
|
|
600
|
+
return this.y;
|
|
601
|
+
},
|
|
602
|
+
set: function (v) {
|
|
603
|
+
this.y = v;
|
|
604
|
+
},
|
|
605
|
+
enumerable: false,
|
|
606
|
+
configurable: true
|
|
607
|
+
});
|
|
608
|
+
Object.defineProperty(DPoint.prototype, "lng", {
|
|
609
|
+
get: function () {
|
|
610
|
+
return this.x;
|
|
611
|
+
},
|
|
612
|
+
set: function (v) {
|
|
613
|
+
this.x = v;
|
|
614
|
+
},
|
|
615
|
+
enumerable: false,
|
|
616
|
+
configurable: true
|
|
617
|
+
});
|
|
618
|
+
Object.defineProperty(DPoint.prototype, "lon", {
|
|
619
|
+
get: function () {
|
|
620
|
+
return this.x;
|
|
621
|
+
},
|
|
622
|
+
set: function (v) {
|
|
623
|
+
this.x = v;
|
|
624
|
+
},
|
|
625
|
+
enumerable: false,
|
|
626
|
+
configurable: true
|
|
627
|
+
});
|
|
628
|
+
Object.defineProperty(DPoint.prototype, "alt", {
|
|
629
|
+
get: function () {
|
|
630
|
+
return this.z;
|
|
631
|
+
},
|
|
632
|
+
set: function (v) {
|
|
633
|
+
this.z = v;
|
|
634
|
+
},
|
|
635
|
+
enumerable: false,
|
|
636
|
+
configurable: true
|
|
637
|
+
});
|
|
598
638
|
DPoint.prototype.simple = function (xKey, yKey) {
|
|
599
639
|
var _a;
|
|
600
640
|
if (xKey === void 0) { xKey = 'x'; }
|
package/dist/es2015/DPoint.js
CHANGED
|
@@ -28,7 +28,7 @@ export class DPoint {
|
|
|
28
28
|
static parse(c, format = 'xyz') {
|
|
29
29
|
const { lat, lon, lng = lon, alt } = c;
|
|
30
30
|
if (lat && lng) {
|
|
31
|
-
return new DPoint(
|
|
31
|
+
return new DPoint(lng, lat, alt !== null && alt !== void 0 ? alt : 0);
|
|
32
32
|
}
|
|
33
33
|
let t = c;
|
|
34
34
|
if (c.type === 'Point') {
|
|
@@ -495,6 +495,30 @@ export class DPoint {
|
|
|
495
495
|
get hPoint() {
|
|
496
496
|
return this.yPoint;
|
|
497
497
|
}
|
|
498
|
+
get lat() {
|
|
499
|
+
return this.y;
|
|
500
|
+
}
|
|
501
|
+
set lat(v) {
|
|
502
|
+
this.y = v;
|
|
503
|
+
}
|
|
504
|
+
get lng() {
|
|
505
|
+
return this.x;
|
|
506
|
+
}
|
|
507
|
+
set lng(v) {
|
|
508
|
+
this.x = v;
|
|
509
|
+
}
|
|
510
|
+
get lon() {
|
|
511
|
+
return this.x;
|
|
512
|
+
}
|
|
513
|
+
set lon(v) {
|
|
514
|
+
this.x = v;
|
|
515
|
+
}
|
|
516
|
+
get alt() {
|
|
517
|
+
return this.z;
|
|
518
|
+
}
|
|
519
|
+
set alt(v) {
|
|
520
|
+
this.z = v;
|
|
521
|
+
}
|
|
498
522
|
simple(xKey = 'x', yKey = 'y') {
|
|
499
523
|
return {
|
|
500
524
|
[xKey]: this.x,
|
package/dist/esm/DPoint.js
CHANGED
|
@@ -58,7 +58,7 @@ var DPoint = (function () {
|
|
|
58
58
|
if (format === void 0) { format = 'xyz'; }
|
|
59
59
|
var _a = c, lat = _a.lat, lon = _a.lon, _b = _a.lng, lng = _b === void 0 ? lon : _b, alt = _a.alt;
|
|
60
60
|
if (lat && lng) {
|
|
61
|
-
return new DPoint(
|
|
61
|
+
return new DPoint(lng, lat, alt !== null && alt !== void 0 ? alt : 0);
|
|
62
62
|
}
|
|
63
63
|
var t = c;
|
|
64
64
|
if (c.type === 'Point') {
|
|
@@ -592,6 +592,46 @@ var DPoint = (function () {
|
|
|
592
592
|
enumerable: false,
|
|
593
593
|
configurable: true
|
|
594
594
|
});
|
|
595
|
+
Object.defineProperty(DPoint.prototype, "lat", {
|
|
596
|
+
get: function () {
|
|
597
|
+
return this.y;
|
|
598
|
+
},
|
|
599
|
+
set: function (v) {
|
|
600
|
+
this.y = v;
|
|
601
|
+
},
|
|
602
|
+
enumerable: false,
|
|
603
|
+
configurable: true
|
|
604
|
+
});
|
|
605
|
+
Object.defineProperty(DPoint.prototype, "lng", {
|
|
606
|
+
get: function () {
|
|
607
|
+
return this.x;
|
|
608
|
+
},
|
|
609
|
+
set: function (v) {
|
|
610
|
+
this.x = v;
|
|
611
|
+
},
|
|
612
|
+
enumerable: false,
|
|
613
|
+
configurable: true
|
|
614
|
+
});
|
|
615
|
+
Object.defineProperty(DPoint.prototype, "lon", {
|
|
616
|
+
get: function () {
|
|
617
|
+
return this.x;
|
|
618
|
+
},
|
|
619
|
+
set: function (v) {
|
|
620
|
+
this.x = v;
|
|
621
|
+
},
|
|
622
|
+
enumerable: false,
|
|
623
|
+
configurable: true
|
|
624
|
+
});
|
|
625
|
+
Object.defineProperty(DPoint.prototype, "alt", {
|
|
626
|
+
get: function () {
|
|
627
|
+
return this.z;
|
|
628
|
+
},
|
|
629
|
+
set: function (v) {
|
|
630
|
+
this.z = v;
|
|
631
|
+
},
|
|
632
|
+
enumerable: false,
|
|
633
|
+
configurable: true
|
|
634
|
+
});
|
|
595
635
|
DPoint.prototype.simple = function (xKey, yKey) {
|
|
596
636
|
var _a;
|
|
597
637
|
if (xKey === void 0) { xKey = 'x'; }
|