dgeoutils 2.4.20 → 2.4.21

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.
@@ -1,5 +1,5 @@
1
1
  /// <reference types="offscreencanvas" />
2
- import { DCoord, DPoint, LatLng } from './DPoint';
2
+ import { DCoord, DPoint, LatLng, XYZ } from './DPoint';
3
3
  import { DLine } from './DLine';
4
4
  import { DPolygonLoop } from './DPolygonLoop';
5
5
  import { True } from './utils';
@@ -98,6 +98,7 @@ export declare class DPolygon {
98
98
  static parse(a: LatLng[], format?: string): DPolygon;
99
99
  static parse(a: number[][], format?: string): DPolygon;
100
100
  static parse(a: DCoord[], format?: string): DPolygon;
101
+ static parse(a: XYZ[], format?: string): DPolygon;
101
102
  static parse(a: GeoJsonGeometry | Feature | FeatureCollection<LineString | Polygon>, format?: string): DPolygon | DeepArray<DPolygon>;
102
103
  toArrayOfCoords(format?: string): DCoord[];
103
104
  toGeoJSONFeature(format?: string): Feature<LineString | Polygon>;
package/dist/cjs/utils.js CHANGED
@@ -246,7 +246,7 @@ exports.toDegreesMinutesSeconds = toDegreesMinutesSeconds;
246
246
  var parseDegreesMinutesSeconds = function (i) {
247
247
  var e_1, _a;
248
248
  var _b, _c, _d, _e, _f, _g, _h;
249
- var parts = i.matchAll(/(?<value>-?\d+(?<tail>\.\d{0,})?)(?<type>°|'|")/gmiu);
249
+ var parts = i.matchAll(/(?<value>-?\d+(?<tail>\.\d{1,})?)(?<type>°|'|")/gmiu);
250
250
  var d = 0;
251
251
  var m = 0;
252
252
  var s = 0;
@@ -184,7 +184,7 @@ export const toDegreesMinutesSeconds = (v) => {
184
184
  };
185
185
  export const parseDegreesMinutesSeconds = (i) => {
186
186
  var _a, _b, _c, _d, _e, _f, _g;
187
- const parts = i.matchAll(/(?<value>-?\d+(?<tail>\.\d{0,})?)(?<type>°|'|")/gmiu);
187
+ const parts = i.matchAll(/(?<value>-?\d+(?<tail>\.\d{1,})?)(?<type>°|'|")/gmiu);
188
188
  let d = 0;
189
189
  let m = 0;
190
190
  let s = 0;
package/dist/esm/utils.js CHANGED
@@ -232,7 +232,7 @@ export var toDegreesMinutesSeconds = function (v) {
232
232
  export var parseDegreesMinutesSeconds = function (i) {
233
233
  var e_1, _a;
234
234
  var _b, _c, _d, _e, _f, _g, _h;
235
- var parts = i.matchAll(/(?<value>-?\d+(?<tail>\.\d{0,})?)(?<type>°|'|")/gmiu);
235
+ var parts = i.matchAll(/(?<value>-?\d+(?<tail>\.\d{1,})?)(?<type>°|'|")/gmiu);
236
236
  var d = 0;
237
237
  var m = 0;
238
238
  var s = 0;