dgeoutils 2.4.2 → 2.4.3

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.
Files changed (43) hide show
  1. package/dist/{DCircle.d.ts → cjs/DCircle.d.ts} +0 -0
  2. package/dist/cjs/DCircle.js +102 -0
  3. package/dist/{DLine.d.ts → cjs/DLine.d.ts} +0 -0
  4. package/dist/cjs/DLine.js +310 -0
  5. package/dist/{DNumbers.d.ts → cjs/DNumbers.d.ts} +0 -0
  6. package/dist/cjs/DNumbers.js +30 -0
  7. package/dist/{DPlane.d.ts → cjs/DPlane.d.ts} +0 -0
  8. package/dist/cjs/DPlane.js +132 -0
  9. package/dist/{DPoint.d.ts → cjs/DPoint.d.ts} +0 -0
  10. package/dist/cjs/DPoint.js +574 -0
  11. package/dist/{DPolygon.d.ts → cjs/DPolygon.d.ts} +0 -0
  12. package/dist/cjs/DPolygon.js +1560 -0
  13. package/dist/{DPolygonLoop.d.ts → cjs/DPolygonLoop.d.ts} +0 -0
  14. package/dist/cjs/DPolygonLoop.js +401 -0
  15. package/dist/{FastSearch.d.ts → cjs/FastSearch.d.ts} +0 -0
  16. package/dist/cjs/FastSearch.js +53 -0
  17. package/dist/{TraceMatrix.d.ts → cjs/TraceMatrix.d.ts} +0 -0
  18. package/dist/cjs/TraceMatrix.js +256 -0
  19. package/dist/{index.d.ts → cjs/index.d.ts} +0 -0
  20. package/dist/{index.js → cjs/index.js} +5 -1
  21. package/dist/{utils.d.ts → cjs/utils.d.ts} +0 -0
  22. package/dist/cjs/utils.js +216 -0
  23. package/dist/{DCircle.js → es2015/DCircle.js} +14 -18
  24. package/dist/{DLine.js → es2015/DLine.js} +24 -28
  25. package/dist/es2015/DNumbers.js +22 -0
  26. package/dist/{DPlane.js → es2015/DPlane.js} +22 -26
  27. package/dist/{DPoint.js → es2015/DPoint.js} +52 -56
  28. package/dist/{DPolygon.js → es2015/DPolygon.js} +41 -45
  29. package/dist/{DPolygonLoop.js → es2015/DPolygonLoop.js} +1 -5
  30. package/dist/{FastSearch.js → es2015/FastSearch.js} +1 -5
  31. package/dist/{TraceMatrix.js → es2015/TraceMatrix.js} +35 -39
  32. package/dist/es2015/index.js +10 -0
  33. package/dist/{utils.js → es2015/utils.js} +29 -41
  34. package/dist/esm/DCircle.js +1 -1
  35. package/dist/esm/DLine.js +2 -2
  36. package/dist/esm/DPoint.js +2 -2
  37. package/dist/esm/DPolygon.js +8 -8
  38. package/dist/esm/utils.js +6 -6
  39. package/dist/umd/dgeoutils.js +26 -26
  40. package/dist/umd/dgeoutils.min.js +1 -1
  41. package/dist/umd/dgeoutils.min.js.map +1 -1
  42. package/package.json +8 -13
  43. package/dist/DNumbers.js +0 -26
@@ -65,7 +65,7 @@ import { DPoint } from './DPoint';
65
65
  import { DLine } from './DLine';
66
66
  import { DCircle } from './DCircle';
67
67
  import { DNumbers } from './DNumbers';
68
- import { io as jstsIo, operation } from 'jsts';
68
+ import { io as jstsIo, operation } from 'jsts/dist/jsts.js';
69
69
  import { DPolygonLoop } from './DPolygonLoop';
70
70
  import { isDefAndNotNull } from './utils';
71
71
  var _a = operation.buffer.BufferParameters, CAP_ROUND = _a.CAP_ROUND, CAP_FLAT = _a.CAP_FLAT, CAP_SQUARE = _a.CAP_SQUARE;
@@ -673,14 +673,14 @@ var DPolygon = (function () {
673
673
  if (type === DPolygon.WKT_POLYGON) {
674
674
  var h = '';
675
675
  if (this.holes && this.holes.length) {
676
- h = ", " + this.holes.map(function (hole) { return hole.toString(); })
677
- .join(', ');
676
+ h = ", ".concat(this.holes.map(function (hole) { return hole.toString(); })
677
+ .join(', '));
678
678
  }
679
- return "POLYGON ((" + this.deintersection.mapArray(function (r) { return r.x + " " + r.y + (withZ ? " " + r.z : ''); })
680
- .join(', ') + ")" + h + ")";
679
+ return "POLYGON ((".concat(this.deintersection.mapArray(function (r) { return "".concat(r.x, " ").concat(r.y).concat(withZ ? " ".concat(r.z) : ''); })
680
+ .join(', '), ")").concat(h, ")");
681
681
  }
682
- return "LINESTRING (" + this.mapArray(function (r) { return r.x + " " + r.y + (withZ ? " " + r.z : ''); })
683
- .join(', ') + ")";
682
+ return "LINESTRING (".concat(this.mapArray(function (r) { return "".concat(r.x, " ").concat(r.y).concat(withZ ? " ".concat(r.z) : ''); })
683
+ .join(', '), ")");
684
684
  };
685
685
  DPolygon.prototype.filter = function (f) {
686
686
  this.pPoints = this.pPoints.filter(f);
@@ -734,7 +734,7 @@ var DPolygon = (function () {
734
734
  .reduce(function (a, h) { return a + h.getValue(); }, ''));
735
735
  };
736
736
  DPolygon.prototype.toString = function () {
737
- return "(" + this.mapArray(function (r) { return r.toString(); }).join(', ') + ")";
737
+ return "(".concat(this.mapArray(function (r) { return r.toString(); }).join(', '), ")");
738
738
  };
739
739
  DPolygon.prototype.close = function () {
740
740
  var p0 = this.first;
package/dist/esm/utils.js CHANGED
@@ -41,38 +41,38 @@ var hook = function (scope) { return function () { return scope; }; };
41
41
  var shouldBeInt = function (scope, funcName, argName) { return function (p) {
42
42
  if (!p.clone().round()
43
43
  .equal(p)) {
44
- warn("\"" + funcName + "\" -> \"" + argName + "\" should be Int!");
44
+ warn("\"".concat(funcName, "\" -> \"").concat(argName, "\" should be Int!"));
45
45
  }
46
46
  return scope;
47
47
  }; };
48
48
  var shouldBeUInt = function (scope, funcName, argName) { return function (p) {
49
49
  if (!p.clone().round()
50
50
  .equal(p) || !p.gtOrEqual(DPoint.zero())) {
51
- warn("\"" + funcName + "\" -> \"" + argName + "\" should be UInt!");
51
+ warn("\"".concat(funcName, "\" -> \"").concat(argName, "\" should be UInt!"));
52
52
  }
53
53
  return scope;
54
54
  }; };
55
55
  var shouldBeDegree = function (scope, funcName, argName) { return function (p) {
56
56
  if (!p.likeWorldGeodeticSystem) {
57
- warn("\"" + funcName + "\" -> \"" + argName + "\" should be degree!");
57
+ warn("\"".concat(funcName, "\" -> \"").concat(argName, "\" should be degree!"));
58
58
  }
59
59
  return scope;
60
60
  }; };
61
61
  var shouldBeRadians = function (scope, funcName, argName) { return function (p) {
62
62
  if (!p.likeRadians) {
63
- warn("\"" + funcName + "\" -> \"" + argName + "\" should be radians!");
63
+ warn("\"".concat(funcName, "\" -> \"").concat(argName, "\" should be radians!"));
64
64
  }
65
65
  return scope;
66
66
  }; };
67
67
  var shouldExist = function (scope, funcName, argName) { return function (p) {
68
68
  if (!isDefAndNotNull(p)) {
69
- warn("\"" + funcName + "\" -> \"" + argName + "\" should exist!");
69
+ warn("\"".concat(funcName, "\" -> \"").concat(argName, "\" should exist!"));
70
70
  }
71
71
  return scope;
72
72
  }; };
73
73
  var shouldBeMeters = function (scope, funcName, argName) { return function (p) {
74
74
  if (!p.likePseudoMercator) {
75
- warn("\"" + funcName + "\" -> \"" + argName + "\" should be meters!");
75
+ warn("\"".concat(funcName, "\" -> \"").concat(argName, "\" should be meters!"));
76
76
  }
77
77
  return scope;
78
78
  }; };