mapshaper 0.6.102 → 0.6.104
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/LICENSE +1 -1
- package/mapshaper.js +959 -816
- package/package.json +7 -7
- package/www/index.html +1 -1
- package/www/mapshaper-gui.js +381 -204
- package/www/mapshaper.js +959 -816
- package/www/modules.js +32141 -24119
- package/www/page.css +4 -0
package/mapshaper.js
CHANGED
|
@@ -2,104 +2,105 @@
|
|
|
2
2
|
|
|
3
3
|
var utils = /*#__PURE__*/Object.freeze({
|
|
4
4
|
__proto__: null,
|
|
5
|
+
get addThousandsSep () { return addThousandsSep; },
|
|
6
|
+
get addslashes () { return addslashes; },
|
|
7
|
+
get arrayToIndex () { return arrayToIndex; },
|
|
8
|
+
get clamp () { return clamp; },
|
|
9
|
+
get cleanNumericString () { return cleanNumericString; },
|
|
10
|
+
get contains () { return contains; },
|
|
11
|
+
get copyElements () { return copyElements; },
|
|
12
|
+
get countValues () { return countValues; },
|
|
13
|
+
get createBuffer () { return createBuffer; },
|
|
5
14
|
get default () { return utils; },
|
|
15
|
+
get defaults () { return defaults; },
|
|
16
|
+
get difference () { return difference; },
|
|
17
|
+
get endsWith () { return endsWith; },
|
|
18
|
+
get every () { return every; },
|
|
19
|
+
get expandoBuffer () { return expandoBuffer; },
|
|
20
|
+
get extend () { return extend$1; },
|
|
21
|
+
get extendBuffer () { return extendBuffer; },
|
|
22
|
+
get find () { return find; },
|
|
23
|
+
get findMedian () { return findMedian; },
|
|
24
|
+
get findQuantile () { return findQuantile; },
|
|
25
|
+
get findRankByValue () { return findRankByValue; },
|
|
26
|
+
get findStringPrefix () { return findStringPrefix; },
|
|
27
|
+
get findValueByPct () { return findValueByPct; },
|
|
28
|
+
get findValueByRank () { return findValueByRank; },
|
|
29
|
+
get forEach () { return forEach; },
|
|
30
|
+
get forEachProperty () { return forEachProperty; },
|
|
31
|
+
get format () { return format; },
|
|
32
|
+
get formatDateISO () { return formatDateISO; },
|
|
33
|
+
get formatIntlNumber () { return formatIntlNumber; },
|
|
34
|
+
get formatNumber () { return formatNumber$1; },
|
|
35
|
+
get formatNumberForDisplay () { return formatNumberForDisplay; },
|
|
36
|
+
get formatVersionedName () { return formatVersionedName; },
|
|
37
|
+
get formatter () { return formatter; },
|
|
38
|
+
get genericSort () { return genericSort; },
|
|
39
|
+
get getArrayBounds () { return getArrayBounds; },
|
|
40
|
+
get getGenericComparator () { return getGenericComparator; },
|
|
41
|
+
get getKeyComparator () { return getKeyComparator; },
|
|
42
|
+
get getSortedIds () { return getSortedIds; },
|
|
6
43
|
get getUniqueName () { return getUniqueName; },
|
|
7
|
-
get
|
|
8
|
-
get
|
|
9
|
-
get
|
|
10
|
-
get
|
|
44
|
+
get groupBy () { return groupBy; },
|
|
45
|
+
get htmlEscape () { return htmlEscape; },
|
|
46
|
+
get indexOf () { return indexOf; },
|
|
47
|
+
get indexOn () { return indexOn; },
|
|
48
|
+
get inherit () { return inherit; },
|
|
49
|
+
get initializeArray () { return initializeArray; },
|
|
50
|
+
get intersection () { return intersection; },
|
|
11
51
|
get isArray () { return isArray; },
|
|
12
|
-
get
|
|
13
|
-
get
|
|
52
|
+
get isArrayLike () { return isArrayLike; },
|
|
53
|
+
get isBoolean () { return isBoolean; },
|
|
54
|
+
get isDate () { return isDate; },
|
|
55
|
+
get isEven () { return isEven; },
|
|
14
56
|
get isFiniteNumber () { return isFiniteNumber; },
|
|
15
|
-
get
|
|
57
|
+
get isFunction () { return isFunction; },
|
|
16
58
|
get isInteger () { return isInteger; },
|
|
17
|
-
get
|
|
59
|
+
get isNonNegNumber () { return isNonNegNumber; },
|
|
60
|
+
get isNumber () { return isNumber; },
|
|
61
|
+
get isObject () { return isObject; },
|
|
18
62
|
get isOdd () { return isOdd$1; },
|
|
63
|
+
get isPromise () { return isPromise; },
|
|
19
64
|
get isString () { return isString; },
|
|
20
|
-
get
|
|
21
|
-
get
|
|
22
|
-
get
|
|
23
|
-
get
|
|
24
|
-
get isArrayLike () { return isArrayLike; },
|
|
25
|
-
get addslashes () { return addslashes; },
|
|
26
|
-
get regexEscape () { return regexEscape; },
|
|
27
|
-
get htmlEscape () { return htmlEscape; },
|
|
28
|
-
get defaults () { return defaults; },
|
|
29
|
-
get extend () { return extend$1; },
|
|
30
|
-
get inherit () { return inherit; },
|
|
31
|
-
get promisify () { return promisify; },
|
|
32
|
-
get reduceAsync () { return reduceAsync; },
|
|
65
|
+
get isValidNumber () { return isValidNumber; },
|
|
66
|
+
get lpad () { return lpad; },
|
|
67
|
+
get ltrim () { return ltrim; },
|
|
68
|
+
get mean () { return mean; },
|
|
33
69
|
get merge () { return merge; },
|
|
34
|
-
get
|
|
35
|
-
get
|
|
36
|
-
get
|
|
37
|
-
get
|
|
38
|
-
get
|
|
39
|
-
get
|
|
40
|
-
get
|
|
70
|
+
get mergeNames () { return mergeNames; },
|
|
71
|
+
get numToStr () { return numToStr; },
|
|
72
|
+
get parseIntlNumber () { return parseIntlNumber; },
|
|
73
|
+
get parseNumber () { return parseNumber; },
|
|
74
|
+
get parsePercent () { return parsePercent; },
|
|
75
|
+
get parseString () { return parseString; },
|
|
76
|
+
get pickOne () { return pickOne; },
|
|
77
|
+
get pluck () { return pluck; },
|
|
78
|
+
get pluralSuffix () { return pluralSuffix; },
|
|
79
|
+
get promisify () { return promisify; },
|
|
80
|
+
get quicksort () { return quicksort$1; },
|
|
81
|
+
get quicksortPartition () { return quicksortPartition; },
|
|
41
82
|
get range () { return range; },
|
|
83
|
+
get reduceAsync () { return reduceAsync; },
|
|
84
|
+
get regexEscape () { return regexEscape; },
|
|
85
|
+
get reorderArray () { return reorderArray; },
|
|
42
86
|
get repeat () { return repeat; },
|
|
43
|
-
get sum () { return sum$1; },
|
|
44
|
-
get getArrayBounds () { return getArrayBounds; },
|
|
45
|
-
get uniq () { return uniq; },
|
|
46
|
-
get pluck () { return pluck; },
|
|
47
|
-
get countValues () { return countValues; },
|
|
48
|
-
get indexOn () { return indexOn; },
|
|
49
|
-
get groupBy () { return groupBy; },
|
|
50
|
-
get arrayToIndex () { return arrayToIndex; },
|
|
51
|
-
get forEach () { return forEach; },
|
|
52
|
-
get forEachProperty () { return forEachProperty; },
|
|
53
|
-
get initializeArray () { return initializeArray; },
|
|
54
|
-
get replaceArray () { return replaceArray; },
|
|
55
87
|
get repeatString () { return repeatString; },
|
|
56
|
-
get
|
|
57
|
-
get pluralSuffix () { return pluralSuffix; },
|
|
58
|
-
get endsWith () { return endsWith; },
|
|
59
|
-
get lpad () { return lpad; },
|
|
88
|
+
get replaceArray () { return replaceArray; },
|
|
60
89
|
get rpad () { return rpad; },
|
|
61
|
-
get trim () { return trim; },
|
|
62
|
-
get ltrim () { return ltrim; },
|
|
63
90
|
get rtrim () { return rtrim; },
|
|
64
|
-
get addThousandsSep () { return addThousandsSep; },
|
|
65
|
-
get numToStr () { return numToStr; },
|
|
66
|
-
get formatNumber () { return formatNumber$1; },
|
|
67
|
-
get formatIntlNumber () { return formatIntlNumber; },
|
|
68
|
-
get formatNumberForDisplay () { return formatNumberForDisplay; },
|
|
69
91
|
get shuffle () { return shuffle; },
|
|
70
|
-
get
|
|
71
|
-
get genericSort () { return genericSort; },
|
|
72
|
-
get getSortedIds () { return getSortedIds; },
|
|
92
|
+
get some () { return some; },
|
|
73
93
|
get sortArrayIndex () { return sortArrayIndex; },
|
|
74
|
-
get
|
|
75
|
-
get
|
|
76
|
-
get
|
|
77
|
-
get
|
|
78
|
-
get quicksortPartition () { return quicksortPartition; },
|
|
79
|
-
get findRankByValue () { return findRankByValue; },
|
|
80
|
-
get findValueByPct () { return findValueByPct; },
|
|
81
|
-
get findValueByRank () { return findValueByRank; },
|
|
82
|
-
get findMedian () { return findMedian; },
|
|
83
|
-
get findQuantile () { return findQuantile; },
|
|
84
|
-
get mean () { return mean; },
|
|
85
|
-
get format () { return format; },
|
|
86
|
-
get formatter () { return formatter; },
|
|
87
|
-
get wildcardToRegExp () { return wildcardToRegExp; },
|
|
88
|
-
get createBuffer () { return createBuffer; },
|
|
94
|
+
get sortOn () { return sortOn; },
|
|
95
|
+
get splitLines () { return splitLines; },
|
|
96
|
+
get sum () { return sum$1; },
|
|
97
|
+
get toArray () { return toArray; },
|
|
89
98
|
get toBuffer () { return toBuffer; },
|
|
90
|
-
get
|
|
91
|
-
get
|
|
92
|
-
get
|
|
93
|
-
get mergeNames () { return mergeNames; },
|
|
94
|
-
get findStringPrefix () { return findStringPrefix; },
|
|
95
|
-
get parsePercent () { return parsePercent; },
|
|
96
|
-
get formatVersionedName () { return formatVersionedName; },
|
|
99
|
+
get trim () { return trim; },
|
|
100
|
+
get trimQuotes () { return trimQuotes; },
|
|
101
|
+
get uniq () { return uniq; },
|
|
97
102
|
get uniqifyNames () { return uniqifyNames; },
|
|
98
|
-
get
|
|
99
|
-
get parseNumber () { return parseNumber; },
|
|
100
|
-
get parseIntlNumber () { return parseIntlNumber; },
|
|
101
|
-
get cleanNumericString () { return cleanNumericString; },
|
|
102
|
-
get trimQuotes () { return trimQuotes; }
|
|
103
|
+
get wildcardToRegExp () { return wildcardToRegExp; }
|
|
103
104
|
});
|
|
104
105
|
|
|
105
106
|
// This module provides a way for multiple jobs to run together asynchronously
|
|
@@ -128,13 +129,29 @@
|
|
|
128
129
|
|
|
129
130
|
var Stash = /*#__PURE__*/Object.freeze({
|
|
130
131
|
__proto__: null,
|
|
131
|
-
|
|
132
|
+
clearStash: clearStash,
|
|
132
133
|
getStashedVar: getStashedVar,
|
|
133
|
-
|
|
134
|
+
stashVar: stashVar
|
|
134
135
|
});
|
|
135
136
|
|
|
137
|
+
// Several dependencies are loaded via require()
|
|
138
|
+
var f;
|
|
139
|
+
if (typeof require == 'function') {
|
|
140
|
+
// Node.js context: native require() function
|
|
141
|
+
f = require;
|
|
142
|
+
} else if (typeof window == 'object' && window.modules) {
|
|
143
|
+
// running in web GUI
|
|
144
|
+
f = function(name) {
|
|
145
|
+
return window.modules[name];
|
|
146
|
+
};
|
|
147
|
+
} else {
|
|
148
|
+
// stub to avoid runtime error in a handful of tests
|
|
149
|
+
f = function() {};
|
|
150
|
+
}
|
|
151
|
+
var require$1 = f;
|
|
152
|
+
|
|
136
153
|
// Fall back to browserify's Buffer polyfill
|
|
137
|
-
var B$3 = typeof Buffer != 'undefined' ? Buffer : require('buffer').Buffer;
|
|
154
|
+
var B$3 = typeof Buffer != 'undefined' ? Buffer : require$1('buffer').Buffer;
|
|
138
155
|
|
|
139
156
|
var uniqCount = 0;
|
|
140
157
|
function getUniqueName(prefix) {
|
|
@@ -684,6 +701,10 @@
|
|
|
684
701
|
}
|
|
685
702
|
}
|
|
686
703
|
|
|
704
|
+
function pickOne(arr) {
|
|
705
|
+
return arr[Math.floor(Math.random() * arr.length)];
|
|
706
|
+
}
|
|
707
|
+
|
|
687
708
|
// Sort an array of objects based on one or more properties.
|
|
688
709
|
// Usage: sortOn(array, key1, asc?[, key2, asc? ...])
|
|
689
710
|
//
|
|
@@ -1295,7 +1316,6 @@
|
|
|
1295
1316
|
if (parts.length > 1 || true) {
|
|
1296
1317
|
return '\nError details:\n' + parts[0];
|
|
1297
1318
|
}
|
|
1298
|
-
return '';
|
|
1299
1319
|
}
|
|
1300
1320
|
|
|
1301
1321
|
// print a message to stdout
|
|
@@ -1418,28 +1438,28 @@
|
|
|
1418
1438
|
|
|
1419
1439
|
var Logging = /*#__PURE__*/Object.freeze({
|
|
1420
1440
|
__proto__: null,
|
|
1421
|
-
|
|
1422
|
-
|
|
1441
|
+
NonFatalError: NonFatalError,
|
|
1442
|
+
UserError: UserError,
|
|
1443
|
+
debug: debug,
|
|
1423
1444
|
enableLogging: enableLogging,
|
|
1424
|
-
loggingEnabled: loggingEnabled,
|
|
1425
1445
|
error: error,
|
|
1426
|
-
|
|
1446
|
+
formatColumns: formatColumns,
|
|
1447
|
+
formatLogArgs: formatLogArgs,
|
|
1448
|
+
formatStringsAsGrid: formatStringsAsGrid,
|
|
1449
|
+
getErrorDetail: getErrorDetail,
|
|
1450
|
+
getLoggingSetter: getLoggingSetter,
|
|
1427
1451
|
interrupt: interrupt,
|
|
1452
|
+
logArgs: logArgs,
|
|
1453
|
+
loggingEnabled: loggingEnabled,
|
|
1428
1454
|
message: message,
|
|
1429
|
-
warn: warn,
|
|
1430
|
-
setLoggingFunctions: setLoggingFunctions,
|
|
1431
|
-
getErrorDetail: getErrorDetail,
|
|
1432
1455
|
print: print,
|
|
1433
|
-
verbose: verbose,
|
|
1434
|
-
debug: debug,
|
|
1435
1456
|
printError: printError,
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
truncateString: truncateString
|
|
1457
|
+
setLoggingForCLI: setLoggingForCLI,
|
|
1458
|
+
setLoggingFunctions: setLoggingFunctions,
|
|
1459
|
+
stop: stop,
|
|
1460
|
+
truncateString: truncateString,
|
|
1461
|
+
verbose: verbose,
|
|
1462
|
+
warn: warn
|
|
1443
1463
|
});
|
|
1444
1464
|
|
|
1445
1465
|
function Transform() {
|
|
@@ -1756,12 +1776,29 @@
|
|
|
1756
1776
|
return count;
|
|
1757
1777
|
}
|
|
1758
1778
|
|
|
1779
|
+
// export function getPointBounds(shapes) {
|
|
1780
|
+
// var bounds = new Bounds();
|
|
1781
|
+
// forEachPoint(shapes, function(p) {
|
|
1782
|
+
// bounds.mergePoint(p[0], p[1]);
|
|
1783
|
+
// });
|
|
1784
|
+
// return bounds;
|
|
1785
|
+
// }
|
|
1786
|
+
|
|
1759
1787
|
function getPointBounds$1(shapes) {
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1788
|
+
new Bounds();
|
|
1789
|
+
var shp, x, y, xmin = Infinity, ymin = Infinity, xmax = -Infinity, ymax = -Infinity;
|
|
1790
|
+
for (var i=0, n=shapes.length; i<n; i++) {
|
|
1791
|
+
shp = shapes[i];
|
|
1792
|
+
for (var j=0, m=shp ? shp.length : 0; j<m; j++) {
|
|
1793
|
+
x = shp[j][0];
|
|
1794
|
+
y = shp[j][1];
|
|
1795
|
+
if (x > xmax) xmax = x;
|
|
1796
|
+
if (x < xmin) xmin = x;
|
|
1797
|
+
if (y > ymax) ymax = y;
|
|
1798
|
+
if (y < ymin) ymin = y;
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
return shp ? new Bounds(xmin, ymin, xmax, ymax) : new Bounds();
|
|
1765
1802
|
}
|
|
1766
1803
|
|
|
1767
1804
|
function getPointFeatureBounds(shape, bounds) {
|
|
@@ -1799,10 +1836,10 @@
|
|
|
1799
1836
|
var PointUtils = /*#__PURE__*/Object.freeze({
|
|
1800
1837
|
__proto__: null,
|
|
1801
1838
|
countPointsInLayer: countPointsInLayer,
|
|
1839
|
+
forEachPoint: forEachPoint,
|
|
1802
1840
|
getPointBounds: getPointBounds$1,
|
|
1803
1841
|
getPointFeatureBounds: getPointFeatureBounds,
|
|
1804
|
-
getPointsInLayer: getPointsInLayer
|
|
1805
|
-
forEachPoint: forEachPoint
|
|
1842
|
+
getPointsInLayer: getPointsInLayer
|
|
1806
1843
|
});
|
|
1807
1844
|
|
|
1808
1845
|
function absArcId(arcId) {
|
|
@@ -2022,26 +2059,22 @@
|
|
|
2022
2059
|
var ArcUtils = /*#__PURE__*/Object.freeze({
|
|
2023
2060
|
__proto__: null,
|
|
2024
2061
|
absArcId: absArcId,
|
|
2025
|
-
calcArcBounds: calcArcBounds,
|
|
2026
|
-
getUnfilteredArcLength: getUnfilteredArcLength,
|
|
2027
|
-
getUnfilteredArcCoords: getUnfilteredArcCoords,
|
|
2028
|
-
findArcIdFromVertexId: findArcIdFromVertexId,
|
|
2029
|
-
deleteLastArc: deleteLastArc,
|
|
2030
|
-
deleteVertex: deleteVertex,
|
|
2031
2062
|
appendEmptyArc: appendEmptyArc,
|
|
2032
2063
|
appendVertex: appendVertex,
|
|
2033
|
-
|
|
2064
|
+
calcArcBounds: calcArcBounds,
|
|
2034
2065
|
countFilteredVertices: countFilteredVertices,
|
|
2035
|
-
|
|
2066
|
+
deleteLastArc: deleteLastArc,
|
|
2067
|
+
deleteVertex: deleteVertex,
|
|
2068
|
+
filterVertexData: filterVertexData,
|
|
2069
|
+
findArcIdFromVertexId: findArcIdFromVertexId,
|
|
2070
|
+
getUnfilteredArcCoords: getUnfilteredArcCoords,
|
|
2071
|
+
getUnfilteredArcLength: getUnfilteredArcLength,
|
|
2072
|
+
insertVertex: insertVertex
|
|
2036
2073
|
});
|
|
2037
2074
|
|
|
2038
2075
|
var WGS84 = {
|
|
2039
2076
|
// https://en.wikipedia.org/wiki/Earth_radius
|
|
2040
|
-
SEMIMAJOR_AXIS: 6378137
|
|
2041
|
-
SEMIMINOR_AXIS: 6356752.3142,
|
|
2042
|
-
AUTHALIC_RADIUS: 6371007.2,
|
|
2043
|
-
VOLUMETRIC_RADIUS: 6371000.8
|
|
2044
|
-
};
|
|
2077
|
+
SEMIMAJOR_AXIS: 6378137};
|
|
2045
2078
|
|
|
2046
2079
|
// TODO: remove this constant, use actual data from dataset CRS,
|
|
2047
2080
|
// also consider using ellipsoidal formulas where greater accuracy might be important.
|
|
@@ -2390,35 +2423,35 @@
|
|
|
2390
2423
|
|
|
2391
2424
|
var Geom = /*#__PURE__*/Object.freeze({
|
|
2392
2425
|
__proto__: null,
|
|
2393
|
-
R: R$1,
|
|
2394
2426
|
D2R: D2R,
|
|
2427
|
+
R: R$1,
|
|
2395
2428
|
R2D: R2D,
|
|
2429
|
+
bearing: bearing,
|
|
2430
|
+
bearing2D: bearing2D,
|
|
2431
|
+
containsBounds: containsBounds,
|
|
2432
|
+
convLngLatToSph: convLngLatToSph,
|
|
2433
|
+
cosine: cosine,
|
|
2434
|
+
cosine3D: cosine3D,
|
|
2396
2435
|
degreesToMeters: degreesToMeters,
|
|
2436
|
+
distance2D: distance2D,
|
|
2397
2437
|
distance3D: distance3D,
|
|
2398
2438
|
distanceSq: distanceSq,
|
|
2399
|
-
distance2D: distance2D,
|
|
2400
2439
|
distanceSq3D: distanceSq3D,
|
|
2440
|
+
greatCircleDistance: greatCircleDistance,
|
|
2441
|
+
innerAngle: innerAngle,
|
|
2401
2442
|
innerAngle2: innerAngle2,
|
|
2402
|
-
|
|
2443
|
+
innerAngle3D: innerAngle3D,
|
|
2444
|
+
lngLatToXYZ: lngLatToXYZ,
|
|
2445
|
+
pointSegDistSq: pointSegDistSq,
|
|
2446
|
+
pointSegDistSq2: pointSegDistSq2,
|
|
2447
|
+
pointSegDistSq3D: pointSegDistSq3D,
|
|
2403
2448
|
signedAngle: signedAngle,
|
|
2404
|
-
bearing2D: bearing2D,
|
|
2405
|
-
bearing: bearing,
|
|
2406
2449
|
signedAngleSph: signedAngleSph,
|
|
2407
|
-
convLngLatToSph: convLngLatToSph,
|
|
2408
|
-
xyzToLngLat: xyzToLngLat,
|
|
2409
|
-
lngLatToXYZ: lngLatToXYZ,
|
|
2410
2450
|
sphericalDistance: sphericalDistance,
|
|
2411
|
-
|
|
2412
|
-
innerAngle: innerAngle,
|
|
2413
|
-
innerAngle3D: innerAngle3D,
|
|
2451
|
+
standardAngle: standardAngle,
|
|
2414
2452
|
triangleArea: triangleArea,
|
|
2415
|
-
cosine: cosine,
|
|
2416
|
-
cosine3D: cosine3D,
|
|
2417
2453
|
triangleArea3D: triangleArea3D,
|
|
2418
|
-
|
|
2419
|
-
pointSegDistSq3D: pointSegDistSq3D,
|
|
2420
|
-
pointSegDistSq2: pointSegDistSq2,
|
|
2421
|
-
containsBounds: containsBounds
|
|
2454
|
+
xyzToLngLat: xyzToLngLat
|
|
2422
2455
|
});
|
|
2423
2456
|
|
|
2424
2457
|
function pathIsClosed(ids, arcs) {
|
|
@@ -2564,16 +2597,16 @@
|
|
|
2564
2597
|
|
|
2565
2598
|
var PathGeom = /*#__PURE__*/Object.freeze({
|
|
2566
2599
|
__proto__: null,
|
|
2567
|
-
|
|
2600
|
+
get calcPathLen () { return calcPathLen; },
|
|
2601
|
+
countVerticesInPath: countVerticesInPath,
|
|
2602
|
+
getAvgPathXY: getAvgPathXY,
|
|
2603
|
+
getMaxPath: getMaxPath,
|
|
2604
|
+
getPathBounds: getPathBounds$1,
|
|
2568
2605
|
getPointToPathDistance: getPointToPathDistance,
|
|
2569
2606
|
getPointToPathInfo: getPointToPathInfo,
|
|
2570
2607
|
getPointToShapeDistance: getPointToShapeDistance,
|
|
2571
2608
|
getPointToShapeInfo: getPointToShapeInfo,
|
|
2572
|
-
|
|
2573
|
-
getMaxPath: getMaxPath,
|
|
2574
|
-
countVerticesInPath: countVerticesInPath,
|
|
2575
|
-
getPathBounds: getPathBounds$1,
|
|
2576
|
-
get calcPathLen () { return calcPathLen; }
|
|
2609
|
+
pathIsClosed: pathIsClosed
|
|
2577
2610
|
});
|
|
2578
2611
|
|
|
2579
2612
|
// Get the centroid of the largest ring of a polygon
|
|
@@ -2617,8 +2650,8 @@
|
|
|
2617
2650
|
|
|
2618
2651
|
var PolygonCentroid = /*#__PURE__*/Object.freeze({
|
|
2619
2652
|
__proto__: null,
|
|
2620
|
-
|
|
2621
|
-
|
|
2653
|
+
getPathCentroid: getPathCentroid,
|
|
2654
|
+
getShapeCentroid: getShapeCentroid
|
|
2622
2655
|
});
|
|
2623
2656
|
|
|
2624
2657
|
function testSegmentBoundsIntersection(a, b, bb) {
|
|
@@ -2900,25 +2933,25 @@
|
|
|
2900
2933
|
__proto__: null,
|
|
2901
2934
|
calcPolsbyPopperCompactness: calcPolsbyPopperCompactness,
|
|
2902
2935
|
calcSchwartzbergCompactness: calcSchwartzbergCompactness,
|
|
2936
|
+
getPathArea: getPathArea,
|
|
2937
|
+
getPathPerimeter: getPathPerimeter,
|
|
2903
2938
|
getPathWinding: getPathWinding,
|
|
2904
|
-
|
|
2939
|
+
getPlanarPathArea: getPlanarPathArea,
|
|
2940
|
+
getPlanarPathArea2: getPlanarPathArea2,
|
|
2941
|
+
getPlanarPathPerimeter: getPlanarPathPerimeter,
|
|
2905
2942
|
getPlanarShapeArea: getPlanarShapeArea,
|
|
2906
|
-
getSphericalShapeArea: getSphericalShapeArea,
|
|
2907
|
-
testBoundsInPolygon: testBoundsInPolygon,
|
|
2908
|
-
testPointInPolygon: testPointInPolygon,
|
|
2909
|
-
testPointInRing: testPointInRing,
|
|
2910
|
-
testRayIntersection: testRayIntersection,
|
|
2911
2943
|
getRayIntersection: getRayIntersection,
|
|
2912
|
-
|
|
2944
|
+
getShapeArea: getShapeArea,
|
|
2945
|
+
getShapePerimeter: getShapePerimeter,
|
|
2913
2946
|
getSphericalPathArea: getSphericalPathArea,
|
|
2914
2947
|
getSphericalPathArea2: getSphericalPathArea2,
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
getPathPerimeter: getPathPerimeter,
|
|
2918
|
-
getShapePerimeter: getShapePerimeter,
|
|
2948
|
+
getSphericalPathPerimeter: getSphericalPathPerimeter,
|
|
2949
|
+
getSphericalShapeArea: getSphericalShapeArea,
|
|
2919
2950
|
getSphericalShapePerimeter: getSphericalShapePerimeter,
|
|
2920
|
-
|
|
2921
|
-
|
|
2951
|
+
testBoundsInPolygon: testBoundsInPolygon,
|
|
2952
|
+
testPointInPolygon: testPointInPolygon,
|
|
2953
|
+
testPointInRing: testPointInRing,
|
|
2954
|
+
testRayIntersection: testRayIntersection
|
|
2922
2955
|
});
|
|
2923
2956
|
|
|
2924
2957
|
// Returns an interval for snapping together coordinates that be co-incident bug
|
|
@@ -3112,12 +3145,12 @@
|
|
|
3112
3145
|
|
|
3113
3146
|
var Snapping = /*#__PURE__*/Object.freeze({
|
|
3114
3147
|
__proto__: null,
|
|
3148
|
+
getCoordinateIds: getCoordinateIds,
|
|
3149
|
+
getEndpointIds: getEndpointIds,
|
|
3115
3150
|
getHighPrecisionSnapInterval: getHighPrecisionSnapInterval,
|
|
3116
3151
|
snapCoords: snapCoords,
|
|
3117
3152
|
snapCoordsByInterval: snapCoordsByInterval,
|
|
3118
|
-
snapEndpointsByInterval: snapEndpointsByInterval
|
|
3119
|
-
getCoordinateIds: getCoordinateIds,
|
|
3120
|
-
getEndpointIds: getEndpointIds
|
|
3153
|
+
snapEndpointsByInterval: snapEndpointsByInterval
|
|
3121
3154
|
});
|
|
3122
3155
|
|
|
3123
3156
|
// Find the intersection between two 2D segments
|
|
@@ -3346,10 +3379,10 @@
|
|
|
3346
3379
|
|
|
3347
3380
|
var SegmentGeom = /*#__PURE__*/Object.freeze({
|
|
3348
3381
|
__proto__: null,
|
|
3349
|
-
segmentIntersection: segmentIntersection,
|
|
3350
3382
|
findClosestPointOnSeg: findClosestPointOnSeg,
|
|
3351
3383
|
orient2D: orient2D,
|
|
3352
3384
|
segmentHit: segmentHit,
|
|
3385
|
+
segmentIntersection: segmentIntersection,
|
|
3353
3386
|
segmentTurn: segmentTurn
|
|
3354
3387
|
});
|
|
3355
3388
|
|
|
@@ -3616,23 +3649,23 @@
|
|
|
3616
3649
|
|
|
3617
3650
|
var PathUtils = /*#__PURE__*/Object.freeze({
|
|
3618
3651
|
__proto__: null,
|
|
3619
|
-
getAvgSegment: getAvgSegment,
|
|
3620
|
-
getAvgSegment2: getAvgSegment2,
|
|
3621
|
-
getDirectedArcPresenceTest: getDirectedArcPresenceTest,
|
|
3622
|
-
getArcPresenceTest: getArcPresenceTest,
|
|
3623
|
-
countArcsInShapes: countArcsInShapes,
|
|
3624
|
-
getPathBounds: getPathBounds,
|
|
3625
|
-
findShapesByArcId: findShapesByArcId,
|
|
3626
|
-
reversePath: reversePath,
|
|
3627
3652
|
clampIntervalByPct: clampIntervalByPct,
|
|
3653
|
+
countArcsInShapes: countArcsInShapes,
|
|
3654
|
+
filterEmptyArcs: filterEmptyArcs,
|
|
3628
3655
|
findNextRemovableVertex: findNextRemovableVertex,
|
|
3656
|
+
findShapesByArcId: findShapesByArcId,
|
|
3629
3657
|
forEachArcId: forEachArcId,
|
|
3630
|
-
forEachSegmentInShape: forEachSegmentInShape,
|
|
3631
3658
|
forEachSegmentInPath: forEachSegmentInPath,
|
|
3632
|
-
|
|
3633
|
-
|
|
3659
|
+
forEachSegmentInShape: forEachSegmentInShape,
|
|
3660
|
+
getArcPresenceTest: getArcPresenceTest,
|
|
3661
|
+
getAvgSegment: getAvgSegment,
|
|
3662
|
+
getAvgSegment2: getAvgSegment2,
|
|
3663
|
+
getDirectedArcPresenceTest: getDirectedArcPresenceTest,
|
|
3664
|
+
getPathBounds: getPathBounds,
|
|
3634
3665
|
getPathMetadata: getPathMetadata,
|
|
3635
|
-
quantizeArcs: quantizeArcs
|
|
3666
|
+
quantizeArcs: quantizeArcs,
|
|
3667
|
+
reversePath: reversePath,
|
|
3668
|
+
traversePaths: traversePaths
|
|
3636
3669
|
});
|
|
3637
3670
|
|
|
3638
3671
|
// Utility functions for both paths and points
|
|
@@ -3709,26 +3742,12 @@
|
|
|
3709
3742
|
__proto__: null,
|
|
3710
3743
|
cloneShape: cloneShape,
|
|
3711
3744
|
cloneShapes: cloneShapes,
|
|
3712
|
-
forEachShapePart: forEachShapePart,
|
|
3713
|
-
editShapes: editShapes,
|
|
3714
3745
|
editShapeParts: editShapeParts,
|
|
3715
|
-
|
|
3746
|
+
editShapes: editShapes,
|
|
3747
|
+
findMaxPartCount: findMaxPartCount,
|
|
3748
|
+
forEachShapePart: forEachShapePart
|
|
3716
3749
|
});
|
|
3717
3750
|
|
|
3718
|
-
// Several dependencies are loaded via require() ... this module returns a
|
|
3719
|
-
// stub function when require() does not exist as a global function,
|
|
3720
|
-
// to avoid runtime errors (this should only happen in some tests when single
|
|
3721
|
-
// modules are imported)
|
|
3722
|
-
var f;
|
|
3723
|
-
if (typeof require == 'function') {
|
|
3724
|
-
f = require;
|
|
3725
|
-
} else {
|
|
3726
|
-
f = function() {
|
|
3727
|
-
// console.error('Unable to load module', name);
|
|
3728
|
-
};
|
|
3729
|
-
}
|
|
3730
|
-
var require$1 = f;
|
|
3731
|
-
|
|
3732
3751
|
var iconv = require$1('iconv-lite');
|
|
3733
3752
|
|
|
3734
3753
|
// import iconv from 'iconv-lite';
|
|
@@ -3873,19 +3892,19 @@
|
|
|
3873
3892
|
|
|
3874
3893
|
var Encodings = /*#__PURE__*/Object.freeze({
|
|
3875
3894
|
__proto__: null,
|
|
3876
|
-
getEncodings: getEncodings,
|
|
3877
|
-
validateEncoding: validateEncoding,
|
|
3878
|
-
stringsAreAscii: stringsAreAscii,
|
|
3879
|
-
stringIsAscii: stringIsAscii,
|
|
3880
|
-
encodingIsUtf8: encodingIsUtf8,
|
|
3881
|
-
encodingIsAsciiCompat: encodingIsAsciiCompat,
|
|
3882
|
-
standardizeEncodingName: standardizeEncodingName,
|
|
3883
3895
|
bufferToString: bufferToString,
|
|
3884
|
-
encodeString: encodeString,
|
|
3885
3896
|
decodeString: decodeString,
|
|
3897
|
+
encodeString: encodeString,
|
|
3898
|
+
encodingIsAsciiCompat: encodingIsAsciiCompat,
|
|
3886
3899
|
encodingIsSupported: encodingIsSupported,
|
|
3900
|
+
encodingIsUtf8: encodingIsUtf8,
|
|
3901
|
+
getEncodings: getEncodings,
|
|
3902
|
+
printEncodings: printEncodings,
|
|
3903
|
+
standardizeEncodingName: standardizeEncodingName,
|
|
3904
|
+
stringIsAscii: stringIsAscii,
|
|
3905
|
+
stringsAreAscii: stringsAreAscii,
|
|
3887
3906
|
trimBOM: trimBOM,
|
|
3888
|
-
|
|
3907
|
+
validateEncoding: validateEncoding
|
|
3889
3908
|
});
|
|
3890
3909
|
|
|
3891
3910
|
// Not a general-purpose deep copy function
|
|
@@ -4129,21 +4148,21 @@
|
|
|
4129
4148
|
|
|
4130
4149
|
var DataUtils = /*#__PURE__*/Object.freeze({
|
|
4131
4150
|
__proto__: null,
|
|
4151
|
+
applyFieldOrder: applyFieldOrder,
|
|
4132
4152
|
copyRecord: copyRecord,
|
|
4133
|
-
|
|
4134
|
-
fixInconsistentFields: fixInconsistentFields,
|
|
4153
|
+
deleteFields: deleteFields,
|
|
4135
4154
|
fieldListContainsAll: fieldListContainsAll,
|
|
4155
|
+
findFieldNames: findFieldNames,
|
|
4156
|
+
fixInconsistentFields: fixInconsistentFields,
|
|
4136
4157
|
getColumnType: getColumnType,
|
|
4137
|
-
deleteFields: deleteFields,
|
|
4138
|
-
isInvalidFieldName: isInvalidFieldName,
|
|
4139
|
-
getUniqFieldNames: getUniqFieldNames,
|
|
4140
4158
|
getFieldValues: getFieldValues,
|
|
4141
|
-
getUniqFieldValues: getUniqFieldValues,
|
|
4142
|
-
applyFieldOrder: applyFieldOrder,
|
|
4143
4159
|
getFirstNonEmptyRecord: getFirstNonEmptyRecord,
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4160
|
+
getInputParser: getInputParser,
|
|
4161
|
+
getUniqFieldNames: getUniqFieldNames,
|
|
4162
|
+
getUniqFieldValues: getUniqFieldValues,
|
|
4163
|
+
getValueType: getValueType,
|
|
4164
|
+
isInvalidFieldName: isInvalidFieldName,
|
|
4165
|
+
parseUnknownType: parseUnknownType
|
|
4147
4166
|
});
|
|
4148
4167
|
|
|
4149
4168
|
function DataTable(obj) {
|
|
@@ -4265,8 +4284,8 @@
|
|
|
4265
4284
|
|
|
4266
4285
|
var RectangleUtils = /*#__PURE__*/Object.freeze({
|
|
4267
4286
|
__proto__: null,
|
|
4268
|
-
|
|
4269
|
-
|
|
4287
|
+
bboxToCoords: bboxToCoords,
|
|
4288
|
+
pathIsRectangle: pathIsRectangle
|
|
4270
4289
|
});
|
|
4271
4290
|
|
|
4272
4291
|
// Insert a column of values into a (new or existing) data field
|
|
@@ -4567,42 +4586,42 @@
|
|
|
4567
4586
|
|
|
4568
4587
|
var LayerUtils = /*#__PURE__*/Object.freeze({
|
|
4569
4588
|
__proto__: null,
|
|
4570
|
-
|
|
4589
|
+
copyLayer: copyLayer,
|
|
4590
|
+
copyLayerShapes: copyLayerShapes,
|
|
4591
|
+
countArcsInLayers: countArcsInLayers,
|
|
4592
|
+
countMultiPartFeatures: countMultiPartFeatures,
|
|
4593
|
+
deleteFeatureById: deleteFeatureById,
|
|
4594
|
+
divideFeaturesByType: divideFeaturesByType,
|
|
4595
|
+
filterPathLayerByArcIds: filterPathLayerByArcIds,
|
|
4596
|
+
getArcPresenceTest2: getArcPresenceTest2,
|
|
4597
|
+
getFeatureCount: getFeatureCount,
|
|
4598
|
+
getLayerBounds: getLayerBounds,
|
|
4571
4599
|
getLayerDataTable: getLayerDataTable,
|
|
4600
|
+
getLayerSourceFile: getLayerSourceFile,
|
|
4601
|
+
getOutputLayer: getOutputLayer,
|
|
4602
|
+
initDataTable: initDataTable,
|
|
4603
|
+
insertFieldValues: insertFieldValues,
|
|
4604
|
+
isolateLayer: isolateLayer,
|
|
4572
4605
|
layerHasAttributeData: layerHasAttributeData,
|
|
4573
|
-
layerHasNonNullData: layerHasNonNullData,
|
|
4574
4606
|
layerHasGeometry: layerHasGeometry,
|
|
4575
|
-
|
|
4607
|
+
layerHasNonNullData: layerHasNonNullData,
|
|
4608
|
+
layerHasNonNullShapes: layerHasNonNullShapes,
|
|
4576
4609
|
layerHasPaths: layerHasPaths,
|
|
4577
4610
|
layerHasPoints: layerHasPoints,
|
|
4611
|
+
layerIsEmpty: layerIsEmpty,
|
|
4612
|
+
layerIsGeometric: layerIsGeometric,
|
|
4578
4613
|
layerIsRectangle: layerIsRectangle,
|
|
4579
4614
|
layerOnlyHasRectangles: layerOnlyHasRectangles,
|
|
4580
|
-
|
|
4581
|
-
deleteFeatureById: deleteFeatureById,
|
|
4582
|
-
transformPointsInLayer: transformPointsInLayer,
|
|
4583
|
-
getFeatureCount: getFeatureCount,
|
|
4584
|
-
layerIsEmpty: layerIsEmpty,
|
|
4615
|
+
layerTypeMessage: layerTypeMessage,
|
|
4585
4616
|
requireDataField: requireDataField,
|
|
4586
4617
|
requireDataFields: requireDataFields,
|
|
4587
|
-
|
|
4618
|
+
requirePathLayer: requirePathLayer,
|
|
4588
4619
|
requirePointLayer: requirePointLayer,
|
|
4589
|
-
requireSinglePointLayer: requireSinglePointLayer,
|
|
4590
|
-
requirePolylineLayer: requirePolylineLayer,
|
|
4591
4620
|
requirePolygonLayer: requirePolygonLayer,
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
divideFeaturesByType: divideFeaturesByType,
|
|
4595
|
-
getOutputLayer: getOutputLayer,
|
|
4621
|
+
requirePolylineLayer: requirePolylineLayer,
|
|
4622
|
+
requireSinglePointLayer: requireSinglePointLayer,
|
|
4596
4623
|
setOutputLayerName: setOutputLayerName,
|
|
4597
|
-
|
|
4598
|
-
filterPathLayerByArcIds: filterPathLayerByArcIds,
|
|
4599
|
-
copyLayerShapes: copyLayerShapes,
|
|
4600
|
-
countMultiPartFeatures: countMultiPartFeatures,
|
|
4601
|
-
getArcPresenceTest2: getArcPresenceTest2,
|
|
4602
|
-
countArcsInLayers: countArcsInLayers,
|
|
4603
|
-
getLayerBounds: getLayerBounds,
|
|
4604
|
-
isolateLayer: isolateLayer,
|
|
4605
|
-
initDataTable: initDataTable
|
|
4624
|
+
transformPointsInLayer: transformPointsInLayer
|
|
4606
4625
|
});
|
|
4607
4626
|
|
|
4608
4627
|
// A matrix class that supports affine transformations (scaling, translation, rotation).
|
|
@@ -4819,7 +4838,7 @@
|
|
|
4819
4838
|
var AK = {
|
|
4820
4839
|
name: 'AK',
|
|
4821
4840
|
proj: '+proj=aea +lat_1=55 +lat_2=70 +lat_0=65 +lon_0=-148 +x_0=0 +y_0=0',
|
|
4822
|
-
bbox: [-172.26,50.89,-127
|
|
4841
|
+
bbox: [-172.26,50.89,-127,73.21],
|
|
4823
4842
|
origin: [-152, 63],
|
|
4824
4843
|
placement: [-1882782,-969242],
|
|
4825
4844
|
scale: 0.37
|
|
@@ -4827,7 +4846,7 @@
|
|
|
4827
4846
|
var HI = {
|
|
4828
4847
|
name: 'HI',
|
|
4829
4848
|
proj: '+proj=aea +lat_1=19 +lat_2=24 +lat_0=20.9 +lon_0=-156.5 +x_0=0 +y_0=0',
|
|
4830
|
-
bbox: [-160.
|
|
4849
|
+
bbox: [-160.5,18.72,-154.57,22.58],
|
|
4831
4850
|
origin: [-157, 21],
|
|
4832
4851
|
placement: [-1050326,-1055362]
|
|
4833
4852
|
};
|
|
@@ -4904,9 +4923,9 @@
|
|
|
4904
4923
|
|
|
4905
4924
|
var CustomProjections = /*#__PURE__*/Object.freeze({
|
|
4906
4925
|
__proto__: null,
|
|
4907
|
-
parseCustomProjection: parseCustomProjection,
|
|
4908
4926
|
AlbersUSA: AlbersUSA,
|
|
4909
|
-
parseCustomParams: parseCustomParams
|
|
4927
|
+
parseCustomParams: parseCustomParams,
|
|
4928
|
+
parseCustomProjection: parseCustomProjection
|
|
4910
4929
|
});
|
|
4911
4930
|
|
|
4912
4931
|
function getWorldBounds(e) {
|
|
@@ -4934,10 +4953,10 @@
|
|
|
4934
4953
|
|
|
4935
4954
|
var LatLon = /*#__PURE__*/Object.freeze({
|
|
4936
4955
|
__proto__: null,
|
|
4937
|
-
getWorldBounds: getWorldBounds,
|
|
4938
|
-
probablyDecimalDegreeBounds: probablyDecimalDegreeBounds,
|
|
4939
4956
|
clampToWorldBounds: clampToWorldBounds,
|
|
4940
|
-
getAntimeridian: getAntimeridian
|
|
4957
|
+
getAntimeridian: getAntimeridian,
|
|
4958
|
+
getWorldBounds: getWorldBounds,
|
|
4959
|
+
probablyDecimalDegreeBounds: probablyDecimalDegreeBounds
|
|
4941
4960
|
});
|
|
4942
4961
|
|
|
4943
4962
|
var mproj = require$1('mproj');
|
|
@@ -5252,37 +5271,37 @@
|
|
|
5252
5271
|
|
|
5253
5272
|
var Projections = /*#__PURE__*/Object.freeze({
|
|
5254
5273
|
__proto__: null,
|
|
5255
|
-
initProjLibrary: initProjLibrary,
|
|
5256
|
-
setProjectionLoader: setProjectionLoader,
|
|
5257
|
-
findProjLibs: findProjLibs,
|
|
5258
|
-
getProjTransform: getProjTransform,
|
|
5259
|
-
getProjTransform2: getProjTransform2,
|
|
5260
|
-
toLngLat: toLngLat,
|
|
5261
|
-
projectPoint: projectPoint,
|
|
5262
|
-
getProjInfo: getProjInfo,
|
|
5263
|
-
crsToProj4: crsToProj4,
|
|
5264
|
-
crsToPrj: crsToPrj,
|
|
5265
5274
|
crsAreEqual: crsAreEqual,
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5275
|
+
crsToPrj: crsToPrj,
|
|
5276
|
+
crsToProj4: crsToProj4,
|
|
5277
|
+
findProjLibs: findProjLibs,
|
|
5269
5278
|
getCrsInfo: getCrsInfo,
|
|
5270
|
-
parseCrsString: parseCrsString,
|
|
5271
|
-
requireProjectedDataset: requireProjectedDataset,
|
|
5272
|
-
setDatasetCrsInfo: setDatasetCrsInfo,
|
|
5273
|
-
getDatasetCrsInfo: getDatasetCrsInfo,
|
|
5274
5279
|
getDatasetCRS: getDatasetCRS,
|
|
5275
|
-
|
|
5280
|
+
getDatasetCrsInfo: getDatasetCrsInfo,
|
|
5281
|
+
getProjDefn: getProjDefn,
|
|
5282
|
+
getProjInfo: getProjInfo,
|
|
5283
|
+
getProjTransform: getProjTransform,
|
|
5284
|
+
getProjTransform2: getProjTransform2,
|
|
5276
5285
|
getScaleFactorAtXY: getScaleFactorAtXY,
|
|
5277
|
-
|
|
5286
|
+
initProjLibrary: initProjLibrary,
|
|
5278
5287
|
isInvertibleCRS: isInvertibleCRS,
|
|
5279
5288
|
isLatLngCRS: isLatLngCRS,
|
|
5289
|
+
isLatLngDataset: isLatLngDataset,
|
|
5290
|
+
isProjAlias: isProjAlias,
|
|
5291
|
+
isProjectedCRS: isProjectedCRS,
|
|
5280
5292
|
isWGS84: isWGS84,
|
|
5281
5293
|
isWebMercator: isWebMercator,
|
|
5282
|
-
|
|
5294
|
+
looksLikeProj4String: looksLikeProj4String,
|
|
5295
|
+
parseCrsString: parseCrsString,
|
|
5296
|
+
parsePrj: parsePrj,
|
|
5283
5297
|
printProjections: printProjections,
|
|
5284
|
-
|
|
5285
|
-
|
|
5298
|
+
projectPoint: projectPoint,
|
|
5299
|
+
requireDatasetsHaveCompatibleCRS: requireDatasetsHaveCompatibleCRS,
|
|
5300
|
+
requireProjectedDataset: requireProjectedDataset,
|
|
5301
|
+
setDatasetCrsInfo: setDatasetCrsInfo,
|
|
5302
|
+
setProjectionLoader: setProjectionLoader,
|
|
5303
|
+
toLngLat: toLngLat,
|
|
5304
|
+
translatePrj: translatePrj
|
|
5286
5305
|
});
|
|
5287
5306
|
|
|
5288
5307
|
// Coordinate iterators
|
|
@@ -5396,7 +5415,6 @@
|
|
|
5396
5415
|
}
|
|
5397
5416
|
|
|
5398
5417
|
function MultiShapeIter(arcs) {
|
|
5399
|
-
new ShapeIter(arcs);
|
|
5400
5418
|
|
|
5401
5419
|
}
|
|
5402
5420
|
|
|
@@ -5449,10 +5467,10 @@
|
|
|
5449
5467
|
|
|
5450
5468
|
var ShapeIter$1 = /*#__PURE__*/Object.freeze({
|
|
5451
5469
|
__proto__: null,
|
|
5452
|
-
PointIter: PointIter,
|
|
5453
5470
|
ArcIter: ArcIter,
|
|
5454
5471
|
FilteredArcIter: FilteredArcIter,
|
|
5455
5472
|
MultiShapeIter: MultiShapeIter,
|
|
5473
|
+
PointIter: PointIter,
|
|
5456
5474
|
ShapeIter: ShapeIter
|
|
5457
5475
|
});
|
|
5458
5476
|
|
|
@@ -5501,8 +5519,8 @@
|
|
|
5501
5519
|
|
|
5502
5520
|
var SimplifyPct = /*#__PURE__*/Object.freeze({
|
|
5503
5521
|
__proto__: null,
|
|
5504
|
-
|
|
5505
|
-
|
|
5522
|
+
getThresholdByPct: getThresholdByPct,
|
|
5523
|
+
getThresholdFunction: getThresholdFunction
|
|
5506
5524
|
});
|
|
5507
5525
|
|
|
5508
5526
|
// An interface for managing a collection of paths.
|
|
@@ -6546,8 +6564,8 @@
|
|
|
6546
6564
|
|
|
6547
6565
|
var Topology = /*#__PURE__*/Object.freeze({
|
|
6548
6566
|
__proto__: null,
|
|
6549
|
-
|
|
6550
|
-
|
|
6567
|
+
buildPathTopology: buildPathTopology,
|
|
6568
|
+
buildTopology: buildTopology
|
|
6551
6569
|
});
|
|
6552
6570
|
|
|
6553
6571
|
// Merge arcs from one or more source datasets into target dataset
|
|
@@ -6691,12 +6709,12 @@
|
|
|
6691
6709
|
|
|
6692
6710
|
var Merging = /*#__PURE__*/Object.freeze({
|
|
6693
6711
|
__proto__: null,
|
|
6694
|
-
|
|
6695
|
-
mergeDatasetsForExport: mergeDatasetsForExport,
|
|
6712
|
+
mergeArcs: mergeArcs,
|
|
6696
6713
|
mergeCommandTargets: mergeCommandTargets,
|
|
6697
|
-
mergeDatasets: mergeDatasets,
|
|
6698
6714
|
mergeDatasetInfo: mergeDatasetInfo$1,
|
|
6699
|
-
|
|
6715
|
+
mergeDatasets: mergeDatasets,
|
|
6716
|
+
mergeDatasetsForExport: mergeDatasetsForExport,
|
|
6717
|
+
mergeDatasetsIntoDataset: mergeDatasetsIntoDataset
|
|
6700
6718
|
});
|
|
6701
6719
|
|
|
6702
6720
|
// Test if the second endpoint of an arc is the endpoint of any path in any layer
|
|
@@ -7345,22 +7363,22 @@
|
|
|
7345
7363
|
|
|
7346
7364
|
var DatasetUtils = /*#__PURE__*/Object.freeze({
|
|
7347
7365
|
__proto__: null,
|
|
7348
|
-
|
|
7349
|
-
mergeDatasetInfo: mergeDatasetInfo,
|
|
7350
|
-
copyDatasetInfo: copyDatasetInfo,
|
|
7351
|
-
splitApartLayers: splitApartLayers,
|
|
7366
|
+
cleanupArcs: cleanupArcs,
|
|
7352
7367
|
copyDataset: copyDataset,
|
|
7353
7368
|
copyDatasetForExport: copyDatasetForExport,
|
|
7354
7369
|
copyDatasetForRenaming: copyDatasetForRenaming,
|
|
7355
|
-
|
|
7356
|
-
datasetIsEmpty: datasetIsEmpty,
|
|
7370
|
+
copyDatasetInfo: copyDatasetInfo,
|
|
7357
7371
|
datasetHasGeometry: datasetHasGeometry,
|
|
7358
7372
|
datasetHasPaths: datasetHasPaths,
|
|
7359
|
-
|
|
7373
|
+
datasetIsEmpty: datasetIsEmpty,
|
|
7374
|
+
getDatasetBounds: getDatasetBounds,
|
|
7375
|
+
mergeDatasetInfo: mergeDatasetInfo,
|
|
7376
|
+
mergeOutputLayerIntoDataset: mergeOutputLayerIntoDataset,
|
|
7360
7377
|
pruneArcs: pruneArcs,
|
|
7361
|
-
replaceLayers: replaceLayers,
|
|
7362
7378
|
replaceLayerContents: replaceLayerContents,
|
|
7363
|
-
|
|
7379
|
+
replaceLayers: replaceLayers,
|
|
7380
|
+
splitApartLayers: splitApartLayers,
|
|
7381
|
+
splitDataset: splitDataset,
|
|
7364
7382
|
transformPoints: transformPoints
|
|
7365
7383
|
});
|
|
7366
7384
|
|
|
@@ -7440,14 +7458,14 @@
|
|
|
7440
7458
|
|
|
7441
7459
|
var FilenameUtils = /*#__PURE__*/Object.freeze({
|
|
7442
7460
|
__proto__: null,
|
|
7443
|
-
|
|
7461
|
+
getCommonFileBase: getCommonFileBase,
|
|
7444
7462
|
getFileBase: getFileBase,
|
|
7445
7463
|
getFileExtension: getFileExtension,
|
|
7464
|
+
getOutputFileBase: getOutputFileBase,
|
|
7446
7465
|
getPathBase: getPathBase,
|
|
7466
|
+
parseLocalPath: parseLocalPath,
|
|
7447
7467
|
replaceFileExtension: replaceFileExtension,
|
|
7448
|
-
toLowerCaseExtension: toLowerCaseExtension
|
|
7449
|
-
getCommonFileBase: getCommonFileBase,
|
|
7450
|
-
getOutputFileBase: getOutputFileBase
|
|
7468
|
+
toLowerCaseExtension: toLowerCaseExtension
|
|
7451
7469
|
});
|
|
7452
7470
|
|
|
7453
7471
|
var decoder;
|
|
@@ -7627,13 +7645,7 @@
|
|
|
7627
7645
|
currentStructures.length = sharedLength;
|
|
7628
7646
|
}
|
|
7629
7647
|
let result;
|
|
7630
|
-
if (currentUnpackr.randomAccessStructure && src[position$1] < 0x40 && src[position$1] >= 0x20 && readStruct)
|
|
7631
|
-
result = readStruct(src, position$1, srcEnd, currentUnpackr);
|
|
7632
|
-
src = null; // dispose of this so that recursive unpack calls don't save state
|
|
7633
|
-
if (!(options && options.lazy) && result)
|
|
7634
|
-
result = result.toJSON();
|
|
7635
|
-
position$1 = srcEnd;
|
|
7636
|
-
} else
|
|
7648
|
+
if (currentUnpackr.randomAccessStructure && src[position$1] < 0x40 && src[position$1] >= 0x20 && readStruct) ; else
|
|
7637
7649
|
result = read();
|
|
7638
7650
|
if (bundledStrings$1) { // bundled strings to skip past
|
|
7639
7651
|
position$1 = bundledStrings$1.postBundlePosition;
|
|
@@ -8475,7 +8487,7 @@
|
|
|
8475
8487
|
else if (data.length == 12)// TODO: Implement support for negative
|
|
8476
8488
|
return new Date(
|
|
8477
8489
|
((data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3]) / 1000000 +
|
|
8478
|
-
(((data[4] & 0x80) ? -
|
|
8490
|
+
(((data[4] & 0x80) ? -281474976710656 : 0) + data[6] * 0x10000000000 + data[7] * 0x100000000 + data[8] * 0x1000000 + (data[9] << 16) + (data[10] << 8) + data[11]) * 1000)
|
|
8479
8491
|
else
|
|
8480
8492
|
return new Date('invalid')
|
|
8481
8493
|
}; // notepack defines extension 0 to mean undefined, so use that as the default here
|
|
@@ -8892,12 +8904,12 @@
|
|
|
8892
8904
|
position += 4;
|
|
8893
8905
|
}
|
|
8894
8906
|
} else if (value >> 0 === value) { // negative integer
|
|
8895
|
-
if (value >= -
|
|
8907
|
+
if (value >= -32) {
|
|
8896
8908
|
target[position++] = 0x100 + value;
|
|
8897
|
-
} else if (value >= -
|
|
8909
|
+
} else if (value >= -128) {
|
|
8898
8910
|
target[position++] = 0xd0;
|
|
8899
8911
|
target[position++] = value + 0x100;
|
|
8900
|
-
} else if (value >= -
|
|
8912
|
+
} else if (value >= -32768) {
|
|
8901
8913
|
target[position++] = 0xd1;
|
|
8902
8914
|
targetView.setInt16(position, value);
|
|
8903
8915
|
position += 2;
|
|
@@ -8908,7 +8920,7 @@
|
|
|
8908
8920
|
}
|
|
8909
8921
|
} else {
|
|
8910
8922
|
let useFloat32;
|
|
8911
|
-
if ((useFloat32 = this.useFloat32) > 0 && value < 0x100000000 && value >= -
|
|
8923
|
+
if ((useFloat32 = this.useFloat32) > 0 && value < 0x100000000 && value >= -2147483648) {
|
|
8912
8924
|
target[position++] = 0xca;
|
|
8913
8925
|
targetView.setFloat32(position, value);
|
|
8914
8926
|
let xShifted;
|
|
@@ -9615,11 +9627,10 @@
|
|
|
9615
9627
|
});
|
|
9616
9628
|
|
|
9617
9629
|
// aliases for shorter compressed code (most minifers don't do this)
|
|
9618
|
-
var u8 = Uint8Array, u16 = Uint16Array,
|
|
9630
|
+
var u8 = Uint8Array, u16 = Uint16Array, i32 = Int32Array;
|
|
9619
9631
|
// fixed length extra bits
|
|
9620
9632
|
var fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);
|
|
9621
9633
|
// fixed distance extra bits
|
|
9622
|
-
// see fleb note
|
|
9623
9634
|
var fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);
|
|
9624
9635
|
// code length index map
|
|
9625
9636
|
var clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
|
|
@@ -9630,26 +9641,26 @@
|
|
|
9630
9641
|
b[i] = start += 1 << eb[i - 1];
|
|
9631
9642
|
}
|
|
9632
9643
|
// numbers here are at max 18 bits
|
|
9633
|
-
var r = new
|
|
9644
|
+
var r = new i32(b[30]);
|
|
9634
9645
|
for (var i = 1; i < 30; ++i) {
|
|
9635
9646
|
for (var j = b[i]; j < b[i + 1]; ++j) {
|
|
9636
9647
|
r[j] = ((j - b[i]) << 5) | i;
|
|
9637
9648
|
}
|
|
9638
9649
|
}
|
|
9639
|
-
return
|
|
9650
|
+
return { b: b, r: r };
|
|
9640
9651
|
};
|
|
9641
|
-
var _a = freb(fleb, 2), fl = _a
|
|
9652
|
+
var _a = freb(fleb, 2), fl = _a.b, revfl = _a.r;
|
|
9642
9653
|
// we can ignore the fact that the other numbers are wrong; they never happen anyway
|
|
9643
9654
|
fl[28] = 258, revfl[258] = 28;
|
|
9644
|
-
var _b = freb(fdeb, 0), fd = _b
|
|
9655
|
+
var _b = freb(fdeb, 0), fd = _b.b, revfd = _b.r;
|
|
9645
9656
|
// map of value to reverse (assuming 16 bits)
|
|
9646
9657
|
var rev = new u16(32768);
|
|
9647
9658
|
for (var i = 0; i < 32768; ++i) {
|
|
9648
9659
|
// reverse table algorithm from SO
|
|
9649
|
-
var x = ((i & 0xAAAA)
|
|
9650
|
-
x = ((x & 0xCCCC)
|
|
9651
|
-
x = ((x & 0xF0F0)
|
|
9652
|
-
rev[i] = (((x & 0xFF00)
|
|
9660
|
+
var x = ((i & 0xAAAA) >> 1) | ((i & 0x5555) << 1);
|
|
9661
|
+
x = ((x & 0xCCCC) >> 2) | ((x & 0x3333) << 2);
|
|
9662
|
+
x = ((x & 0xF0F0) >> 4) | ((x & 0x0F0F) << 4);
|
|
9663
|
+
rev[i] = (((x & 0xFF00) >> 8) | ((x & 0x00FF) << 8)) >> 1;
|
|
9653
9664
|
}
|
|
9654
9665
|
// create huffman tree from u8 "map": index -> code length for code index
|
|
9655
9666
|
// mb (max bits) must be at most 15
|
|
@@ -9667,7 +9678,7 @@
|
|
|
9667
9678
|
}
|
|
9668
9679
|
// u16 "map": index -> minimum code for bit length = index
|
|
9669
9680
|
var le = new u16(mb);
|
|
9670
|
-
for (i =
|
|
9681
|
+
for (i = 1; i < mb; ++i) {
|
|
9671
9682
|
le[i] = (le[i - 1] + l[i - 1]) << 1;
|
|
9672
9683
|
}
|
|
9673
9684
|
var co;
|
|
@@ -9688,7 +9699,7 @@
|
|
|
9688
9699
|
// m is end value
|
|
9689
9700
|
for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {
|
|
9690
9701
|
// every 16 bit value starting with the code yields the same result
|
|
9691
|
-
co[rev[v]
|
|
9702
|
+
co[rev[v] >> rvb] = sv;
|
|
9692
9703
|
}
|
|
9693
9704
|
}
|
|
9694
9705
|
}
|
|
@@ -9697,7 +9708,7 @@
|
|
|
9697
9708
|
co = new u16(s);
|
|
9698
9709
|
for (i = 0; i < s; ++i) {
|
|
9699
9710
|
if (cd[i]) {
|
|
9700
|
-
co[i] = rev[le[cd[i] - 1]++]
|
|
9711
|
+
co[i] = rev[le[cd[i] - 1]++] >> (15 - cd[i]);
|
|
9701
9712
|
}
|
|
9702
9713
|
}
|
|
9703
9714
|
}
|
|
@@ -9750,9 +9761,7 @@
|
|
|
9750
9761
|
if (e == null || e > v.length)
|
|
9751
9762
|
e = v.length;
|
|
9752
9763
|
// can't use .constructor in case user-supplied
|
|
9753
|
-
|
|
9754
|
-
n.set(v.subarray(s, e));
|
|
9755
|
-
return n;
|
|
9764
|
+
return new u8(v.subarray(s, e));
|
|
9756
9765
|
};
|
|
9757
9766
|
// error codes
|
|
9758
9767
|
var ec = [
|
|
@@ -9782,19 +9791,18 @@
|
|
|
9782
9791
|
return e;
|
|
9783
9792
|
};
|
|
9784
9793
|
// expands raw DEFLATE data
|
|
9785
|
-
var inflt = function (dat, buf,
|
|
9786
|
-
// source length
|
|
9787
|
-
var sl = dat.length;
|
|
9788
|
-
if (!sl ||
|
|
9794
|
+
var inflt = function (dat, st, buf, dict) {
|
|
9795
|
+
// source length dict length
|
|
9796
|
+
var sl = dat.length, dl = dict ? dict.length : 0;
|
|
9797
|
+
if (!sl || st.f && !st.l)
|
|
9789
9798
|
return buf || new u8(0);
|
|
9799
|
+
var noBuf = !buf;
|
|
9790
9800
|
// have to estimate size
|
|
9791
|
-
var
|
|
9801
|
+
var resize = noBuf || st.i != 2;
|
|
9792
9802
|
// no state
|
|
9793
|
-
var noSt =
|
|
9794
|
-
if (!st)
|
|
9795
|
-
st = {};
|
|
9803
|
+
var noSt = st.i;
|
|
9796
9804
|
// Assumes roughly 33% compression ratio average
|
|
9797
|
-
if (
|
|
9805
|
+
if (noBuf)
|
|
9798
9806
|
buf = new u8(sl * 3);
|
|
9799
9807
|
// ensure buffer can fit at least l elements
|
|
9800
9808
|
var cbuf = function (l) {
|
|
@@ -9827,7 +9835,7 @@
|
|
|
9827
9835
|
break;
|
|
9828
9836
|
}
|
|
9829
9837
|
// ensure size
|
|
9830
|
-
if (
|
|
9838
|
+
if (resize)
|
|
9831
9839
|
cbuf(bt + l);
|
|
9832
9840
|
// Copy over uncompressed data
|
|
9833
9841
|
buf.set(dat.subarray(s, t), bt);
|
|
@@ -9860,7 +9868,7 @@
|
|
|
9860
9868
|
// bits read
|
|
9861
9869
|
pos += r & 15;
|
|
9862
9870
|
// symbol
|
|
9863
|
-
var s = r
|
|
9871
|
+
var s = r >> 4;
|
|
9864
9872
|
// code length to copy
|
|
9865
9873
|
if (s < 16) {
|
|
9866
9874
|
ldt[i++] = s;
|
|
@@ -9896,14 +9904,14 @@
|
|
|
9896
9904
|
}
|
|
9897
9905
|
}
|
|
9898
9906
|
// Make sure the buffer can hold this + the largest possible addition
|
|
9899
|
-
// Maximum chunk size (practically, theoretically infinite) is 2^17
|
|
9900
|
-
if (
|
|
9907
|
+
// Maximum chunk size (practically, theoretically infinite) is 2^17
|
|
9908
|
+
if (resize)
|
|
9901
9909
|
cbuf(bt + 131072);
|
|
9902
9910
|
var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;
|
|
9903
9911
|
var lpos = pos;
|
|
9904
9912
|
for (;; lpos = pos) {
|
|
9905
9913
|
// bits read, code
|
|
9906
|
-
var c = lm[bits16(dat, pos) & lms], sym = c
|
|
9914
|
+
var c = lm[bits16(dat, pos) & lms], sym = c >> 4;
|
|
9907
9915
|
pos += c & 15;
|
|
9908
9916
|
if (pos > tbts) {
|
|
9909
9917
|
if (noSt)
|
|
@@ -9928,52 +9936,55 @@
|
|
|
9928
9936
|
pos += b;
|
|
9929
9937
|
}
|
|
9930
9938
|
// dist
|
|
9931
|
-
var d = dm[bits16(dat, pos) & dms], dsym = d
|
|
9939
|
+
var d = dm[bits16(dat, pos) & dms], dsym = d >> 4;
|
|
9932
9940
|
if (!d)
|
|
9933
9941
|
err(3);
|
|
9934
9942
|
pos += d & 15;
|
|
9935
9943
|
var dt = fd[dsym];
|
|
9936
9944
|
if (dsym > 3) {
|
|
9937
9945
|
var b = fdeb[dsym];
|
|
9938
|
-
dt += bits16(dat, pos) & (
|
|
9946
|
+
dt += bits16(dat, pos) & (1 << b) - 1, pos += b;
|
|
9939
9947
|
}
|
|
9940
9948
|
if (pos > tbts) {
|
|
9941
9949
|
if (noSt)
|
|
9942
9950
|
err(0);
|
|
9943
9951
|
break;
|
|
9944
9952
|
}
|
|
9945
|
-
if (
|
|
9953
|
+
if (resize)
|
|
9946
9954
|
cbuf(bt + 131072);
|
|
9947
9955
|
var end = bt + add;
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9952
|
-
|
|
9956
|
+
if (bt < dt) {
|
|
9957
|
+
var shift = dl - dt, dend = Math.min(dt, end);
|
|
9958
|
+
if (shift + bt < 0)
|
|
9959
|
+
err(3);
|
|
9960
|
+
for (; bt < dend; ++bt)
|
|
9961
|
+
buf[bt] = dict[shift + bt];
|
|
9953
9962
|
}
|
|
9954
|
-
bt
|
|
9963
|
+
for (; bt < end; ++bt)
|
|
9964
|
+
buf[bt] = buf[bt - dt];
|
|
9955
9965
|
}
|
|
9956
9966
|
}
|
|
9957
9967
|
st.l = lm, st.p = lpos, st.b = bt, st.f = final;
|
|
9958
9968
|
if (lm)
|
|
9959
9969
|
final = 1, st.m = lbt, st.d = dm, st.n = dbt;
|
|
9960
9970
|
} while (!final);
|
|
9961
|
-
|
|
9971
|
+
// don't reallocate for streams or user buffers
|
|
9972
|
+
return bt != buf.length && noBuf ? slc(buf, 0, bt) : buf.subarray(0, bt);
|
|
9962
9973
|
};
|
|
9963
9974
|
// starting at p, write the minimum number of bits that can hold v to d
|
|
9964
9975
|
var wbits = function (d, p, v) {
|
|
9965
9976
|
v <<= p & 7;
|
|
9966
9977
|
var o = (p / 8) | 0;
|
|
9967
9978
|
d[o] |= v;
|
|
9968
|
-
d[o + 1] |= v
|
|
9979
|
+
d[o + 1] |= v >> 8;
|
|
9969
9980
|
};
|
|
9970
9981
|
// starting at p, write the minimum number of bits (>8) that can hold v to d
|
|
9971
9982
|
var wbits16 = function (d, p, v) {
|
|
9972
9983
|
v <<= p & 7;
|
|
9973
9984
|
var o = (p / 8) | 0;
|
|
9974
9985
|
d[o] |= v;
|
|
9975
|
-
d[o + 1] |= v
|
|
9976
|
-
d[o + 2] |= v
|
|
9986
|
+
d[o + 1] |= v >> 8;
|
|
9987
|
+
d[o + 2] |= v >> 16;
|
|
9977
9988
|
};
|
|
9978
9989
|
// creates code lengths from a frequency table
|
|
9979
9990
|
var hTree = function (d, mb) {
|
|
@@ -9986,11 +9997,11 @@
|
|
|
9986
9997
|
var s = t.length;
|
|
9987
9998
|
var t2 = t.slice();
|
|
9988
9999
|
if (!s)
|
|
9989
|
-
return
|
|
10000
|
+
return { t: et, l: 0 };
|
|
9990
10001
|
if (s == 1) {
|
|
9991
10002
|
var v = new u8(t[0].s + 1);
|
|
9992
10003
|
v[t[0].s] = 1;
|
|
9993
|
-
return
|
|
10004
|
+
return { t: v, l: 1 };
|
|
9994
10005
|
}
|
|
9995
10006
|
t.sort(function (a, b) { return a.f - b.f; });
|
|
9996
10007
|
// after i2 reaches last ind, will be stopped
|
|
@@ -10034,7 +10045,7 @@
|
|
|
10034
10045
|
else
|
|
10035
10046
|
break;
|
|
10036
10047
|
}
|
|
10037
|
-
dt
|
|
10048
|
+
dt >>= lft;
|
|
10038
10049
|
while (dt > 0) {
|
|
10039
10050
|
var i2_2 = t2[i].s;
|
|
10040
10051
|
if (tr[i2_2] < mb)
|
|
@@ -10051,7 +10062,7 @@
|
|
|
10051
10062
|
}
|
|
10052
10063
|
mbt = mb;
|
|
10053
10064
|
}
|
|
10054
|
-
return
|
|
10065
|
+
return { t: new u8(tr), l: mbt };
|
|
10055
10066
|
};
|
|
10056
10067
|
// get the max length and assign length codes
|
|
10057
10068
|
var ln = function (n, l, d) {
|
|
@@ -10094,7 +10105,7 @@
|
|
|
10094
10105
|
cln = c[i];
|
|
10095
10106
|
}
|
|
10096
10107
|
}
|
|
10097
|
-
return
|
|
10108
|
+
return { c: cl.subarray(0, cli), n: s };
|
|
10098
10109
|
};
|
|
10099
10110
|
// calculate the length of output from tree, code lengths
|
|
10100
10111
|
var clen = function (cf, cl) {
|
|
@@ -10110,7 +10121,7 @@
|
|
|
10110
10121
|
var s = dat.length;
|
|
10111
10122
|
var o = shft(pos + 2);
|
|
10112
10123
|
out[o] = s & 255;
|
|
10113
|
-
out[o + 1] = s
|
|
10124
|
+
out[o + 1] = s >> 8;
|
|
10114
10125
|
out[o + 2] = out[o] ^ 255;
|
|
10115
10126
|
out[o + 3] = out[o + 1] ^ 255;
|
|
10116
10127
|
for (var i = 0; i < s; ++i)
|
|
@@ -10121,23 +10132,23 @@
|
|
|
10121
10132
|
var wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {
|
|
10122
10133
|
wbits(out, p++, final);
|
|
10123
10134
|
++lf[256];
|
|
10124
|
-
var _a = hTree(lf, 15), dlt = _a
|
|
10125
|
-
var _b = hTree(df, 15), ddt = _b
|
|
10126
|
-
var _c = lc(dlt), lclt = _c
|
|
10127
|
-
var _d = lc(ddt), lcdt = _d
|
|
10135
|
+
var _a = hTree(lf, 15), dlt = _a.t, mlb = _a.l;
|
|
10136
|
+
var _b = hTree(df, 15), ddt = _b.t, mdb = _b.l;
|
|
10137
|
+
var _c = lc(dlt), lclt = _c.c, nlc = _c.n;
|
|
10138
|
+
var _d = lc(ddt), lcdt = _d.c, ndc = _d.n;
|
|
10128
10139
|
var lcfreq = new u16(19);
|
|
10129
10140
|
for (var i = 0; i < lclt.length; ++i)
|
|
10130
|
-
lcfreq[lclt[i] & 31]
|
|
10141
|
+
++lcfreq[lclt[i] & 31];
|
|
10131
10142
|
for (var i = 0; i < lcdt.length; ++i)
|
|
10132
|
-
lcfreq[lcdt[i] & 31]
|
|
10133
|
-
var _e = hTree(lcfreq, 7), lct = _e
|
|
10143
|
+
++lcfreq[lcdt[i] & 31];
|
|
10144
|
+
var _e = hTree(lcfreq, 7), lct = _e.t, mlcb = _e.l;
|
|
10134
10145
|
var nlcc = 19;
|
|
10135
10146
|
for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)
|
|
10136
10147
|
;
|
|
10137
10148
|
var flen = (bl + 5) << 3;
|
|
10138
10149
|
var ftlen = clen(lf, flt) + clen(df, fdt) + eb;
|
|
10139
|
-
var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) +
|
|
10140
|
-
if (flen <= ftlen && flen <= dtlen)
|
|
10150
|
+
var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + 2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18];
|
|
10151
|
+
if (bs >= 0 && flen <= ftlen && flen <= dtlen)
|
|
10141
10152
|
return wfblk(out, p, dat.subarray(bs, bs + bl));
|
|
10142
10153
|
var lm, ll, dm, dl;
|
|
10143
10154
|
wbits(out, p, 1 + (dtlen < ftlen)), p += 2;
|
|
@@ -10158,7 +10169,7 @@
|
|
|
10158
10169
|
var len = clct[i] & 31;
|
|
10159
10170
|
wbits(out, p, llm[len]), p += lct[len];
|
|
10160
10171
|
if (len > 15)
|
|
10161
|
-
wbits(out, p, (clct[i]
|
|
10172
|
+
wbits(out, p, (clct[i] >> 5) & 127), p += clct[i] >> 12;
|
|
10162
10173
|
}
|
|
10163
10174
|
}
|
|
10164
10175
|
}
|
|
@@ -10166,63 +10177,55 @@
|
|
|
10166
10177
|
lm = flm, ll = flt, dm = fdm, dl = fdt;
|
|
10167
10178
|
}
|
|
10168
10179
|
for (var i = 0; i < li; ++i) {
|
|
10169
|
-
|
|
10170
|
-
|
|
10180
|
+
var sym = syms[i];
|
|
10181
|
+
if (sym > 255) {
|
|
10182
|
+
var len = (sym >> 18) & 31;
|
|
10171
10183
|
wbits16(out, p, lm[len + 257]), p += ll[len + 257];
|
|
10172
10184
|
if (len > 7)
|
|
10173
|
-
wbits(out, p, (
|
|
10174
|
-
var dst =
|
|
10185
|
+
wbits(out, p, (sym >> 23) & 31), p += fleb[len];
|
|
10186
|
+
var dst = sym & 31;
|
|
10175
10187
|
wbits16(out, p, dm[dst]), p += dl[dst];
|
|
10176
10188
|
if (dst > 3)
|
|
10177
|
-
wbits16(out, p, (
|
|
10189
|
+
wbits16(out, p, (sym >> 5) & 8191), p += fdeb[dst];
|
|
10178
10190
|
}
|
|
10179
10191
|
else {
|
|
10180
|
-
wbits16(out, p, lm[
|
|
10192
|
+
wbits16(out, p, lm[sym]), p += ll[sym];
|
|
10181
10193
|
}
|
|
10182
10194
|
}
|
|
10183
10195
|
wbits16(out, p, lm[256]);
|
|
10184
10196
|
return p + ll[256];
|
|
10185
10197
|
};
|
|
10186
10198
|
// deflate options (nice << 13) | chain
|
|
10187
|
-
var deo = /*#__PURE__*/ new
|
|
10199
|
+
var deo = /*#__PURE__*/ new i32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);
|
|
10188
10200
|
// empty
|
|
10189
10201
|
var et = /*#__PURE__*/ new u8(0);
|
|
10190
10202
|
// compresses data into a raw DEFLATE buffer
|
|
10191
|
-
var dflt = function (dat, lvl, plvl, pre, post,
|
|
10192
|
-
var s = dat.length;
|
|
10203
|
+
var dflt = function (dat, lvl, plvl, pre, post, st) {
|
|
10204
|
+
var s = st.z || dat.length;
|
|
10193
10205
|
var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);
|
|
10194
10206
|
// writing to this writes to the output buffer
|
|
10195
10207
|
var w = o.subarray(pre, o.length - post);
|
|
10196
|
-
var
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
if (e >= s) {
|
|
10202
|
-
// write final block
|
|
10203
|
-
w[pos >> 3] = lst;
|
|
10204
|
-
}
|
|
10205
|
-
pos = wfblk(w, pos + 1, dat.subarray(i, e));
|
|
10206
|
-
}
|
|
10207
|
-
}
|
|
10208
|
-
else {
|
|
10208
|
+
var lst = st.l;
|
|
10209
|
+
var pos = (st.r || 0) & 7;
|
|
10210
|
+
if (lvl) {
|
|
10211
|
+
if (pos)
|
|
10212
|
+
w[0] = st.r >> 3;
|
|
10209
10213
|
var opt = deo[lvl - 1];
|
|
10210
|
-
var n = opt
|
|
10214
|
+
var n = opt >> 13, c = opt & 8191;
|
|
10211
10215
|
var msk_1 = (1 << plvl) - 1;
|
|
10212
10216
|
// prev 2-byte val map curr 2-byte val map
|
|
10213
|
-
var prev = new u16(32768), head = new u16(msk_1 + 1);
|
|
10217
|
+
var prev = st.p || new u16(32768), head = st.h || new u16(msk_1 + 1);
|
|
10214
10218
|
var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;
|
|
10215
10219
|
var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };
|
|
10216
10220
|
// 24576 is an arbitrary number of maximum symbols per block
|
|
10217
10221
|
// 424 buffer for last block
|
|
10218
|
-
var syms = new
|
|
10222
|
+
var syms = new i32(25000);
|
|
10219
10223
|
// length/literal freq distance freq
|
|
10220
10224
|
var lf = new u16(288), df = new u16(32);
|
|
10221
|
-
// l/lcnt exbits index
|
|
10222
|
-
var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;
|
|
10223
|
-
for (; i < s; ++i) {
|
|
10225
|
+
// l/lcnt exbits index l/lind waitdx blkpos
|
|
10226
|
+
var lc_1 = 0, eb = 0, i = st.i || 0, li = 0, wi = st.w || 0, bs = 0;
|
|
10227
|
+
for (; i + 2 < s; ++i) {
|
|
10224
10228
|
// hash value
|
|
10225
|
-
// deopt when i > s - 3 - at end, deopt acceptable
|
|
10226
10229
|
var hv = hsh(i);
|
|
10227
10230
|
// index mod 32768 previous index mod
|
|
10228
10231
|
var imod = i & 32767, pimod = head[hv];
|
|
@@ -10233,7 +10236,7 @@
|
|
|
10233
10236
|
if (wi <= i) {
|
|
10234
10237
|
// bytes remaining
|
|
10235
10238
|
var rem = s - i;
|
|
10236
|
-
if ((lc_1 > 7000 || li > 24576) && rem > 423) {
|
|
10239
|
+
if ((lc_1 > 7000 || li > 24576) && (rem > 423 || !lst)) {
|
|
10237
10240
|
pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);
|
|
10238
10241
|
li = lc_1 = eb = 0, bs = i;
|
|
10239
10242
|
for (var j = 0; j < 286; ++j)
|
|
@@ -10242,7 +10245,7 @@
|
|
|
10242
10245
|
df[j] = 0;
|
|
10243
10246
|
}
|
|
10244
10247
|
// len dist chain
|
|
10245
|
-
var l = 2, d = 0, ch_1 = c, dif =
|
|
10248
|
+
var l = 2, d = 0, ch_1 = c, dif = imod - pimod & 32767;
|
|
10246
10249
|
if (rem > 2 && hv == hsh(i - dif)) {
|
|
10247
10250
|
var maxn = Math.min(n, rem) - 1;
|
|
10248
10251
|
var maxd = Math.min(32767, i);
|
|
@@ -10265,9 +10268,9 @@
|
|
|
10265
10268
|
var mmd = Math.min(dif, nl - 2);
|
|
10266
10269
|
var md = 0;
|
|
10267
10270
|
for (var j = 0; j < mmd; ++j) {
|
|
10268
|
-
var ti =
|
|
10271
|
+
var ti = i - dif + j & 32767;
|
|
10269
10272
|
var pti = prev[ti];
|
|
10270
|
-
var cd =
|
|
10273
|
+
var cd = ti - pti & 32767;
|
|
10271
10274
|
if (cd > md)
|
|
10272
10275
|
md = cd, pimod = ti;
|
|
10273
10276
|
}
|
|
@@ -10275,12 +10278,12 @@
|
|
|
10275
10278
|
}
|
|
10276
10279
|
// check the previous match
|
|
10277
10280
|
imod = pimod, pimod = prev[imod];
|
|
10278
|
-
dif +=
|
|
10281
|
+
dif += imod - pimod & 32767;
|
|
10279
10282
|
}
|
|
10280
10283
|
}
|
|
10281
10284
|
// d will be nonzero only when a match was found
|
|
10282
10285
|
if (d) {
|
|
10283
|
-
// store both dist and len data in one
|
|
10286
|
+
// store both dist and len data in one int32
|
|
10284
10287
|
// Make sure this is recognized as a len/dist with 28th bit (2^28)
|
|
10285
10288
|
syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];
|
|
10286
10289
|
var lin = revfl[l] & 31, din = revfd[d] & 31;
|
|
@@ -10296,10 +10299,30 @@
|
|
|
10296
10299
|
}
|
|
10297
10300
|
}
|
|
10298
10301
|
}
|
|
10302
|
+
for (i = Math.max(i, wi); i < s; ++i) {
|
|
10303
|
+
syms[li++] = dat[i];
|
|
10304
|
+
++lf[dat[i]];
|
|
10305
|
+
}
|
|
10299
10306
|
pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
pos
|
|
10307
|
+
if (!lst) {
|
|
10308
|
+
st.r = (pos & 7) | w[(pos / 8) | 0] << 3;
|
|
10309
|
+
// shft(pos) now 1 less if pos & 7 != 0
|
|
10310
|
+
pos -= 7;
|
|
10311
|
+
st.h = head, st.p = prev, st.i = i, st.w = wi;
|
|
10312
|
+
}
|
|
10313
|
+
}
|
|
10314
|
+
else {
|
|
10315
|
+
for (var i = st.w || 0; i < s + lst; i += 65535) {
|
|
10316
|
+
// end
|
|
10317
|
+
var e = i + 65535;
|
|
10318
|
+
if (e >= s) {
|
|
10319
|
+
// write final block
|
|
10320
|
+
w[(pos / 8) | 0] = lst;
|
|
10321
|
+
e = s;
|
|
10322
|
+
}
|
|
10323
|
+
pos = wfblk(w, pos + 1, dat.subarray(i, e));
|
|
10324
|
+
}
|
|
10325
|
+
st.i = s;
|
|
10303
10326
|
}
|
|
10304
10327
|
return slc(o, 0, pre + shft(pos) + post);
|
|
10305
10328
|
};
|
|
@@ -10330,7 +10353,18 @@
|
|
|
10330
10353
|
};
|
|
10331
10354
|
// deflate with opts
|
|
10332
10355
|
var dopt = function (dat, opt, pre, post, st) {
|
|
10333
|
-
|
|
10356
|
+
if (!st) {
|
|
10357
|
+
st = { l: 1 };
|
|
10358
|
+
if (opt.dictionary) {
|
|
10359
|
+
var dict = opt.dictionary.subarray(-32768);
|
|
10360
|
+
var newDat = new u8(dict.length + dat.length);
|
|
10361
|
+
newDat.set(dict);
|
|
10362
|
+
newDat.set(dat, dict.length);
|
|
10363
|
+
dat = newDat;
|
|
10364
|
+
st.w = dict.length;
|
|
10365
|
+
}
|
|
10366
|
+
}
|
|
10367
|
+
return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? (st.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : 20) : (12 + opt.mem), pre, post, st);
|
|
10334
10368
|
};
|
|
10335
10369
|
// Walmart object spread
|
|
10336
10370
|
var mrg = function (a, b) {
|
|
@@ -10375,7 +10409,7 @@
|
|
|
10375
10409
|
else
|
|
10376
10410
|
td[k] = v;
|
|
10377
10411
|
}
|
|
10378
|
-
return
|
|
10412
|
+
return fnStr;
|
|
10379
10413
|
};
|
|
10380
10414
|
var ch = [];
|
|
10381
10415
|
// clone bufs
|
|
@@ -10390,27 +10424,29 @@
|
|
|
10390
10424
|
};
|
|
10391
10425
|
// use a worker to execute code
|
|
10392
10426
|
var wrkr = function (fns, init, id, cb) {
|
|
10393
|
-
var _a;
|
|
10394
10427
|
if (!ch[id]) {
|
|
10395
10428
|
var fnStr = '', td_1 = {}, m = fns.length - 1;
|
|
10396
10429
|
for (var i = 0; i < m; ++i)
|
|
10397
|
-
|
|
10398
|
-
ch[id] = wcln(fns[m], fnStr, td_1);
|
|
10430
|
+
fnStr = wcln(fns[i], fnStr, td_1);
|
|
10431
|
+
ch[id] = { c: wcln(fns[m], fnStr, td_1), e: td_1 };
|
|
10399
10432
|
}
|
|
10400
|
-
var td = mrg({}, ch[id]
|
|
10401
|
-
return wk(ch[id]
|
|
10433
|
+
var td = mrg({}, ch[id].e);
|
|
10434
|
+
return wk(ch[id].c + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);
|
|
10402
10435
|
};
|
|
10403
10436
|
// base async inflate fn
|
|
10404
|
-
var bInflt = function () { return [u8, u16,
|
|
10405
|
-
var bDflt = function () { return [u8, u16,
|
|
10437
|
+
var bInflt = function () { return [u8, u16, i32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gopt]; };
|
|
10438
|
+
var bDflt = function () { return [u8, u16, i32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };
|
|
10406
10439
|
// gzip extra
|
|
10407
10440
|
var gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };
|
|
10408
10441
|
// gunzip extra
|
|
10409
10442
|
var guze = function () { return [gzs, gzl]; };
|
|
10410
10443
|
// post buf
|
|
10411
10444
|
var pbf = function (msg) { return postMessage(msg, [msg.buffer]); };
|
|
10412
|
-
// get
|
|
10413
|
-
var
|
|
10445
|
+
// get opts
|
|
10446
|
+
var gopt = function (o) { return o && {
|
|
10447
|
+
out: o.size && new u8(o.size),
|
|
10448
|
+
dictionary: o.dictionary
|
|
10449
|
+
}; };
|
|
10414
10450
|
// async helper
|
|
10415
10451
|
var cbify = function (dat, opts, fns, init, id, cb) {
|
|
10416
10452
|
var w = wrkr(fns, init, id, function (err, dat) {
|
|
@@ -10450,7 +10486,7 @@
|
|
|
10450
10486
|
var flg = d[3];
|
|
10451
10487
|
var st = 10;
|
|
10452
10488
|
if (flg & 4)
|
|
10453
|
-
st += d[10] |
|
|
10489
|
+
st += (d[10] | d[11] << 8) + 2;
|
|
10454
10490
|
for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])
|
|
10455
10491
|
;
|
|
10456
10492
|
return st + (flg & 2);
|
|
@@ -10458,10 +10494,10 @@
|
|
|
10458
10494
|
// gzip length
|
|
10459
10495
|
var gzl = function (d) {
|
|
10460
10496
|
var l = d.length;
|
|
10461
|
-
return (
|
|
10497
|
+
return (d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16 | d[l - 1] << 24) >>> 0;
|
|
10462
10498
|
};
|
|
10463
10499
|
// gzip header length
|
|
10464
|
-
var gzhl = function (o) { return 10 + (
|
|
10500
|
+
var gzhl = function (o) { return 10 + (o.filename ? o.filename.length + 1 : 0); };
|
|
10465
10501
|
function deflate(data, opts, cb) {
|
|
10466
10502
|
if (!cb)
|
|
10467
10503
|
cb = opts, opts = {};
|
|
@@ -10487,16 +10523,16 @@
|
|
|
10487
10523
|
err(7);
|
|
10488
10524
|
return cbify(data, opts, [
|
|
10489
10525
|
bInflt
|
|
10490
|
-
], function (ev) { return pbf(inflateSync(ev.data[0],
|
|
10526
|
+
], function (ev) { return pbf(inflateSync(ev.data[0], gopt(ev.data[1]))); }, 1, cb);
|
|
10491
10527
|
}
|
|
10492
10528
|
/**
|
|
10493
10529
|
* Expands DEFLATE data with no wrapper
|
|
10494
10530
|
* @param data The data to decompress
|
|
10495
|
-
* @param
|
|
10531
|
+
* @param opts The decompression options
|
|
10496
10532
|
* @returns The decompressed version of the data
|
|
10497
10533
|
*/
|
|
10498
|
-
function inflateSync(data,
|
|
10499
|
-
return inflt(data, out);
|
|
10534
|
+
function inflateSync(data, opts) {
|
|
10535
|
+
return inflt(data, { i: 2 }, opts && opts.out, opts && opts.dictionary);
|
|
10500
10536
|
}
|
|
10501
10537
|
function gzip(data, opts, cb) {
|
|
10502
10538
|
if (!cb)
|
|
@@ -10532,16 +10568,19 @@
|
|
|
10532
10568
|
bInflt,
|
|
10533
10569
|
guze,
|
|
10534
10570
|
function () { return [gunzipSync$1]; }
|
|
10535
|
-
], function (ev) { return pbf(gunzipSync$1(ev.data[0])); }, 3, cb);
|
|
10571
|
+
], function (ev) { return pbf(gunzipSync$1(ev.data[0], ev.data[1])); }, 3, cb);
|
|
10536
10572
|
}
|
|
10537
10573
|
/**
|
|
10538
10574
|
* Expands GZIP data
|
|
10539
10575
|
* @param data The data to decompress
|
|
10540
|
-
* @param
|
|
10576
|
+
* @param opts The decompression options
|
|
10541
10577
|
* @returns The decompressed version of the data
|
|
10542
10578
|
*/
|
|
10543
|
-
function gunzipSync$1(data,
|
|
10544
|
-
|
|
10579
|
+
function gunzipSync$1(data, opts) {
|
|
10580
|
+
var st = gzs(data);
|
|
10581
|
+
if (st + 8 > data.length)
|
|
10582
|
+
err(6, 'invalid gzip data');
|
|
10583
|
+
return inflt(data.subarray(st, -8), { i: 2 }, opts && opts.out || new u8(gzl(data)), opts && opts.dictionary);
|
|
10545
10584
|
}
|
|
10546
10585
|
// flatten a directory structure
|
|
10547
10586
|
var fltn = function (d, p, t, o) {
|
|
@@ -10574,7 +10613,7 @@
|
|
|
10574
10613
|
var c = d[i++];
|
|
10575
10614
|
var eb = (c > 127) + (c > 223) + (c > 239);
|
|
10576
10615
|
if (i + eb > d.length)
|
|
10577
|
-
return
|
|
10616
|
+
return { s: r, r: slc(d, i - 1) };
|
|
10578
10617
|
if (!eb)
|
|
10579
10618
|
r += String.fromCharCode(c);
|
|
10580
10619
|
else if (eb == 3) {
|
|
@@ -10595,12 +10634,7 @@
|
|
|
10595
10634
|
* @returns The string encoded in UTF-8/Latin-1 binary
|
|
10596
10635
|
*/
|
|
10597
10636
|
function strToU8(str, latin1) {
|
|
10598
|
-
|
|
10599
|
-
var ar_1 = new u8(str.length);
|
|
10600
|
-
for (var i = 0; i < str.length; ++i)
|
|
10601
|
-
ar_1[i] = str.charCodeAt(i);
|
|
10602
|
-
return ar_1;
|
|
10603
|
-
}
|
|
10637
|
+
var i;
|
|
10604
10638
|
if (te)
|
|
10605
10639
|
return te.encode(str);
|
|
10606
10640
|
var l = str.length;
|
|
@@ -10640,13 +10674,14 @@
|
|
|
10640
10674
|
r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));
|
|
10641
10675
|
return r;
|
|
10642
10676
|
}
|
|
10643
|
-
else if (td)
|
|
10677
|
+
else if (td) {
|
|
10644
10678
|
return td.decode(dat);
|
|
10679
|
+
}
|
|
10645
10680
|
else {
|
|
10646
|
-
var _a = dutf8(dat),
|
|
10647
|
-
if (
|
|
10681
|
+
var _a = dutf8(dat), s = _a.s, r = _a.r;
|
|
10682
|
+
if (r.length)
|
|
10648
10683
|
err(8);
|
|
10649
|
-
return
|
|
10684
|
+
return s;
|
|
10650
10685
|
}
|
|
10651
10686
|
}
|
|
10652
10687
|
// skip local zip header
|
|
@@ -10689,7 +10724,7 @@
|
|
|
10689
10724
|
var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;
|
|
10690
10725
|
if (y < 0 || y > 119)
|
|
10691
10726
|
err(10);
|
|
10692
|
-
wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds()
|
|
10727
|
+
wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >> 1)), b += 4;
|
|
10693
10728
|
if (c != -1) {
|
|
10694
10729
|
wbytes(d, b, f.crc);
|
|
10695
10730
|
wbytes(d, b + 4, c < 0 ? -c - 2 : c);
|
|
@@ -10929,9 +10964,10 @@
|
|
|
10929
10964
|
cbl(null, slc(data, b, b + sc));
|
|
10930
10965
|
else if (c_1 == 8) {
|
|
10931
10966
|
var infl = data.subarray(b, b + sc);
|
|
10932
|
-
|
|
10967
|
+
// Synchronously decompress under 512KB, or barely-compressed data
|
|
10968
|
+
if (su < 524288 || sc > 0.8 * su) {
|
|
10933
10969
|
try {
|
|
10934
|
-
cbl(null, inflateSync(infl, new u8(su)));
|
|
10970
|
+
cbl(null, inflateSync(infl, { out: new u8(su) }));
|
|
10935
10971
|
}
|
|
10936
10972
|
catch (e) {
|
|
10937
10973
|
cbl(e, null);
|
|
@@ -10994,7 +11030,7 @@
|
|
|
10994
11030
|
if (!c_2)
|
|
10995
11031
|
files[fn] = slc(data, b, b + sc);
|
|
10996
11032
|
else if (c_2 == 8)
|
|
10997
|
-
files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));
|
|
11033
|
+
files[fn] = inflateSync(data.subarray(b, b + sc), { out: new u8(su) });
|
|
10998
11034
|
else
|
|
10999
11035
|
err(14, 'unknown compression type ' + c_2);
|
|
11000
11036
|
}
|
|
@@ -11062,11 +11098,11 @@
|
|
|
11062
11098
|
|
|
11063
11099
|
var Gzip = /*#__PURE__*/Object.freeze({
|
|
11064
11100
|
__proto__: null,
|
|
11065
|
-
isGzipped: isGzipped,
|
|
11066
|
-
gzipSync: gzipSync,
|
|
11067
|
-
gzipAsync: gzipAsync,
|
|
11068
11101
|
gunzipAsync: gunzipAsync,
|
|
11069
|
-
gunzipSync: gunzipSync
|
|
11102
|
+
gunzipSync: gunzipSync,
|
|
11103
|
+
gzipAsync: gzipAsync,
|
|
11104
|
+
gzipSync: gzipSync,
|
|
11105
|
+
isGzipped: isGzipped
|
|
11070
11106
|
});
|
|
11071
11107
|
|
|
11072
11108
|
// Export in a column-first format
|
|
@@ -11310,12 +11346,12 @@
|
|
|
11310
11346
|
var Pack = /*#__PURE__*/Object.freeze({
|
|
11311
11347
|
__proto__: null,
|
|
11312
11348
|
PACKAGE_EXT: PACKAGE_EXT,
|
|
11313
|
-
exportPackedDatasets: exportPackedDatasets,
|
|
11314
|
-
pack: pack,
|
|
11315
|
-
exportDatasetsToPack: exportDatasetsToPack,
|
|
11316
|
-
exportDataset: exportDataset,
|
|
11317
11349
|
compressSnapshotForExport: compressSnapshotForExport,
|
|
11318
|
-
|
|
11350
|
+
exportDataset: exportDataset,
|
|
11351
|
+
exportDatasetsToPack: exportDatasetsToPack,
|
|
11352
|
+
exportInfo: exportInfo,
|
|
11353
|
+
exportPackedDatasets: exportPackedDatasets,
|
|
11354
|
+
pack: pack
|
|
11319
11355
|
});
|
|
11320
11356
|
|
|
11321
11357
|
// Guess the type of a data file from file extension, or return null if not sure
|
|
@@ -11440,24 +11476,24 @@
|
|
|
11440
11476
|
|
|
11441
11477
|
var FileTypes = /*#__PURE__*/Object.freeze({
|
|
11442
11478
|
__proto__: null,
|
|
11443
|
-
|
|
11444
|
-
|
|
11479
|
+
couldBeDsvFile: couldBeDsvFile,
|
|
11480
|
+
filenameIsUnsupportedOutputType: filenameIsUnsupportedOutputType,
|
|
11481
|
+
getFormatName: getFormatName,
|
|
11445
11482
|
guessInputContentType: guessInputContentType,
|
|
11483
|
+
guessInputFileType: guessInputFileType,
|
|
11446
11484
|
guessInputType: guessInputType,
|
|
11447
|
-
|
|
11448
|
-
stringLooksLikeKML: stringLooksLikeKML,
|
|
11449
|
-
couldBeDsvFile: couldBeDsvFile,
|
|
11450
|
-
looksLikeImportableFile: looksLikeImportableFile,
|
|
11451
|
-
looksLikeContentFile: looksLikeContentFile,
|
|
11452
|
-
isPackageFile: isPackageFile,
|
|
11453
|
-
isZipFile: isZipFile,
|
|
11454
|
-
isKmzFile: isKmzFile,
|
|
11485
|
+
isAuxiliaryInputFileType: isAuxiliaryInputFileType,
|
|
11455
11486
|
isGzipFile: isGzipFile,
|
|
11456
|
-
isSupportedOutputFormat: isSupportedOutputFormat,
|
|
11457
|
-
getFormatName: getFormatName,
|
|
11458
|
-
isSupportedBinaryInputType: isSupportedBinaryInputType,
|
|
11459
11487
|
isImportableAsBinary: isImportableAsBinary,
|
|
11460
|
-
|
|
11488
|
+
isKmzFile: isKmzFile,
|
|
11489
|
+
isPackageFile: isPackageFile,
|
|
11490
|
+
isSupportedBinaryInputType: isSupportedBinaryInputType,
|
|
11491
|
+
isSupportedOutputFormat: isSupportedOutputFormat,
|
|
11492
|
+
isZipFile: isZipFile,
|
|
11493
|
+
looksLikeContentFile: looksLikeContentFile,
|
|
11494
|
+
looksLikeImportableFile: looksLikeImportableFile,
|
|
11495
|
+
stringLooksLikeJSON: stringLooksLikeJSON,
|
|
11496
|
+
stringLooksLikeKML: stringLooksLikeKML
|
|
11461
11497
|
});
|
|
11462
11498
|
|
|
11463
11499
|
// input: A file path or a buffer
|
|
@@ -11565,11 +11601,11 @@
|
|
|
11565
11601
|
|
|
11566
11602
|
var Zip = /*#__PURE__*/Object.freeze({
|
|
11567
11603
|
__proto__: null,
|
|
11568
|
-
|
|
11604
|
+
isImportableZipPath: isImportableZipPath,
|
|
11569
11605
|
unzipAsync: unzipAsync,
|
|
11570
|
-
|
|
11606
|
+
unzipSync: unzipSync,
|
|
11571
11607
|
zipAsync: zipAsync,
|
|
11572
|
-
|
|
11608
|
+
zipSync: zipSync
|
|
11573
11609
|
});
|
|
11574
11610
|
|
|
11575
11611
|
var cli = {};
|
|
@@ -11797,9 +11833,9 @@
|
|
|
11797
11833
|
|
|
11798
11834
|
var FileExport = /*#__PURE__*/Object.freeze({
|
|
11799
11835
|
__proto__: null,
|
|
11800
|
-
|
|
11836
|
+
getOutputPaths: getOutputPaths,
|
|
11801
11837
|
replaceWriteFiles: replaceWriteFiles,
|
|
11802
|
-
|
|
11838
|
+
writeFiles: writeFiles
|
|
11803
11839
|
});
|
|
11804
11840
|
|
|
11805
11841
|
// Returns a search function
|
|
@@ -12501,8 +12537,8 @@
|
|
|
12501
12537
|
|
|
12502
12538
|
var PathExport = /*#__PURE__*/Object.freeze({
|
|
12503
12539
|
__proto__: null,
|
|
12504
|
-
|
|
12505
|
-
|
|
12540
|
+
exportPathData: exportPathData,
|
|
12541
|
+
exportPointData: exportPointData
|
|
12506
12542
|
});
|
|
12507
12543
|
|
|
12508
12544
|
function stringifyAsNDJSON(o) {
|
|
@@ -12540,8 +12576,8 @@
|
|
|
12540
12576
|
|
|
12541
12577
|
var Stringify = /*#__PURE__*/Object.freeze({
|
|
12542
12578
|
__proto__: null,
|
|
12543
|
-
|
|
12544
|
-
|
|
12579
|
+
getFormattedStringify: getFormattedStringify,
|
|
12580
|
+
stringifyAsNDJSON: stringifyAsNDJSON
|
|
12545
12581
|
});
|
|
12546
12582
|
|
|
12547
12583
|
function isValidArc(arcId, arcs) {
|
|
@@ -12662,8 +12698,8 @@
|
|
|
12662
12698
|
|
|
12663
12699
|
var PathfinderUtils = /*#__PURE__*/Object.freeze({
|
|
12664
12700
|
__proto__: null,
|
|
12665
|
-
|
|
12666
|
-
|
|
12701
|
+
chooseRighthandVector: chooseRighthandVector,
|
|
12702
|
+
getRightmostArc: getRightmostArc
|
|
12667
12703
|
});
|
|
12668
12704
|
|
|
12669
12705
|
var FWD_USED = 0x8;
|
|
@@ -12681,9 +12717,9 @@
|
|
|
12681
12717
|
var idx = absArcId(arcId), // get index of path in
|
|
12682
12718
|
mask;
|
|
12683
12719
|
if (idx == arcId) { // arcBits controls fwd path
|
|
12684
|
-
mask =
|
|
12720
|
+
mask = -4; // target fwd bits
|
|
12685
12721
|
} else { // arcBits controls rev. path
|
|
12686
|
-
mask =
|
|
12722
|
+
mask = -49; // target rev bits
|
|
12687
12723
|
arcBits = arcBits << 4; // shift code to target rev path
|
|
12688
12724
|
}
|
|
12689
12725
|
routesArr[idx] &= (arcBits | mask);
|
|
@@ -12739,7 +12775,7 @@
|
|
|
12739
12775
|
// (these arcs represent shared borders and will not be part of the dissolved path)
|
|
12740
12776
|
//
|
|
12741
12777
|
if (dissolve && (newBits & 0x22) === 0x22) {
|
|
12742
|
-
newBits &=
|
|
12778
|
+
newBits &= -18; // make invisible
|
|
12743
12779
|
}
|
|
12744
12780
|
}
|
|
12745
12781
|
|
|
@@ -12757,11 +12793,11 @@
|
|
|
12757
12793
|
closeRev = isInv ? fwd : rev;
|
|
12758
12794
|
|
|
12759
12795
|
if (closeFwd) {
|
|
12760
|
-
if (hide) mask &=
|
|
12796
|
+
if (hide) mask &= -2;
|
|
12761
12797
|
mask ^= 0x2;
|
|
12762
12798
|
}
|
|
12763
12799
|
if (closeRev) {
|
|
12764
|
-
if (hide) mask &=
|
|
12800
|
+
if (hide) mask &= -17;
|
|
12765
12801
|
mask ^= 0x20;
|
|
12766
12802
|
}
|
|
12767
12803
|
routesArr[idx] = currBits & mask;
|
|
@@ -12892,15 +12928,15 @@
|
|
|
12892
12928
|
|
|
12893
12929
|
var Pathfinder = /*#__PURE__*/Object.freeze({
|
|
12894
12930
|
__proto__: null,
|
|
12895
|
-
setBits: setBits,
|
|
12896
12931
|
andBits: andBits,
|
|
12897
|
-
|
|
12932
|
+
closeArcRoutes: closeArcRoutes,
|
|
12933
|
+
getPathFinder: getPathFinder,
|
|
12934
|
+
getRingIntersector: getRingIntersector,
|
|
12898
12935
|
getRouteBits: getRouteBits,
|
|
12899
12936
|
markPathsAsUsed: markPathsAsUsed,
|
|
12900
12937
|
openArcRoutes: openArcRoutes,
|
|
12901
|
-
|
|
12902
|
-
|
|
12903
|
-
getRingIntersector: getRingIntersector
|
|
12938
|
+
setBits: setBits,
|
|
12939
|
+
setRouteBits: setRouteBits
|
|
12904
12940
|
});
|
|
12905
12941
|
|
|
12906
12942
|
// Keep track of whether positive or negative integer ids are 'used' or not.
|
|
@@ -13233,16 +13269,16 @@
|
|
|
13233
13269
|
|
|
13234
13270
|
var SegmentIntersection = /*#__PURE__*/Object.freeze({
|
|
13235
13271
|
__proto__: null,
|
|
13236
|
-
getIntersectionPoints: getIntersectionPoints,
|
|
13237
|
-
getIntersectionLayer: getIntersectionLayer,
|
|
13238
|
-
findSegmentIntersections: findSegmentIntersections,
|
|
13239
|
-
sortIntersections: sortIntersections,
|
|
13240
|
-
dedupIntersections: dedupIntersections,
|
|
13241
|
-
calcSegmentIntersectionStripeCount2: calcSegmentIntersectionStripeCount2,
|
|
13242
13272
|
calcSegmentIntersectionStripeCount: calcSegmentIntersectionStripeCount,
|
|
13243
|
-
|
|
13273
|
+
calcSegmentIntersectionStripeCount2: calcSegmentIntersectionStripeCount2,
|
|
13274
|
+
dedupIntersections: dedupIntersections,
|
|
13275
|
+
findSegmentIntersections: findSegmentIntersections,
|
|
13276
|
+
formatIntersectingSegment: formatIntersectingSegment,
|
|
13244
13277
|
formatIntersection: formatIntersection,
|
|
13245
|
-
|
|
13278
|
+
getIntersectionLayer: getIntersectionLayer,
|
|
13279
|
+
getIntersectionPoints: getIntersectionPoints,
|
|
13280
|
+
intersectSegments: intersectSegments,
|
|
13281
|
+
sortIntersections: sortIntersections
|
|
13246
13282
|
});
|
|
13247
13283
|
|
|
13248
13284
|
function findNearestVertices(p, shp, arcs) {
|
|
@@ -13370,19 +13406,19 @@
|
|
|
13370
13406
|
|
|
13371
13407
|
var VertexUtils = /*#__PURE__*/Object.freeze({
|
|
13372
13408
|
__proto__: null,
|
|
13409
|
+
findNearestVertex: findNearestVertex,
|
|
13373
13410
|
findNearestVertices: findNearestVertices,
|
|
13374
|
-
snapVerticesToPoint: snapVerticesToPoint,
|
|
13375
|
-
snapPointToArcEndpoint: snapPointToArcEndpoint,
|
|
13376
13411
|
findVertexIds: findVertexIds,
|
|
13377
|
-
getVertexCoords: getVertexCoords,
|
|
13378
|
-
vertexIsArcEnd: vertexIsArcEnd,
|
|
13379
|
-
vertexIsArcEndpoint: vertexIsArcEndpoint,
|
|
13380
|
-
vertexIsArcStart: vertexIsArcStart,
|
|
13381
|
-
getArcStartCoords: getArcStartCoords,
|
|
13382
13412
|
getArcEndCoords: getArcEndCoords,
|
|
13383
13413
|
getArcEndpointCoords: getArcEndpointCoords,
|
|
13414
|
+
getArcStartCoords: getArcStartCoords,
|
|
13415
|
+
getVertexCoords: getVertexCoords,
|
|
13384
13416
|
setVertexCoords: setVertexCoords,
|
|
13385
|
-
|
|
13417
|
+
snapPointToArcEndpoint: snapPointToArcEndpoint,
|
|
13418
|
+
snapVerticesToPoint: snapVerticesToPoint,
|
|
13419
|
+
vertexIsArcEnd: vertexIsArcEnd,
|
|
13420
|
+
vertexIsArcEndpoint: vertexIsArcEndpoint,
|
|
13421
|
+
vertexIsArcStart: vertexIsArcStart
|
|
13386
13422
|
});
|
|
13387
13423
|
|
|
13388
13424
|
// arcs: ArcCollection containing original coordinates
|
|
@@ -13592,18 +13628,18 @@
|
|
|
13592
13628
|
|
|
13593
13629
|
var Rounding = /*#__PURE__*/Object.freeze({
|
|
13594
13630
|
__proto__: null,
|
|
13595
|
-
|
|
13596
|
-
|
|
13597
|
-
|
|
13598
|
-
roundToTenths: roundToTenths,
|
|
13599
|
-
getRoundingFunction: getRoundingFunction,
|
|
13631
|
+
fround: fround,
|
|
13632
|
+
fround2: fround2,
|
|
13633
|
+
getBinaryRoundingFunction: getBinaryRoundingFunction,
|
|
13600
13634
|
getBoundsPrecisionForDisplay: getBoundsPrecisionForDisplay,
|
|
13601
13635
|
getRoundedCoordString: getRoundedCoordString,
|
|
13602
13636
|
getRoundedCoords: getRoundedCoords,
|
|
13637
|
+
getRoundingFunction: getRoundingFunction,
|
|
13603
13638
|
roundPoints: roundPoints,
|
|
13604
|
-
|
|
13605
|
-
|
|
13606
|
-
|
|
13639
|
+
roundToDigits: roundToDigits,
|
|
13640
|
+
roundToDigits2: roundToDigits2,
|
|
13641
|
+
roundToSignificantDigits: roundToSignificantDigits,
|
|
13642
|
+
roundToTenths: roundToTenths,
|
|
13607
13643
|
setCoordinatePrecision: setCoordinatePrecision
|
|
13608
13644
|
});
|
|
13609
13645
|
|
|
@@ -13790,16 +13826,16 @@
|
|
|
13790
13826
|
|
|
13791
13827
|
var Units = /*#__PURE__*/Object.freeze({
|
|
13792
13828
|
__proto__: null,
|
|
13793
|
-
parseSizeParam: parseSizeParam,
|
|
13794
|
-
getIntervalConversionFactor: getIntervalConversionFactor,
|
|
13795
|
-
parseMeasure: parseMeasure,
|
|
13796
|
-
parseMeasure2: parseMeasure2,
|
|
13797
13829
|
convertAreaParam: convertAreaParam,
|
|
13798
13830
|
convertDistanceParam: convertDistanceParam,
|
|
13799
|
-
convertIntervalParam: convertIntervalParam,
|
|
13800
|
-
convertIntervalPair: convertIntervalPair,
|
|
13801
13831
|
convertFourSides: convertFourSides,
|
|
13802
|
-
|
|
13832
|
+
convertIntervalPair: convertIntervalPair,
|
|
13833
|
+
convertIntervalParam: convertIntervalParam,
|
|
13834
|
+
getAreaLabel: getAreaLabel,
|
|
13835
|
+
getIntervalConversionFactor: getIntervalConversionFactor,
|
|
13836
|
+
parseMeasure: parseMeasure,
|
|
13837
|
+
parseMeasure2: parseMeasure2,
|
|
13838
|
+
parseSizeParam: parseSizeParam
|
|
13803
13839
|
});
|
|
13804
13840
|
|
|
13805
13841
|
// Used by -clean -dissolve2 -filter-slivers -filter-islands to generate area filters
|
|
@@ -13915,11 +13951,11 @@
|
|
|
13915
13951
|
|
|
13916
13952
|
var Slivers = /*#__PURE__*/Object.freeze({
|
|
13917
13953
|
__proto__: null,
|
|
13918
|
-
|
|
13919
|
-
getSliverTest: getSliverTest,
|
|
13920
|
-
getSliverAreaFunction: getSliverAreaFunction,
|
|
13954
|
+
calcMaxSliverArea: calcMaxSliverArea,
|
|
13921
13955
|
getDefaultSliverThreshold: getDefaultSliverThreshold,
|
|
13922
|
-
|
|
13956
|
+
getSliverAreaFunction: getSliverAreaFunction,
|
|
13957
|
+
getSliverFilter: getSliverFilter,
|
|
13958
|
+
getSliverTest: getSliverTest
|
|
13923
13959
|
});
|
|
13924
13960
|
|
|
13925
13961
|
// Returns undefined if not found
|
|
@@ -14806,13 +14842,13 @@
|
|
|
14806
14842
|
|
|
14807
14843
|
var TargetUtils = /*#__PURE__*/Object.freeze({
|
|
14808
14844
|
__proto__: null,
|
|
14845
|
+
countTargetLayers: countTargetLayers,
|
|
14809
14846
|
expandCommandTargets: expandCommandTargets,
|
|
14810
14847
|
findCommandTargets: findCommandTargets,
|
|
14811
|
-
groupLayersByDataset: groupLayersByDataset,
|
|
14812
14848
|
findMatchingLayers: findMatchingLayers,
|
|
14813
14849
|
getLayerMatch: getLayerMatch,
|
|
14814
|
-
|
|
14815
|
-
|
|
14850
|
+
getLayerTargetId: getLayerTargetId,
|
|
14851
|
+
groupLayersByDataset: groupLayersByDataset
|
|
14816
14852
|
});
|
|
14817
14853
|
|
|
14818
14854
|
function getNullLayerProxy(targets) {
|
|
@@ -15262,10 +15298,10 @@
|
|
|
15262
15298
|
|
|
15263
15299
|
var Expressions = /*#__PURE__*/Object.freeze({
|
|
15264
15300
|
__proto__: null,
|
|
15265
|
-
getExpressionFunction: getExpressionFunction,
|
|
15266
15301
|
compileExpressionToFunction: compileExpressionToFunction,
|
|
15267
15302
|
getAssignedVars: getAssignedVars,
|
|
15268
15303
|
getBaseContext: getBaseContext,
|
|
15304
|
+
getExpressionFunction: getExpressionFunction,
|
|
15269
15305
|
nullifyUnsetProperties: nullifyUnsetProperties
|
|
15270
15306
|
});
|
|
15271
15307
|
|
|
@@ -15392,8 +15428,8 @@
|
|
|
15392
15428
|
var FeatureExpressions = /*#__PURE__*/Object.freeze({
|
|
15393
15429
|
__proto__: null,
|
|
15394
15430
|
compileFeatureExpression: compileFeatureExpression,
|
|
15395
|
-
|
|
15396
|
-
|
|
15431
|
+
compileFeaturePairExpression: compileFeaturePairExpression,
|
|
15432
|
+
compileFeaturePairFilterExpression: compileFeaturePairFilterExpression
|
|
15397
15433
|
});
|
|
15398
15434
|
|
|
15399
15435
|
function getMode(values) {
|
|
@@ -15751,8 +15787,8 @@
|
|
|
15751
15787
|
var Calc = /*#__PURE__*/Object.freeze({
|
|
15752
15788
|
__proto__: null,
|
|
15753
15789
|
applyCalcExpression: applyCalcExpression,
|
|
15754
|
-
|
|
15755
|
-
|
|
15790
|
+
compileCalcExpression: compileCalcExpression,
|
|
15791
|
+
evalCalcExpression: evalCalcExpression
|
|
15756
15792
|
});
|
|
15757
15793
|
|
|
15758
15794
|
// get function that returns an object containing calculated values
|
|
@@ -15880,9 +15916,9 @@
|
|
|
15880
15916
|
|
|
15881
15917
|
var DataAggregation = /*#__PURE__*/Object.freeze({
|
|
15882
15918
|
__proto__: null,
|
|
15919
|
+
aggregateDataRecords: aggregateDataRecords,
|
|
15883
15920
|
getCategoryClassifier: getCategoryClassifier,
|
|
15884
15921
|
getMultiFieldKeyFunction: getMultiFieldKeyFunction,
|
|
15885
|
-
aggregateDataRecords: aggregateDataRecords,
|
|
15886
15922
|
recombineDataRecords: recombineDataRecords
|
|
15887
15923
|
});
|
|
15888
15924
|
|
|
@@ -16519,7 +16555,7 @@
|
|
|
16519
16555
|
// split into two rings that touch each other where the original ring crossed itself.
|
|
16520
16556
|
//
|
|
16521
16557
|
function getSelfIntersectionSplitter(nodes) {
|
|
16522
|
-
var pathIndex = new IdTestIndex(nodes.arcs.size()
|
|
16558
|
+
var pathIndex = new IdTestIndex(nodes.arcs.size());
|
|
16523
16559
|
var filter = function(arcId) {
|
|
16524
16560
|
return pathIndex.hasId(~arcId);
|
|
16525
16561
|
};
|
|
@@ -16616,8 +16652,8 @@
|
|
|
16616
16652
|
var PathRepair = /*#__PURE__*/Object.freeze({
|
|
16617
16653
|
__proto__: null,
|
|
16618
16654
|
cleanShapes: cleanShapes,
|
|
16619
|
-
removeSpikesInPath: removeSpikesInPath,
|
|
16620
16655
|
getSelfIntersectionSplitter: getSelfIntersectionSplitter,
|
|
16656
|
+
removeSpikesInPath: removeSpikesInPath,
|
|
16621
16657
|
splitPathByIds: splitPathByIds
|
|
16622
16658
|
});
|
|
16623
16659
|
|
|
@@ -17013,14 +17049,14 @@
|
|
|
17013
17049
|
var IntersectionCuts = /*#__PURE__*/Object.freeze({
|
|
17014
17050
|
__proto__: null,
|
|
17015
17051
|
addIntersectionCuts: addIntersectionCuts,
|
|
17016
|
-
divideArcs: divideArcs,
|
|
17017
17052
|
cutPathsAtIntersections: cutPathsAtIntersections,
|
|
17018
|
-
|
|
17019
|
-
insertCutPoints: insertCutPoints,
|
|
17020
|
-
getCutPoint: getCutPoint,
|
|
17021
|
-
sortCutPoints: sortCutPoints,
|
|
17053
|
+
divideArcs: divideArcs,
|
|
17022
17054
|
filterSortedCutPoints: filterSortedCutPoints,
|
|
17023
|
-
findClippingPoints: findClippingPoints
|
|
17055
|
+
findClippingPoints: findClippingPoints,
|
|
17056
|
+
getCutPoint: getCutPoint,
|
|
17057
|
+
insertCutPoints: insertCutPoints,
|
|
17058
|
+
remapDividedArcs: remapDividedArcs,
|
|
17059
|
+
sortCutPoints: sortCutPoints
|
|
17024
17060
|
});
|
|
17025
17061
|
|
|
17026
17062
|
// Support for timing using T.start() and T.stop()
|
|
@@ -17181,8 +17217,8 @@
|
|
|
17181
17217
|
|
|
17182
17218
|
var PolygonMosaic = /*#__PURE__*/Object.freeze({
|
|
17183
17219
|
__proto__: null,
|
|
17184
|
-
|
|
17185
|
-
|
|
17220
|
+
buildPolygonMosaic: buildPolygonMosaic,
|
|
17221
|
+
mosaic: mosaic
|
|
17186
17222
|
});
|
|
17187
17223
|
|
|
17188
17224
|
// Map non-negative integers to non-negative integer ids
|
|
@@ -17276,14 +17312,14 @@
|
|
|
17276
17312
|
//
|
|
17277
17313
|
function PolygonTiler(mosaic, arcTileIndex, nodes, opts) {
|
|
17278
17314
|
var arcs = nodes.arcs;
|
|
17279
|
-
var visitedTileIndex = new IdTestIndex(mosaic.length
|
|
17315
|
+
var visitedTileIndex = new IdTestIndex(mosaic.length);
|
|
17280
17316
|
var divide = getHoleDivider(nodes);
|
|
17281
17317
|
// temp vars
|
|
17282
17318
|
var currHoles; // arc ids of all holes in shape
|
|
17283
17319
|
var currRingBbox;
|
|
17284
17320
|
var tilesInShape; // accumulator for tile ids of tiles in current shape
|
|
17285
|
-
var ringIndex = new IdTestIndex(arcs.size()
|
|
17286
|
-
var holeIndex = new IdTestIndex(arcs.size()
|
|
17321
|
+
var ringIndex = new IdTestIndex(arcs.size());
|
|
17322
|
+
var holeIndex = new IdTestIndex(arcs.size());
|
|
17287
17323
|
|
|
17288
17324
|
// return ids of tiles in shape
|
|
17289
17325
|
this.getTilesInShape = function(shp, shapeId) {
|
|
@@ -17384,7 +17420,7 @@
|
|
|
17384
17420
|
// map arc ids to tile ids
|
|
17385
17421
|
var arcTileIndex = new ShapeArcIndex(mosaic, nodes.arcs);
|
|
17386
17422
|
// keep track of which tiles have been assigned to shapes
|
|
17387
|
-
var fetchedTileIndex = new IdTestIndex(mosaic.length
|
|
17423
|
+
var fetchedTileIndex = new IdTestIndex(mosaic.length);
|
|
17388
17424
|
// bidirection index of tile ids <=> shape ids
|
|
17389
17425
|
var tileShapeIndex = new TileShapeIndex(mosaic, opts);
|
|
17390
17426
|
// assign tiles to shapes
|
|
@@ -17664,9 +17700,9 @@
|
|
|
17664
17700
|
|
|
17665
17701
|
var PolygonDissolve2 = /*#__PURE__*/Object.freeze({
|
|
17666
17702
|
__proto__: null,
|
|
17667
|
-
dissolvePolygonLayer2: dissolvePolygonLayer2,
|
|
17668
17703
|
composeMosaicLayer: composeMosaicLayer,
|
|
17669
|
-
dissolvePolygonGroups2: dissolvePolygonGroups2
|
|
17704
|
+
dissolvePolygonGroups2: dissolvePolygonGroups2,
|
|
17705
|
+
dissolvePolygonLayer2: dissolvePolygonLayer2
|
|
17670
17706
|
});
|
|
17671
17707
|
|
|
17672
17708
|
// Assumes intersection cuts have been added and duplicated points removed
|
|
@@ -18466,17 +18502,17 @@
|
|
|
18466
18502
|
|
|
18467
18503
|
var GeojsonExport = /*#__PURE__*/Object.freeze({
|
|
18468
18504
|
__proto__: null,
|
|
18469
|
-
|
|
18505
|
+
default: GeoJSON,
|
|
18506
|
+
exportDatasetAsGeoJSON: exportDatasetAsGeoJSON,
|
|
18470
18507
|
exportGeoJSON: exportGeoJSON,
|
|
18508
|
+
exportIds: exportIds,
|
|
18471
18509
|
exportLayerAsGeoJSON: exportLayerAsGeoJSON,
|
|
18472
|
-
|
|
18510
|
+
exportProperties: exportProperties,
|
|
18473
18511
|
getDatasetBbox: getDatasetBbox,
|
|
18474
|
-
|
|
18512
|
+
getIdField: getIdField,
|
|
18475
18513
|
preserveOriginalCRS: preserveOriginalCRS,
|
|
18476
18514
|
useFeatureCollection: useFeatureCollection,
|
|
18477
|
-
|
|
18478
|
-
getIdField: getIdField,
|
|
18479
|
-
exportIds: exportIds
|
|
18515
|
+
warnIfNotWgs84: warnIfNotWgs84
|
|
18480
18516
|
});
|
|
18481
18517
|
|
|
18482
18518
|
/*
|
|
@@ -18715,19 +18751,19 @@
|
|
|
18715
18751
|
|
|
18716
18752
|
var FrameUtils = /*#__PURE__*/Object.freeze({
|
|
18717
18753
|
__proto__: null,
|
|
18718
|
-
getFrameData: getFrameData,
|
|
18719
|
-
fitDatasetToFrame: fitDatasetToFrame,
|
|
18720
|
-
getFrameLayerData: getFrameLayerData,
|
|
18721
18754
|
calcFrameData: calcFrameData,
|
|
18722
|
-
|
|
18723
|
-
|
|
18724
|
-
findFrameLayerInDataset: findFrameLayerInDataset,
|
|
18755
|
+
calcOutputBounds: calcOutputBounds,
|
|
18756
|
+
findFrame: findFrame,
|
|
18725
18757
|
findFrameDataset: findFrameDataset,
|
|
18726
18758
|
findFrameLayer: findFrameLayer,
|
|
18727
|
-
|
|
18759
|
+
findFrameLayerInDataset: findFrameLayerInDataset,
|
|
18760
|
+
fitDatasetToFrame: fitDatasetToFrame,
|
|
18761
|
+
getFrameData: getFrameData,
|
|
18728
18762
|
getFrameLayerBounds: getFrameLayerBounds,
|
|
18763
|
+
getFrameLayerData: getFrameLayerData,
|
|
18764
|
+
getFrameSize: getFrameSize,
|
|
18729
18765
|
getMapFrameMetersPerPixel: getMapFrameMetersPerPixel,
|
|
18730
|
-
|
|
18766
|
+
isFrameLayer: isFrameLayer,
|
|
18731
18767
|
parseMarginOption: parseMarginOption
|
|
18732
18768
|
});
|
|
18733
18769
|
|
|
@@ -18837,7 +18873,6 @@
|
|
|
18837
18873
|
function getFitBoxTransform(bbox, points, shapes, arcs) {
|
|
18838
18874
|
var dataset = {
|
|
18839
18875
|
arcs: arcs,
|
|
18840
|
-
info: {},
|
|
18841
18876
|
layers: []
|
|
18842
18877
|
};
|
|
18843
18878
|
if (points && points.length) {
|
|
@@ -18933,8 +18968,8 @@
|
|
|
18933
18968
|
|
|
18934
18969
|
var SvgPathUtils = /*#__PURE__*/Object.freeze({
|
|
18935
18970
|
__proto__: null,
|
|
18936
|
-
|
|
18937
|
-
|
|
18971
|
+
stringifyLineStringCoords: stringifyLineStringCoords,
|
|
18972
|
+
stringifyPolygonCoords: stringifyPolygonCoords
|
|
18938
18973
|
});
|
|
18939
18974
|
|
|
18940
18975
|
/* example patterns
|
|
@@ -19178,11 +19213,11 @@
|
|
|
19178
19213
|
|
|
19179
19214
|
var SvgHatch = /*#__PURE__*/Object.freeze({
|
|
19180
19215
|
__proto__: null,
|
|
19181
|
-
|
|
19216
|
+
convertFillPattern: convertFillPattern,
|
|
19182
19217
|
parseDashes: parseDashes,
|
|
19183
|
-
parseHatches: parseHatches,
|
|
19184
19218
|
parseDots: parseDots,
|
|
19185
|
-
|
|
19219
|
+
parseHatches: parseHatches,
|
|
19220
|
+
parsePattern: parsePattern
|
|
19186
19221
|
});
|
|
19187
19222
|
|
|
19188
19223
|
// parsing hints for -style command cli options
|
|
@@ -19432,17 +19467,17 @@
|
|
|
19432
19467
|
var SvgProperties = /*#__PURE__*/Object.freeze({
|
|
19433
19468
|
__proto__: null,
|
|
19434
19469
|
applyStyleAttributes: applyStyleAttributes,
|
|
19435
|
-
isSupportedSvgStyleProperty: isSupportedSvgStyleProperty,
|
|
19436
19470
|
findPropertiesBySymbolGeom: findPropertiesBySymbolGeom,
|
|
19437
19471
|
getSymbolDataAccessor: getSymbolDataAccessor,
|
|
19438
|
-
mightBeExpression: mightBeExpression,
|
|
19439
19472
|
getSymbolPropertyAccessor: getSymbolPropertyAccessor,
|
|
19473
|
+
isSupportedSvgStyleProperty: isSupportedSvgStyleProperty,
|
|
19440
19474
|
isSvgClassName: isSvgClassName,
|
|
19475
|
+
isSvgColor: isSvgColor,
|
|
19476
|
+
isSvgMeasure: isSvgMeasure,
|
|
19441
19477
|
isSvgNumber: isSvgNumber,
|
|
19478
|
+
mightBeExpression: mightBeExpression,
|
|
19442
19479
|
parseBoolean: parseBoolean,
|
|
19443
|
-
|
|
19444
|
-
parseSvgMeasure: parseSvgMeasure,
|
|
19445
|
-
isSvgColor: isSvgColor
|
|
19480
|
+
parseSvgMeasure: parseSvgMeasure
|
|
19446
19481
|
});
|
|
19447
19482
|
|
|
19448
19483
|
var geojsonImporters = {
|
|
@@ -19566,12 +19601,12 @@
|
|
|
19566
19601
|
|
|
19567
19602
|
var GeojsonToSvg = /*#__PURE__*/Object.freeze({
|
|
19568
19603
|
__proto__: null,
|
|
19604
|
+
flattenMultiPolygonCoords: flattenMultiPolygonCoords,
|
|
19569
19605
|
importGeoJSONFeatures: importGeoJSONFeatures,
|
|
19570
|
-
importPoint: importPoint,
|
|
19571
19606
|
importLineString: importLineString,
|
|
19572
19607
|
importMultiLineString: importMultiLineString,
|
|
19573
19608
|
importMultiPolygon: importMultiPolygon,
|
|
19574
|
-
|
|
19609
|
+
importPoint: importPoint,
|
|
19575
19610
|
importPolygon: importPolygon
|
|
19576
19611
|
});
|
|
19577
19612
|
|
|
@@ -19632,11 +19667,12 @@
|
|
|
19632
19667
|
|
|
19633
19668
|
var SvgLabels = /*#__PURE__*/Object.freeze({
|
|
19634
19669
|
__proto__: null,
|
|
19635
|
-
|
|
19636
|
-
|
|
19670
|
+
renderLabel: renderLabel$1,
|
|
19671
|
+
renderStyledLabel: renderStyledLabel
|
|
19637
19672
|
});
|
|
19638
19673
|
|
|
19639
19674
|
// convert data records (properties like svg-symbol, label-text, fill, r) to svg symbols
|
|
19675
|
+
//
|
|
19640
19676
|
|
|
19641
19677
|
function getTransform(xy, scale) {
|
|
19642
19678
|
var str = 'translate(' + roundToTenths(xy[0]) + ' ' + roundToTenths(xy[1]) + ')';
|
|
@@ -19825,8 +19861,8 @@
|
|
|
19825
19861
|
var SvgSymbols = /*#__PURE__*/Object.freeze({
|
|
19826
19862
|
__proto__: null,
|
|
19827
19863
|
getTransform: getTransform,
|
|
19828
|
-
|
|
19829
|
-
|
|
19864
|
+
renderPoint: renderPoint,
|
|
19865
|
+
symbolRenderers: symbolRenderers
|
|
19830
19866
|
});
|
|
19831
19867
|
|
|
19832
19868
|
cmd.scalebar = function(catalog, opts) {
|
|
@@ -20104,10 +20140,10 @@
|
|
|
20104
20140
|
|
|
20105
20141
|
var Scalebar = /*#__PURE__*/Object.freeze({
|
|
20106
20142
|
__proto__: null,
|
|
20107
|
-
getScalebarLayer: getScalebarLayer,
|
|
20108
|
-
renderScalebar: renderScalebar,
|
|
20109
20143
|
formatDistanceLabel: formatDistanceLabel,
|
|
20110
|
-
|
|
20144
|
+
getScalebarLayer: getScalebarLayer,
|
|
20145
|
+
parseScalebarLabelToKm: parseScalebarLabelToKm,
|
|
20146
|
+
renderScalebar: renderScalebar
|
|
20111
20147
|
});
|
|
20112
20148
|
|
|
20113
20149
|
var furnitureRenderers = {
|
|
@@ -20153,10 +20189,10 @@
|
|
|
20153
20189
|
|
|
20154
20190
|
var Furniture = /*#__PURE__*/Object.freeze({
|
|
20155
20191
|
__proto__: null,
|
|
20156
|
-
layerHasFurniture: layerHasFurniture,
|
|
20157
|
-
isFurnitureLayer: isFurnitureLayer,
|
|
20158
|
-
getFurnitureLayerType: getFurnitureLayerType,
|
|
20159
20192
|
getFurnitureLayerData: getFurnitureLayerData,
|
|
20193
|
+
getFurnitureLayerType: getFurnitureLayerType,
|
|
20194
|
+
isFurnitureLayer: isFurnitureLayer,
|
|
20195
|
+
layerHasFurniture: layerHasFurniture,
|
|
20160
20196
|
renderFurnitureLayer: renderFurnitureLayer
|
|
20161
20197
|
});
|
|
20162
20198
|
|
|
@@ -20223,8 +20259,8 @@
|
|
|
20223
20259
|
|
|
20224
20260
|
var SvgStringify = /*#__PURE__*/Object.freeze({
|
|
20225
20261
|
__proto__: null,
|
|
20226
|
-
stringify: stringify,
|
|
20227
20262
|
stringEscape: stringEscape,
|
|
20263
|
+
stringify: stringify,
|
|
20228
20264
|
stringifyProperties: stringifyProperties
|
|
20229
20265
|
});
|
|
20230
20266
|
|
|
@@ -20306,8 +20342,8 @@
|
|
|
20306
20342
|
|
|
20307
20343
|
var SvgEffect = /*#__PURE__*/Object.freeze({
|
|
20308
20344
|
__proto__: null,
|
|
20309
|
-
|
|
20310
|
-
|
|
20345
|
+
convertFillEffect: convertFillEffect,
|
|
20346
|
+
getSphereEffectParams: getSphereEffectParams
|
|
20311
20347
|
});
|
|
20312
20348
|
|
|
20313
20349
|
var cache = {};
|
|
@@ -20678,22 +20714,22 @@ ${svg}
|
|
|
20678
20714
|
|
|
20679
20715
|
var Svg = /*#__PURE__*/Object.freeze({
|
|
20680
20716
|
__proto__: null,
|
|
20681
|
-
|
|
20717
|
+
exportDataAttributesForSVG: exportDataAttributesForSVG,
|
|
20682
20718
|
exportFurnitureLayerForSVG: exportFurnitureLayerForSVG,
|
|
20683
20719
|
exportLayerForSVG: exportLayerForSVG,
|
|
20684
|
-
|
|
20685
|
-
exportDataAttributesForSVG: exportDataAttributesForSVG,
|
|
20686
|
-
getEmptyLayerForSVG: getEmptyLayerForSVG,
|
|
20687
|
-
featureHasSvgSymbol: featureHasSvgSymbol,
|
|
20720
|
+
exportSVG: exportSVG,
|
|
20688
20721
|
featureHasLabel: featureHasLabel,
|
|
20722
|
+
featureHasSvgSymbol: featureHasSvgSymbol,
|
|
20723
|
+
getEmptyLayerForSVG: getEmptyLayerForSVG,
|
|
20724
|
+
layerHasLabels: layerHasLabels,
|
|
20689
20725
|
layerHasSvgSymbols: layerHasSvgSymbols,
|
|
20690
|
-
|
|
20726
|
+
validateSvgDataFields: validateSvgDataFields
|
|
20691
20727
|
});
|
|
20692
20728
|
|
|
20693
20729
|
// import { isKmzFile } from '../io/mapshaper-file-types';
|
|
20694
20730
|
|
|
20695
20731
|
function exportKML(dataset, opts) {
|
|
20696
|
-
var toKML = require("@placemarkio/tokml").toKML;
|
|
20732
|
+
var toKML = require$1("@placemarkio/tokml").toKML;
|
|
20697
20733
|
var geojsonOpts = Object.assign({combine_layers: true, geojson_type: 'FeatureCollection'}, opts);
|
|
20698
20734
|
var geojson = exportDatasetAsGeoJSON(dataset, geojsonOpts);
|
|
20699
20735
|
var kml = toKML(geojson);
|
|
@@ -20993,8 +21029,8 @@ ${svg}
|
|
|
20993
21029
|
|
|
20994
21030
|
var BinArray$1 = /*#__PURE__*/Object.freeze({
|
|
20995
21031
|
__proto__: null,
|
|
20996
|
-
|
|
20997
|
-
|
|
21032
|
+
BinArray: BinArray,
|
|
21033
|
+
buffersAreIdentical: buffersAreIdentical
|
|
20998
21034
|
});
|
|
20999
21035
|
|
|
21000
21036
|
var Dbf = {};
|
|
@@ -22346,8 +22382,8 @@ ${svg}
|
|
|
22346
22382
|
|
|
22347
22383
|
var TopojsonExport = /*#__PURE__*/Object.freeze({
|
|
22348
22384
|
__proto__: null,
|
|
22349
|
-
|
|
22350
|
-
|
|
22385
|
+
calcExportBounds: calcExportBounds,
|
|
22386
|
+
exportTopoJSON: exportTopoJSON
|
|
22351
22387
|
});
|
|
22352
22388
|
|
|
22353
22389
|
function importJSONTable(arr) {
|
|
@@ -22386,9 +22422,9 @@ ${svg}
|
|
|
22386
22422
|
|
|
22387
22423
|
var JsonTable = /*#__PURE__*/Object.freeze({
|
|
22388
22424
|
__proto__: null,
|
|
22389
|
-
importJSONTable: importJSONTable,
|
|
22390
22425
|
exportJSON: exportJSON,
|
|
22391
|
-
exportJSONTable: exportJSONTable
|
|
22426
|
+
exportJSONTable: exportJSONTable,
|
|
22427
|
+
importJSONTable: importJSONTable
|
|
22392
22428
|
});
|
|
22393
22429
|
|
|
22394
22430
|
function getOutputFormat(dataset, opts) {
|
|
@@ -22704,10 +22740,10 @@ ${svg}
|
|
|
22704
22740
|
|
|
22705
22741
|
var Export = /*#__PURE__*/Object.freeze({
|
|
22706
22742
|
__proto__: null,
|
|
22707
|
-
exportTargetLayers: exportTargetLayers,
|
|
22708
|
-
exportFileContent: exportFileContent,
|
|
22709
|
-
assignUniqueLayerNames: assignUniqueLayerNames,
|
|
22710
22743
|
assignUniqueFileNames: assignUniqueFileNames,
|
|
22744
|
+
assignUniqueLayerNames: assignUniqueLayerNames,
|
|
22745
|
+
exportFileContent: exportFileContent,
|
|
22746
|
+
exportTargetLayers: exportTargetLayers,
|
|
22711
22747
|
formatVersionedFileName: formatVersionedFileName
|
|
22712
22748
|
});
|
|
22713
22749
|
|
|
@@ -22892,10 +22928,10 @@ ${svg}
|
|
|
22892
22928
|
|
|
22893
22929
|
var FileReader$1 = /*#__PURE__*/Object.freeze({
|
|
22894
22930
|
__proto__: null,
|
|
22895
|
-
readFirstChars: readFirstChars,
|
|
22896
|
-
Reader2: Reader2,
|
|
22897
22931
|
BufferReader: BufferReader,
|
|
22898
|
-
FileReader: FileReader
|
|
22932
|
+
FileReader: FileReader,
|
|
22933
|
+
Reader2: Reader2,
|
|
22934
|
+
readFirstChars: readFirstChars
|
|
22899
22935
|
});
|
|
22900
22936
|
|
|
22901
22937
|
// Read and parse a DSV file
|
|
@@ -23147,14 +23183,14 @@ ${svg}
|
|
|
23147
23183
|
|
|
23148
23184
|
var DelimReader = /*#__PURE__*/Object.freeze({
|
|
23149
23185
|
__proto__: null,
|
|
23150
|
-
|
|
23151
|
-
readDelimRecordsFromString: readDelimRecordsFromString,
|
|
23152
|
-
indexOfLine: indexOfLine,
|
|
23186
|
+
getDelimFieldFilter: getDelimFieldFilter,
|
|
23153
23187
|
getRowConverter: getRowConverter,
|
|
23188
|
+
indexOfLine: indexOfLine,
|
|
23154
23189
|
parseDelimHeaderSection: parseDelimHeaderSection,
|
|
23155
|
-
|
|
23156
|
-
|
|
23157
|
-
|
|
23190
|
+
parseDelimText: parseDelimText,
|
|
23191
|
+
readDelimRecords: readDelimRecords,
|
|
23192
|
+
readDelimRecordsFromString: readDelimRecordsFromString,
|
|
23193
|
+
readLinesAsString: readLinesAsString
|
|
23158
23194
|
});
|
|
23159
23195
|
|
|
23160
23196
|
function detectEncodingFromBOM(bytes) {
|
|
@@ -23286,9 +23322,9 @@ ${svg}
|
|
|
23286
23322
|
|
|
23287
23323
|
var EncodingDetection = /*#__PURE__*/Object.freeze({
|
|
23288
23324
|
__proto__: null,
|
|
23289
|
-
|
|
23325
|
+
decodeSamples: decodeSamples,
|
|
23290
23326
|
detectEncoding: detectEncoding,
|
|
23291
|
-
|
|
23327
|
+
detectEncodingFromBOM: detectEncodingFromBOM
|
|
23292
23328
|
});
|
|
23293
23329
|
|
|
23294
23330
|
// Convert a string containing delimited text data into a dataset object
|
|
@@ -23497,12 +23533,12 @@ ${svg}
|
|
|
23497
23533
|
|
|
23498
23534
|
var DelimImport = /*#__PURE__*/Object.freeze({
|
|
23499
23535
|
__proto__: null,
|
|
23536
|
+
adjustRecordTypes: adjustRecordTypes,
|
|
23537
|
+
getFieldTypeHints: getFieldTypeHints,
|
|
23538
|
+
guessDelimiter: guessDelimiter,
|
|
23500
23539
|
importDelim: importDelim,
|
|
23501
23540
|
importDelim2: importDelim2,
|
|
23502
|
-
isSupportedDelimiter: isSupportedDelimiter
|
|
23503
|
-
guessDelimiter: guessDelimiter,
|
|
23504
|
-
getFieldTypeHints: getFieldTypeHints,
|
|
23505
|
-
adjustRecordTypes: adjustRecordTypes
|
|
23541
|
+
isSupportedDelimiter: isSupportedDelimiter
|
|
23506
23542
|
});
|
|
23507
23543
|
|
|
23508
23544
|
function validateInputOpts(cmd) {
|
|
@@ -23745,14 +23781,14 @@ ${svg}
|
|
|
23745
23781
|
|
|
23746
23782
|
var OptionParsingUtils = /*#__PURE__*/Object.freeze({
|
|
23747
23783
|
__proto__: null,
|
|
23748
|
-
splitShellTokens: splitShellTokens,
|
|
23749
|
-
parseNumberList: parseNumberList,
|
|
23750
|
-
parseStringList: parseStringList,
|
|
23751
|
-
parseColorList: parseColorList,
|
|
23752
23784
|
cleanArgv: cleanArgv,
|
|
23753
23785
|
formatOptionValue: formatOptionValue,
|
|
23754
23786
|
isAssignment: isAssignment,
|
|
23755
|
-
|
|
23787
|
+
parseColorList: parseColorList,
|
|
23788
|
+
parseNumberList: parseNumberList,
|
|
23789
|
+
parseStringList: parseStringList,
|
|
23790
|
+
splitAssignment: splitAssignment,
|
|
23791
|
+
splitShellTokens: splitShellTokens
|
|
23756
23792
|
});
|
|
23757
23793
|
|
|
23758
23794
|
function CommandParser() {
|
|
@@ -25316,6 +25352,14 @@ ${svg}
|
|
|
25316
25352
|
describe: '(polygon-polygon join) use max overlap to join one polygon',
|
|
25317
25353
|
type: 'flag'
|
|
25318
25354
|
})
|
|
25355
|
+
.option('min-overlap-pct', {
|
|
25356
|
+
describe: '(polygon-polygon join) min overlap as pct of target polygon',
|
|
25357
|
+
type: 'percent'
|
|
25358
|
+
})
|
|
25359
|
+
.option('min-overlap-area', {
|
|
25360
|
+
describe: '(polygon-polygon join) minimum area of overlap',
|
|
25361
|
+
type: 'area'
|
|
25362
|
+
})
|
|
25319
25363
|
// .option('nearest-point', {
|
|
25320
25364
|
// describe: '(point-point join)',
|
|
25321
25365
|
// type: 'flag'
|
|
@@ -25754,6 +25798,10 @@ ${svg}
|
|
|
25754
25798
|
parser.command('style')
|
|
25755
25799
|
.oldAlias('svg-style')
|
|
25756
25800
|
.describe('set SVG style properties using JS or literal values')
|
|
25801
|
+
.option('clear', {
|
|
25802
|
+
describe: 'remove all style properties from a layer',
|
|
25803
|
+
type: 'flag'
|
|
25804
|
+
})
|
|
25757
25805
|
.option('where', whereOpt)
|
|
25758
25806
|
.option('class', {
|
|
25759
25807
|
describe: 'name of CSS class or classes (space-separated)'
|
|
@@ -26968,8 +27016,8 @@ ${svg}
|
|
|
26968
27016
|
|
|
26969
27017
|
var DbfImport = /*#__PURE__*/Object.freeze({
|
|
26970
27018
|
__proto__: null,
|
|
26971
|
-
|
|
26972
|
-
|
|
27019
|
+
ShapefileTable: ShapefileTable,
|
|
27020
|
+
importDbfTable: importDbfTable
|
|
26973
27021
|
});
|
|
26974
27022
|
|
|
26975
27023
|
function translateShapefileType(shpType) {
|
|
@@ -26990,8 +27038,8 @@ ${svg}
|
|
|
26990
27038
|
|
|
26991
27039
|
var ShpCommon = /*#__PURE__*/Object.freeze({
|
|
26992
27040
|
__proto__: null,
|
|
26993
|
-
|
|
26994
|
-
|
|
27041
|
+
isSupportedShapefileType: isSupportedShapefileType,
|
|
27042
|
+
translateShapefileType: translateShapefileType
|
|
26995
27043
|
});
|
|
26996
27044
|
|
|
26997
27045
|
function getNullRecord(id) {
|
|
@@ -27704,9 +27752,9 @@ ${svg}
|
|
|
27704
27752
|
|
|
27705
27753
|
var PathImport = /*#__PURE__*/Object.freeze({
|
|
27706
27754
|
__proto__: null,
|
|
27755
|
+
PathImporter: PathImporter,
|
|
27707
27756
|
cleanPathsAfterImport: cleanPathsAfterImport,
|
|
27708
|
-
pointHasValidCoords: pointHasValidCoords
|
|
27709
|
-
PathImporter: PathImporter
|
|
27757
|
+
pointHasValidCoords: pointHasValidCoords
|
|
27710
27758
|
});
|
|
27711
27759
|
|
|
27712
27760
|
// Read Shapefile data from a file, ArrayBuffer or Buffer
|
|
@@ -27914,9 +27962,9 @@ ${svg}
|
|
|
27914
27962
|
|
|
27915
27963
|
var GeojsonImport = /*#__PURE__*/Object.freeze({
|
|
27916
27964
|
__proto__: null,
|
|
27917
|
-
importGeoJSON: importGeoJSON,
|
|
27918
27965
|
GeoJSONParser: GeoJSONParser,
|
|
27919
|
-
importCRS: importCRS
|
|
27966
|
+
importCRS: importCRS,
|
|
27967
|
+
importGeoJSON: importGeoJSON
|
|
27920
27968
|
});
|
|
27921
27969
|
|
|
27922
27970
|
// Convert a TopoJSON topology into mapshaper's internal format
|
|
@@ -28842,8 +28890,8 @@ ${svg}
|
|
|
28842
28890
|
|
|
28843
28891
|
var JsonImport = /*#__PURE__*/Object.freeze({
|
|
28844
28892
|
__proto__: null,
|
|
28845
|
-
identifyJSONString: identifyJSONString,
|
|
28846
28893
|
identifyJSONObject: identifyJSONObject,
|
|
28894
|
+
identifyJSONString: identifyJSONString,
|
|
28847
28895
|
importGeoJSONFile: importGeoJSONFile,
|
|
28848
28896
|
importJSON: importJSON
|
|
28849
28897
|
});
|
|
@@ -29088,8 +29136,8 @@ ${svg}
|
|
|
29088
29136
|
|
|
29089
29137
|
var Unpack = /*#__PURE__*/Object.freeze({
|
|
29090
29138
|
__proto__: null,
|
|
29091
|
-
|
|
29092
|
-
|
|
29139
|
+
restoreSessionData: restoreSessionData,
|
|
29140
|
+
unpackSessionData: unpackSessionData
|
|
29093
29141
|
});
|
|
29094
29142
|
|
|
29095
29143
|
cmd.importFiles = async function(catalog, opts) {
|
|
@@ -29345,9 +29393,9 @@ ${svg}
|
|
|
29345
29393
|
|
|
29346
29394
|
var FileImport = /*#__PURE__*/Object.freeze({
|
|
29347
29395
|
__proto__: null,
|
|
29348
|
-
replaceImportFile: replaceImportFile,
|
|
29349
29396
|
importFile: importFile,
|
|
29350
|
-
importFilesTogether: importFilesTogether
|
|
29397
|
+
importFilesTogether: importFilesTogether,
|
|
29398
|
+
replaceImportFile: replaceImportFile
|
|
29351
29399
|
});
|
|
29352
29400
|
|
|
29353
29401
|
function convertSourceName(name, targets) {
|
|
@@ -29397,8 +29445,8 @@ ${svg}
|
|
|
29397
29445
|
|
|
29398
29446
|
var SourceUtils = /*#__PURE__*/Object.freeze({
|
|
29399
29447
|
__proto__: null,
|
|
29400
|
-
convertSourceName: convertSourceName,
|
|
29401
29448
|
convertInterpolatedName: convertInterpolatedName,
|
|
29449
|
+
convertSourceName: convertSourceName,
|
|
29402
29450
|
findCommandSource: findCommandSource
|
|
29403
29451
|
});
|
|
29404
29452
|
|
|
@@ -30737,13 +30785,13 @@ ${svg}
|
|
|
30737
30785
|
var BufferCommon = /*#__PURE__*/Object.freeze({
|
|
30738
30786
|
__proto__: null,
|
|
30739
30787
|
dissolveBufferDataset: dissolveBufferDataset,
|
|
30740
|
-
getBufferToleranceFromCircleSegments: getBufferToleranceFromCircleSegments,
|
|
30741
30788
|
getArcDegreesFromTolerancePct: getArcDegreesFromTolerancePct,
|
|
30742
|
-
getBufferToleranceFromCircleSegments2: getBufferToleranceFromCircleSegments2,
|
|
30743
30789
|
getArcDegreesFromTolerancePct2: getArcDegreesFromTolerancePct2,
|
|
30744
|
-
|
|
30790
|
+
getBufferDistanceFunction: getBufferDistanceFunction,
|
|
30791
|
+
getBufferToleranceFromCircleSegments: getBufferToleranceFromCircleSegments,
|
|
30792
|
+
getBufferToleranceFromCircleSegments2: getBufferToleranceFromCircleSegments2,
|
|
30745
30793
|
getBufferToleranceFunction: getBufferToleranceFunction,
|
|
30746
|
-
|
|
30794
|
+
parseConstantBufferDistance: parseConstantBufferDistance
|
|
30747
30795
|
});
|
|
30748
30796
|
|
|
30749
30797
|
// Returns a function for generating GeoJSON geometries (MultiLineString or MultiPolygon)
|
|
@@ -30973,9 +31021,9 @@ ${svg}
|
|
|
30973
31021
|
|
|
30974
31022
|
var PathBuffer = /*#__PURE__*/Object.freeze({
|
|
30975
31023
|
__proto__: null,
|
|
30976
|
-
getPolylineBufferMaker: getPolylineBufferMaker,
|
|
30977
31024
|
addBufferVertex: addBufferVertex,
|
|
30978
|
-
bufferIntersection: bufferIntersection
|
|
31025
|
+
bufferIntersection: bufferIntersection,
|
|
31026
|
+
getPolylineBufferMaker: getPolylineBufferMaker
|
|
30979
31027
|
});
|
|
30980
31028
|
|
|
30981
31029
|
function getPolylineBufferMaker2(arcs, geod, getBearing, opts) {
|
|
@@ -31352,14 +31400,14 @@ ${svg}
|
|
|
31352
31400
|
|
|
31353
31401
|
var Geodesic = /*#__PURE__*/Object.freeze({
|
|
31354
31402
|
__proto__: null,
|
|
31355
|
-
interpolatePoint2D: interpolatePoint2D,
|
|
31356
|
-
getInterpolationFunction: getInterpolationFunction,
|
|
31357
|
-
getPlanarSegmentEndpoint: getPlanarSegmentEndpoint,
|
|
31358
|
-
getGeodeticSegmentFunction: getGeodeticSegmentFunction,
|
|
31359
|
-
getFastGeodeticSegmentFunction: getFastGeodeticSegmentFunction,
|
|
31360
31403
|
bearingDegrees: bearingDegrees,
|
|
31361
31404
|
bearingDegrees2D: bearingDegrees2D,
|
|
31362
|
-
getBearingFunction: getBearingFunction
|
|
31405
|
+
getBearingFunction: getBearingFunction,
|
|
31406
|
+
getFastGeodeticSegmentFunction: getFastGeodeticSegmentFunction,
|
|
31407
|
+
getGeodeticSegmentFunction: getGeodeticSegmentFunction,
|
|
31408
|
+
getInterpolationFunction: getInterpolationFunction,
|
|
31409
|
+
getPlanarSegmentEndpoint: getPlanarSegmentEndpoint,
|
|
31410
|
+
interpolatePoint2D: interpolatePoint2D
|
|
31363
31411
|
});
|
|
31364
31412
|
|
|
31365
31413
|
function makePolylineBuffer(lyr, dataset, opts) {
|
|
@@ -31729,7 +31777,7 @@ ${svg}
|
|
|
31729
31777
|
|
|
31730
31778
|
// Make a single geodetic circle
|
|
31731
31779
|
function getCircleGeoJSON(center, radius, vertices, opts) {
|
|
31732
|
-
var n =
|
|
31780
|
+
var n = 360;
|
|
31733
31781
|
var geod = getGeodeticSegmentFunction(parseCrsString('wgs84')); // ?
|
|
31734
31782
|
if (opts.inset) {
|
|
31735
31783
|
radius -= opts.inset;
|
|
@@ -32399,10 +32447,10 @@ ${svg}
|
|
|
32399
32447
|
const degrees = 180 / Math.PI;
|
|
32400
32448
|
|
|
32401
32449
|
var A = -0.14861,
|
|
32402
|
-
B =
|
|
32450
|
+
B = 1.78277,
|
|
32403
32451
|
C = -0.29227,
|
|
32404
32452
|
D = -0.90649,
|
|
32405
|
-
E =
|
|
32453
|
+
E = 1.97294,
|
|
32406
32454
|
ED = E * D,
|
|
32407
32455
|
EB = E * B,
|
|
32408
32456
|
BC_DA = B * C - D * A;
|
|
@@ -33394,18 +33442,22 @@ ${svg}
|
|
|
33394
33442
|
function getCategoricalClassifier(classValues, nullVal, opts) {
|
|
33395
33443
|
// categories: strings to match in the data
|
|
33396
33444
|
var categories = opts.categories;
|
|
33445
|
+
// index categories for better performance on datasets with many categories
|
|
33446
|
+
var index = categories.reduce((memo, key, i) => {
|
|
33447
|
+
memo[key] = i;
|
|
33448
|
+
return memo;
|
|
33449
|
+
}, {});
|
|
33397
33450
|
var classToValue = getDiscreteValueGetter(classValues, nullVal, opts.other);
|
|
33398
33451
|
return function(val) {
|
|
33399
|
-
var i
|
|
33400
|
-
|
|
33401
|
-
|
|
33402
|
-
|
|
33403
|
-
|
|
33404
|
-
idx = -2; // field contains an 'other' value
|
|
33452
|
+
var i;
|
|
33453
|
+
if (val in index) {
|
|
33454
|
+
i = index[val];
|
|
33455
|
+
} else if (val || val === 0) {
|
|
33456
|
+
i = -2; // -2 indicates an 'other' value
|
|
33405
33457
|
} else {
|
|
33406
|
-
|
|
33458
|
+
i = -1; // field is empty (null value)
|
|
33407
33459
|
}
|
|
33408
|
-
return classToValue(
|
|
33460
|
+
return classToValue(i);
|
|
33409
33461
|
};
|
|
33410
33462
|
}
|
|
33411
33463
|
|
|
@@ -33550,8 +33602,8 @@ ${svg}
|
|
|
33550
33602
|
|
|
33551
33603
|
var PolygonNeighbors = /*#__PURE__*/Object.freeze({
|
|
33552
33604
|
__proto__: null,
|
|
33553
|
-
|
|
33554
|
-
|
|
33605
|
+
findPairsOfNeighbors: findPairsOfNeighbors,
|
|
33606
|
+
getNeighborLookupFunction: getNeighborLookupFunction
|
|
33555
33607
|
});
|
|
33556
33608
|
|
|
33557
33609
|
function getNonAdjacentClassifier(lyr, dataset, colors) {
|
|
@@ -34171,81 +34223,81 @@ ${svg}
|
|
|
34171
34223
|
|
|
34172
34224
|
var d3Scales = /*#__PURE__*/Object.freeze({
|
|
34173
34225
|
__proto__: null,
|
|
34174
|
-
|
|
34175
|
-
schemeAccent: Accent,
|
|
34176
|
-
schemeDark2: Dark2,
|
|
34177
|
-
schemePaired: Paired,
|
|
34178
|
-
schemePastel1: Pastel1,
|
|
34179
|
-
schemePastel2: Pastel2,
|
|
34180
|
-
schemeSet1: Set1,
|
|
34181
|
-
schemeSet2: Set2,
|
|
34182
|
-
schemeSet3: Set3,
|
|
34183
|
-
schemeTableau10: Tableau10,
|
|
34226
|
+
interpolateBlues: Blues,
|
|
34184
34227
|
interpolateBrBG: BrBG,
|
|
34185
|
-
|
|
34228
|
+
interpolateBuGn: BuGn,
|
|
34229
|
+
interpolateBuPu: BuPu,
|
|
34230
|
+
interpolateCividis: cividis,
|
|
34231
|
+
interpolateCool: cool,
|
|
34232
|
+
interpolateCubehelixDefault: cubehelix,
|
|
34233
|
+
interpolateGnBu: GnBu,
|
|
34234
|
+
interpolateGreens: Greens,
|
|
34235
|
+
interpolateGreys: Greys,
|
|
34236
|
+
interpolateInferno: inferno,
|
|
34237
|
+
interpolateMagma: magma,
|
|
34238
|
+
interpolateOrRd: OrRd,
|
|
34239
|
+
interpolateOranges: Oranges,
|
|
34186
34240
|
interpolatePRGn: PRGn,
|
|
34187
|
-
schemePRGn: scheme$p,
|
|
34188
34241
|
interpolatePiYG: PiYG,
|
|
34189
|
-
|
|
34242
|
+
interpolatePlasma: plasma,
|
|
34243
|
+
interpolatePuBu: PuBu,
|
|
34244
|
+
interpolatePuBuGn: PuBuGn,
|
|
34190
34245
|
interpolatePuOr: PuOr,
|
|
34191
|
-
|
|
34246
|
+
interpolatePuRd: PuRd,
|
|
34247
|
+
interpolatePurples: Purples,
|
|
34248
|
+
interpolateRainbow: rainbow,
|
|
34192
34249
|
interpolateRdBu: RdBu,
|
|
34193
|
-
schemeRdBu: scheme$m,
|
|
34194
34250
|
interpolateRdGy: RdGy,
|
|
34195
|
-
|
|
34251
|
+
interpolateRdPu: RdPu,
|
|
34196
34252
|
interpolateRdYlBu: RdYlBu,
|
|
34197
|
-
schemeRdYlBu: scheme$k,
|
|
34198
34253
|
interpolateRdYlGn: RdYlGn,
|
|
34199
|
-
|
|
34254
|
+
interpolateReds: Reds,
|
|
34255
|
+
interpolateSinebow: sinebow,
|
|
34200
34256
|
interpolateSpectral: Spectral,
|
|
34201
|
-
|
|
34202
|
-
|
|
34257
|
+
interpolateTurbo: turbo,
|
|
34258
|
+
interpolateViridis: viridis,
|
|
34259
|
+
interpolateWarm: warm,
|
|
34260
|
+
interpolateYlGn: YlGn,
|
|
34261
|
+
interpolateYlGnBu: YlGnBu,
|
|
34262
|
+
interpolateYlOrBr: YlOrBr,
|
|
34263
|
+
interpolateYlOrRd: YlOrRd,
|
|
34264
|
+
schemeAccent: Accent,
|
|
34265
|
+
schemeBlues: scheme$5,
|
|
34266
|
+
schemeBrBG: scheme$q,
|
|
34203
34267
|
schemeBuGn: scheme$h,
|
|
34204
|
-
interpolateBuPu: BuPu,
|
|
34205
34268
|
schemeBuPu: scheme$g,
|
|
34206
|
-
|
|
34269
|
+
schemeCategory10: category10,
|
|
34270
|
+
schemeDark2: Dark2,
|
|
34207
34271
|
schemeGnBu: scheme$f,
|
|
34208
|
-
|
|
34272
|
+
schemeGreens: scheme$4,
|
|
34273
|
+
schemeGreys: scheme$3,
|
|
34209
34274
|
schemeOrRd: scheme$e,
|
|
34210
|
-
|
|
34211
|
-
|
|
34212
|
-
|
|
34275
|
+
schemeOranges: scheme,
|
|
34276
|
+
schemePRGn: scheme$p,
|
|
34277
|
+
schemePaired: Paired,
|
|
34278
|
+
schemePastel1: Pastel1,
|
|
34279
|
+
schemePastel2: Pastel2,
|
|
34280
|
+
schemePiYG: scheme$o,
|
|
34213
34281
|
schemePuBu: scheme$c,
|
|
34214
|
-
|
|
34282
|
+
schemePuBuGn: scheme$d,
|
|
34283
|
+
schemePuOr: scheme$n,
|
|
34215
34284
|
schemePuRd: scheme$b,
|
|
34216
|
-
|
|
34285
|
+
schemePurples: scheme$2,
|
|
34286
|
+
schemeRdBu: scheme$m,
|
|
34287
|
+
schemeRdGy: scheme$l,
|
|
34217
34288
|
schemeRdPu: scheme$a,
|
|
34218
|
-
|
|
34219
|
-
|
|
34220
|
-
|
|
34289
|
+
schemeRdYlBu: scheme$k,
|
|
34290
|
+
schemeRdYlGn: scheme$j,
|
|
34291
|
+
schemeReds: scheme$1,
|
|
34292
|
+
schemeSet1: Set1,
|
|
34293
|
+
schemeSet2: Set2,
|
|
34294
|
+
schemeSet3: Set3,
|
|
34295
|
+
schemeSpectral: scheme$i,
|
|
34296
|
+
schemeTableau10: Tableau10,
|
|
34221
34297
|
schemeYlGn: scheme$8,
|
|
34222
|
-
|
|
34298
|
+
schemeYlGnBu: scheme$9,
|
|
34223
34299
|
schemeYlOrBr: scheme$7,
|
|
34224
|
-
|
|
34225
|
-
schemeYlOrRd: scheme$6,
|
|
34226
|
-
interpolateBlues: Blues,
|
|
34227
|
-
schemeBlues: scheme$5,
|
|
34228
|
-
interpolateGreens: Greens,
|
|
34229
|
-
schemeGreens: scheme$4,
|
|
34230
|
-
interpolateGreys: Greys,
|
|
34231
|
-
schemeGreys: scheme$3,
|
|
34232
|
-
interpolatePurples: Purples,
|
|
34233
|
-
schemePurples: scheme$2,
|
|
34234
|
-
interpolateReds: Reds,
|
|
34235
|
-
schemeReds: scheme$1,
|
|
34236
|
-
interpolateOranges: Oranges,
|
|
34237
|
-
schemeOranges: scheme,
|
|
34238
|
-
interpolateCividis: cividis,
|
|
34239
|
-
interpolateCubehelixDefault: cubehelix,
|
|
34240
|
-
interpolateRainbow: rainbow,
|
|
34241
|
-
interpolateWarm: warm,
|
|
34242
|
-
interpolateCool: cool,
|
|
34243
|
-
interpolateSinebow: sinebow,
|
|
34244
|
-
interpolateTurbo: turbo,
|
|
34245
|
-
interpolateViridis: viridis,
|
|
34246
|
-
interpolateMagma: magma,
|
|
34247
|
-
interpolateInferno: inferno,
|
|
34248
|
-
interpolatePlasma: plasma
|
|
34300
|
+
schemeYlOrRd: scheme$6
|
|
34249
34301
|
});
|
|
34250
34302
|
|
|
34251
34303
|
var index = {
|
|
@@ -34274,7 +34326,6 @@ ${svg}
|
|
|
34274
34326
|
addCategoricalScheme('Tableau20',
|
|
34275
34327
|
'4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5');
|
|
34276
34328
|
index.all = [].concat(index.sequential, index.rainbow, index.diverging, index.categorical);
|
|
34277
|
-
|
|
34278
34329
|
}
|
|
34279
34330
|
|
|
34280
34331
|
function standardName(name) {
|
|
@@ -34288,8 +34339,15 @@ ${svg}
|
|
|
34288
34339
|
return null;
|
|
34289
34340
|
}
|
|
34290
34341
|
|
|
34291
|
-
function addSchemesFromD3(type,
|
|
34292
|
-
|
|
34342
|
+
function addSchemesFromD3(type, namesStr) {
|
|
34343
|
+
var names = namesStr.split(',');
|
|
34344
|
+
index[type] = index[type].concat(names);
|
|
34345
|
+
if (type == 'categorical') {
|
|
34346
|
+
// copy categorical colors for simplicity
|
|
34347
|
+
names.forEach(name => {
|
|
34348
|
+
ramps[name] = d3Scales['scheme' + name];
|
|
34349
|
+
});
|
|
34350
|
+
}
|
|
34293
34351
|
}
|
|
34294
34352
|
|
|
34295
34353
|
function addCategoricalScheme(name, str) {
|
|
@@ -34343,16 +34401,14 @@ ${svg}
|
|
|
34343
34401
|
initSchemes();
|
|
34344
34402
|
var names = index[type];
|
|
34345
34403
|
if (!names) error('Unknown color scheme type:', type);
|
|
34346
|
-
|
|
34347
|
-
return names[i];
|
|
34404
|
+
return utils.pickOne(names);
|
|
34348
34405
|
}
|
|
34349
34406
|
|
|
34350
|
-
function
|
|
34407
|
+
function pickRandomCategoricalScheme(n) {
|
|
34351
34408
|
initSchemes();
|
|
34352
|
-
var
|
|
34353
|
-
|
|
34354
|
-
|
|
34355
|
-
return colors.slice(0, n);
|
|
34409
|
+
var minSize = Math.min(n, 20); // use largest available if n is too large
|
|
34410
|
+
var schemes = index.categorical.filter(name => ramps[name].length >= minSize);
|
|
34411
|
+
return utils.pickOne(schemes) || 'Tableau20';
|
|
34356
34412
|
}
|
|
34357
34413
|
|
|
34358
34414
|
function getCategoricalColorScheme(name, n) {
|
|
@@ -34461,10 +34517,11 @@ ${svg}
|
|
|
34461
34517
|
|
|
34462
34518
|
if (colorArg == 'random') {
|
|
34463
34519
|
if (categorical) {
|
|
34464
|
-
|
|
34520
|
+
colorScheme = pickRandomCategoricalScheme(n);
|
|
34521
|
+
} else {
|
|
34522
|
+
colorScheme = pickRandomColorScheme('sequential');
|
|
34465
34523
|
}
|
|
34466
|
-
|
|
34467
|
-
message('Randomly selected color ramp:', colorScheme);
|
|
34524
|
+
message('Randomly selected color scheme:', colorScheme);
|
|
34468
34525
|
} else if (isColorSchemeName(colorArg)) {
|
|
34469
34526
|
colorScheme = colorArg;
|
|
34470
34527
|
} else if (colorArg && !parseColor(colorArg)) {
|
|
@@ -34971,7 +35028,7 @@ ${svg}
|
|
|
34971
35028
|
// Need to expose clip/erase routes in both directions by setting route
|
|
34972
35029
|
// in both directions to visible -- this is how cut-out shapes are detected
|
|
34973
35030
|
// Or-ing with 0x11 makes both directions visible (so reverse paths will block)
|
|
34974
|
-
openArcRoutes(clipShapes, arcs, clipFlags, type == 'clip', type == 'erase',
|
|
35031
|
+
openArcRoutes(clipShapes, arcs, clipFlags, type == 'clip', type == 'erase', true, 0x11);
|
|
34975
35032
|
var index = new PathIndex(clipShapes, arcs);
|
|
34976
35033
|
var clippedShapes = targetShapes.map(function(shape, i) {
|
|
34977
35034
|
if (shape) {
|
|
@@ -35387,8 +35444,8 @@ ${svg}
|
|
|
35387
35444
|
var Bbox2Clipping = /*#__PURE__*/Object.freeze({
|
|
35388
35445
|
__proto__: null,
|
|
35389
35446
|
divideDatasetByBBox: divideDatasetByBBox,
|
|
35390
|
-
|
|
35391
|
-
|
|
35447
|
+
segmentInsideBBox: segmentInsideBBox,
|
|
35448
|
+
segmentOutsideBBox: segmentOutsideBBox
|
|
35392
35449
|
});
|
|
35393
35450
|
|
|
35394
35451
|
cmd.clipLayers = function(target, src, dataset, opts) {
|
|
@@ -35554,10 +35611,10 @@ ${svg}
|
|
|
35554
35611
|
|
|
35555
35612
|
var ClipErase = /*#__PURE__*/Object.freeze({
|
|
35556
35613
|
__proto__: null,
|
|
35557
|
-
clipLayersInPlace: clipLayersInPlace,
|
|
35558
35614
|
clipLayers: clipLayers,
|
|
35559
35615
|
clipLayersByBBox: clipLayersByBBox,
|
|
35560
35616
|
clipLayersByLayer: clipLayersByLayer,
|
|
35617
|
+
clipLayersInPlace: clipLayersInPlace,
|
|
35561
35618
|
getClipMessage: getClipMessage
|
|
35562
35619
|
});
|
|
35563
35620
|
|
|
@@ -36474,10 +36531,10 @@ ${svg}
|
|
|
36474
36531
|
|
|
36475
36532
|
var Info = /*#__PURE__*/Object.freeze({
|
|
36476
36533
|
__proto__: null,
|
|
36477
|
-
getLayerInfo: getLayerInfo,
|
|
36478
|
-
getAttributeTableInfo: getAttributeTableInfo,
|
|
36479
36534
|
formatAttributeTableInfo: formatAttributeTableInfo,
|
|
36480
|
-
formatTableValue: formatTableValue
|
|
36535
|
+
formatTableValue: formatTableValue,
|
|
36536
|
+
getAttributeTableInfo: getAttributeTableInfo,
|
|
36537
|
+
getLayerInfo: getLayerInfo
|
|
36481
36538
|
});
|
|
36482
36539
|
|
|
36483
36540
|
// import { importGeoJSON } from '../geojson/geojson-import';
|
|
@@ -36717,7 +36774,7 @@ ${svg}
|
|
|
36717
36774
|
|
|
36718
36775
|
// Join data from @src table to records in @destLyr layer.
|
|
36719
36776
|
// @join function
|
|
36720
|
-
// Receives index of record in the dest table
|
|
36777
|
+
// Receives index of one record in the dest table
|
|
36721
36778
|
// Returns array of matching records in src table, or null if no matches
|
|
36722
36779
|
//
|
|
36723
36780
|
function joinTableToLayer(destLyr, src, join, opts) {
|
|
@@ -36743,7 +36800,7 @@ ${svg}
|
|
|
36743
36800
|
collisionFields = [],
|
|
36744
36801
|
skipCount = 0,
|
|
36745
36802
|
retn = {},
|
|
36746
|
-
srcRec, srcId, destRec,
|
|
36803
|
+
srcRec, srcId, destRec, joinIds, count, filter, calc, i, j, n, m;
|
|
36747
36804
|
|
|
36748
36805
|
// support for duplication of destination records for many-to-one joins
|
|
36749
36806
|
var duplicateRecords, destShapes;
|
|
@@ -36765,14 +36822,14 @@ ${svg}
|
|
|
36765
36822
|
n = destRecords.length;
|
|
36766
36823
|
for (i=0; i<n; i++) {
|
|
36767
36824
|
destRec = destRecords[i];
|
|
36768
|
-
|
|
36769
|
-
if (
|
|
36770
|
-
skipCount +=
|
|
36771
|
-
|
|
36772
|
-
skipCount -=
|
|
36773
|
-
}
|
|
36774
|
-
for (j=0, count=0, m=
|
|
36775
|
-
srcId =
|
|
36825
|
+
joinIds = join(i);
|
|
36826
|
+
if (joinIds && filter) {
|
|
36827
|
+
skipCount += joinIds.length;
|
|
36828
|
+
joinIds = filter(joinIds, destRec);
|
|
36829
|
+
skipCount -= joinIds.length;
|
|
36830
|
+
}
|
|
36831
|
+
for (j=0, count=0, m=joinIds ? joinIds.length : 0; j<m; j++) {
|
|
36832
|
+
srcId = joinIds[j];
|
|
36776
36833
|
srcRec = srcRecords[srcId];
|
|
36777
36834
|
// duplication mode: many-to-one joins add new features to the target layer.
|
|
36778
36835
|
if (count > 0 && useDuplication) {
|
|
@@ -36798,7 +36855,7 @@ ${svg}
|
|
|
36798
36855
|
count++;
|
|
36799
36856
|
}
|
|
36800
36857
|
if (calc) {
|
|
36801
|
-
calc(
|
|
36858
|
+
calc(joinIds, destRec);
|
|
36802
36859
|
}
|
|
36803
36860
|
if (count > 0) {
|
|
36804
36861
|
matchCount++;
|
|
@@ -36964,12 +37021,12 @@ ${svg}
|
|
|
36964
37021
|
|
|
36965
37022
|
var JoinTables = /*#__PURE__*/Object.freeze({
|
|
36966
37023
|
__proto__: null,
|
|
36967
|
-
|
|
37024
|
+
findCollisionFields: findCollisionFields,
|
|
37025
|
+
getFieldsToJoin: getFieldsToJoin,
|
|
36968
37026
|
joinTableToLayer: joinTableToLayer,
|
|
36969
|
-
|
|
37027
|
+
joinTables: joinTables,
|
|
36970
37028
|
updateUnmatchedRecord: updateUnmatchedRecord,
|
|
36971
|
-
|
|
36972
|
-
getFieldsToJoin: getFieldsToJoin
|
|
37029
|
+
validateFieldNames: validateFieldNames
|
|
36973
37030
|
});
|
|
36974
37031
|
|
|
36975
37032
|
cmd.divide = function(targetLayers, targetDataset, source, opts) {
|
|
@@ -37989,8 +38046,8 @@ ${svg}
|
|
|
37989
38046
|
|
|
37990
38047
|
var FilterGeom = /*#__PURE__*/Object.freeze({
|
|
37991
38048
|
__proto__: null,
|
|
37992
|
-
|
|
37993
|
-
|
|
38049
|
+
findShapesIntersectingBBox: findShapesIntersectingBBox,
|
|
38050
|
+
getBBoxIntersectionTest: getBBoxIntersectionTest
|
|
37994
38051
|
});
|
|
37995
38052
|
|
|
37996
38053
|
cmd.filterFeatures = function(lyr, arcs, opts) {
|
|
@@ -38057,7 +38114,6 @@ ${svg}
|
|
|
38057
38114
|
utils.repeat(n, function(shapeId) {
|
|
38058
38115
|
var result = filter(shapeId);
|
|
38059
38116
|
requireBooleanResult(result);
|
|
38060
|
-
if (invert) result = !result;
|
|
38061
38117
|
if (result === true) {
|
|
38062
38118
|
if (shapes) filteredShapes.push(shapes[shapeId] || null);
|
|
38063
38119
|
if (records) filteredRecords.push(records[shapeId] || null);
|
|
@@ -38377,7 +38433,6 @@ ${svg}
|
|
|
38377
38433
|
var coords = [];
|
|
38378
38434
|
var ascending = a[1] < b[1];
|
|
38379
38435
|
if (a[0] != b[0]) error('Expected an edge segment');
|
|
38380
|
-
if (interval > 0 === false) error('Expected a positive interval');
|
|
38381
38436
|
if (ascending) {
|
|
38382
38437
|
y1 = a[1];
|
|
38383
38438
|
y2 = b[1];
|
|
@@ -39159,10 +39214,10 @@ ${svg}
|
|
|
39159
39214
|
|
|
39160
39215
|
var PointPolygonJoin = /*#__PURE__*/Object.freeze({
|
|
39161
39216
|
__proto__: null,
|
|
39217
|
+
getPolygonToPointsFunction: getPolygonToPointsFunction,
|
|
39162
39218
|
joinPointsToPolygons: joinPointsToPolygons,
|
|
39163
39219
|
joinPolygonsToPoints: joinPolygonsToPoints,
|
|
39164
|
-
prepJoinLayers: prepJoinLayers
|
|
39165
|
-
getPolygonToPointsFunction: getPolygonToPointsFunction
|
|
39220
|
+
prepJoinLayers: prepJoinLayers
|
|
39166
39221
|
});
|
|
39167
39222
|
|
|
39168
39223
|
// This is a special-purpose function designed to copy a data field from a points
|
|
@@ -39810,9 +39865,9 @@ ${svg}
|
|
|
39810
39865
|
|
|
39811
39866
|
var Lines = /*#__PURE__*/Object.freeze({
|
|
39812
39867
|
__proto__: null,
|
|
39813
|
-
polygonsToLines: polygonsToLines,
|
|
39814
39868
|
createLineLayer: createLineLayer,
|
|
39815
|
-
extractInnerLines: extractInnerLines
|
|
39869
|
+
extractInnerLines: extractInnerLines,
|
|
39870
|
+
polygonsToLines: polygonsToLines
|
|
39816
39871
|
});
|
|
39817
39872
|
|
|
39818
39873
|
function getClippingDataset(src, dest, opts) {
|
|
@@ -40116,8 +40171,8 @@ ${svg}
|
|
|
40116
40171
|
var ProjectionParams = /*#__PURE__*/Object.freeze({
|
|
40117
40172
|
__proto__: null,
|
|
40118
40173
|
expandProjDefn: expandProjDefn,
|
|
40119
|
-
|
|
40120
|
-
|
|
40174
|
+
getCenterParams: getCenterParams,
|
|
40175
|
+
getConicParams: getConicParams
|
|
40121
40176
|
});
|
|
40122
40177
|
|
|
40123
40178
|
cmd.proj = function(dataset, catalog, opts) {
|
|
@@ -40315,12 +40370,12 @@ ${svg}
|
|
|
40315
40370
|
|
|
40316
40371
|
var Proj = /*#__PURE__*/Object.freeze({
|
|
40317
40372
|
__proto__: null,
|
|
40318
|
-
fetchCrsInfo: fetchCrsInfo,
|
|
40319
|
-
projectDataset: projectDataset,
|
|
40320
40373
|
cleanProjectedPathLayers: cleanProjectedPathLayers,
|
|
40321
|
-
|
|
40374
|
+
fetchCrsInfo: fetchCrsInfo,
|
|
40322
40375
|
projectArcs: projectArcs,
|
|
40323
|
-
projectArcs2: projectArcs2
|
|
40376
|
+
projectArcs2: projectArcs2,
|
|
40377
|
+
projectDataset: projectDataset,
|
|
40378
|
+
projectPointLayer: projectPointLayer
|
|
40324
40379
|
});
|
|
40325
40380
|
|
|
40326
40381
|
cmd.graticule = function(dataset, opts) {
|
|
@@ -40753,16 +40808,18 @@ ${svg}
|
|
|
40753
40808
|
targetDataset.arcs = mergedDataset.arcs;
|
|
40754
40809
|
prepJoinLayers(targetLyr, sourceLyr);
|
|
40755
40810
|
var mergedLyr = {
|
|
40756
|
-
geometry_type: 'polygon',
|
|
40757
40811
|
shapes: targetLyr.shapes.concat(sourceLyr.shapes)
|
|
40758
40812
|
};
|
|
40759
40813
|
// make a mosaic from merged shapes of both layers
|
|
40760
40814
|
var mosaicIndex = new MosaicIndex(mergedLyr, nodes, {flat: false});
|
|
40761
|
-
|
|
40762
40815
|
var joinOpts = utils.extend({}, opts);
|
|
40763
|
-
|
|
40764
|
-
|
|
40816
|
+
if (joinOpts.min_overlap_area) {
|
|
40817
|
+
// convert area arg to square meters (typically)
|
|
40818
|
+
joinOpts.min_overlap_area = convertAreaParam(joinOpts.min_overlap_area, getDatasetCRS(targetDataset));
|
|
40819
|
+
}
|
|
40765
40820
|
|
|
40821
|
+
var joinFunction = getPolygonToPolygonFunction(targetLyr, sourceLyr, mosaicIndex, joinOpts);
|
|
40822
|
+
var retn = joinTableToLayer(targetLyr, sourceLyr.data, joinFunction, joinOpts);
|
|
40766
40823
|
if (opts.interpolate) {
|
|
40767
40824
|
if (opts.duplication) stop('duplication and interpolate options cannot be used together');
|
|
40768
40825
|
interpolateFieldsByArea(targetLyr, sourceLyr, mosaicIndex, opts);
|
|
@@ -40776,6 +40833,22 @@ ${svg}
|
|
|
40776
40833
|
var sourceFields = opts.interpolate;
|
|
40777
40834
|
var sourceRecords = sourceLyr.data.getRecords();
|
|
40778
40835
|
|
|
40836
|
+
// Use different interpolation methods for qualitative and quantitative data
|
|
40837
|
+
// Assumes string and boolean fields are qualitative and numeric fields are
|
|
40838
|
+
// quantitative (TODO: somehow recognize numeric index data as qualitative)
|
|
40839
|
+
var quantitativeFields = [];
|
|
40840
|
+
var qualitativeFields = [];
|
|
40841
|
+
sourceFields.forEach(function(field) {
|
|
40842
|
+
var type = getColumnType(field, sourceRecords);
|
|
40843
|
+
if (type == 'number') {
|
|
40844
|
+
quantitativeFields.push(field);
|
|
40845
|
+
} else if (type == 'string' || type == 'boolean') {
|
|
40846
|
+
qualitativeFields.push(field);
|
|
40847
|
+
} else {
|
|
40848
|
+
message(`"${field}" field appears to contain ${type}-type data. No interpolation method is available.`);
|
|
40849
|
+
}
|
|
40850
|
+
});
|
|
40851
|
+
|
|
40779
40852
|
// for each destination polygon, calculate interpolated values,
|
|
40780
40853
|
// using the data calculated in previous steps
|
|
40781
40854
|
destLyr.data.getRecords().forEach(function(destRec, destId) {
|
|
@@ -40784,9 +40857,13 @@ ${svg}
|
|
|
40784
40857
|
for (i=0; i<tileIds.length; i++) {
|
|
40785
40858
|
tileRecords.push(mosaicRecords[tileIds[i]]);
|
|
40786
40859
|
}
|
|
40787
|
-
for (i=0; i<
|
|
40860
|
+
for (i=0; i<quantitativeFields.length; i++) {
|
|
40788
40861
|
field = sourceFields[i];
|
|
40789
|
-
destRec[field] =
|
|
40862
|
+
destRec[field] = getInterpolatedNumber(field, tileRecords, sourceRecords);
|
|
40863
|
+
}
|
|
40864
|
+
for (i=0; i<qualitativeFields.length; i++) {
|
|
40865
|
+
field = sourceFields[i];
|
|
40866
|
+
destRec[field] = getInterpolatedCategory(field, tileRecords, sourceRecords);
|
|
40790
40867
|
}
|
|
40791
40868
|
});
|
|
40792
40869
|
}
|
|
@@ -40839,7 +40916,7 @@ ${svg}
|
|
|
40839
40916
|
// return value;
|
|
40840
40917
|
// }
|
|
40841
40918
|
|
|
40842
|
-
function
|
|
40919
|
+
function getInterpolatedNumber(field, tileRecords, sourceRecords) {
|
|
40843
40920
|
var value = 0, tileRec, sourceRec, sourceId;
|
|
40844
40921
|
for (var i=0; i<tileRecords.length; i++) {
|
|
40845
40922
|
tileRec = tileRecords[i];
|
|
@@ -40853,6 +40930,31 @@ ${svg}
|
|
|
40853
40930
|
return value;
|
|
40854
40931
|
}
|
|
40855
40932
|
|
|
40933
|
+
function getInterpolatedCategory(field, tileRecords, sourceRecords) {
|
|
40934
|
+
var value, tileRec, sourceRec, sourceId, idx;
|
|
40935
|
+
var areas = [];
|
|
40936
|
+
var values = [];
|
|
40937
|
+
for (var i=0; i<tileRecords.length; i++) {
|
|
40938
|
+
tileRec = tileRecords[i];
|
|
40939
|
+
if (!tileRec.sourceIds) continue;
|
|
40940
|
+
for (var j=0; j<tileRec.sourceIds.length; j++) {
|
|
40941
|
+
sourceId = tileRec.sourceIds[j];
|
|
40942
|
+
sourceRec = sourceRecords[sourceId];
|
|
40943
|
+
value = sourceRec[field];
|
|
40944
|
+
idx = values.indexOf(value);
|
|
40945
|
+
if (idx == -1) {
|
|
40946
|
+
values.push(value);
|
|
40947
|
+
areas.push(tileRec.area);
|
|
40948
|
+
} else {
|
|
40949
|
+
areas[idx] += tileRec.area;
|
|
40950
|
+
}
|
|
40951
|
+
}
|
|
40952
|
+
}
|
|
40953
|
+
var maxArea = Math.max.apply(null, areas);
|
|
40954
|
+
var maxIdx = areas.indexOf(maxArea);
|
|
40955
|
+
return maxIdx == -1 ? null : values[maxIdx];
|
|
40956
|
+
}
|
|
40957
|
+
|
|
40856
40958
|
|
|
40857
40959
|
function getIdConversionFunction(offset, length) {
|
|
40858
40960
|
return function (mergedIds) {
|
|
@@ -40865,17 +40967,50 @@ ${svg}
|
|
|
40865
40967
|
};
|
|
40866
40968
|
}
|
|
40867
40969
|
|
|
40868
|
-
function
|
|
40869
|
-
|
|
40970
|
+
function getMinPctFunction(minPct, destLyr, mosaicIndex) {
|
|
40971
|
+
mosaicIndex.nodes.arcs;
|
|
40870
40972
|
var destLen = destLyr.shapes.length;
|
|
40871
40973
|
|
|
40872
|
-
function
|
|
40873
|
-
var
|
|
40874
|
-
|
|
40875
|
-
|
|
40876
|
-
|
|
40877
|
-
|
|
40974
|
+
return function(destId, srcIds) {
|
|
40975
|
+
var destTileIds = mosaicIndex.getTileIdsByShapeId(destId);
|
|
40976
|
+
var destArea = getAreaOfTiles(destTileIds, mosaicIndex);
|
|
40977
|
+
return srcIds.filter(function(srcId, i) {
|
|
40978
|
+
var srcTileIds = mosaicIndex.getTileIdsByShapeId(srcId + destLen);
|
|
40979
|
+
var sharedIds = utils.intersection(destTileIds, srcTileIds);
|
|
40980
|
+
var overlapArea = getAreaOfTiles(sharedIds, mosaicIndex);
|
|
40981
|
+
var overlapPct = overlapArea / destArea || 0;
|
|
40982
|
+
return overlapPct >= minPct;
|
|
40983
|
+
});
|
|
40984
|
+
};
|
|
40985
|
+
}
|
|
40986
|
+
|
|
40987
|
+
function getMinAreaFunction(minArea, destLyr, mosaicIndex) {
|
|
40988
|
+
mosaicIndex.nodes.arcs;
|
|
40989
|
+
var destLen = destLyr.shapes.length;
|
|
40990
|
+
|
|
40991
|
+
return function(destId, srcIds) {
|
|
40992
|
+
var destTileIds = mosaicIndex.getTileIdsByShapeId(destId);
|
|
40993
|
+
|
|
40994
|
+
return srcIds.filter(function(srcId, i) {
|
|
40995
|
+
var srcTileIds = mosaicIndex.getTileIdsByShapeId(srcId + destLen);
|
|
40996
|
+
var sharedIds = utils.intersection(destTileIds, srcTileIds);
|
|
40997
|
+
var overlapArea = getAreaOfTiles(sharedIds, mosaicIndex);
|
|
40998
|
+
return overlapArea >= minArea;
|
|
40999
|
+
});
|
|
41000
|
+
};
|
|
41001
|
+
}
|
|
41002
|
+
|
|
41003
|
+
function getAreaOfTiles(tileIds, mosaicIndex) {
|
|
41004
|
+
var arcs = mosaicIndex.nodes.arcs;
|
|
41005
|
+
var area = 0;
|
|
41006
|
+
for (var i=0; i<tileIds.length; i++) {
|
|
41007
|
+
area += geom.getShapeArea(mosaicIndex.mosaic[tileIds[i]], arcs);
|
|
40878
41008
|
}
|
|
41009
|
+
return area;
|
|
41010
|
+
}
|
|
41011
|
+
|
|
41012
|
+
function getMaxOverlapFunction(destLyr, mosaicIndex) {
|
|
41013
|
+
var destLen = destLyr.shapes.length;
|
|
40879
41014
|
|
|
40880
41015
|
return function(destId, srcIds) {
|
|
40881
41016
|
var destTileIds = mosaicIndex.getTileIdsByShapeId(destId);
|
|
@@ -40884,7 +41019,7 @@ ${svg}
|
|
|
40884
41019
|
srcIds.forEach(function(srcId, i) {
|
|
40885
41020
|
var srcTileIds = mosaicIndex.getTileIdsByShapeId(srcId + destLen);
|
|
40886
41021
|
var sharedIds = utils.intersection(destTileIds, srcTileIds);
|
|
40887
|
-
var area =
|
|
41022
|
+
var area = getAreaOfTiles(sharedIds, mosaicIndex);
|
|
40888
41023
|
if (area >= maxArea) {
|
|
40889
41024
|
maxId = srcId;
|
|
40890
41025
|
maxArea = area;
|
|
@@ -40897,14 +41032,21 @@ ${svg}
|
|
|
40897
41032
|
|
|
40898
41033
|
|
|
40899
41034
|
// Returned function converts a target layer feature id to multiple source feature ids
|
|
40900
|
-
// TODO: option to join the source polygon with the greatest overlapping area
|
|
40901
41035
|
// TODO: option to ignore source polygon with small overlaps
|
|
40902
41036
|
// (as a percentage of the area of one or the other polygon?)
|
|
40903
41037
|
function getPolygonToPolygonFunction(targetLyr, srcLyr, mosaicIndex, opts) {
|
|
40904
41038
|
var mergedToSourceIds = getIdConversionFunction(targetLyr.shapes.length, srcLyr.shapes.length);
|
|
40905
41039
|
var selectMaxOverlap;
|
|
41040
|
+
var minAreaFilter;
|
|
41041
|
+
var minPctFilter;
|
|
40906
41042
|
if (opts.largest_overlap) {
|
|
40907
|
-
selectMaxOverlap = getMaxOverlapFunction(targetLyr,
|
|
41043
|
+
selectMaxOverlap = getMaxOverlapFunction(targetLyr, mosaicIndex);
|
|
41044
|
+
}
|
|
41045
|
+
if (opts.min_overlap_pct) {
|
|
41046
|
+
minPctFilter = getMinPctFunction(opts.min_overlap_pct, targetLyr, mosaicIndex);
|
|
41047
|
+
}
|
|
41048
|
+
if (opts.min_overlap_area) {
|
|
41049
|
+
minAreaFilter = getMinAreaFunction(opts.min_overlap_area, targetLyr, mosaicIndex);
|
|
40908
41050
|
}
|
|
40909
41051
|
|
|
40910
41052
|
return function(targId) {
|
|
@@ -40919,6 +41061,12 @@ ${svg}
|
|
|
40919
41061
|
if (sourceIds.length > 1 && opts.largest_overlap) {
|
|
40920
41062
|
sourceIds = selectMaxOverlap(targId, sourceIds);
|
|
40921
41063
|
}
|
|
41064
|
+
if (minAreaFilter) {
|
|
41065
|
+
sourceIds = minAreaFilter(targId, sourceIds);
|
|
41066
|
+
}
|
|
41067
|
+
if (minPctFilter) {
|
|
41068
|
+
sourceIds = minPctFilter(targId, sourceIds);
|
|
41069
|
+
}
|
|
40922
41070
|
return sourceIds;
|
|
40923
41071
|
};
|
|
40924
41072
|
}
|
|
@@ -40929,7 +41077,7 @@ ${svg}
|
|
|
40929
41077
|
function polylineToMidpoints(shp, arcs, opts) {
|
|
40930
41078
|
if (!shp) return null;
|
|
40931
41079
|
var points = shp.map(function(path) {
|
|
40932
|
-
return findPathMidpoint(path, arcs
|
|
41080
|
+
return findPathMidpoint(path, arcs);
|
|
40933
41081
|
});
|
|
40934
41082
|
return points;
|
|
40935
41083
|
}
|
|
@@ -40951,9 +41099,6 @@ ${svg}
|
|
|
40951
41099
|
var k;
|
|
40952
41100
|
if (partialLen + segLen >= halfLen) {
|
|
40953
41101
|
k = (halfLen - partialLen) / segLen;
|
|
40954
|
-
if (useNearestVertex) {
|
|
40955
|
-
k = k < 0.5 ? 0 : 1;
|
|
40956
|
-
}
|
|
40957
41102
|
// p = [a + k * (c - a), b + k * (d - b)];
|
|
40958
41103
|
p = [(1 - k) * a + k * c, (1 - k) * b + k * d];
|
|
40959
41104
|
}
|
|
@@ -41262,10 +41407,10 @@ ${svg}
|
|
|
41262
41407
|
|
|
41263
41408
|
var Points = /*#__PURE__*/Object.freeze({
|
|
41264
41409
|
__proto__: null,
|
|
41265
|
-
pointsFromPolygons: pointsFromPolygons,
|
|
41266
41410
|
coordinateFromValue: coordinateFromValue,
|
|
41267
41411
|
findXField: findXField,
|
|
41268
|
-
findYField: findYField
|
|
41412
|
+
findYField: findYField,
|
|
41413
|
+
pointsFromPolygons: pointsFromPolygons
|
|
41269
41414
|
});
|
|
41270
41415
|
|
|
41271
41416
|
function joinPolygonsViaPoints(targetLyr, targetDataset, source, opts) {
|
|
@@ -41433,6 +41578,7 @@ ${svg}
|
|
|
41433
41578
|
THIS SOFTWARE.
|
|
41434
41579
|
*/
|
|
41435
41580
|
|
|
41581
|
+
|
|
41436
41582
|
var earthRadius = 6371;
|
|
41437
41583
|
var rad = Math.PI / 180;
|
|
41438
41584
|
|
|
@@ -41450,7 +41596,6 @@ ${svg}
|
|
|
41450
41596
|
left: 0, // left index in the kd-tree array
|
|
41451
41597
|
right: index.ids.length - 1, // right index
|
|
41452
41598
|
axis: 0, // 0 for longitude axis and 1 for latitude axis
|
|
41453
|
-
dist: 0, // will hold the lower bound of children's distances to the query point
|
|
41454
41599
|
minLng: -180, // bounding box of the node
|
|
41455
41600
|
minLat: -90,
|
|
41456
41601
|
maxLng: 180,
|
|
@@ -41469,7 +41614,7 @@ ${svg}
|
|
|
41469
41614
|
// add all points of the leaf node to the queue
|
|
41470
41615
|
for (var i = left; i <= right; i++) {
|
|
41471
41616
|
item = index.points[index.ids[i]];
|
|
41472
|
-
|
|
41617
|
+
{
|
|
41473
41618
|
q.push({
|
|
41474
41619
|
i: index.ids[i],
|
|
41475
41620
|
item: item,
|
|
@@ -41486,7 +41631,7 @@ ${svg}
|
|
|
41486
41631
|
|
|
41487
41632
|
// add middle point to the queue
|
|
41488
41633
|
item = index.points[index.ids[m]];
|
|
41489
|
-
|
|
41634
|
+
{
|
|
41490
41635
|
q.push({
|
|
41491
41636
|
i: index.ids[m],
|
|
41492
41637
|
item: item,
|
|
@@ -41831,8 +41976,6 @@ ${svg}
|
|
|
41831
41976
|
//
|
|
41832
41977
|
function getHexGridMaker(bbox, interval, opts) {
|
|
41833
41978
|
var flatTop = opts.type != 'hex2'; // hex2 is "pointy-top" orientation
|
|
41834
|
-
// origin cell (bottom left) may be "outie" or "innie" ... could be settable
|
|
41835
|
-
var outieOrigin = true;
|
|
41836
41979
|
var minorInterval = interval * Math.sqrt(3) / 2;
|
|
41837
41980
|
var _colCounts = _getColCounts(bbox, interval);
|
|
41838
41981
|
var _rowCounts = _getRowCounts(bbox, interval);
|
|
@@ -41990,7 +42133,7 @@ ${svg}
|
|
|
41990
42133
|
}
|
|
41991
42134
|
|
|
41992
42135
|
function _isUpperCell(col) {
|
|
41993
|
-
return isOdd(col) ||
|
|
42136
|
+
return isOdd(col) || false;
|
|
41994
42137
|
}
|
|
41995
42138
|
|
|
41996
42139
|
function _idxToPoint(id) {
|
|
@@ -42602,8 +42745,7 @@ ${svg}
|
|
|
42602
42745
|
var empty = [];
|
|
42603
42746
|
points.forEach(function(p) {
|
|
42604
42747
|
var bbox = getPointBounds(p, radius);
|
|
42605
|
-
|
|
42606
|
-
addPointToGridIndex(p, gridIndex, grid, addNeighbors);
|
|
42748
|
+
addPointToGridIndex(p, gridIndex, grid);
|
|
42607
42749
|
bboxIndex.add.apply(bboxIndex, bbox);
|
|
42608
42750
|
});
|
|
42609
42751
|
bboxIndex.finish();
|
|
@@ -42627,7 +42769,7 @@ ${svg}
|
|
|
42627
42769
|
var i = grid.pointToIdx(p);
|
|
42628
42770
|
var [c, r] = grid.idxToColRow(i);
|
|
42629
42771
|
addCellToGridIndex(c, r, grid, index);
|
|
42630
|
-
|
|
42772
|
+
{
|
|
42631
42773
|
grid.forEachNeighbor(c, r, function(c, r) {
|
|
42632
42774
|
addCellToGridIndex(c, r, grid, index);
|
|
42633
42775
|
});
|
|
@@ -42745,9 +42887,9 @@ ${svg}
|
|
|
42745
42887
|
|
|
42746
42888
|
var PointToGrid = /*#__PURE__*/Object.freeze({
|
|
42747
42889
|
__proto__: null,
|
|
42748
|
-
getPointCircleRadius: getPointCircleRadius,
|
|
42749
42890
|
calcCellProperties: calcCellProperties,
|
|
42750
|
-
calcWeights: calcWeights
|
|
42891
|
+
calcWeights: calcWeights,
|
|
42892
|
+
getPointCircleRadius: getPointCircleRadius
|
|
42751
42893
|
});
|
|
42752
42894
|
|
|
42753
42895
|
function closeUndershoots(lyr, dataset, opts) {
|
|
@@ -43177,8 +43319,8 @@ ${svg}
|
|
|
43177
43319
|
var ParseCommands = /*#__PURE__*/Object.freeze({
|
|
43178
43320
|
__proto__: null,
|
|
43179
43321
|
parseCommands: parseCommands,
|
|
43180
|
-
|
|
43181
|
-
|
|
43322
|
+
parseConsoleCommands: parseConsoleCommands,
|
|
43323
|
+
standardizeConsoleCommands: standardizeConsoleCommands
|
|
43182
43324
|
});
|
|
43183
43325
|
|
|
43184
43326
|
function getIOProxy(job) {
|
|
@@ -43684,7 +43826,7 @@ ${svg}
|
|
|
43684
43826
|
|
|
43685
43827
|
// create a queue of unwind targets
|
|
43686
43828
|
queue = getUnwindTargets(intersections, zlim, data.zz);
|
|
43687
|
-
utils.sortOn(queue, 'z',
|
|
43829
|
+
utils.sortOn(queue, 'z', true);
|
|
43688
43830
|
|
|
43689
43831
|
while (queue.length > 0) {
|
|
43690
43832
|
target = queue.pop();
|
|
@@ -44122,9 +44264,8 @@ ${svg}
|
|
|
44122
44264
|
}
|
|
44123
44265
|
|
|
44124
44266
|
function protectContentEdges(arcs) {
|
|
44125
|
-
var e = 1e-14;
|
|
44126
44267
|
var bb = arcs.getBounds();
|
|
44127
|
-
bb.padBounds(-
|
|
44268
|
+
bb.padBounds(-1e-14, -1e-14, -1e-14, -1e-14);
|
|
44128
44269
|
limitSimplificationExtent(arcs, bb.toArray(), true);
|
|
44129
44270
|
}
|
|
44130
44271
|
|
|
@@ -44239,17 +44380,17 @@ ${svg}
|
|
|
44239
44380
|
|
|
44240
44381
|
var Simplify = /*#__PURE__*/Object.freeze({
|
|
44241
44382
|
__proto__: null,
|
|
44242
|
-
finalizeSimplification: finalizeSimplification,
|
|
44243
|
-
getStandardSimplifyOpts: getStandardSimplifyOpts,
|
|
44244
|
-
useSphericalSimplify: useSphericalSimplify,
|
|
44245
|
-
simplifyPaths: simplifyPaths,
|
|
44246
|
-
getSimplifyMethod: getSimplifyMethod,
|
|
44247
|
-
protectWorldEdges: protectWorldEdges,
|
|
44248
|
-
parseSimplifyResolution: parseSimplifyResolution,
|
|
44249
44383
|
calcPlanarInterval: calcPlanarInterval,
|
|
44250
44384
|
calcSphericalInterval: calcSphericalInterval,
|
|
44251
44385
|
convertSimplifyInterval: convertSimplifyInterval,
|
|
44252
|
-
convertSimplifyResolution: convertSimplifyResolution
|
|
44386
|
+
convertSimplifyResolution: convertSimplifyResolution,
|
|
44387
|
+
finalizeSimplification: finalizeSimplification,
|
|
44388
|
+
getSimplifyMethod: getSimplifyMethod,
|
|
44389
|
+
getStandardSimplifyOpts: getStandardSimplifyOpts,
|
|
44390
|
+
parseSimplifyResolution: parseSimplifyResolution,
|
|
44391
|
+
protectWorldEdges: protectWorldEdges,
|
|
44392
|
+
simplifyPaths: simplifyPaths,
|
|
44393
|
+
useSphericalSimplify: useSphericalSimplify
|
|
44253
44394
|
});
|
|
44254
44395
|
|
|
44255
44396
|
cmd.sortFeatures = function(lyr, arcs, opts) {
|
|
@@ -44436,7 +44577,7 @@ ${svg}
|
|
|
44436
44577
|
};
|
|
44437
44578
|
|
|
44438
44579
|
cmd.svgStyle = function(lyr, dataset, opts) {
|
|
44439
|
-
var
|
|
44580
|
+
var filterFn;
|
|
44440
44581
|
if (getFeatureCount(lyr) === 0) {
|
|
44441
44582
|
return;
|
|
44442
44583
|
}
|
|
@@ -44444,7 +44585,10 @@ ${svg}
|
|
|
44444
44585
|
initDataTable(lyr);
|
|
44445
44586
|
}
|
|
44446
44587
|
if (opts.where) {
|
|
44447
|
-
|
|
44588
|
+
filterFn = compileFeatureExpression(opts.where, lyr, dataset.arcs);
|
|
44589
|
+
}
|
|
44590
|
+
if (opts.clear) {
|
|
44591
|
+
lyr.data.getFields().filter(isSupportedSvgStyleProperty).forEach(lyr.data.deleteField, lyr.data);
|
|
44448
44592
|
}
|
|
44449
44593
|
Object.keys(opts).forEach(function(optName) {
|
|
44450
44594
|
var svgName = optName.replace('_', '-'); // undo cli parser name conversion
|
|
@@ -44454,7 +44598,7 @@ ${svg}
|
|
|
44454
44598
|
var strVal = opts[optName].trim();
|
|
44455
44599
|
var accessor = getSymbolPropertyAccessor(strVal, svgName, lyr);
|
|
44456
44600
|
getLayerDataTable(lyr).getRecords().forEach(function(rec, i) {
|
|
44457
|
-
if (
|
|
44601
|
+
if (filterFn && !filterFn(i)) {
|
|
44458
44602
|
// make sure field exists if record is excluded by filter
|
|
44459
44603
|
if (svgName in rec === false) {
|
|
44460
44604
|
rec[svgName] = undefined;
|
|
@@ -45083,7 +45227,6 @@ ${svg}
|
|
|
45083
45227
|
return name + '_' + n;
|
|
45084
45228
|
});
|
|
45085
45229
|
var mergedLyr = {
|
|
45086
|
-
geometry_type: 'polygon',
|
|
45087
45230
|
shapes: allShapes
|
|
45088
45231
|
};
|
|
45089
45232
|
var mosaicIndex = new MosaicIndex(mergedLyr, nodes, {flat: false});
|
|
@@ -45898,7 +46041,7 @@ ${svg}
|
|
|
45898
46041
|
});
|
|
45899
46042
|
}
|
|
45900
46043
|
|
|
45901
|
-
var version = "0.6.
|
|
46044
|
+
var version = "0.6.104";
|
|
45902
46045
|
|
|
45903
46046
|
// Parse command line args into commands and run them
|
|
45904
46047
|
// Function takes an optional Node-style callback. A Promise is returned if no callback is given.
|
|
@@ -46222,12 +46365,12 @@ ${svg}
|
|
|
46222
46365
|
|
|
46223
46366
|
var RunCommands = /*#__PURE__*/Object.freeze({
|
|
46224
46367
|
__proto__: null,
|
|
46225
|
-
runCommands: runCommands,
|
|
46226
46368
|
applyCommands: applyCommands,
|
|
46369
|
+
runAndRemoveInfoCommands: runAndRemoveInfoCommands,
|
|
46370
|
+
runCommands: runCommands,
|
|
46227
46371
|
runCommandsXL: runCommandsXL,
|
|
46228
|
-
testCommands: testCommands,
|
|
46229
46372
|
runParsedCommands: runParsedCommands,
|
|
46230
|
-
|
|
46373
|
+
testCommands: testCommands
|
|
46231
46374
|
});
|
|
46232
46375
|
|
|
46233
46376
|
// Return an array containing points from a path iterator, clipped to a bounding box
|