@loaders.gl/shapefile 4.0.0-beta.2 → 4.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dbf-loader.d.ts.map +1 -0
- package/dist/{esm/dbf-loader.js → dbf-loader.js} +2 -2
- package/dist/dbf-loader.js.map +1 -0
- package/dist/dbf-worker.js +82 -26
- package/dist/{dist.min.js → dist.dev.js} +1363 -1971
- package/dist/index.cjs +1107 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/parsers/parse-dbf.d.ts.map +1 -0
- package/dist/{esm/lib → lib}/parsers/parse-dbf.js +8 -9
- package/dist/lib/parsers/parse-dbf.js.map +1 -0
- package/dist/lib/parsers/parse-shapefile.d.ts.map +1 -0
- package/dist/{esm/lib → lib}/parsers/parse-shapefile.js +5 -5
- package/dist/lib/parsers/parse-shapefile.js.map +1 -0
- package/dist/lib/parsers/parse-shp-geometry.d.ts.map +1 -0
- package/dist/{esm/lib → lib}/parsers/parse-shp-geometry.js +1 -1
- package/dist/lib/parsers/parse-shp-geometry.js.map +1 -0
- package/dist/lib/parsers/parse-shp-header.d.ts.map +1 -0
- package/dist/{esm/lib → lib}/parsers/parse-shp-header.js +2 -2
- package/dist/lib/parsers/parse-shp-header.js.map +1 -0
- package/dist/lib/parsers/parse-shp.d.ts.map +1 -0
- package/dist/{esm/lib → lib}/parsers/parse-shp.js +11 -12
- package/dist/lib/parsers/parse-shp.js.map +1 -0
- package/dist/lib/parsers/parse-shx.d.ts.map +1 -0
- package/dist/{esm/lib → lib}/parsers/parse-shx.js +1 -1
- package/dist/lib/parsers/parse-shx.js.map +1 -0
- package/dist/lib/parsers/types.d.ts.map +1 -0
- package/dist/lib/parsers/types.js.map +1 -0
- package/dist/lib/streaming/binary-chunk-reader.d.ts.map +1 -0
- package/dist/{esm/lib → lib}/streaming/binary-chunk-reader.js +4 -5
- package/dist/lib/streaming/binary-chunk-reader.js.map +1 -0
- package/dist/lib/streaming/binary-reader.d.ts.map +1 -0
- package/dist/{esm/lib → lib}/streaming/binary-reader.js +2 -3
- package/dist/lib/streaming/binary-reader.js.map +1 -0
- package/dist/lib/streaming/zip-batch-iterators.d.ts.map +1 -0
- package/dist/lib/streaming/zip-batch-iterators.js.map +1 -0
- package/dist/shapefile-loader.d.ts.map +1 -0
- package/dist/{esm/shapefile-loader.js → shapefile-loader.js} +3 -3
- package/dist/shapefile-loader.js.map +1 -0
- package/dist/shp-loader.d.ts.map +1 -0
- package/dist/{esm/shp-loader.js → shp-loader.js} +2 -2
- package/dist/shp-loader.js.map +1 -0
- package/dist/shp-worker.js +64 -3
- package/dist/{src/workers → workers}/dbf-worker.d.ts.map +1 -1
- package/dist/{esm/workers → workers}/dbf-worker.js +1 -1
- package/dist/workers/dbf-worker.js.map +1 -0
- package/dist/{src/workers → workers}/shp-worker.d.ts.map +1 -1
- package/dist/{esm/workers → workers}/shp-worker.js +1 -1
- package/dist/workers/shp-worker.js.map +1 -0
- package/package.json +18 -10
- package/dist/es5/bundle.js +0 -6
- package/dist/es5/bundle.js.map +0 -1
- package/dist/es5/dbf-loader.js +0 -55
- package/dist/es5/dbf-loader.js.map +0 -1
- package/dist/es5/index.js +0 -60
- package/dist/es5/index.js.map +0 -1
- package/dist/es5/lib/parsers/parse-dbf.js +0 -394
- package/dist/es5/lib/parsers/parse-dbf.js.map +0 -1
- package/dist/es5/lib/parsers/parse-shapefile.js +0 -377
- package/dist/es5/lib/parsers/parse-shapefile.js.map +0 -1
- package/dist/es5/lib/parsers/parse-shp-geometry.js +0 -220
- package/dist/es5/lib/parsers/parse-shp-geometry.js.map +0 -1
- package/dist/es5/lib/parsers/parse-shp-header.js +0 -35
- package/dist/es5/lib/parsers/parse-shp-header.js.map +0 -1
- package/dist/es5/lib/parsers/parse-shp.js +0 -227
- package/dist/es5/lib/parsers/parse-shp.js.map +0 -1
- package/dist/es5/lib/parsers/parse-shx.js +0 -26
- package/dist/es5/lib/parsers/parse-shx.js.map +0 -1
- package/dist/es5/lib/parsers/types.js +0 -2
- package/dist/es5/lib/parsers/types.js.map +0 -1
- package/dist/es5/lib/streaming/binary-chunk-reader.js +0 -178
- package/dist/es5/lib/streaming/binary-chunk-reader.js.map +0 -1
- package/dist/es5/lib/streaming/binary-reader.js +0 -48
- package/dist/es5/lib/streaming/binary-reader.js.map +0 -1
- package/dist/es5/lib/streaming/zip-batch-iterators.js +0 -95
- package/dist/es5/lib/streaming/zip-batch-iterators.js.map +0 -1
- package/dist/es5/shapefile-loader.js +0 -29
- package/dist/es5/shapefile-loader.js.map +0 -1
- package/dist/es5/shp-loader.js +0 -58
- package/dist/es5/shp-loader.js.map +0 -1
- package/dist/es5/workers/dbf-worker.js +0 -6
- package/dist/es5/workers/dbf-worker.js.map +0 -1
- package/dist/es5/workers/shp-worker.js +0 -6
- package/dist/es5/workers/shp-worker.js.map +0 -1
- package/dist/esm/bundle.js +0 -4
- package/dist/esm/bundle.js.map +0 -1
- package/dist/esm/dbf-loader.js.map +0 -1
- package/dist/esm/index.js +0 -7
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/lib/parsers/parse-dbf.js.map +0 -1
- package/dist/esm/lib/parsers/parse-shapefile.js.map +0 -1
- package/dist/esm/lib/parsers/parse-shp-geometry.js.map +0 -1
- package/dist/esm/lib/parsers/parse-shp-header.js.map +0 -1
- package/dist/esm/lib/parsers/parse-shp.js.map +0 -1
- package/dist/esm/lib/parsers/parse-shx.js.map +0 -1
- package/dist/esm/lib/parsers/types.js.map +0 -1
- package/dist/esm/lib/streaming/binary-chunk-reader.js.map +0 -1
- package/dist/esm/lib/streaming/binary-reader.js.map +0 -1
- package/dist/esm/lib/streaming/zip-batch-iterators.js.map +0 -1
- package/dist/esm/shapefile-loader.js.map +0 -1
- package/dist/esm/shp-loader.js.map +0 -1
- package/dist/esm/workers/dbf-worker.js.map +0 -1
- package/dist/esm/workers/shp-worker.js.map +0 -1
- package/dist/src/bundle.d.ts +0 -2
- package/dist/src/bundle.d.ts.map +0 -1
- package/dist/src/dbf-loader.d.ts.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/lib/parsers/parse-dbf.d.ts.map +0 -1
- package/dist/src/lib/parsers/parse-shapefile.d.ts.map +0 -1
- package/dist/src/lib/parsers/parse-shp-geometry.d.ts.map +0 -1
- package/dist/src/lib/parsers/parse-shp-header.d.ts.map +0 -1
- package/dist/src/lib/parsers/parse-shp.d.ts.map +0 -1
- package/dist/src/lib/parsers/parse-shx.d.ts.map +0 -1
- package/dist/src/lib/parsers/types.d.ts.map +0 -1
- package/dist/src/lib/streaming/binary-chunk-reader.d.ts.map +0 -1
- package/dist/src/lib/streaming/binary-reader.d.ts.map +0 -1
- package/dist/src/lib/streaming/zip-batch-iterators.d.ts.map +0 -1
- package/dist/src/shapefile-loader.d.ts.map +0 -1
- package/dist/src/shp-loader.d.ts.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/src/bundle.ts +0 -4
- /package/dist/{src/dbf-loader.d.ts → dbf-loader.d.ts} +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{src/lib → lib}/parsers/parse-dbf.d.ts +0 -0
- /package/dist/{src/lib → lib}/parsers/parse-shapefile.d.ts +0 -0
- /package/dist/{src/lib → lib}/parsers/parse-shp-geometry.d.ts +0 -0
- /package/dist/{src/lib → lib}/parsers/parse-shp-header.d.ts +0 -0
- /package/dist/{src/lib → lib}/parsers/parse-shp.d.ts +0 -0
- /package/dist/{src/lib → lib}/parsers/parse-shx.d.ts +0 -0
- /package/dist/{src/lib → lib}/parsers/types.d.ts +0 -0
- /package/dist/{esm/lib → lib}/parsers/types.js +0 -0
- /package/dist/{src/lib → lib}/streaming/binary-chunk-reader.d.ts +0 -0
- /package/dist/{src/lib → lib}/streaming/binary-reader.d.ts +0 -0
- /package/dist/{src/lib → lib}/streaming/zip-batch-iterators.d.ts +0 -0
- /package/dist/{esm/lib → lib}/streaming/zip-batch-iterators.js +0 -0
- /package/dist/{src/shapefile-loader.d.ts → shapefile-loader.d.ts} +0 -0
- /package/dist/{src/shp-loader.d.ts → shp-loader.d.ts} +0 -0
- /package/dist/{src/workers → workers}/dbf-worker.d.ts +0 -0
- /package/dist/{src/workers → workers}/shp-worker.d.ts +0 -0
|
@@ -1,124 +1,148 @@
|
|
|
1
|
-
(()
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
+
if (typeof exports === 'object' && typeof module === 'object')
|
|
3
|
+
module.exports = factory();
|
|
4
|
+
else if (typeof define === 'function' && define.amd) define([], factory);
|
|
5
|
+
else if (typeof exports === 'object') exports['loader'] = factory();
|
|
6
|
+
else root['loader'] = factory();})(globalThis, function () {
|
|
7
|
+
"use strict";
|
|
8
|
+
var __exports__ = (() => {
|
|
2
9
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
-
return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
-
};
|
|
10
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
12
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
13
|
var __export = (target, all) => {
|
|
11
|
-
__markAsModule(target);
|
|
12
14
|
for (var name in all)
|
|
13
15
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
16
|
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
+
for (let key of __getOwnPropNames(from))
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
|
+
|
|
27
|
+
// src/index.ts
|
|
28
|
+
var src_exports = {};
|
|
29
|
+
__export(src_exports, {
|
|
30
|
+
DBFLoader: () => DBFLoader,
|
|
31
|
+
DBFWorkerLoader: () => DBFWorkerLoader,
|
|
32
|
+
SHPLoader: () => SHPLoader,
|
|
33
|
+
SHPWorkerLoader: () => SHPWorkerLoader,
|
|
34
|
+
ShapefileLoader: () => ShapefileLoader,
|
|
35
|
+
_BinaryChunkReader: () => BinaryChunkReader,
|
|
36
|
+
_BinaryReader: () => BinaryReader,
|
|
37
|
+
_zipBatchIterators: () => zipBatchIterators
|
|
38
|
+
});
|
|
15
39
|
|
|
16
40
|
// src/lib/streaming/binary-chunk-reader.ts
|
|
17
|
-
var BinaryChunkReader
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return false;
|
|
41
|
+
var BinaryChunkReader = class {
|
|
42
|
+
constructor(options) {
|
|
43
|
+
const {
|
|
44
|
+
maxRewindBytes = 0
|
|
45
|
+
} = options || {};
|
|
46
|
+
this.offset = 0;
|
|
47
|
+
this.arrayBuffers = [];
|
|
48
|
+
this.ended = false;
|
|
49
|
+
this.maxRewindBytes = maxRewindBytes;
|
|
50
|
+
}
|
|
51
|
+
write(arrayBuffer) {
|
|
52
|
+
this.arrayBuffers.push(arrayBuffer);
|
|
53
|
+
}
|
|
54
|
+
end() {
|
|
55
|
+
this.arrayBuffers = [];
|
|
56
|
+
this.ended = true;
|
|
57
|
+
}
|
|
58
|
+
hasAvailableBytes(bytes) {
|
|
59
|
+
let bytesAvailable = -this.offset;
|
|
60
|
+
for (const arrayBuffer of this.arrayBuffers) {
|
|
61
|
+
bytesAvailable += arrayBuffer.byteLength;
|
|
62
|
+
if (bytesAvailable >= bytes) {
|
|
63
|
+
return true;
|
|
44
64
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if (start2 + bytes <= buf.byteLength) {
|
|
57
|
-
end = start2 + bytes;
|
|
58
|
-
selectedBuffers.push([i, [start2, end]]);
|
|
59
|
-
return selectedBuffers;
|
|
60
|
-
}
|
|
61
|
-
end = buf.byteLength;
|
|
62
|
-
selectedBuffers.push([i, [start2, end]]);
|
|
63
|
-
bytes -= buf.byteLength - start2;
|
|
64
|
-
offset += buf.byteLength;
|
|
65
|
-
}
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
getDataView(bytes) {
|
|
69
|
-
const bufferOffsets = this.findBufferOffsets(bytes);
|
|
70
|
-
if (!bufferOffsets && this.ended) {
|
|
71
|
-
throw new Error("binary data exhausted");
|
|
72
|
-
}
|
|
73
|
-
if (!bufferOffsets) {
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
if (bufferOffsets.length === 1) {
|
|
77
|
-
const [bufferIndex, [start2, end]] = bufferOffsets[0];
|
|
78
|
-
const arrayBuffer = this.arrayBuffers[bufferIndex];
|
|
79
|
-
const view2 = new DataView(arrayBuffer, start2, end - start2);
|
|
80
|
-
this.offset += bytes;
|
|
81
|
-
this.disposeBuffers();
|
|
82
|
-
return view2;
|
|
83
|
-
}
|
|
84
|
-
const view = new DataView(this._combineArrayBuffers(bufferOffsets));
|
|
85
|
-
this.offset += bytes;
|
|
86
|
-
this.disposeBuffers();
|
|
87
|
-
return view;
|
|
88
|
-
}
|
|
89
|
-
disposeBuffers() {
|
|
90
|
-
while (this.arrayBuffers.length > 0 && this.offset - this.maxRewindBytes >= this.arrayBuffers[0].byteLength) {
|
|
91
|
-
this.offset -= this.arrayBuffers[0].byteLength;
|
|
92
|
-
this.arrayBuffers.shift();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
_combineArrayBuffers(bufferOffsets) {
|
|
96
|
-
let byteLength = 0;
|
|
97
|
-
for (const bufferOffset of bufferOffsets) {
|
|
98
|
-
const [start2, end] = bufferOffset[1];
|
|
99
|
-
byteLength += end - start2;
|
|
100
|
-
}
|
|
101
|
-
const result = new Uint8Array(byteLength);
|
|
102
|
-
let resultOffset = 0;
|
|
103
|
-
for (const bufferOffset of bufferOffsets) {
|
|
104
|
-
const [bufferIndex, [start2, end]] = bufferOffset;
|
|
105
|
-
const sourceArray = new Uint8Array(this.arrayBuffers[bufferIndex]);
|
|
106
|
-
result.set(sourceArray.subarray(start2, end), resultOffset);
|
|
107
|
-
resultOffset += end - start2;
|
|
108
|
-
}
|
|
109
|
-
return result.buffer;
|
|
110
|
-
}
|
|
111
|
-
skip(bytes) {
|
|
112
|
-
this.offset += bytes;
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
findBufferOffsets(bytes) {
|
|
69
|
+
let offset = -this.offset;
|
|
70
|
+
const selectedBuffers = [];
|
|
71
|
+
for (let i = 0; i < this.arrayBuffers.length; i++) {
|
|
72
|
+
const buf = this.arrayBuffers[i];
|
|
73
|
+
if (offset + buf.byteLength <= 0) {
|
|
74
|
+
offset += buf.byteLength;
|
|
75
|
+
continue;
|
|
113
76
|
}
|
|
114
|
-
|
|
115
|
-
|
|
77
|
+
const start2 = offset <= 0 ? Math.abs(offset) : 0;
|
|
78
|
+
let end;
|
|
79
|
+
if (start2 + bytes <= buf.byteLength) {
|
|
80
|
+
end = start2 + bytes;
|
|
81
|
+
selectedBuffers.push([i, [start2, end]]);
|
|
82
|
+
return selectedBuffers;
|
|
116
83
|
}
|
|
117
|
-
|
|
84
|
+
end = buf.byteLength;
|
|
85
|
+
selectedBuffers.push([i, [start2, end]]);
|
|
86
|
+
bytes -= buf.byteLength - start2;
|
|
87
|
+
offset += buf.byteLength;
|
|
88
|
+
}
|
|
89
|
+
return null;
|
|
118
90
|
}
|
|
119
|
-
|
|
91
|
+
getDataView(bytes) {
|
|
92
|
+
const bufferOffsets = this.findBufferOffsets(bytes);
|
|
93
|
+
if (!bufferOffsets && this.ended) {
|
|
94
|
+
throw new Error("binary data exhausted");
|
|
95
|
+
}
|
|
96
|
+
if (!bufferOffsets) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
if (bufferOffsets.length === 1) {
|
|
100
|
+
const [bufferIndex, [start2, end]] = bufferOffsets[0];
|
|
101
|
+
const arrayBuffer = this.arrayBuffers[bufferIndex];
|
|
102
|
+
const view2 = new DataView(arrayBuffer, start2, end - start2);
|
|
103
|
+
this.offset += bytes;
|
|
104
|
+
this.disposeBuffers();
|
|
105
|
+
return view2;
|
|
106
|
+
}
|
|
107
|
+
const view = new DataView(this._combineArrayBuffers(bufferOffsets));
|
|
108
|
+
this.offset += bytes;
|
|
109
|
+
this.disposeBuffers();
|
|
110
|
+
return view;
|
|
111
|
+
}
|
|
112
|
+
disposeBuffers() {
|
|
113
|
+
while (this.arrayBuffers.length > 0 && this.offset - this.maxRewindBytes >= this.arrayBuffers[0].byteLength) {
|
|
114
|
+
this.offset -= this.arrayBuffers[0].byteLength;
|
|
115
|
+
this.arrayBuffers.shift();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
_combineArrayBuffers(bufferOffsets) {
|
|
119
|
+
let byteLength = 0;
|
|
120
|
+
for (const bufferOffset of bufferOffsets) {
|
|
121
|
+
const [start2, end] = bufferOffset[1];
|
|
122
|
+
byteLength += end - start2;
|
|
123
|
+
}
|
|
124
|
+
const result = new Uint8Array(byteLength);
|
|
125
|
+
let resultOffset = 0;
|
|
126
|
+
for (const bufferOffset of bufferOffsets) {
|
|
127
|
+
const [bufferIndex, [start2, end]] = bufferOffset;
|
|
128
|
+
const sourceArray = new Uint8Array(this.arrayBuffers[bufferIndex]);
|
|
129
|
+
result.set(sourceArray.subarray(start2, end), resultOffset);
|
|
130
|
+
resultOffset += end - start2;
|
|
131
|
+
}
|
|
132
|
+
return result.buffer;
|
|
133
|
+
}
|
|
134
|
+
skip(bytes) {
|
|
135
|
+
this.offset += bytes;
|
|
136
|
+
}
|
|
137
|
+
rewind(bytes) {
|
|
138
|
+
this.offset -= bytes;
|
|
139
|
+
}
|
|
140
|
+
};
|
|
120
141
|
|
|
121
142
|
// src/lib/parsers/parse-shp-header.ts
|
|
143
|
+
var LITTLE_ENDIAN = true;
|
|
144
|
+
var BIG_ENDIAN = false;
|
|
145
|
+
var SHP_MAGIC_NUMBER = 9994;
|
|
122
146
|
function parseSHPHeader(headerView) {
|
|
123
147
|
const header = {
|
|
124
148
|
magic: headerView.getInt32(0, BIG_ENDIAN),
|
|
@@ -144,18 +168,13 @@
|
|
|
144
168
|
}
|
|
145
169
|
return header;
|
|
146
170
|
}
|
|
147
|
-
var LITTLE_ENDIAN, BIG_ENDIAN, SHP_MAGIC_NUMBER;
|
|
148
|
-
var init_parse_shp_header = __esm({
|
|
149
|
-
"src/lib/parsers/parse-shp-header.ts"() {
|
|
150
|
-
LITTLE_ENDIAN = true;
|
|
151
|
-
BIG_ENDIAN = false;
|
|
152
|
-
SHP_MAGIC_NUMBER = 9994;
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
171
|
|
|
156
172
|
// src/lib/parsers/parse-shp-geometry.ts
|
|
173
|
+
var LITTLE_ENDIAN2 = true;
|
|
157
174
|
function parseRecord(view, options) {
|
|
158
|
-
const {
|
|
175
|
+
const {
|
|
176
|
+
_maxDimensions = 4
|
|
177
|
+
} = options?.shp || {};
|
|
159
178
|
let offset = 0;
|
|
160
179
|
const type = view.getInt32(offset, LITTLE_ENDIAN2);
|
|
161
180
|
offset += Int32Array.BYTES_PER_ELEMENT;
|
|
@@ -197,7 +216,10 @@
|
|
|
197
216
|
let positions;
|
|
198
217
|
[positions, offset] = parsePositions(view, offset, 1, dim);
|
|
199
218
|
return {
|
|
200
|
-
positions: {
|
|
219
|
+
positions: {
|
|
220
|
+
value: positions,
|
|
221
|
+
size: dim
|
|
222
|
+
},
|
|
201
223
|
type: "Point"
|
|
202
224
|
};
|
|
203
225
|
}
|
|
@@ -219,7 +241,10 @@
|
|
|
219
241
|
}
|
|
220
242
|
const positions = concatPositions(xyPositions, mPositions, zPositions);
|
|
221
243
|
return {
|
|
222
|
-
positions: {
|
|
244
|
+
positions: {
|
|
245
|
+
value: positions,
|
|
246
|
+
size: dim
|
|
247
|
+
},
|
|
223
248
|
type: "Point"
|
|
224
249
|
};
|
|
225
250
|
}
|
|
@@ -251,8 +276,14 @@
|
|
|
251
276
|
if (type === "LineString") {
|
|
252
277
|
return {
|
|
253
278
|
type,
|
|
254
|
-
positions: {
|
|
255
|
-
|
|
279
|
+
positions: {
|
|
280
|
+
value: positions,
|
|
281
|
+
size: dim
|
|
282
|
+
},
|
|
283
|
+
pathIndices: {
|
|
284
|
+
value: ringIndices,
|
|
285
|
+
size: 1
|
|
286
|
+
}
|
|
256
287
|
};
|
|
257
288
|
}
|
|
258
289
|
const polygonIndices = [];
|
|
@@ -268,18 +299,24 @@
|
|
|
268
299
|
polygonIndices.push(nPoints);
|
|
269
300
|
return {
|
|
270
301
|
type,
|
|
271
|
-
positions: {
|
|
272
|
-
|
|
273
|
-
|
|
302
|
+
positions: {
|
|
303
|
+
value: positions,
|
|
304
|
+
size: dim
|
|
305
|
+
},
|
|
306
|
+
primitivePolygonIndices: {
|
|
307
|
+
value: ringIndices,
|
|
308
|
+
size: 1
|
|
309
|
+
},
|
|
310
|
+
polygonIndices: {
|
|
311
|
+
value: new Uint32Array(polygonIndices),
|
|
312
|
+
size: 1
|
|
313
|
+
}
|
|
274
314
|
};
|
|
275
315
|
}
|
|
276
316
|
function parsePositions(view, offset, nPoints, dim) {
|
|
277
317
|
const bufferOffset = view.byteOffset + offset;
|
|
278
318
|
const bufferLength = nPoints * dim * Float64Array.BYTES_PER_ELEMENT;
|
|
279
|
-
return [
|
|
280
|
-
new Float64Array(view.buffer.slice(bufferOffset, bufferOffset + bufferLength)),
|
|
281
|
-
offset + bufferLength
|
|
282
|
-
];
|
|
319
|
+
return [new Float64Array(view.buffer.slice(bufferOffset, bufferOffset + bufferLength)), offset + bufferLength];
|
|
283
320
|
}
|
|
284
321
|
function concatPositions(xyPositions, mPositions, zPositions) {
|
|
285
322
|
if (!(mPositions || zPositions)) {
|
|
@@ -323,14 +360,49 @@
|
|
|
323
360
|
}
|
|
324
361
|
return area / 2;
|
|
325
362
|
}
|
|
326
|
-
var LITTLE_ENDIAN2;
|
|
327
|
-
var init_parse_shp_geometry = __esm({
|
|
328
|
-
"src/lib/parsers/parse-shp-geometry.ts"() {
|
|
329
|
-
LITTLE_ENDIAN2 = true;
|
|
330
|
-
}
|
|
331
|
-
});
|
|
332
363
|
|
|
333
364
|
// src/lib/parsers/parse-shp.ts
|
|
365
|
+
var LITTLE_ENDIAN3 = true;
|
|
366
|
+
var BIG_ENDIAN2 = false;
|
|
367
|
+
var SHP_HEADER_SIZE = 100;
|
|
368
|
+
var SHP_RECORD_HEADER_SIZE = 12;
|
|
369
|
+
var STATE = {
|
|
370
|
+
EXPECTING_HEADER: 0,
|
|
371
|
+
EXPECTING_RECORD: 1,
|
|
372
|
+
END: 2,
|
|
373
|
+
ERROR: 3
|
|
374
|
+
};
|
|
375
|
+
var SHPParser = class {
|
|
376
|
+
options = {};
|
|
377
|
+
binaryReader = new BinaryChunkReader({
|
|
378
|
+
maxRewindBytes: SHP_RECORD_HEADER_SIZE
|
|
379
|
+
});
|
|
380
|
+
state = STATE.EXPECTING_HEADER;
|
|
381
|
+
result = {
|
|
382
|
+
geometries: [],
|
|
383
|
+
progress: {
|
|
384
|
+
bytesTotal: NaN,
|
|
385
|
+
bytesUsed: NaN,
|
|
386
|
+
rows: NaN
|
|
387
|
+
},
|
|
388
|
+
currentIndex: NaN
|
|
389
|
+
};
|
|
390
|
+
constructor(options) {
|
|
391
|
+
this.options = options;
|
|
392
|
+
}
|
|
393
|
+
write(arrayBuffer) {
|
|
394
|
+
this.binaryReader.write(arrayBuffer);
|
|
395
|
+
this.state = parseState(this.state, this.result, this.binaryReader, this.options);
|
|
396
|
+
}
|
|
397
|
+
end() {
|
|
398
|
+
this.binaryReader.end();
|
|
399
|
+
this.state = parseState(this.state, this.result, this.binaryReader, this.options);
|
|
400
|
+
if (this.state !== STATE.END) {
|
|
401
|
+
this.state = STATE.ERROR;
|
|
402
|
+
this.result.error = "SHP incomplete file";
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
};
|
|
334
406
|
function parseSHP(arrayBuffer, options) {
|
|
335
407
|
const shpParser = new SHPParser(options);
|
|
336
408
|
shpParser.write(arrayBuffer);
|
|
@@ -418,85 +490,32 @@
|
|
|
418
490
|
}
|
|
419
491
|
}
|
|
420
492
|
}
|
|
421
|
-
var LITTLE_ENDIAN3, BIG_ENDIAN2, SHP_HEADER_SIZE, SHP_RECORD_HEADER_SIZE, STATE, SHPParser;
|
|
422
|
-
var init_parse_shp = __esm({
|
|
423
|
-
"src/lib/parsers/parse-shp.ts"() {
|
|
424
|
-
init_binary_chunk_reader();
|
|
425
|
-
init_parse_shp_header();
|
|
426
|
-
init_parse_shp_geometry();
|
|
427
|
-
LITTLE_ENDIAN3 = true;
|
|
428
|
-
BIG_ENDIAN2 = false;
|
|
429
|
-
SHP_HEADER_SIZE = 100;
|
|
430
|
-
SHP_RECORD_HEADER_SIZE = 12;
|
|
431
|
-
STATE = {
|
|
432
|
-
EXPECTING_HEADER: 0,
|
|
433
|
-
EXPECTING_RECORD: 1,
|
|
434
|
-
END: 2,
|
|
435
|
-
ERROR: 3
|
|
436
|
-
};
|
|
437
|
-
SHPParser = class {
|
|
438
|
-
constructor(options) {
|
|
439
|
-
this.options = {};
|
|
440
|
-
this.binaryReader = new BinaryChunkReader({ maxRewindBytes: SHP_RECORD_HEADER_SIZE });
|
|
441
|
-
this.state = STATE.EXPECTING_HEADER;
|
|
442
|
-
this.result = {
|
|
443
|
-
geometries: [],
|
|
444
|
-
progress: {
|
|
445
|
-
bytesTotal: NaN,
|
|
446
|
-
bytesUsed: NaN,
|
|
447
|
-
rows: NaN
|
|
448
|
-
},
|
|
449
|
-
currentIndex: NaN
|
|
450
|
-
};
|
|
451
|
-
this.options = options;
|
|
452
|
-
}
|
|
453
|
-
write(arrayBuffer) {
|
|
454
|
-
this.binaryReader.write(arrayBuffer);
|
|
455
|
-
this.state = parseState(this.state, this.result, this.binaryReader, this.options);
|
|
456
|
-
}
|
|
457
|
-
end() {
|
|
458
|
-
this.binaryReader.end();
|
|
459
|
-
this.state = parseState(this.state, this.result, this.binaryReader, this.options);
|
|
460
|
-
if (this.state !== STATE.END) {
|
|
461
|
-
this.state = STATE.ERROR;
|
|
462
|
-
this.result.error = "SHP incomplete file";
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
};
|
|
466
|
-
}
|
|
467
|
-
});
|
|
468
493
|
|
|
469
494
|
// src/shp-loader.ts
|
|
470
|
-
var VERSION
|
|
471
|
-
var
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
options: {
|
|
487
|
-
shp: {
|
|
488
|
-
_maxDimensions: 4
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
};
|
|
492
|
-
SHPLoader = {
|
|
493
|
-
...SHPWorkerLoader,
|
|
494
|
-
parse: async (arrayBuffer, options) => parseSHP(arrayBuffer, options),
|
|
495
|
-
parseSync: parseSHP,
|
|
496
|
-
parseInBatches: (arrayBufferIterator, options) => parseSHPInBatches(arrayBufferIterator, options)
|
|
497
|
-
};
|
|
495
|
+
var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
496
|
+
var SHP_MAGIC_NUMBER2 = [0, 0, 39, 10];
|
|
497
|
+
var SHPWorkerLoader = {
|
|
498
|
+
name: "SHP",
|
|
499
|
+
id: "shp",
|
|
500
|
+
module: "shapefile",
|
|
501
|
+
version: VERSION,
|
|
502
|
+
worker: true,
|
|
503
|
+
category: "geometry",
|
|
504
|
+
extensions: ["shp"],
|
|
505
|
+
mimeTypes: ["application/octet-stream"],
|
|
506
|
+
tests: [new Uint8Array(SHP_MAGIC_NUMBER2).buffer],
|
|
507
|
+
options: {
|
|
508
|
+
shp: {
|
|
509
|
+
_maxDimensions: 4
|
|
510
|
+
}
|
|
498
511
|
}
|
|
499
|
-
}
|
|
512
|
+
};
|
|
513
|
+
var SHPLoader = {
|
|
514
|
+
...SHPWorkerLoader,
|
|
515
|
+
parse: async (arrayBuffer, options) => parseSHP(arrayBuffer, options),
|
|
516
|
+
parseSync: parseSHP,
|
|
517
|
+
parseInBatches: (arrayBufferIterator, options) => parseSHPInBatches(arrayBufferIterator, options)
|
|
518
|
+
};
|
|
500
519
|
|
|
501
520
|
// ../loader-utils/src/loader-types.ts
|
|
502
521
|
async function parseFromContext(data, loaders, options, context) {
|
|
@@ -508,24 +527,16 @@
|
|
|
508
527
|
}
|
|
509
528
|
return context._parseInBatches(data, loader, options, context);
|
|
510
529
|
}
|
|
511
|
-
var init_loader_types = __esm({
|
|
512
|
-
"../loader-utils/src/loader-types.ts"() {
|
|
513
|
-
}
|
|
514
|
-
});
|
|
515
530
|
|
|
516
531
|
// ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
517
532
|
function _typeof(obj) {
|
|
518
533
|
"@babel/helpers - typeof";
|
|
519
|
-
return _typeof = typeof Symbol
|
|
534
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
|
|
520
535
|
return typeof obj2;
|
|
521
536
|
} : function(obj2) {
|
|
522
|
-
return obj2 && typeof Symbol
|
|
537
|
+
return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
523
538
|
}, _typeof(obj);
|
|
524
539
|
}
|
|
525
|
-
var init_typeof = __esm({
|
|
526
|
-
"../../node_modules/@babel/runtime/helpers/esm/typeof.js"() {
|
|
527
|
-
}
|
|
528
|
-
});
|
|
529
540
|
|
|
530
541
|
// ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
531
542
|
function _toPrimitive(input, hint) {
|
|
@@ -540,23 +551,12 @@
|
|
|
540
551
|
}
|
|
541
552
|
return (hint === "string" ? String : Number)(input);
|
|
542
553
|
}
|
|
543
|
-
var init_toPrimitive = __esm({
|
|
544
|
-
"../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js"() {
|
|
545
|
-
init_typeof();
|
|
546
|
-
}
|
|
547
|
-
});
|
|
548
554
|
|
|
549
555
|
// ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
550
556
|
function _toPropertyKey(arg) {
|
|
551
557
|
var key = _toPrimitive(arg, "string");
|
|
552
558
|
return _typeof(key) === "symbol" ? key : String(key);
|
|
553
559
|
}
|
|
554
|
-
var init_toPropertyKey = __esm({
|
|
555
|
-
"../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"() {
|
|
556
|
-
init_typeof();
|
|
557
|
-
init_toPrimitive();
|
|
558
|
-
}
|
|
559
|
-
});
|
|
560
560
|
|
|
561
561
|
// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
562
562
|
function _defineProperty(obj, key, value) {
|
|
@@ -573,18 +573,6 @@
|
|
|
573
573
|
}
|
|
574
574
|
return obj;
|
|
575
575
|
}
|
|
576
|
-
var init_defineProperty = __esm({
|
|
577
|
-
"../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"() {
|
|
578
|
-
init_toPropertyKey();
|
|
579
|
-
}
|
|
580
|
-
});
|
|
581
|
-
|
|
582
|
-
// ../loader-utils/src/index.ts
|
|
583
|
-
var init_src = __esm({
|
|
584
|
-
"../loader-utils/src/index.ts"() {
|
|
585
|
-
init_loader_types();
|
|
586
|
-
}
|
|
587
|
-
});
|
|
588
576
|
|
|
589
577
|
// ../gis/src/lib/binary-to-geojson.ts
|
|
590
578
|
function binaryToGeometry(data, startIndex, endIndex) {
|
|
@@ -601,7 +589,9 @@
|
|
|
601
589
|
}
|
|
602
590
|
}
|
|
603
591
|
function polygonToGeoJson(data, startIndex = -Infinity, endIndex = Infinity) {
|
|
604
|
-
const {
|
|
592
|
+
const {
|
|
593
|
+
positions
|
|
594
|
+
} = data;
|
|
605
595
|
const polygonIndices = data.polygonIndices.value.filter((x) => x >= startIndex && x <= endIndex);
|
|
606
596
|
const primitivePolygonIndices = data.primitivePolygonIndices.value.filter((x) => x >= startIndex && x <= endIndex);
|
|
607
597
|
const multi = polygonIndices.length > 2;
|
|
@@ -613,7 +603,10 @@
|
|
|
613
603
|
const ringCoordinates = ringToGeoJson(positions, startRingIndex, endRingIndex);
|
|
614
604
|
coordinates2.push(ringCoordinates);
|
|
615
605
|
}
|
|
616
|
-
return {
|
|
606
|
+
return {
|
|
607
|
+
type: "Polygon",
|
|
608
|
+
coordinates: coordinates2
|
|
609
|
+
};
|
|
617
610
|
}
|
|
618
611
|
const coordinates = [];
|
|
619
612
|
for (let i = 0; i < polygonIndices.length - 1; i++) {
|
|
@@ -622,31 +615,50 @@
|
|
|
622
615
|
const polygonCoordinates = polygonToGeoJson(data, startPolygonIndex, endPolygonIndex).coordinates;
|
|
623
616
|
coordinates.push(polygonCoordinates);
|
|
624
617
|
}
|
|
625
|
-
return {
|
|
618
|
+
return {
|
|
619
|
+
type: "MultiPolygon",
|
|
620
|
+
coordinates
|
|
621
|
+
};
|
|
626
622
|
}
|
|
627
623
|
function lineStringToGeoJson(data, startIndex = -Infinity, endIndex = Infinity) {
|
|
628
|
-
const {
|
|
624
|
+
const {
|
|
625
|
+
positions
|
|
626
|
+
} = data;
|
|
629
627
|
const pathIndices = data.pathIndices.value.filter((x) => x >= startIndex && x <= endIndex);
|
|
630
628
|
const multi = pathIndices.length > 2;
|
|
631
629
|
if (!multi) {
|
|
632
630
|
const coordinates2 = ringToGeoJson(positions, pathIndices[0], pathIndices[1]);
|
|
633
|
-
return {
|
|
631
|
+
return {
|
|
632
|
+
type: "LineString",
|
|
633
|
+
coordinates: coordinates2
|
|
634
|
+
};
|
|
634
635
|
}
|
|
635
636
|
const coordinates = [];
|
|
636
637
|
for (let i = 0; i < pathIndices.length - 1; i++) {
|
|
637
638
|
const ringCoordinates = ringToGeoJson(positions, pathIndices[i], pathIndices[i + 1]);
|
|
638
639
|
coordinates.push(ringCoordinates);
|
|
639
640
|
}
|
|
640
|
-
return {
|
|
641
|
+
return {
|
|
642
|
+
type: "MultiLineString",
|
|
643
|
+
coordinates
|
|
644
|
+
};
|
|
641
645
|
}
|
|
642
646
|
function pointToGeoJson(data, startIndex, endIndex) {
|
|
643
|
-
const {
|
|
647
|
+
const {
|
|
648
|
+
positions
|
|
649
|
+
} = data;
|
|
644
650
|
const coordinates = ringToGeoJson(positions, startIndex, endIndex);
|
|
645
651
|
const multi = coordinates.length > 1;
|
|
646
652
|
if (multi) {
|
|
647
|
-
return {
|
|
653
|
+
return {
|
|
654
|
+
type: "MultiPoint",
|
|
655
|
+
coordinates
|
|
656
|
+
};
|
|
648
657
|
}
|
|
649
|
-
return {
|
|
658
|
+
return {
|
|
659
|
+
type: "Point",
|
|
660
|
+
coordinates: coordinates[0]
|
|
661
|
+
};
|
|
650
662
|
}
|
|
651
663
|
function ringToGeoJson(positions, startIndex, endIndex) {
|
|
652
664
|
startIndex = startIndex || 0;
|
|
@@ -661,10 +673,6 @@
|
|
|
661
673
|
}
|
|
662
674
|
return ringCoordinates;
|
|
663
675
|
}
|
|
664
|
-
var init_binary_to_geojson = __esm({
|
|
665
|
-
"../gis/src/lib/binary-to-geojson.ts"() {
|
|
666
|
-
}
|
|
667
|
-
});
|
|
668
676
|
|
|
669
677
|
// ../gis/src/lib/transform.ts
|
|
670
678
|
function transformGeoJsonCoords(features, fn) {
|
|
@@ -684,18 +692,6 @@
|
|
|
684
692
|
function isCoord(array) {
|
|
685
693
|
return Array.isArray(array) && Number.isFinite(array[0]) && Number.isFinite(array[1]);
|
|
686
694
|
}
|
|
687
|
-
var init_transform = __esm({
|
|
688
|
-
"../gis/src/lib/transform.ts"() {
|
|
689
|
-
}
|
|
690
|
-
});
|
|
691
|
-
|
|
692
|
-
// ../gis/src/index.ts
|
|
693
|
-
var init_src2 = __esm({
|
|
694
|
-
"../gis/src/index.ts"() {
|
|
695
|
-
init_binary_to_geojson();
|
|
696
|
-
init_transform();
|
|
697
|
-
}
|
|
698
|
-
});
|
|
699
695
|
|
|
700
696
|
// ../../node_modules/proj4/lib/global.js
|
|
701
697
|
function global_default(defs2) {
|
|
@@ -708,66 +704,48 @@
|
|
|
708
704
|
defs2["EPSG:900913"] = defs2["EPSG:3857"];
|
|
709
705
|
defs2["EPSG:102113"] = defs2["EPSG:3857"];
|
|
710
706
|
}
|
|
711
|
-
var init_global = __esm({
|
|
712
|
-
"../../node_modules/proj4/lib/global.js"() {
|
|
713
|
-
}
|
|
714
|
-
});
|
|
715
707
|
|
|
716
708
|
// ../../node_modules/proj4/lib/constants/values.js
|
|
717
|
-
var PJD_3PARAM
|
|
718
|
-
var
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
FORTPI = Math.PI / 4;
|
|
733
|
-
TWO_PI = Math.PI * 2;
|
|
734
|
-
SPI = 3.14159265359;
|
|
735
|
-
}
|
|
736
|
-
});
|
|
709
|
+
var PJD_3PARAM = 1;
|
|
710
|
+
var PJD_7PARAM = 2;
|
|
711
|
+
var PJD_WGS84 = 4;
|
|
712
|
+
var PJD_NODATUM = 5;
|
|
713
|
+
var SEC_TO_RAD = 484813681109536e-20;
|
|
714
|
+
var HALF_PI = Math.PI / 2;
|
|
715
|
+
var SIXTH = 0.16666666666666666;
|
|
716
|
+
var RA4 = 0.04722222222222222;
|
|
717
|
+
var RA6 = 0.022156084656084655;
|
|
718
|
+
var EPSLN = 1e-10;
|
|
719
|
+
var D2R = 0.017453292519943295;
|
|
720
|
+
var R2D = 57.29577951308232;
|
|
721
|
+
var FORTPI = Math.PI / 4;
|
|
722
|
+
var TWO_PI = Math.PI * 2;
|
|
723
|
+
var SPI = 3.14159265359;
|
|
737
724
|
|
|
738
725
|
// ../../node_modules/proj4/lib/constants/PrimeMeridian.js
|
|
739
|
-
var exports;
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
exports.stockholm = 18.058277777778;
|
|
754
|
-
exports.athens = 23.7163375;
|
|
755
|
-
exports.oslo = 10.722916666667;
|
|
756
|
-
}
|
|
757
|
-
});
|
|
726
|
+
var exports = {};
|
|
727
|
+
exports.greenwich = 0;
|
|
728
|
+
exports.lisbon = -9.131906111111;
|
|
729
|
+
exports.paris = 2.337229166667;
|
|
730
|
+
exports.bogota = -74.080916666667;
|
|
731
|
+
exports.madrid = -3.687938888889;
|
|
732
|
+
exports.rome = 12.452333333333;
|
|
733
|
+
exports.bern = 7.439583333333;
|
|
734
|
+
exports.jakarta = 106.807719444444;
|
|
735
|
+
exports.ferro = -17.666666666667;
|
|
736
|
+
exports.brussels = 4.367975;
|
|
737
|
+
exports.stockholm = 18.058277777778;
|
|
738
|
+
exports.athens = 23.7163375;
|
|
739
|
+
exports.oslo = 10.722916666667;
|
|
758
740
|
|
|
759
741
|
// ../../node_modules/proj4/lib/constants/units.js
|
|
760
|
-
var units_default
|
|
761
|
-
|
|
762
|
-
"
|
|
763
|
-
|
|
764
|
-
ft: { to_meter: 0.3048 },
|
|
765
|
-
"us-ft": { to_meter: 1200 / 3937 }
|
|
766
|
-
};
|
|
767
|
-
}
|
|
768
|
-
});
|
|
742
|
+
var units_default = {
|
|
743
|
+
ft: { to_meter: 0.3048 },
|
|
744
|
+
"us-ft": { to_meter: 1200 / 3937 }
|
|
745
|
+
};
|
|
769
746
|
|
|
770
747
|
// ../../node_modules/proj4/lib/match.js
|
|
748
|
+
var ignoredChar = /[\s_\-\/\(\)]/g;
|
|
771
749
|
function match(obj, key) {
|
|
772
750
|
if (obj[key]) {
|
|
773
751
|
return obj[key];
|
|
@@ -784,12 +762,6 @@
|
|
|
784
762
|
}
|
|
785
763
|
}
|
|
786
764
|
}
|
|
787
|
-
var ignoredChar;
|
|
788
|
-
var init_match = __esm({
|
|
789
|
-
"../../node_modules/proj4/lib/match.js"() {
|
|
790
|
-
ignoredChar = /[\s_\-\/\(\)]/g;
|
|
791
|
-
}
|
|
792
|
-
});
|
|
793
765
|
|
|
794
766
|
// ../../node_modules/proj4/lib/projString.js
|
|
795
767
|
function projString_default(defData) {
|
|
@@ -919,16 +891,20 @@
|
|
|
919
891
|
}
|
|
920
892
|
return self;
|
|
921
893
|
}
|
|
922
|
-
var init_projString = __esm({
|
|
923
|
-
"../../node_modules/proj4/lib/projString.js"() {
|
|
924
|
-
init_values();
|
|
925
|
-
init_PrimeMeridian();
|
|
926
|
-
init_units();
|
|
927
|
-
init_match();
|
|
928
|
-
}
|
|
929
|
-
});
|
|
930
894
|
|
|
931
895
|
// ../../node_modules/wkt-parser/parser.js
|
|
896
|
+
var parser_default = parseString;
|
|
897
|
+
var NEUTRAL = 1;
|
|
898
|
+
var KEYWORD = 2;
|
|
899
|
+
var NUMBER = 3;
|
|
900
|
+
var QUOTED = 4;
|
|
901
|
+
var AFTERQUOTE = 5;
|
|
902
|
+
var ENDED = -1;
|
|
903
|
+
var whitespace = /\s/;
|
|
904
|
+
var latin = /[A-Za-z]/;
|
|
905
|
+
var keyword = /[A-Za-z84_]/;
|
|
906
|
+
var endThings = /[,\]]/;
|
|
907
|
+
var digets = /[\d\.E\-\+]/;
|
|
932
908
|
function Parser(text) {
|
|
933
909
|
if (typeof text !== "string") {
|
|
934
910
|
throw new Error("not a string");
|
|
@@ -941,164 +917,147 @@
|
|
|
941
917
|
this.currentObject = null;
|
|
942
918
|
this.state = NEUTRAL;
|
|
943
919
|
}
|
|
944
|
-
function
|
|
945
|
-
var
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
var init_parser = __esm({
|
|
950
|
-
"../../node_modules/wkt-parser/parser.js"() {
|
|
951
|
-
parser_default = parseString;
|
|
952
|
-
NEUTRAL = 1;
|
|
953
|
-
KEYWORD = 2;
|
|
954
|
-
NUMBER = 3;
|
|
955
|
-
QUOTED = 4;
|
|
956
|
-
AFTERQUOTE = 5;
|
|
957
|
-
ENDED = -1;
|
|
958
|
-
whitespace = /\s/;
|
|
959
|
-
latin = /[A-Za-z]/;
|
|
960
|
-
keyword = /[A-Za-z84_]/;
|
|
961
|
-
endThings = /[,\]]/;
|
|
962
|
-
digets = /[\d\.E\-\+]/;
|
|
963
|
-
Parser.prototype.readCharicter = function() {
|
|
964
|
-
var char = this.text[this.place++];
|
|
965
|
-
if (this.state !== QUOTED) {
|
|
966
|
-
while (whitespace.test(char)) {
|
|
967
|
-
if (this.place >= this.text.length) {
|
|
968
|
-
return;
|
|
969
|
-
}
|
|
970
|
-
char = this.text[this.place++];
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
switch (this.state) {
|
|
974
|
-
case NEUTRAL:
|
|
975
|
-
return this.neutral(char);
|
|
976
|
-
case KEYWORD:
|
|
977
|
-
return this.keyword(char);
|
|
978
|
-
case QUOTED:
|
|
979
|
-
return this.quoted(char);
|
|
980
|
-
case AFTERQUOTE:
|
|
981
|
-
return this.afterquote(char);
|
|
982
|
-
case NUMBER:
|
|
983
|
-
return this.number(char);
|
|
984
|
-
case ENDED:
|
|
985
|
-
return;
|
|
986
|
-
}
|
|
987
|
-
};
|
|
988
|
-
Parser.prototype.afterquote = function(char) {
|
|
989
|
-
if (char === '"') {
|
|
990
|
-
this.word += '"';
|
|
991
|
-
this.state = QUOTED;
|
|
992
|
-
return;
|
|
993
|
-
}
|
|
994
|
-
if (endThings.test(char)) {
|
|
995
|
-
this.word = this.word.trim();
|
|
996
|
-
this.afterItem(char);
|
|
997
|
-
return;
|
|
998
|
-
}
|
|
999
|
-
throw new Error(`havn't handled "` + char + '" in afterquote yet, index ' + this.place);
|
|
1000
|
-
};
|
|
1001
|
-
Parser.prototype.afterItem = function(char) {
|
|
1002
|
-
if (char === ",") {
|
|
1003
|
-
if (this.word !== null) {
|
|
1004
|
-
this.currentObject.push(this.word);
|
|
1005
|
-
}
|
|
1006
|
-
this.word = null;
|
|
1007
|
-
this.state = NEUTRAL;
|
|
1008
|
-
return;
|
|
1009
|
-
}
|
|
1010
|
-
if (char === "]") {
|
|
1011
|
-
this.level--;
|
|
1012
|
-
if (this.word !== null) {
|
|
1013
|
-
this.currentObject.push(this.word);
|
|
1014
|
-
this.word = null;
|
|
1015
|
-
}
|
|
1016
|
-
this.state = NEUTRAL;
|
|
1017
|
-
this.currentObject = this.stack.pop();
|
|
1018
|
-
if (!this.currentObject) {
|
|
1019
|
-
this.state = ENDED;
|
|
1020
|
-
}
|
|
1021
|
-
return;
|
|
1022
|
-
}
|
|
1023
|
-
};
|
|
1024
|
-
Parser.prototype.number = function(char) {
|
|
1025
|
-
if (digets.test(char)) {
|
|
1026
|
-
this.word += char;
|
|
1027
|
-
return;
|
|
1028
|
-
}
|
|
1029
|
-
if (endThings.test(char)) {
|
|
1030
|
-
this.word = parseFloat(this.word);
|
|
1031
|
-
this.afterItem(char);
|
|
1032
|
-
return;
|
|
1033
|
-
}
|
|
1034
|
-
throw new Error(`havn't handled "` + char + '" in number yet, index ' + this.place);
|
|
1035
|
-
};
|
|
1036
|
-
Parser.prototype.quoted = function(char) {
|
|
1037
|
-
if (char === '"') {
|
|
1038
|
-
this.state = AFTERQUOTE;
|
|
920
|
+
Parser.prototype.readCharicter = function() {
|
|
921
|
+
var char = this.text[this.place++];
|
|
922
|
+
if (this.state !== QUOTED) {
|
|
923
|
+
while (whitespace.test(char)) {
|
|
924
|
+
if (this.place >= this.text.length) {
|
|
1039
925
|
return;
|
|
1040
926
|
}
|
|
1041
|
-
this.
|
|
927
|
+
char = this.text[this.place++];
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
switch (this.state) {
|
|
931
|
+
case NEUTRAL:
|
|
932
|
+
return this.neutral(char);
|
|
933
|
+
case KEYWORD:
|
|
934
|
+
return this.keyword(char);
|
|
935
|
+
case QUOTED:
|
|
936
|
+
return this.quoted(char);
|
|
937
|
+
case AFTERQUOTE:
|
|
938
|
+
return this.afterquote(char);
|
|
939
|
+
case NUMBER:
|
|
940
|
+
return this.number(char);
|
|
941
|
+
case ENDED:
|
|
1042
942
|
return;
|
|
1043
|
-
};
|
|
1044
|
-
Parser.prototype.keyword = function(char) {
|
|
1045
|
-
if (keyword.test(char)) {
|
|
1046
|
-
this.word += char;
|
|
1047
|
-
return;
|
|
1048
|
-
}
|
|
1049
|
-
if (char === "[") {
|
|
1050
|
-
var newObjects = [];
|
|
1051
|
-
newObjects.push(this.word);
|
|
1052
|
-
this.level++;
|
|
1053
|
-
if (this.root === null) {
|
|
1054
|
-
this.root = newObjects;
|
|
1055
|
-
} else {
|
|
1056
|
-
this.currentObject.push(newObjects);
|
|
1057
|
-
}
|
|
1058
|
-
this.stack.push(this.currentObject);
|
|
1059
|
-
this.currentObject = newObjects;
|
|
1060
|
-
this.state = NEUTRAL;
|
|
1061
|
-
return;
|
|
1062
|
-
}
|
|
1063
|
-
if (endThings.test(char)) {
|
|
1064
|
-
this.afterItem(char);
|
|
1065
|
-
return;
|
|
1066
|
-
}
|
|
1067
|
-
throw new Error(`havn't handled "` + char + '" in keyword yet, index ' + this.place);
|
|
1068
|
-
};
|
|
1069
|
-
Parser.prototype.neutral = function(char) {
|
|
1070
|
-
if (latin.test(char)) {
|
|
1071
|
-
this.word = char;
|
|
1072
|
-
this.state = KEYWORD;
|
|
1073
|
-
return;
|
|
1074
|
-
}
|
|
1075
|
-
if (char === '"') {
|
|
1076
|
-
this.word = "";
|
|
1077
|
-
this.state = QUOTED;
|
|
1078
|
-
return;
|
|
1079
|
-
}
|
|
1080
|
-
if (digets.test(char)) {
|
|
1081
|
-
this.word = char;
|
|
1082
|
-
this.state = NUMBER;
|
|
1083
|
-
return;
|
|
1084
|
-
}
|
|
1085
|
-
if (endThings.test(char)) {
|
|
1086
|
-
this.afterItem(char);
|
|
1087
|
-
return;
|
|
1088
|
-
}
|
|
1089
|
-
throw new Error(`havn't handled "` + char + '" in neutral yet, index ' + this.place);
|
|
1090
|
-
};
|
|
1091
|
-
Parser.prototype.output = function() {
|
|
1092
|
-
while (this.place < this.text.length) {
|
|
1093
|
-
this.readCharicter();
|
|
1094
|
-
}
|
|
1095
|
-
if (this.state === ENDED) {
|
|
1096
|
-
return this.root;
|
|
1097
|
-
}
|
|
1098
|
-
throw new Error('unable to parse string "' + this.text + '". State is ' + this.state);
|
|
1099
|
-
};
|
|
1100
943
|
}
|
|
1101
|
-
}
|
|
944
|
+
};
|
|
945
|
+
Parser.prototype.afterquote = function(char) {
|
|
946
|
+
if (char === '"') {
|
|
947
|
+
this.word += '"';
|
|
948
|
+
this.state = QUOTED;
|
|
949
|
+
return;
|
|
950
|
+
}
|
|
951
|
+
if (endThings.test(char)) {
|
|
952
|
+
this.word = this.word.trim();
|
|
953
|
+
this.afterItem(char);
|
|
954
|
+
return;
|
|
955
|
+
}
|
|
956
|
+
throw new Error(`havn't handled "` + char + '" in afterquote yet, index ' + this.place);
|
|
957
|
+
};
|
|
958
|
+
Parser.prototype.afterItem = function(char) {
|
|
959
|
+
if (char === ",") {
|
|
960
|
+
if (this.word !== null) {
|
|
961
|
+
this.currentObject.push(this.word);
|
|
962
|
+
}
|
|
963
|
+
this.word = null;
|
|
964
|
+
this.state = NEUTRAL;
|
|
965
|
+
return;
|
|
966
|
+
}
|
|
967
|
+
if (char === "]") {
|
|
968
|
+
this.level--;
|
|
969
|
+
if (this.word !== null) {
|
|
970
|
+
this.currentObject.push(this.word);
|
|
971
|
+
this.word = null;
|
|
972
|
+
}
|
|
973
|
+
this.state = NEUTRAL;
|
|
974
|
+
this.currentObject = this.stack.pop();
|
|
975
|
+
if (!this.currentObject) {
|
|
976
|
+
this.state = ENDED;
|
|
977
|
+
}
|
|
978
|
+
return;
|
|
979
|
+
}
|
|
980
|
+
};
|
|
981
|
+
Parser.prototype.number = function(char) {
|
|
982
|
+
if (digets.test(char)) {
|
|
983
|
+
this.word += char;
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
986
|
+
if (endThings.test(char)) {
|
|
987
|
+
this.word = parseFloat(this.word);
|
|
988
|
+
this.afterItem(char);
|
|
989
|
+
return;
|
|
990
|
+
}
|
|
991
|
+
throw new Error(`havn't handled "` + char + '" in number yet, index ' + this.place);
|
|
992
|
+
};
|
|
993
|
+
Parser.prototype.quoted = function(char) {
|
|
994
|
+
if (char === '"') {
|
|
995
|
+
this.state = AFTERQUOTE;
|
|
996
|
+
return;
|
|
997
|
+
}
|
|
998
|
+
this.word += char;
|
|
999
|
+
return;
|
|
1000
|
+
};
|
|
1001
|
+
Parser.prototype.keyword = function(char) {
|
|
1002
|
+
if (keyword.test(char)) {
|
|
1003
|
+
this.word += char;
|
|
1004
|
+
return;
|
|
1005
|
+
}
|
|
1006
|
+
if (char === "[") {
|
|
1007
|
+
var newObjects = [];
|
|
1008
|
+
newObjects.push(this.word);
|
|
1009
|
+
this.level++;
|
|
1010
|
+
if (this.root === null) {
|
|
1011
|
+
this.root = newObjects;
|
|
1012
|
+
} else {
|
|
1013
|
+
this.currentObject.push(newObjects);
|
|
1014
|
+
}
|
|
1015
|
+
this.stack.push(this.currentObject);
|
|
1016
|
+
this.currentObject = newObjects;
|
|
1017
|
+
this.state = NEUTRAL;
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
if (endThings.test(char)) {
|
|
1021
|
+
this.afterItem(char);
|
|
1022
|
+
return;
|
|
1023
|
+
}
|
|
1024
|
+
throw new Error(`havn't handled "` + char + '" in keyword yet, index ' + this.place);
|
|
1025
|
+
};
|
|
1026
|
+
Parser.prototype.neutral = function(char) {
|
|
1027
|
+
if (latin.test(char)) {
|
|
1028
|
+
this.word = char;
|
|
1029
|
+
this.state = KEYWORD;
|
|
1030
|
+
return;
|
|
1031
|
+
}
|
|
1032
|
+
if (char === '"') {
|
|
1033
|
+
this.word = "";
|
|
1034
|
+
this.state = QUOTED;
|
|
1035
|
+
return;
|
|
1036
|
+
}
|
|
1037
|
+
if (digets.test(char)) {
|
|
1038
|
+
this.word = char;
|
|
1039
|
+
this.state = NUMBER;
|
|
1040
|
+
return;
|
|
1041
|
+
}
|
|
1042
|
+
if (endThings.test(char)) {
|
|
1043
|
+
this.afterItem(char);
|
|
1044
|
+
return;
|
|
1045
|
+
}
|
|
1046
|
+
throw new Error(`havn't handled "` + char + '" in neutral yet, index ' + this.place);
|
|
1047
|
+
};
|
|
1048
|
+
Parser.prototype.output = function() {
|
|
1049
|
+
while (this.place < this.text.length) {
|
|
1050
|
+
this.readCharicter();
|
|
1051
|
+
}
|
|
1052
|
+
if (this.state === ENDED) {
|
|
1053
|
+
return this.root;
|
|
1054
|
+
}
|
|
1055
|
+
throw new Error('unable to parse string "' + this.text + '". State is ' + this.state);
|
|
1056
|
+
};
|
|
1057
|
+
function parseString(txt) {
|
|
1058
|
+
var parser = new Parser(txt);
|
|
1059
|
+
return parser.output();
|
|
1060
|
+
}
|
|
1102
1061
|
|
|
1103
1062
|
// ../../node_modules/wkt-parser/process.js
|
|
1104
1063
|
function mapit(obj, key, value) {
|
|
@@ -1209,12 +1168,9 @@
|
|
|
1209
1168
|
return mapit(obj, key, v);
|
|
1210
1169
|
}
|
|
1211
1170
|
}
|
|
1212
|
-
var init_process = __esm({
|
|
1213
|
-
"../../node_modules/wkt-parser/process.js"() {
|
|
1214
|
-
}
|
|
1215
|
-
});
|
|
1216
1171
|
|
|
1217
1172
|
// ../../node_modules/wkt-parser/index.js
|
|
1173
|
+
var D2R2 = 0.017453292519943295;
|
|
1218
1174
|
function rename(obj, params) {
|
|
1219
1175
|
var outName = params[0];
|
|
1220
1176
|
var inName = params[1];
|
|
@@ -1402,14 +1358,6 @@
|
|
|
1402
1358
|
cleanWKT(obj);
|
|
1403
1359
|
return obj;
|
|
1404
1360
|
}
|
|
1405
|
-
var D2R2;
|
|
1406
|
-
var init_wkt_parser = __esm({
|
|
1407
|
-
"../../node_modules/wkt-parser/index.js"() {
|
|
1408
|
-
init_parser();
|
|
1409
|
-
init_process();
|
|
1410
|
-
D2R2 = 0.017453292519943295;
|
|
1411
|
-
}
|
|
1412
|
-
});
|
|
1413
1361
|
|
|
1414
1362
|
// ../../node_modules/proj4/lib/defs.js
|
|
1415
1363
|
function defs(name) {
|
|
@@ -1450,16 +1398,8 @@
|
|
|
1450
1398
|
return;
|
|
1451
1399
|
}
|
|
1452
1400
|
}
|
|
1453
|
-
|
|
1454
|
-
var
|
|
1455
|
-
"../../node_modules/proj4/lib/defs.js"() {
|
|
1456
|
-
init_global();
|
|
1457
|
-
init_projString();
|
|
1458
|
-
init_wkt_parser();
|
|
1459
|
-
global_default(defs);
|
|
1460
|
-
defs_default = defs;
|
|
1461
|
-
}
|
|
1462
|
-
});
|
|
1401
|
+
global_default(defs);
|
|
1402
|
+
var defs_default = defs;
|
|
1463
1403
|
|
|
1464
1404
|
// ../../node_modules/proj4/lib/parseCode.js
|
|
1465
1405
|
function testObj(code) {
|
|
@@ -1468,11 +1408,13 @@
|
|
|
1468
1408
|
function testDef(code) {
|
|
1469
1409
|
return code in defs_default;
|
|
1470
1410
|
}
|
|
1411
|
+
var codeWords = ["PROJECTEDCRS", "PROJCRS", "GEOGCS", "GEOCCS", "PROJCS", "LOCAL_CS", "GEODCRS", "GEODETICCRS", "GEODETICDATUM", "ENGCRS", "ENGINEERINGCRS"];
|
|
1471
1412
|
function testWKT(code) {
|
|
1472
1413
|
return codeWords.some(function(word) {
|
|
1473
1414
|
return code.indexOf(word) > -1;
|
|
1474
1415
|
});
|
|
1475
1416
|
}
|
|
1417
|
+
var codes = ["3857", "900913", "3785", "102113"];
|
|
1476
1418
|
function checkMercator(item) {
|
|
1477
1419
|
var auth = match(item, "authority");
|
|
1478
1420
|
if (!auth) {
|
|
@@ -1514,18 +1456,7 @@
|
|
|
1514
1456
|
return code;
|
|
1515
1457
|
}
|
|
1516
1458
|
}
|
|
1517
|
-
var
|
|
1518
|
-
var init_parseCode = __esm({
|
|
1519
|
-
"../../node_modules/proj4/lib/parseCode.js"() {
|
|
1520
|
-
init_defs();
|
|
1521
|
-
init_wkt_parser();
|
|
1522
|
-
init_projString();
|
|
1523
|
-
init_match();
|
|
1524
|
-
codeWords = ["PROJECTEDCRS", "PROJCRS", "GEOGCS", "GEOCCS", "PROJCS", "LOCAL_CS", "GEODCRS", "GEODETICCRS", "GEODETICDATUM", "ENGCRS", "ENGINEERINGCRS"];
|
|
1525
|
-
codes = ["3857", "900913", "3785", "102113"];
|
|
1526
|
-
parseCode_default = parse;
|
|
1527
|
-
}
|
|
1528
|
-
});
|
|
1459
|
+
var parseCode_default = parse;
|
|
1529
1460
|
|
|
1530
1461
|
// ../../node_modules/proj4/lib/extend.js
|
|
1531
1462
|
function extend_default(destination, source) {
|
|
@@ -1542,40 +1473,22 @@
|
|
|
1542
1473
|
}
|
|
1543
1474
|
return destination;
|
|
1544
1475
|
}
|
|
1545
|
-
var init_extend = __esm({
|
|
1546
|
-
"../../node_modules/proj4/lib/extend.js"() {
|
|
1547
|
-
}
|
|
1548
|
-
});
|
|
1549
1476
|
|
|
1550
1477
|
// ../../node_modules/proj4/lib/common/msfnz.js
|
|
1551
1478
|
function msfnz_default(eccent, sinphi, cosphi) {
|
|
1552
1479
|
var con = eccent * sinphi;
|
|
1553
1480
|
return cosphi / Math.sqrt(1 - con * con);
|
|
1554
1481
|
}
|
|
1555
|
-
var init_msfnz = __esm({
|
|
1556
|
-
"../../node_modules/proj4/lib/common/msfnz.js"() {
|
|
1557
|
-
}
|
|
1558
|
-
});
|
|
1559
1482
|
|
|
1560
1483
|
// ../../node_modules/proj4/lib/common/sign.js
|
|
1561
1484
|
function sign_default(x) {
|
|
1562
1485
|
return x < 0 ? -1 : 1;
|
|
1563
1486
|
}
|
|
1564
|
-
var init_sign = __esm({
|
|
1565
|
-
"../../node_modules/proj4/lib/common/sign.js"() {
|
|
1566
|
-
}
|
|
1567
|
-
});
|
|
1568
1487
|
|
|
1569
1488
|
// ../../node_modules/proj4/lib/common/adjust_lon.js
|
|
1570
1489
|
function adjust_lon_default(x) {
|
|
1571
1490
|
return Math.abs(x) <= SPI ? x : x - sign_default(x) * TWO_PI;
|
|
1572
1491
|
}
|
|
1573
|
-
var init_adjust_lon = __esm({
|
|
1574
|
-
"../../node_modules/proj4/lib/common/adjust_lon.js"() {
|
|
1575
|
-
init_values();
|
|
1576
|
-
init_sign();
|
|
1577
|
-
}
|
|
1578
|
-
});
|
|
1579
1492
|
|
|
1580
1493
|
// ../../node_modules/proj4/lib/common/tsfnz.js
|
|
1581
1494
|
function tsfnz_default(eccent, phi, sinphi) {
|
|
@@ -1584,11 +1497,6 @@
|
|
|
1584
1497
|
con = Math.pow((1 - con) / (1 + con), com);
|
|
1585
1498
|
return Math.tan(0.5 * (HALF_PI - phi)) / con;
|
|
1586
1499
|
}
|
|
1587
|
-
var init_tsfnz = __esm({
|
|
1588
|
-
"../../node_modules/proj4/lib/common/tsfnz.js"() {
|
|
1589
|
-
init_values();
|
|
1590
|
-
}
|
|
1591
|
-
});
|
|
1592
1500
|
|
|
1593
1501
|
// ../../node_modules/proj4/lib/common/phi2z.js
|
|
1594
1502
|
function phi2z_default(eccent, ts) {
|
|
@@ -1605,11 +1513,6 @@
|
|
|
1605
1513
|
}
|
|
1606
1514
|
return -9999;
|
|
1607
1515
|
}
|
|
1608
|
-
var init_phi2z = __esm({
|
|
1609
|
-
"../../node_modules/proj4/lib/common/phi2z.js"() {
|
|
1610
|
-
init_values();
|
|
1611
|
-
}
|
|
1612
|
-
});
|
|
1613
1516
|
|
|
1614
1517
|
// ../../node_modules/proj4/lib/projections/merc.js
|
|
1615
1518
|
function init() {
|
|
@@ -1680,23 +1583,13 @@
|
|
|
1680
1583
|
p.y = lat;
|
|
1681
1584
|
return p;
|
|
1682
1585
|
}
|
|
1683
|
-
var names,
|
|
1684
|
-
var
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
init_values();
|
|
1691
|
-
names = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"];
|
|
1692
|
-
merc_default = {
|
|
1693
|
-
init,
|
|
1694
|
-
forward,
|
|
1695
|
-
inverse,
|
|
1696
|
-
names
|
|
1697
|
-
};
|
|
1698
|
-
}
|
|
1699
|
-
});
|
|
1586
|
+
var names = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"];
|
|
1587
|
+
var merc_default = {
|
|
1588
|
+
init,
|
|
1589
|
+
forward,
|
|
1590
|
+
inverse,
|
|
1591
|
+
names
|
|
1592
|
+
};
|
|
1700
1593
|
|
|
1701
1594
|
// ../../node_modules/proj4/lib/projections/longlat.js
|
|
1702
1595
|
function init2() {
|
|
@@ -1704,20 +1597,18 @@
|
|
|
1704
1597
|
function identity(pt) {
|
|
1705
1598
|
return pt;
|
|
1706
1599
|
}
|
|
1707
|
-
var names2,
|
|
1708
|
-
var
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
inverse: identity,
|
|
1715
|
-
names: names2
|
|
1716
|
-
};
|
|
1717
|
-
}
|
|
1718
|
-
});
|
|
1600
|
+
var names2 = ["longlat", "identity"];
|
|
1601
|
+
var longlat_default = {
|
|
1602
|
+
init: init2,
|
|
1603
|
+
forward: identity,
|
|
1604
|
+
inverse: identity,
|
|
1605
|
+
names: names2
|
|
1606
|
+
};
|
|
1719
1607
|
|
|
1720
1608
|
// ../../node_modules/proj4/lib/projections.js
|
|
1609
|
+
var projs = [merc_default, longlat_default];
|
|
1610
|
+
var names3 = {};
|
|
1611
|
+
var projStore = [];
|
|
1721
1612
|
function add(proj, i) {
|
|
1722
1613
|
var len = projStore.length;
|
|
1723
1614
|
if (!proj.names) {
|
|
@@ -1742,244 +1633,229 @@
|
|
|
1742
1633
|
function start() {
|
|
1743
1634
|
projs.forEach(add);
|
|
1744
1635
|
}
|
|
1745
|
-
var
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
projs = [merc_default, longlat_default];
|
|
1751
|
-
names3 = {};
|
|
1752
|
-
projStore = [];
|
|
1753
|
-
projections_default = {
|
|
1754
|
-
start,
|
|
1755
|
-
add,
|
|
1756
|
-
get
|
|
1757
|
-
};
|
|
1758
|
-
}
|
|
1759
|
-
});
|
|
1636
|
+
var projections_default = {
|
|
1637
|
+
start,
|
|
1638
|
+
add,
|
|
1639
|
+
get
|
|
1640
|
+
};
|
|
1760
1641
|
|
|
1761
1642
|
// ../../node_modules/proj4/lib/constants/Ellipsoid.js
|
|
1762
|
-
var exports2
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
b: 6370997,
|
|
1979
|
-
ellipseName: "Normal Sphere (r=6370997)"
|
|
1980
|
-
};
|
|
1981
|
-
}
|
|
1982
|
-
});
|
|
1643
|
+
var exports2 = {};
|
|
1644
|
+
exports2.MERIT = {
|
|
1645
|
+
a: 6378137,
|
|
1646
|
+
rf: 298.257,
|
|
1647
|
+
ellipseName: "MERIT 1983"
|
|
1648
|
+
};
|
|
1649
|
+
exports2.SGS85 = {
|
|
1650
|
+
a: 6378136,
|
|
1651
|
+
rf: 298.257,
|
|
1652
|
+
ellipseName: "Soviet Geodetic System 85"
|
|
1653
|
+
};
|
|
1654
|
+
exports2.GRS80 = {
|
|
1655
|
+
a: 6378137,
|
|
1656
|
+
rf: 298.257222101,
|
|
1657
|
+
ellipseName: "GRS 1980(IUGG, 1980)"
|
|
1658
|
+
};
|
|
1659
|
+
exports2.IAU76 = {
|
|
1660
|
+
a: 6378140,
|
|
1661
|
+
rf: 298.257,
|
|
1662
|
+
ellipseName: "IAU 1976"
|
|
1663
|
+
};
|
|
1664
|
+
exports2.airy = {
|
|
1665
|
+
a: 6377563396e-3,
|
|
1666
|
+
b: 635625691e-2,
|
|
1667
|
+
ellipseName: "Airy 1830"
|
|
1668
|
+
};
|
|
1669
|
+
exports2.APL4 = {
|
|
1670
|
+
a: 6378137,
|
|
1671
|
+
rf: 298.25,
|
|
1672
|
+
ellipseName: "Appl. Physics. 1965"
|
|
1673
|
+
};
|
|
1674
|
+
exports2.NWL9D = {
|
|
1675
|
+
a: 6378145,
|
|
1676
|
+
rf: 298.25,
|
|
1677
|
+
ellipseName: "Naval Weapons Lab., 1965"
|
|
1678
|
+
};
|
|
1679
|
+
exports2.mod_airy = {
|
|
1680
|
+
a: 6377340189e-3,
|
|
1681
|
+
b: 6356034446e-3,
|
|
1682
|
+
ellipseName: "Modified Airy"
|
|
1683
|
+
};
|
|
1684
|
+
exports2.andrae = {
|
|
1685
|
+
a: 637710443e-2,
|
|
1686
|
+
rf: 300,
|
|
1687
|
+
ellipseName: "Andrae 1876 (Den., Iclnd.)"
|
|
1688
|
+
};
|
|
1689
|
+
exports2.aust_SA = {
|
|
1690
|
+
a: 6378160,
|
|
1691
|
+
rf: 298.25,
|
|
1692
|
+
ellipseName: "Australian Natl & S. Amer. 1969"
|
|
1693
|
+
};
|
|
1694
|
+
exports2.GRS67 = {
|
|
1695
|
+
a: 6378160,
|
|
1696
|
+
rf: 298.247167427,
|
|
1697
|
+
ellipseName: "GRS 67(IUGG 1967)"
|
|
1698
|
+
};
|
|
1699
|
+
exports2.bessel = {
|
|
1700
|
+
a: 6377397155e-3,
|
|
1701
|
+
rf: 299.1528128,
|
|
1702
|
+
ellipseName: "Bessel 1841"
|
|
1703
|
+
};
|
|
1704
|
+
exports2.bess_nam = {
|
|
1705
|
+
a: 6377483865e-3,
|
|
1706
|
+
rf: 299.1528128,
|
|
1707
|
+
ellipseName: "Bessel 1841 (Namibia)"
|
|
1708
|
+
};
|
|
1709
|
+
exports2.clrk66 = {
|
|
1710
|
+
a: 63782064e-1,
|
|
1711
|
+
b: 63565838e-1,
|
|
1712
|
+
ellipseName: "Clarke 1866"
|
|
1713
|
+
};
|
|
1714
|
+
exports2.clrk80 = {
|
|
1715
|
+
a: 6378249145e-3,
|
|
1716
|
+
rf: 293.4663,
|
|
1717
|
+
ellipseName: "Clarke 1880 mod."
|
|
1718
|
+
};
|
|
1719
|
+
exports2.clrk58 = {
|
|
1720
|
+
a: 6378293645208759e-9,
|
|
1721
|
+
rf: 294.2606763692654,
|
|
1722
|
+
ellipseName: "Clarke 1858"
|
|
1723
|
+
};
|
|
1724
|
+
exports2.CPM = {
|
|
1725
|
+
a: 63757387e-1,
|
|
1726
|
+
rf: 334.29,
|
|
1727
|
+
ellipseName: "Comm. des Poids et Mesures 1799"
|
|
1728
|
+
};
|
|
1729
|
+
exports2.delmbr = {
|
|
1730
|
+
a: 6376428,
|
|
1731
|
+
rf: 311.5,
|
|
1732
|
+
ellipseName: "Delambre 1810 (Belgium)"
|
|
1733
|
+
};
|
|
1734
|
+
exports2.engelis = {
|
|
1735
|
+
a: 637813605e-2,
|
|
1736
|
+
rf: 298.2566,
|
|
1737
|
+
ellipseName: "Engelis 1985"
|
|
1738
|
+
};
|
|
1739
|
+
exports2.evrst30 = {
|
|
1740
|
+
a: 6377276345e-3,
|
|
1741
|
+
rf: 300.8017,
|
|
1742
|
+
ellipseName: "Everest 1830"
|
|
1743
|
+
};
|
|
1744
|
+
exports2.evrst48 = {
|
|
1745
|
+
a: 6377304063e-3,
|
|
1746
|
+
rf: 300.8017,
|
|
1747
|
+
ellipseName: "Everest 1948"
|
|
1748
|
+
};
|
|
1749
|
+
exports2.evrst56 = {
|
|
1750
|
+
a: 6377301243e-3,
|
|
1751
|
+
rf: 300.8017,
|
|
1752
|
+
ellipseName: "Everest 1956"
|
|
1753
|
+
};
|
|
1754
|
+
exports2.evrst69 = {
|
|
1755
|
+
a: 6377295664e-3,
|
|
1756
|
+
rf: 300.8017,
|
|
1757
|
+
ellipseName: "Everest 1969"
|
|
1758
|
+
};
|
|
1759
|
+
exports2.evrstSS = {
|
|
1760
|
+
a: 6377298556e-3,
|
|
1761
|
+
rf: 300.8017,
|
|
1762
|
+
ellipseName: "Everest (Sabah & Sarawak)"
|
|
1763
|
+
};
|
|
1764
|
+
exports2.fschr60 = {
|
|
1765
|
+
a: 6378166,
|
|
1766
|
+
rf: 298.3,
|
|
1767
|
+
ellipseName: "Fischer (Mercury Datum) 1960"
|
|
1768
|
+
};
|
|
1769
|
+
exports2.fschr60m = {
|
|
1770
|
+
a: 6378155,
|
|
1771
|
+
rf: 298.3,
|
|
1772
|
+
ellipseName: "Fischer 1960"
|
|
1773
|
+
};
|
|
1774
|
+
exports2.fschr68 = {
|
|
1775
|
+
a: 6378150,
|
|
1776
|
+
rf: 298.3,
|
|
1777
|
+
ellipseName: "Fischer 1968"
|
|
1778
|
+
};
|
|
1779
|
+
exports2.helmert = {
|
|
1780
|
+
a: 6378200,
|
|
1781
|
+
rf: 298.3,
|
|
1782
|
+
ellipseName: "Helmert 1906"
|
|
1783
|
+
};
|
|
1784
|
+
exports2.hough = {
|
|
1785
|
+
a: 6378270,
|
|
1786
|
+
rf: 297,
|
|
1787
|
+
ellipseName: "Hough"
|
|
1788
|
+
};
|
|
1789
|
+
exports2.intl = {
|
|
1790
|
+
a: 6378388,
|
|
1791
|
+
rf: 297,
|
|
1792
|
+
ellipseName: "International 1909 (Hayford)"
|
|
1793
|
+
};
|
|
1794
|
+
exports2.kaula = {
|
|
1795
|
+
a: 6378163,
|
|
1796
|
+
rf: 298.24,
|
|
1797
|
+
ellipseName: "Kaula 1961"
|
|
1798
|
+
};
|
|
1799
|
+
exports2.lerch = {
|
|
1800
|
+
a: 6378139,
|
|
1801
|
+
rf: 298.257,
|
|
1802
|
+
ellipseName: "Lerch 1979"
|
|
1803
|
+
};
|
|
1804
|
+
exports2.mprts = {
|
|
1805
|
+
a: 6397300,
|
|
1806
|
+
rf: 191,
|
|
1807
|
+
ellipseName: "Maupertius 1738"
|
|
1808
|
+
};
|
|
1809
|
+
exports2.new_intl = {
|
|
1810
|
+
a: 63781575e-1,
|
|
1811
|
+
b: 63567722e-1,
|
|
1812
|
+
ellipseName: "New International 1967"
|
|
1813
|
+
};
|
|
1814
|
+
exports2.plessis = {
|
|
1815
|
+
a: 6376523,
|
|
1816
|
+
rf: 6355863,
|
|
1817
|
+
ellipseName: "Plessis 1817 (France)"
|
|
1818
|
+
};
|
|
1819
|
+
exports2.krass = {
|
|
1820
|
+
a: 6378245,
|
|
1821
|
+
rf: 298.3,
|
|
1822
|
+
ellipseName: "Krassovsky, 1942"
|
|
1823
|
+
};
|
|
1824
|
+
exports2.SEasia = {
|
|
1825
|
+
a: 6378155,
|
|
1826
|
+
b: 63567733205e-4,
|
|
1827
|
+
ellipseName: "Southeast Asia"
|
|
1828
|
+
};
|
|
1829
|
+
exports2.walbeck = {
|
|
1830
|
+
a: 6376896,
|
|
1831
|
+
b: 63558348467e-4,
|
|
1832
|
+
ellipseName: "Walbeck"
|
|
1833
|
+
};
|
|
1834
|
+
exports2.WGS60 = {
|
|
1835
|
+
a: 6378165,
|
|
1836
|
+
rf: 298.3,
|
|
1837
|
+
ellipseName: "WGS 60"
|
|
1838
|
+
};
|
|
1839
|
+
exports2.WGS66 = {
|
|
1840
|
+
a: 6378145,
|
|
1841
|
+
rf: 298.25,
|
|
1842
|
+
ellipseName: "WGS 66"
|
|
1843
|
+
};
|
|
1844
|
+
exports2.WGS7 = {
|
|
1845
|
+
a: 6378135,
|
|
1846
|
+
rf: 298.26,
|
|
1847
|
+
ellipseName: "WGS 72"
|
|
1848
|
+
};
|
|
1849
|
+
var WGS84 = exports2.WGS84 = {
|
|
1850
|
+
a: 6378137,
|
|
1851
|
+
rf: 298.257223563,
|
|
1852
|
+
ellipseName: "WGS 84"
|
|
1853
|
+
};
|
|
1854
|
+
exports2.sphere = {
|
|
1855
|
+
a: 6370997,
|
|
1856
|
+
b: 6370997,
|
|
1857
|
+
ellipseName: "Normal Sphere (r=6370997)"
|
|
1858
|
+
};
|
|
1983
1859
|
|
|
1984
1860
|
// ../../node_modules/proj4/lib/deriveConstants.js
|
|
1985
1861
|
function eccentricity(a, b, rf, R_A) {
|
|
@@ -2025,106 +1901,94 @@
|
|
|
2025
1901
|
sphere: sphere2
|
|
2026
1902
|
};
|
|
2027
1903
|
}
|
|
2028
|
-
var init_deriveConstants = __esm({
|
|
2029
|
-
"../../node_modules/proj4/lib/deriveConstants.js"() {
|
|
2030
|
-
init_values();
|
|
2031
|
-
init_Ellipsoid();
|
|
2032
|
-
init_match();
|
|
2033
|
-
}
|
|
2034
|
-
});
|
|
2035
1904
|
|
|
2036
1905
|
// ../../node_modules/proj4/lib/constants/Datum.js
|
|
2037
|
-
var exports3;
|
|
2038
|
-
|
|
2039
|
-
"
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
ellipse: "intl",
|
|
2124
|
-
datumName: "Reseau National Belge 1972"
|
|
2125
|
-
};
|
|
2126
|
-
}
|
|
2127
|
-
});
|
|
1906
|
+
var exports3 = {};
|
|
1907
|
+
exports3.wgs84 = {
|
|
1908
|
+
towgs84: "0,0,0",
|
|
1909
|
+
ellipse: "WGS84",
|
|
1910
|
+
datumName: "WGS84"
|
|
1911
|
+
};
|
|
1912
|
+
exports3.ch1903 = {
|
|
1913
|
+
towgs84: "674.374,15.056,405.346",
|
|
1914
|
+
ellipse: "bessel",
|
|
1915
|
+
datumName: "swiss"
|
|
1916
|
+
};
|
|
1917
|
+
exports3.ggrs87 = {
|
|
1918
|
+
towgs84: "-199.87,74.79,246.62",
|
|
1919
|
+
ellipse: "GRS80",
|
|
1920
|
+
datumName: "Greek_Geodetic_Reference_System_1987"
|
|
1921
|
+
};
|
|
1922
|
+
exports3.nad83 = {
|
|
1923
|
+
towgs84: "0,0,0",
|
|
1924
|
+
ellipse: "GRS80",
|
|
1925
|
+
datumName: "North_American_Datum_1983"
|
|
1926
|
+
};
|
|
1927
|
+
exports3.nad27 = {
|
|
1928
|
+
nadgrids: "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",
|
|
1929
|
+
ellipse: "clrk66",
|
|
1930
|
+
datumName: "North_American_Datum_1927"
|
|
1931
|
+
};
|
|
1932
|
+
exports3.potsdam = {
|
|
1933
|
+
towgs84: "606.0,23.0,413.0",
|
|
1934
|
+
ellipse: "bessel",
|
|
1935
|
+
datumName: "Potsdam Rauenberg 1950 DHDN"
|
|
1936
|
+
};
|
|
1937
|
+
exports3.carthage = {
|
|
1938
|
+
towgs84: "-263.0,6.0,431.0",
|
|
1939
|
+
ellipse: "clark80",
|
|
1940
|
+
datumName: "Carthage 1934 Tunisia"
|
|
1941
|
+
};
|
|
1942
|
+
exports3.hermannskogel = {
|
|
1943
|
+
towgs84: "653.0,-212.0,449.0",
|
|
1944
|
+
ellipse: "bessel",
|
|
1945
|
+
datumName: "Hermannskogel"
|
|
1946
|
+
};
|
|
1947
|
+
exports3.osni52 = {
|
|
1948
|
+
towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",
|
|
1949
|
+
ellipse: "airy",
|
|
1950
|
+
datumName: "Irish National"
|
|
1951
|
+
};
|
|
1952
|
+
exports3.ire65 = {
|
|
1953
|
+
towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",
|
|
1954
|
+
ellipse: "mod_airy",
|
|
1955
|
+
datumName: "Ireland 1965"
|
|
1956
|
+
};
|
|
1957
|
+
exports3.rassadiran = {
|
|
1958
|
+
towgs84: "-133.63,-157.5,-158.62",
|
|
1959
|
+
ellipse: "intl",
|
|
1960
|
+
datumName: "Rassadiran"
|
|
1961
|
+
};
|
|
1962
|
+
exports3.nzgd49 = {
|
|
1963
|
+
towgs84: "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",
|
|
1964
|
+
ellipse: "intl",
|
|
1965
|
+
datumName: "New Zealand Geodetic Datum 1949"
|
|
1966
|
+
};
|
|
1967
|
+
exports3.osgb36 = {
|
|
1968
|
+
towgs84: "446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",
|
|
1969
|
+
ellipse: "airy",
|
|
1970
|
+
datumName: "Airy 1830"
|
|
1971
|
+
};
|
|
1972
|
+
exports3.s_jtsk = {
|
|
1973
|
+
towgs84: "589,76,480",
|
|
1974
|
+
ellipse: "bessel",
|
|
1975
|
+
datumName: "S-JTSK (Ferro)"
|
|
1976
|
+
};
|
|
1977
|
+
exports3.beduaram = {
|
|
1978
|
+
towgs84: "-106,-87,188",
|
|
1979
|
+
ellipse: "clrk80",
|
|
1980
|
+
datumName: "Beduaram"
|
|
1981
|
+
};
|
|
1982
|
+
exports3.gunung_segara = {
|
|
1983
|
+
towgs84: "-403,684,41",
|
|
1984
|
+
ellipse: "bessel",
|
|
1985
|
+
datumName: "Gunung Segara Jakarta"
|
|
1986
|
+
};
|
|
1987
|
+
exports3.rnb72 = {
|
|
1988
|
+
towgs84: "106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",
|
|
1989
|
+
ellipse: "intl",
|
|
1990
|
+
datumName: "Reseau National Belge 1972"
|
|
1991
|
+
};
|
|
2128
1992
|
|
|
2129
1993
|
// ../../node_modules/proj4/lib/datum.js
|
|
2130
1994
|
function datum(datumCode, datum_params, a, b, es, ep2) {
|
|
@@ -2155,13 +2019,7 @@
|
|
|
2155
2019
|
out.ep2 = ep2;
|
|
2156
2020
|
return out;
|
|
2157
2021
|
}
|
|
2158
|
-
var datum_default;
|
|
2159
|
-
var init_datum = __esm({
|
|
2160
|
-
"../../node_modules/proj4/lib/datum.js"() {
|
|
2161
|
-
init_values();
|
|
2162
|
-
datum_default = datum;
|
|
2163
|
-
}
|
|
2164
|
-
});
|
|
2022
|
+
var datum_default = datum;
|
|
2165
2023
|
|
|
2166
2024
|
// ../../node_modules/proj4/lib/Proj.js
|
|
2167
2025
|
function Projection(srsCode, callback) {
|
|
@@ -2210,21 +2068,9 @@
|
|
|
2210
2068
|
this.init();
|
|
2211
2069
|
callback(null, this);
|
|
2212
2070
|
}
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
init_parseCode();
|
|
2217
|
-
init_extend();
|
|
2218
|
-
init_projections();
|
|
2219
|
-
init_deriveConstants();
|
|
2220
|
-
init_Datum();
|
|
2221
|
-
init_datum();
|
|
2222
|
-
init_match();
|
|
2223
|
-
Projection.projections = projections_default;
|
|
2224
|
-
Projection.projections.start();
|
|
2225
|
-
Proj_default = Projection;
|
|
2226
|
-
}
|
|
2227
|
-
});
|
|
2071
|
+
Projection.projections = projections_default;
|
|
2072
|
+
Projection.projections.start();
|
|
2073
|
+
var Proj_default = Projection;
|
|
2228
2074
|
|
|
2229
2075
|
// ../../node_modules/proj4/lib/datumUtils.js
|
|
2230
2076
|
function compareDatums(source, dest) {
|
|
@@ -2381,12 +2227,6 @@
|
|
|
2381
2227
|
};
|
|
2382
2228
|
}
|
|
2383
2229
|
}
|
|
2384
|
-
var init_datumUtils = __esm({
|
|
2385
|
-
"../../node_modules/proj4/lib/datumUtils.js"() {
|
|
2386
|
-
init_values();
|
|
2387
|
-
"use strict";
|
|
2388
|
-
}
|
|
2389
|
-
});
|
|
2390
2230
|
|
|
2391
2231
|
// ../../node_modules/proj4/lib/datum_transform.js
|
|
2392
2232
|
function checkParams(type) {
|
|
@@ -2411,12 +2251,6 @@
|
|
|
2411
2251
|
}
|
|
2412
2252
|
return geocentricToGeodetic(point, dest.es, dest.a, dest.b);
|
|
2413
2253
|
}
|
|
2414
|
-
var init_datum_transform = __esm({
|
|
2415
|
-
"../../node_modules/proj4/lib/datum_transform.js"() {
|
|
2416
|
-
init_values();
|
|
2417
|
-
init_datumUtils();
|
|
2418
|
-
}
|
|
2419
|
-
});
|
|
2420
2254
|
|
|
2421
2255
|
// ../../node_modules/proj4/lib/adjust_axis.js
|
|
2422
2256
|
function adjust_axis_default(crs, denorm, point) {
|
|
@@ -2468,10 +2302,6 @@
|
|
|
2468
2302
|
}
|
|
2469
2303
|
return out;
|
|
2470
2304
|
}
|
|
2471
|
-
var init_adjust_axis = __esm({
|
|
2472
|
-
"../../node_modules/proj4/lib/adjust_axis.js"() {
|
|
2473
|
-
}
|
|
2474
|
-
});
|
|
2475
2305
|
|
|
2476
2306
|
// ../../node_modules/proj4/lib/common/toPoint.js
|
|
2477
2307
|
function toPoint_default(array) {
|
|
@@ -2487,10 +2317,6 @@
|
|
|
2487
2317
|
}
|
|
2488
2318
|
return out;
|
|
2489
2319
|
}
|
|
2490
|
-
var init_toPoint = __esm({
|
|
2491
|
-
"../../node_modules/proj4/lib/common/toPoint.js"() {
|
|
2492
|
-
}
|
|
2493
|
-
});
|
|
2494
2320
|
|
|
2495
2321
|
// ../../node_modules/proj4/lib/checkSanity.js
|
|
2496
2322
|
function checkSanity_default(point) {
|
|
@@ -2508,10 +2334,6 @@
|
|
|
2508
2334
|
throw new TypeError("coordinates must be finite numbers");
|
|
2509
2335
|
}
|
|
2510
2336
|
}
|
|
2511
|
-
var init_checkSanity = __esm({
|
|
2512
|
-
"../../node_modules/proj4/lib/checkSanity.js"() {
|
|
2513
|
-
}
|
|
2514
|
-
});
|
|
2515
2337
|
|
|
2516
2338
|
// ../../node_modules/proj4/lib/transform.js
|
|
2517
2339
|
function checkNotWGS(source, dest) {
|
|
@@ -2582,18 +2404,9 @@
|
|
|
2582
2404
|
}
|
|
2583
2405
|
return point;
|
|
2584
2406
|
}
|
|
2585
|
-
var init_transform2 = __esm({
|
|
2586
|
-
"../../node_modules/proj4/lib/transform.js"() {
|
|
2587
|
-
init_values();
|
|
2588
|
-
init_datum_transform();
|
|
2589
|
-
init_adjust_axis();
|
|
2590
|
-
init_Proj();
|
|
2591
|
-
init_toPoint();
|
|
2592
|
-
init_checkSanity();
|
|
2593
|
-
}
|
|
2594
|
-
});
|
|
2595
2407
|
|
|
2596
2408
|
// ../../node_modules/proj4/lib/core.js
|
|
2409
|
+
var wgs84 = Proj_default("WGS84");
|
|
2597
2410
|
function transformer(from, to, coords) {
|
|
2598
2411
|
var transformedArray, out, keys;
|
|
2599
2412
|
if (Array.isArray(coords)) {
|
|
@@ -2673,17 +2486,22 @@
|
|
|
2673
2486
|
return obj;
|
|
2674
2487
|
}
|
|
2675
2488
|
}
|
|
2676
|
-
var
|
|
2677
|
-
var init_core = __esm({
|
|
2678
|
-
"../../node_modules/proj4/lib/core.js"() {
|
|
2679
|
-
init_Proj();
|
|
2680
|
-
init_transform2();
|
|
2681
|
-
wgs84 = Proj_default("WGS84");
|
|
2682
|
-
core_default = proj4;
|
|
2683
|
-
}
|
|
2684
|
-
});
|
|
2489
|
+
var core_default = proj4;
|
|
2685
2490
|
|
|
2686
2491
|
// ../../node_modules/mgrs/mgrs.js
|
|
2492
|
+
var NUM_100K_SETS = 6;
|
|
2493
|
+
var SET_ORIGIN_COLUMN_LETTERS = "AJSAJS";
|
|
2494
|
+
var SET_ORIGIN_ROW_LETTERS = "AFAFAF";
|
|
2495
|
+
var A = 65;
|
|
2496
|
+
var I = 73;
|
|
2497
|
+
var O = 79;
|
|
2498
|
+
var V = 86;
|
|
2499
|
+
var Z = 90;
|
|
2500
|
+
var mgrs_default = {
|
|
2501
|
+
forward: forward2,
|
|
2502
|
+
inverse: inverse2,
|
|
2503
|
+
toPoint
|
|
2504
|
+
};
|
|
2687
2505
|
function forward2(ll, accuracy) {
|
|
2688
2506
|
accuracy = accuracy || 5;
|
|
2689
2507
|
return encode(LLtoUTM({
|
|
@@ -3102,24 +2920,6 @@
|
|
|
3102
2920
|
throw "Invalid zone letter: " + zoneLetter;
|
|
3103
2921
|
}
|
|
3104
2922
|
}
|
|
3105
|
-
var NUM_100K_SETS, SET_ORIGIN_COLUMN_LETTERS, SET_ORIGIN_ROW_LETTERS, A, I, O, V, Z, mgrs_default;
|
|
3106
|
-
var init_mgrs = __esm({
|
|
3107
|
-
"../../node_modules/mgrs/mgrs.js"() {
|
|
3108
|
-
NUM_100K_SETS = 6;
|
|
3109
|
-
SET_ORIGIN_COLUMN_LETTERS = "AJSAJS";
|
|
3110
|
-
SET_ORIGIN_ROW_LETTERS = "AFAFAF";
|
|
3111
|
-
A = 65;
|
|
3112
|
-
I = 73;
|
|
3113
|
-
O = 79;
|
|
3114
|
-
V = 86;
|
|
3115
|
-
Z = 90;
|
|
3116
|
-
mgrs_default = {
|
|
3117
|
-
forward: forward2,
|
|
3118
|
-
inverse: inverse2,
|
|
3119
|
-
toPoint
|
|
3120
|
-
};
|
|
3121
|
-
}
|
|
3122
|
-
});
|
|
3123
2923
|
|
|
3124
2924
|
// ../../node_modules/proj4/lib/Point.js
|
|
3125
2925
|
function Point(x, y, z) {
|
|
@@ -3146,21 +2946,27 @@
|
|
|
3146
2946
|
}
|
|
3147
2947
|
console.warn("proj4.Point will be removed in version 3, use proj4.toPoint");
|
|
3148
2948
|
}
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
Point.prototype.toMGRS = function(accuracy) {
|
|
3157
|
-
return forward2([this.x, this.y], accuracy);
|
|
3158
|
-
};
|
|
3159
|
-
Point_default = Point;
|
|
3160
|
-
}
|
|
3161
|
-
});
|
|
2949
|
+
Point.fromMGRS = function(mgrsStr) {
|
|
2950
|
+
return new Point(toPoint(mgrsStr));
|
|
2951
|
+
};
|
|
2952
|
+
Point.prototype.toMGRS = function(accuracy) {
|
|
2953
|
+
return forward2([this.x, this.y], accuracy);
|
|
2954
|
+
};
|
|
2955
|
+
var Point_default = Point;
|
|
3162
2956
|
|
|
3163
2957
|
// ../../node_modules/proj4/lib/common/pj_enfn.js
|
|
2958
|
+
var C00 = 1;
|
|
2959
|
+
var C02 = 0.25;
|
|
2960
|
+
var C04 = 0.046875;
|
|
2961
|
+
var C06 = 0.01953125;
|
|
2962
|
+
var C08 = 0.01068115234375;
|
|
2963
|
+
var C22 = 0.75;
|
|
2964
|
+
var C44 = 0.46875;
|
|
2965
|
+
var C46 = 0.013020833333333334;
|
|
2966
|
+
var C48 = 0.007120768229166667;
|
|
2967
|
+
var C66 = 0.3645833333333333;
|
|
2968
|
+
var C68 = 0.005696614583333333;
|
|
2969
|
+
var C88 = 0.3076171875;
|
|
3164
2970
|
function pj_enfn_default(es) {
|
|
3165
2971
|
var en = [];
|
|
3166
2972
|
en[0] = C00 - es * (C02 + es * (C04 + es * (C06 + es * C08)));
|
|
@@ -3172,23 +2978,6 @@
|
|
|
3172
2978
|
en[4] = t * es * C88;
|
|
3173
2979
|
return en;
|
|
3174
2980
|
}
|
|
3175
|
-
var C00, C02, C04, C06, C08, C22, C44, C46, C48, C66, C68, C88;
|
|
3176
|
-
var init_pj_enfn = __esm({
|
|
3177
|
-
"../../node_modules/proj4/lib/common/pj_enfn.js"() {
|
|
3178
|
-
C00 = 1;
|
|
3179
|
-
C02 = 0.25;
|
|
3180
|
-
C04 = 0.046875;
|
|
3181
|
-
C06 = 0.01953125;
|
|
3182
|
-
C08 = 0.01068115234375;
|
|
3183
|
-
C22 = 0.75;
|
|
3184
|
-
C44 = 0.46875;
|
|
3185
|
-
C46 = 0.013020833333333334;
|
|
3186
|
-
C48 = 0.007120768229166667;
|
|
3187
|
-
C66 = 0.3645833333333333;
|
|
3188
|
-
C68 = 0.005696614583333333;
|
|
3189
|
-
C88 = 0.3076171875;
|
|
3190
|
-
}
|
|
3191
|
-
});
|
|
3192
2981
|
|
|
3193
2982
|
// ../../node_modules/proj4/lib/common/pj_mlfn.js
|
|
3194
2983
|
function pj_mlfn_default(phi, sphi, cphi, en) {
|
|
@@ -3196,12 +2985,9 @@
|
|
|
3196
2985
|
sphi *= sphi;
|
|
3197
2986
|
return en[0] * phi - cphi * (en[1] + sphi * (en[2] + sphi * (en[3] + sphi * en[4])));
|
|
3198
2987
|
}
|
|
3199
|
-
var init_pj_mlfn = __esm({
|
|
3200
|
-
"../../node_modules/proj4/lib/common/pj_mlfn.js"() {
|
|
3201
|
-
}
|
|
3202
|
-
});
|
|
3203
2988
|
|
|
3204
2989
|
// ../../node_modules/proj4/lib/common/pj_inv_mlfn.js
|
|
2990
|
+
var MAX_ITER = 20;
|
|
3205
2991
|
function pj_inv_mlfn_default(arg, es, en) {
|
|
3206
2992
|
var k = 1 / (1 - es);
|
|
3207
2993
|
var phi = arg;
|
|
@@ -3216,14 +3002,6 @@
|
|
|
3216
3002
|
}
|
|
3217
3003
|
return phi;
|
|
3218
3004
|
}
|
|
3219
|
-
var MAX_ITER;
|
|
3220
|
-
var init_pj_inv_mlfn = __esm({
|
|
3221
|
-
"../../node_modules/proj4/lib/common/pj_inv_mlfn.js"() {
|
|
3222
|
-
init_pj_mlfn();
|
|
3223
|
-
init_values();
|
|
3224
|
-
MAX_ITER = 20;
|
|
3225
|
-
}
|
|
3226
|
-
});
|
|
3227
3005
|
|
|
3228
3006
|
// ../../node_modules/proj4/lib/projections/tmerc.js
|
|
3229
3007
|
function init3() {
|
|
@@ -3330,24 +3108,13 @@
|
|
|
3330
3108
|
p.y = lat;
|
|
3331
3109
|
return p;
|
|
3332
3110
|
}
|
|
3333
|
-
var names4,
|
|
3334
|
-
var
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
init_values();
|
|
3341
|
-
init_sign();
|
|
3342
|
-
names4 = ["Transverse_Mercator", "Transverse Mercator", "tmerc"];
|
|
3343
|
-
tmerc_default = {
|
|
3344
|
-
init: init3,
|
|
3345
|
-
forward: forward3,
|
|
3346
|
-
inverse: inverse3,
|
|
3347
|
-
names: names4
|
|
3348
|
-
};
|
|
3349
|
-
}
|
|
3350
|
-
});
|
|
3111
|
+
var names4 = ["Transverse_Mercator", "Transverse Mercator", "tmerc"];
|
|
3112
|
+
var tmerc_default = {
|
|
3113
|
+
init: init3,
|
|
3114
|
+
forward: forward3,
|
|
3115
|
+
inverse: inverse3,
|
|
3116
|
+
names: names4
|
|
3117
|
+
};
|
|
3351
3118
|
|
|
3352
3119
|
// ../../node_modules/proj4/lib/common/sinh.js
|
|
3353
3120
|
function sinh_default(x) {
|
|
@@ -3355,10 +3122,6 @@
|
|
|
3355
3122
|
r = (r - 1 / r) / 2;
|
|
3356
3123
|
return r;
|
|
3357
3124
|
}
|
|
3358
|
-
var init_sinh = __esm({
|
|
3359
|
-
"../../node_modules/proj4/lib/common/sinh.js"() {
|
|
3360
|
-
}
|
|
3361
|
-
});
|
|
3362
3125
|
|
|
3363
3126
|
// ../../node_modules/proj4/lib/common/hypot.js
|
|
3364
3127
|
function hypot_default(x, y) {
|
|
@@ -3368,10 +3131,6 @@
|
|
|
3368
3131
|
var b = Math.min(x, y) / (a ? a : 1);
|
|
3369
3132
|
return a * Math.sqrt(1 + Math.pow(b, 2));
|
|
3370
3133
|
}
|
|
3371
|
-
var init_hypot = __esm({
|
|
3372
|
-
"../../node_modules/proj4/lib/common/hypot.js"() {
|
|
3373
|
-
}
|
|
3374
|
-
});
|
|
3375
3134
|
|
|
3376
3135
|
// ../../node_modules/proj4/lib/common/log1py.js
|
|
3377
3136
|
function log1py_default(x) {
|
|
@@ -3379,10 +3138,6 @@
|
|
|
3379
3138
|
var z = y - 1;
|
|
3380
3139
|
return z === 0 ? x : x * Math.log(y) / z;
|
|
3381
3140
|
}
|
|
3382
|
-
var init_log1py = __esm({
|
|
3383
|
-
"../../node_modules/proj4/lib/common/log1py.js"() {
|
|
3384
|
-
}
|
|
3385
|
-
});
|
|
3386
3141
|
|
|
3387
3142
|
// ../../node_modules/proj4/lib/common/asinhy.js
|
|
3388
3143
|
function asinhy_default(x) {
|
|
@@ -3390,12 +3145,6 @@
|
|
|
3390
3145
|
y = log1py_default(y * (1 + y / (hypot_default(1, y) + 1)));
|
|
3391
3146
|
return x < 0 ? -y : y;
|
|
3392
3147
|
}
|
|
3393
|
-
var init_asinhy = __esm({
|
|
3394
|
-
"../../node_modules/proj4/lib/common/asinhy.js"() {
|
|
3395
|
-
init_hypot();
|
|
3396
|
-
init_log1py();
|
|
3397
|
-
}
|
|
3398
|
-
});
|
|
3399
3148
|
|
|
3400
3149
|
// ../../node_modules/proj4/lib/common/gatg.js
|
|
3401
3150
|
function gatg_default(pp, B) {
|
|
@@ -3411,10 +3160,6 @@
|
|
|
3411
3160
|
}
|
|
3412
3161
|
return B + h * Math.sin(2 * B);
|
|
3413
3162
|
}
|
|
3414
|
-
var init_gatg = __esm({
|
|
3415
|
-
"../../node_modules/proj4/lib/common/gatg.js"() {
|
|
3416
|
-
}
|
|
3417
|
-
});
|
|
3418
3163
|
|
|
3419
3164
|
// ../../node_modules/proj4/lib/common/clens.js
|
|
3420
3165
|
function clens_default(pp, arg_r) {
|
|
@@ -3430,10 +3175,6 @@
|
|
|
3430
3175
|
}
|
|
3431
3176
|
return Math.sin(arg_r) * hr;
|
|
3432
3177
|
}
|
|
3433
|
-
var init_clens = __esm({
|
|
3434
|
-
"../../node_modules/proj4/lib/common/clens.js"() {
|
|
3435
|
-
}
|
|
3436
|
-
});
|
|
3437
3178
|
|
|
3438
3179
|
// ../../node_modules/proj4/lib/common/cosh.js
|
|
3439
3180
|
function cosh_default(x) {
|
|
@@ -3441,10 +3182,6 @@
|
|
|
3441
3182
|
r = (r + 1 / r) / 2;
|
|
3442
3183
|
return r;
|
|
3443
3184
|
}
|
|
3444
|
-
var init_cosh = __esm({
|
|
3445
|
-
"../../node_modules/proj4/lib/common/cosh.js"() {
|
|
3446
|
-
}
|
|
3447
|
-
});
|
|
3448
3185
|
|
|
3449
3186
|
// ../../node_modules/proj4/lib/common/clens_cmplx.js
|
|
3450
3187
|
function clens_cmplx_default(pp, arg_r, arg_i) {
|
|
@@ -3472,13 +3209,7 @@
|
|
|
3472
3209
|
r = sin_arg_r * cosh_arg_i;
|
|
3473
3210
|
i = cos_arg_r * sinh_arg_i;
|
|
3474
3211
|
return [r * hr - i * hi, r * hi + i * hr];
|
|
3475
|
-
}
|
|
3476
|
-
var init_clens_cmplx = __esm({
|
|
3477
|
-
"../../node_modules/proj4/lib/common/clens_cmplx.js"() {
|
|
3478
|
-
init_sinh();
|
|
3479
|
-
init_cosh();
|
|
3480
|
-
}
|
|
3481
|
-
});
|
|
3212
|
+
}
|
|
3482
3213
|
|
|
3483
3214
|
// ../../node_modules/proj4/lib/projections/etmerc.js
|
|
3484
3215
|
function init4() {
|
|
@@ -3589,25 +3320,13 @@
|
|
|
3589
3320
|
p.y = lat;
|
|
3590
3321
|
return p;
|
|
3591
3322
|
}
|
|
3592
|
-
var names5,
|
|
3593
|
-
var
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
init_clens();
|
|
3600
|
-
init_clens_cmplx();
|
|
3601
|
-
init_adjust_lon();
|
|
3602
|
-
names5 = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc"];
|
|
3603
|
-
etmerc_default = {
|
|
3604
|
-
init: init4,
|
|
3605
|
-
forward: forward4,
|
|
3606
|
-
inverse: inverse4,
|
|
3607
|
-
names: names5
|
|
3608
|
-
};
|
|
3609
|
-
}
|
|
3610
|
-
});
|
|
3323
|
+
var names5 = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc"];
|
|
3324
|
+
var etmerc_default = {
|
|
3325
|
+
init: init4,
|
|
3326
|
+
forward: forward4,
|
|
3327
|
+
inverse: inverse4,
|
|
3328
|
+
names: names5
|
|
3329
|
+
};
|
|
3611
3330
|
|
|
3612
3331
|
// ../../node_modules/proj4/lib/common/adjust_zone.js
|
|
3613
3332
|
function adjust_zone_default(zone, lon) {
|
|
@@ -3621,13 +3340,9 @@
|
|
|
3621
3340
|
}
|
|
3622
3341
|
return zone;
|
|
3623
3342
|
}
|
|
3624
|
-
var init_adjust_zone = __esm({
|
|
3625
|
-
"../../node_modules/proj4/lib/common/adjust_zone.js"() {
|
|
3626
|
-
init_adjust_lon();
|
|
3627
|
-
}
|
|
3628
|
-
});
|
|
3629
3343
|
|
|
3630
3344
|
// ../../node_modules/proj4/lib/projections/utm.js
|
|
3345
|
+
var dependsOn = "etmerc";
|
|
3631
3346
|
function init5() {
|
|
3632
3347
|
var zone = adjust_zone_default(this.zone, this.long0);
|
|
3633
3348
|
if (zone === void 0) {
|
|
@@ -3642,32 +3357,20 @@
|
|
|
3642
3357
|
this.forward = etmerc_default.forward;
|
|
3643
3358
|
this.inverse = etmerc_default.inverse;
|
|
3644
3359
|
}
|
|
3645
|
-
var
|
|
3646
|
-
var
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
dependsOn = "etmerc";
|
|
3652
|
-
names6 = ["Universal Transverse Mercator System", "utm"];
|
|
3653
|
-
utm_default = {
|
|
3654
|
-
init: init5,
|
|
3655
|
-
names: names6,
|
|
3656
|
-
dependsOn
|
|
3657
|
-
};
|
|
3658
|
-
}
|
|
3659
|
-
});
|
|
3360
|
+
var names6 = ["Universal Transverse Mercator System", "utm"];
|
|
3361
|
+
var utm_default = {
|
|
3362
|
+
init: init5,
|
|
3363
|
+
names: names6,
|
|
3364
|
+
dependsOn
|
|
3365
|
+
};
|
|
3660
3366
|
|
|
3661
3367
|
// ../../node_modules/proj4/lib/common/srat.js
|
|
3662
3368
|
function srat_default(esinp, exp) {
|
|
3663
3369
|
return Math.pow((1 - esinp) / (1 + esinp), exp);
|
|
3664
3370
|
}
|
|
3665
|
-
var init_srat = __esm({
|
|
3666
|
-
"../../node_modules/proj4/lib/common/srat.js"() {
|
|
3667
|
-
}
|
|
3668
|
-
});
|
|
3669
3371
|
|
|
3670
3372
|
// ../../node_modules/proj4/lib/projections/gauss.js
|
|
3373
|
+
var MAX_ITER2 = 20;
|
|
3671
3374
|
function init6() {
|
|
3672
3375
|
var sphi = Math.sin(this.lat0);
|
|
3673
3376
|
var cphi = Math.cos(this.lat0);
|
|
@@ -3704,21 +3407,13 @@
|
|
|
3704
3407
|
p.y = lat;
|
|
3705
3408
|
return p;
|
|
3706
3409
|
}
|
|
3707
|
-
var
|
|
3708
|
-
var
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
gauss_default = {
|
|
3715
|
-
init: init6,
|
|
3716
|
-
forward: forward5,
|
|
3717
|
-
inverse: inverse5,
|
|
3718
|
-
names: names7
|
|
3719
|
-
};
|
|
3720
|
-
}
|
|
3721
|
-
});
|
|
3410
|
+
var names7 = ["gauss"];
|
|
3411
|
+
var gauss_default = {
|
|
3412
|
+
init: init6,
|
|
3413
|
+
forward: forward5,
|
|
3414
|
+
inverse: inverse5,
|
|
3415
|
+
names: names7
|
|
3416
|
+
};
|
|
3722
3417
|
|
|
3723
3418
|
// ../../node_modules/proj4/lib/projections/sterea.js
|
|
3724
3419
|
function init7() {
|
|
@@ -3769,20 +3464,13 @@
|
|
|
3769
3464
|
p.x = adjust_lon_default(p.x + this.long0);
|
|
3770
3465
|
return p;
|
|
3771
3466
|
}
|
|
3772
|
-
var names8,
|
|
3773
|
-
var
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
init: init7,
|
|
3780
|
-
forward: forward6,
|
|
3781
|
-
inverse: inverse6,
|
|
3782
|
-
names: names8
|
|
3783
|
-
};
|
|
3784
|
-
}
|
|
3785
|
-
});
|
|
3467
|
+
var names8 = ["Stereographic_North_Pole", "Oblique_Stereographic", "Polar_Stereographic", "sterea", "Oblique Stereographic Alternative", "Double_Stereographic"];
|
|
3468
|
+
var sterea_default = {
|
|
3469
|
+
init: init7,
|
|
3470
|
+
forward: forward6,
|
|
3471
|
+
inverse: inverse6,
|
|
3472
|
+
names: names8
|
|
3473
|
+
};
|
|
3786
3474
|
|
|
3787
3475
|
// ../../node_modules/proj4/lib/projections/stere.js
|
|
3788
3476
|
function ssfn_(phit, sinphi, eccen) {
|
|
@@ -3909,25 +3597,14 @@
|
|
|
3909
3597
|
p.y = lat;
|
|
3910
3598
|
return p;
|
|
3911
3599
|
}
|
|
3912
|
-
var names9,
|
|
3913
|
-
var
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
init_adjust_lon();
|
|
3921
|
-
names9 = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)"];
|
|
3922
|
-
stere_default = {
|
|
3923
|
-
init: init8,
|
|
3924
|
-
forward: forward7,
|
|
3925
|
-
inverse: inverse7,
|
|
3926
|
-
names: names9,
|
|
3927
|
-
ssfn_
|
|
3928
|
-
};
|
|
3929
|
-
}
|
|
3930
|
-
});
|
|
3600
|
+
var names9 = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)"];
|
|
3601
|
+
var stere_default = {
|
|
3602
|
+
init: init8,
|
|
3603
|
+
forward: forward7,
|
|
3604
|
+
inverse: inverse7,
|
|
3605
|
+
names: names9,
|
|
3606
|
+
ssfn_
|
|
3607
|
+
};
|
|
3931
3608
|
|
|
3932
3609
|
// ../../node_modules/proj4/lib/projections/somerc.js
|
|
3933
3610
|
function init9() {
|
|
@@ -3983,18 +3660,13 @@
|
|
|
3983
3660
|
p.y = phy;
|
|
3984
3661
|
return p;
|
|
3985
3662
|
}
|
|
3986
|
-
var names10
|
|
3987
|
-
var
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
inverse: inverse8,
|
|
3994
|
-
names: names10
|
|
3995
|
-
};
|
|
3996
|
-
}
|
|
3997
|
-
});
|
|
3663
|
+
var names10 = ["somerc"];
|
|
3664
|
+
var somerc_default = {
|
|
3665
|
+
init: init9,
|
|
3666
|
+
forward: forward8,
|
|
3667
|
+
inverse: inverse8,
|
|
3668
|
+
names: names10
|
|
3669
|
+
};
|
|
3998
3670
|
|
|
3999
3671
|
// ../../node_modules/proj4/lib/projections/omerc.js
|
|
4000
3672
|
function init10() {
|
|
@@ -4126,22 +3798,13 @@
|
|
|
4126
3798
|
}
|
|
4127
3799
|
return p;
|
|
4128
3800
|
}
|
|
4129
|
-
var names11,
|
|
4130
|
-
var
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
names11 = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "omerc"];
|
|
4137
|
-
omerc_default = {
|
|
4138
|
-
init: init10,
|
|
4139
|
-
forward: forward9,
|
|
4140
|
-
inverse: inverse9,
|
|
4141
|
-
names: names11
|
|
4142
|
-
};
|
|
4143
|
-
}
|
|
4144
|
-
});
|
|
3801
|
+
var names11 = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "omerc"];
|
|
3802
|
+
var omerc_default = {
|
|
3803
|
+
init: init10,
|
|
3804
|
+
forward: forward9,
|
|
3805
|
+
inverse: inverse9,
|
|
3806
|
+
names: names11
|
|
3807
|
+
};
|
|
4145
3808
|
|
|
4146
3809
|
// ../../node_modules/proj4/lib/projections/lcc.js
|
|
4147
3810
|
function init11() {
|
|
@@ -4235,24 +3898,13 @@
|
|
|
4235
3898
|
p.y = lat;
|
|
4236
3899
|
return p;
|
|
4237
3900
|
}
|
|
4238
|
-
var names12,
|
|
4239
|
-
var
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
init_phi2z();
|
|
4246
|
-
init_values();
|
|
4247
|
-
names12 = ["Lambert Tangential Conformal Conic Projection", "Lambert_Conformal_Conic", "Lambert_Conformal_Conic_2SP", "lcc"];
|
|
4248
|
-
lcc_default = {
|
|
4249
|
-
init: init11,
|
|
4250
|
-
forward: forward10,
|
|
4251
|
-
inverse: inverse10,
|
|
4252
|
-
names: names12
|
|
4253
|
-
};
|
|
4254
|
-
}
|
|
4255
|
-
});
|
|
3901
|
+
var names12 = ["Lambert Tangential Conformal Conic Projection", "Lambert_Conformal_Conic", "Lambert_Conformal_Conic_2SP", "lcc"];
|
|
3902
|
+
var lcc_default = {
|
|
3903
|
+
init: init11,
|
|
3904
|
+
forward: forward10,
|
|
3905
|
+
inverse: inverse10,
|
|
3906
|
+
names: names12
|
|
3907
|
+
};
|
|
4256
3908
|
|
|
4257
3909
|
// ../../node_modules/proj4/lib/projections/krovak.js
|
|
4258
3910
|
function init12() {
|
|
@@ -4338,85 +3990,49 @@
|
|
|
4338
3990
|
}
|
|
4339
3991
|
return p;
|
|
4340
3992
|
}
|
|
4341
|
-
var names13,
|
|
4342
|
-
var
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
forward: forward11,
|
|
4349
|
-
inverse: inverse11,
|
|
4350
|
-
names: names13
|
|
4351
|
-
};
|
|
4352
|
-
}
|
|
4353
|
-
});
|
|
3993
|
+
var names13 = ["Krovak", "krovak"];
|
|
3994
|
+
var krovak_default = {
|
|
3995
|
+
init: init12,
|
|
3996
|
+
forward: forward11,
|
|
3997
|
+
inverse: inverse11,
|
|
3998
|
+
names: names13
|
|
3999
|
+
};
|
|
4354
4000
|
|
|
4355
4001
|
// ../../node_modules/proj4/lib/common/mlfn.js
|
|
4356
4002
|
function mlfn_default(e0, e1, e2, e3, phi) {
|
|
4357
4003
|
return e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi);
|
|
4358
4004
|
}
|
|
4359
|
-
var init_mlfn = __esm({
|
|
4360
|
-
"../../node_modules/proj4/lib/common/mlfn.js"() {
|
|
4361
|
-
}
|
|
4362
|
-
});
|
|
4363
4005
|
|
|
4364
4006
|
// ../../node_modules/proj4/lib/common/e0fn.js
|
|
4365
4007
|
function e0fn_default(x) {
|
|
4366
4008
|
return 1 - 0.25 * x * (1 + x / 16 * (3 + 1.25 * x));
|
|
4367
4009
|
}
|
|
4368
|
-
var init_e0fn = __esm({
|
|
4369
|
-
"../../node_modules/proj4/lib/common/e0fn.js"() {
|
|
4370
|
-
}
|
|
4371
|
-
});
|
|
4372
4010
|
|
|
4373
4011
|
// ../../node_modules/proj4/lib/common/e1fn.js
|
|
4374
4012
|
function e1fn_default(x) {
|
|
4375
4013
|
return 0.375 * x * (1 + 0.25 * x * (1 + 0.46875 * x));
|
|
4376
4014
|
}
|
|
4377
|
-
var init_e1fn = __esm({
|
|
4378
|
-
"../../node_modules/proj4/lib/common/e1fn.js"() {
|
|
4379
|
-
}
|
|
4380
|
-
});
|
|
4381
4015
|
|
|
4382
4016
|
// ../../node_modules/proj4/lib/common/e2fn.js
|
|
4383
4017
|
function e2fn_default(x) {
|
|
4384
4018
|
return 0.05859375 * x * x * (1 + 0.75 * x);
|
|
4385
4019
|
}
|
|
4386
|
-
var init_e2fn = __esm({
|
|
4387
|
-
"../../node_modules/proj4/lib/common/e2fn.js"() {
|
|
4388
|
-
}
|
|
4389
|
-
});
|
|
4390
4020
|
|
|
4391
4021
|
// ../../node_modules/proj4/lib/common/e3fn.js
|
|
4392
4022
|
function e3fn_default(x) {
|
|
4393
4023
|
return x * x * x * (35 / 3072);
|
|
4394
4024
|
}
|
|
4395
|
-
var init_e3fn = __esm({
|
|
4396
|
-
"../../node_modules/proj4/lib/common/e3fn.js"() {
|
|
4397
|
-
}
|
|
4398
|
-
});
|
|
4399
4025
|
|
|
4400
4026
|
// ../../node_modules/proj4/lib/common/gN.js
|
|
4401
4027
|
function gN_default(a, e, sinphi) {
|
|
4402
4028
|
var temp = e * sinphi;
|
|
4403
4029
|
return a / Math.sqrt(1 - temp * temp);
|
|
4404
4030
|
}
|
|
4405
|
-
var init_gN = __esm({
|
|
4406
|
-
"../../node_modules/proj4/lib/common/gN.js"() {
|
|
4407
|
-
}
|
|
4408
|
-
});
|
|
4409
4031
|
|
|
4410
4032
|
// ../../node_modules/proj4/lib/common/adjust_lat.js
|
|
4411
4033
|
function adjust_lat_default(x) {
|
|
4412
4034
|
return Math.abs(x) < HALF_PI ? x : x - sign_default(x) * Math.PI;
|
|
4413
4035
|
}
|
|
4414
|
-
var init_adjust_lat = __esm({
|
|
4415
|
-
"../../node_modules/proj4/lib/common/adjust_lat.js"() {
|
|
4416
|
-
init_values();
|
|
4417
|
-
init_sign();
|
|
4418
|
-
}
|
|
4419
|
-
});
|
|
4420
4036
|
|
|
4421
4037
|
// ../../node_modules/proj4/lib/common/imlfn.js
|
|
4422
4038
|
function imlfn_default(ml, e0, e1, e2, e3) {
|
|
@@ -4432,10 +4048,6 @@
|
|
|
4432
4048
|
}
|
|
4433
4049
|
return NaN;
|
|
4434
4050
|
}
|
|
4435
|
-
var init_imlfn = __esm({
|
|
4436
|
-
"../../node_modules/proj4/lib/common/imlfn.js"() {
|
|
4437
|
-
}
|
|
4438
|
-
});
|
|
4439
4051
|
|
|
4440
4052
|
// ../../node_modules/proj4/lib/projections/cass.js
|
|
4441
4053
|
function init13() {
|
|
@@ -4504,28 +4116,13 @@
|
|
|
4504
4116
|
p.y = adjust_lat_default(phi);
|
|
4505
4117
|
return p;
|
|
4506
4118
|
}
|
|
4507
|
-
var names14,
|
|
4508
|
-
var
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
init_e3fn();
|
|
4515
|
-
init_gN();
|
|
4516
|
-
init_adjust_lon();
|
|
4517
|
-
init_adjust_lat();
|
|
4518
|
-
init_imlfn();
|
|
4519
|
-
init_values();
|
|
4520
|
-
names14 = ["Cassini", "Cassini_Soldner", "cass"];
|
|
4521
|
-
cass_default = {
|
|
4522
|
-
init: init13,
|
|
4523
|
-
forward: forward12,
|
|
4524
|
-
inverse: inverse12,
|
|
4525
|
-
names: names14
|
|
4526
|
-
};
|
|
4527
|
-
}
|
|
4528
|
-
});
|
|
4119
|
+
var names14 = ["Cassini", "Cassini_Soldner", "cass"];
|
|
4120
|
+
var cass_default = {
|
|
4121
|
+
init: init13,
|
|
4122
|
+
forward: forward12,
|
|
4123
|
+
inverse: inverse12,
|
|
4124
|
+
names: names14
|
|
4125
|
+
};
|
|
4529
4126
|
|
|
4530
4127
|
// ../../node_modules/proj4/lib/common/qsfnz.js
|
|
4531
4128
|
function qsfnz_default(eccent, sinphi) {
|
|
@@ -4537,12 +4134,12 @@
|
|
|
4537
4134
|
return 2 * sinphi;
|
|
4538
4135
|
}
|
|
4539
4136
|
}
|
|
4540
|
-
var init_qsfnz = __esm({
|
|
4541
|
-
"../../node_modules/proj4/lib/common/qsfnz.js"() {
|
|
4542
|
-
}
|
|
4543
|
-
});
|
|
4544
4137
|
|
|
4545
4138
|
// ../../node_modules/proj4/lib/projections/laea.js
|
|
4139
|
+
var S_POLE = 1;
|
|
4140
|
+
var N_POLE = 2;
|
|
4141
|
+
var EQUIT = 3;
|
|
4142
|
+
var OBLIQ = 4;
|
|
4546
4143
|
function init14() {
|
|
4547
4144
|
var t = Math.abs(this.lat0);
|
|
4548
4145
|
if (Math.abs(t - HALF_PI) < EPSLN) {
|
|
@@ -4756,6 +4353,12 @@
|
|
|
4756
4353
|
p.y = phi;
|
|
4757
4354
|
return p;
|
|
4758
4355
|
}
|
|
4356
|
+
var P00 = 0.3333333333333333;
|
|
4357
|
+
var P01 = 0.17222222222222222;
|
|
4358
|
+
var P02 = 0.10257936507936508;
|
|
4359
|
+
var P10 = 0.06388888888888888;
|
|
4360
|
+
var P11 = 0.0664021164021164;
|
|
4361
|
+
var P20 = 0.016415012942191543;
|
|
4759
4362
|
function authset(es) {
|
|
4760
4363
|
var t;
|
|
4761
4364
|
var APA = [];
|
|
@@ -4773,35 +4376,17 @@
|
|
|
4773
4376
|
var t = beta + beta;
|
|
4774
4377
|
return beta + APA[0] * Math.sin(t) + APA[1] * Math.sin(t + t) + APA[2] * Math.sin(t + t + t);
|
|
4775
4378
|
}
|
|
4776
|
-
var
|
|
4777
|
-
var
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
P01 = 0.17222222222222222;
|
|
4788
|
-
P02 = 0.10257936507936508;
|
|
4789
|
-
P10 = 0.06388888888888888;
|
|
4790
|
-
P11 = 0.0664021164021164;
|
|
4791
|
-
P20 = 0.016415012942191543;
|
|
4792
|
-
names15 = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"];
|
|
4793
|
-
laea_default = {
|
|
4794
|
-
init: init14,
|
|
4795
|
-
forward: forward13,
|
|
4796
|
-
inverse: inverse13,
|
|
4797
|
-
names: names15,
|
|
4798
|
-
S_POLE,
|
|
4799
|
-
N_POLE,
|
|
4800
|
-
EQUIT,
|
|
4801
|
-
OBLIQ
|
|
4802
|
-
};
|
|
4803
|
-
}
|
|
4804
|
-
});
|
|
4379
|
+
var names15 = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"];
|
|
4380
|
+
var laea_default = {
|
|
4381
|
+
init: init14,
|
|
4382
|
+
forward: forward13,
|
|
4383
|
+
inverse: inverse13,
|
|
4384
|
+
names: names15,
|
|
4385
|
+
S_POLE,
|
|
4386
|
+
N_POLE,
|
|
4387
|
+
EQUIT,
|
|
4388
|
+
OBLIQ
|
|
4389
|
+
};
|
|
4805
4390
|
|
|
4806
4391
|
// ../../node_modules/proj4/lib/common/asinz.js
|
|
4807
4392
|
function asinz_default(x) {
|
|
@@ -4810,10 +4395,6 @@
|
|
|
4810
4395
|
}
|
|
4811
4396
|
return Math.asin(x);
|
|
4812
4397
|
}
|
|
4813
|
-
var init_asinz = __esm({
|
|
4814
|
-
"../../node_modules/proj4/lib/common/asinz.js"() {
|
|
4815
|
-
}
|
|
4816
|
-
});
|
|
4817
4398
|
|
|
4818
4399
|
// ../../node_modules/proj4/lib/projections/aea.js
|
|
4819
4400
|
function init15() {
|
|
@@ -4907,24 +4488,14 @@
|
|
|
4907
4488
|
}
|
|
4908
4489
|
return null;
|
|
4909
4490
|
}
|
|
4910
|
-
var names16,
|
|
4911
|
-
var
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
names16 = ["Albers_Conic_Equal_Area", "Albers", "aea"];
|
|
4919
|
-
aea_default = {
|
|
4920
|
-
init: init15,
|
|
4921
|
-
forward: forward14,
|
|
4922
|
-
inverse: inverse14,
|
|
4923
|
-
names: names16,
|
|
4924
|
-
phi1z
|
|
4925
|
-
};
|
|
4926
|
-
}
|
|
4927
|
-
});
|
|
4491
|
+
var names16 = ["Albers_Conic_Equal_Area", "Albers", "aea"];
|
|
4492
|
+
var aea_default = {
|
|
4493
|
+
init: init15,
|
|
4494
|
+
forward: forward14,
|
|
4495
|
+
inverse: inverse14,
|
|
4496
|
+
names: names16,
|
|
4497
|
+
phi1z
|
|
4498
|
+
};
|
|
4928
4499
|
|
|
4929
4500
|
// ../../node_modules/proj4/lib/projections/gnom.js
|
|
4930
4501
|
function init16() {
|
|
@@ -4983,21 +4554,13 @@
|
|
|
4983
4554
|
p.y = lat;
|
|
4984
4555
|
return p;
|
|
4985
4556
|
}
|
|
4986
|
-
var names17
|
|
4987
|
-
var
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
gnom_default = {
|
|
4994
|
-
init: init16,
|
|
4995
|
-
forward: forward15,
|
|
4996
|
-
inverse: inverse15,
|
|
4997
|
-
names: names17
|
|
4998
|
-
};
|
|
4999
|
-
}
|
|
5000
|
-
});
|
|
4557
|
+
var names17 = ["gnom"];
|
|
4558
|
+
var gnom_default = {
|
|
4559
|
+
init: init16,
|
|
4560
|
+
forward: forward15,
|
|
4561
|
+
inverse: inverse15,
|
|
4562
|
+
names: names17
|
|
4563
|
+
};
|
|
5001
4564
|
|
|
5002
4565
|
// ../../node_modules/proj4/lib/common/iqsfnz.js
|
|
5003
4566
|
function iqsfnz_default(eccent, q) {
|
|
@@ -5026,11 +4589,6 @@
|
|
|
5026
4589
|
}
|
|
5027
4590
|
return NaN;
|
|
5028
4591
|
}
|
|
5029
|
-
var init_iqsfnz = __esm({
|
|
5030
|
-
"../../node_modules/proj4/lib/common/iqsfnz.js"() {
|
|
5031
|
-
init_values();
|
|
5032
|
-
}
|
|
5033
|
-
});
|
|
5034
4592
|
|
|
5035
4593
|
// ../../node_modules/proj4/lib/projections/cea.js
|
|
5036
4594
|
function init17() {
|
|
@@ -5070,22 +4628,13 @@
|
|
|
5070
4628
|
p.y = lat;
|
|
5071
4629
|
return p;
|
|
5072
4630
|
}
|
|
5073
|
-
var names18
|
|
5074
|
-
var
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
names18 = ["cea"];
|
|
5081
|
-
cea_default = {
|
|
5082
|
-
init: init17,
|
|
5083
|
-
forward: forward16,
|
|
5084
|
-
inverse: inverse16,
|
|
5085
|
-
names: names18
|
|
5086
|
-
};
|
|
5087
|
-
}
|
|
5088
|
-
});
|
|
4631
|
+
var names18 = ["cea"];
|
|
4632
|
+
var cea_default = {
|
|
4633
|
+
init: init17,
|
|
4634
|
+
forward: forward16,
|
|
4635
|
+
inverse: inverse16,
|
|
4636
|
+
names: names18
|
|
4637
|
+
};
|
|
5089
4638
|
|
|
5090
4639
|
// ../../node_modules/proj4/lib/projections/eqc.js
|
|
5091
4640
|
function init18() {
|
|
@@ -5113,22 +4662,16 @@
|
|
|
5113
4662
|
p.y = adjust_lat_default(this.lat0 + (y - this.y0) / this.a);
|
|
5114
4663
|
return p;
|
|
5115
4664
|
}
|
|
5116
|
-
var names19,
|
|
5117
|
-
var
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
init: init18,
|
|
5124
|
-
forward: forward17,
|
|
5125
|
-
inverse: inverse17,
|
|
5126
|
-
names: names19
|
|
5127
|
-
};
|
|
5128
|
-
}
|
|
5129
|
-
});
|
|
4665
|
+
var names19 = ["Equirectangular", "Equidistant_Cylindrical", "eqc"];
|
|
4666
|
+
var eqc_default = {
|
|
4667
|
+
init: init18,
|
|
4668
|
+
forward: forward17,
|
|
4669
|
+
inverse: inverse17,
|
|
4670
|
+
names: names19
|
|
4671
|
+
};
|
|
5130
4672
|
|
|
5131
4673
|
// ../../node_modules/proj4/lib/projections/poly.js
|
|
4674
|
+
var MAX_ITER3 = 20;
|
|
5132
4675
|
function init19() {
|
|
5133
4676
|
this.temp = this.b / this.a;
|
|
5134
4677
|
this.es = 1 - Math.pow(this.temp, 2);
|
|
@@ -5224,28 +4767,13 @@
|
|
|
5224
4767
|
p.y = lat;
|
|
5225
4768
|
return p;
|
|
5226
4769
|
}
|
|
5227
|
-
var
|
|
5228
|
-
var
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
init_adjust_lon();
|
|
5235
|
-
init_adjust_lat();
|
|
5236
|
-
init_mlfn();
|
|
5237
|
-
init_values();
|
|
5238
|
-
init_gN();
|
|
5239
|
-
MAX_ITER3 = 20;
|
|
5240
|
-
names20 = ["Polyconic", "poly"];
|
|
5241
|
-
poly_default = {
|
|
5242
|
-
init: init19,
|
|
5243
|
-
forward: forward18,
|
|
5244
|
-
inverse: inverse18,
|
|
5245
|
-
names: names20
|
|
5246
|
-
};
|
|
5247
|
-
}
|
|
5248
|
-
});
|
|
4770
|
+
var names20 = ["Polyconic", "poly"];
|
|
4771
|
+
var poly_default = {
|
|
4772
|
+
init: init19,
|
|
4773
|
+
forward: forward18,
|
|
4774
|
+
inverse: inverse18,
|
|
4775
|
+
names: names20
|
|
4776
|
+
};
|
|
5249
4777
|
|
|
5250
4778
|
// ../../node_modules/proj4/lib/projections/nzmg.js
|
|
5251
4779
|
function init20() {
|
|
@@ -5400,19 +4928,13 @@
|
|
|
5400
4928
|
p.y = lat;
|
|
5401
4929
|
return p;
|
|
5402
4930
|
}
|
|
5403
|
-
var names21,
|
|
5404
|
-
var
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
forward: forward19,
|
|
5411
|
-
inverse: inverse19,
|
|
5412
|
-
names: names21
|
|
5413
|
-
};
|
|
5414
|
-
}
|
|
5415
|
-
});
|
|
4931
|
+
var names21 = ["New_Zealand_Map_Grid", "nzmg"];
|
|
4932
|
+
var nzmg_default = {
|
|
4933
|
+
init: init20,
|
|
4934
|
+
forward: forward19,
|
|
4935
|
+
inverse: inverse19,
|
|
4936
|
+
names: names21
|
|
4937
|
+
};
|
|
5416
4938
|
|
|
5417
4939
|
// ../../node_modules/proj4/lib/projections/mill.js
|
|
5418
4940
|
function init21() {
|
|
@@ -5436,21 +4958,16 @@
|
|
|
5436
4958
|
p.y = lat;
|
|
5437
4959
|
return p;
|
|
5438
4960
|
}
|
|
5439
|
-
var names22,
|
|
5440
|
-
var
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
forward: forward20,
|
|
5447
|
-
inverse: inverse20,
|
|
5448
|
-
names: names22
|
|
5449
|
-
};
|
|
5450
|
-
}
|
|
5451
|
-
});
|
|
4961
|
+
var names22 = ["Miller_Cylindrical", "mill"];
|
|
4962
|
+
var mill_default = {
|
|
4963
|
+
init: init21,
|
|
4964
|
+
forward: forward20,
|
|
4965
|
+
inverse: inverse20,
|
|
4966
|
+
names: names22
|
|
4967
|
+
};
|
|
5452
4968
|
|
|
5453
4969
|
// ../../node_modules/proj4/lib/projections/sinu.js
|
|
4970
|
+
var MAX_ITER4 = 20;
|
|
5454
4971
|
function init22() {
|
|
5455
4972
|
if (!this.sphere) {
|
|
5456
4973
|
this.en = pj_enfn_default(this.es);
|
|
@@ -5523,26 +5040,13 @@
|
|
|
5523
5040
|
p.y = lat;
|
|
5524
5041
|
return p;
|
|
5525
5042
|
}
|
|
5526
|
-
var
|
|
5527
|
-
var
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
init_pj_inv_mlfn();
|
|
5534
|
-
init_values();
|
|
5535
|
-
init_asinz();
|
|
5536
|
-
MAX_ITER4 = 20;
|
|
5537
|
-
names23 = ["Sinusoidal", "sinu"];
|
|
5538
|
-
sinu_default = {
|
|
5539
|
-
init: init22,
|
|
5540
|
-
forward: forward21,
|
|
5541
|
-
inverse: inverse21,
|
|
5542
|
-
names: names23
|
|
5543
|
-
};
|
|
5544
|
-
}
|
|
5545
|
-
});
|
|
5043
|
+
var names23 = ["Sinusoidal", "sinu"];
|
|
5044
|
+
var sinu_default = {
|
|
5045
|
+
init: init22,
|
|
5046
|
+
forward: forward21,
|
|
5047
|
+
inverse: inverse21,
|
|
5048
|
+
names: names23
|
|
5049
|
+
};
|
|
5546
5050
|
|
|
5547
5051
|
// ../../node_modules/proj4/lib/projections/moll.js
|
|
5548
5052
|
function init23() {
|
|
@@ -5596,20 +5100,13 @@
|
|
|
5596
5100
|
p.y = lat;
|
|
5597
5101
|
return p;
|
|
5598
5102
|
}
|
|
5599
|
-
var names24,
|
|
5600
|
-
var
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
init: init23,
|
|
5607
|
-
forward: forward22,
|
|
5608
|
-
inverse: inverse22,
|
|
5609
|
-
names: names24
|
|
5610
|
-
};
|
|
5611
|
-
}
|
|
5612
|
-
});
|
|
5103
|
+
var names24 = ["Mollweide", "moll"];
|
|
5104
|
+
var moll_default = {
|
|
5105
|
+
init: init23,
|
|
5106
|
+
forward: forward22,
|
|
5107
|
+
inverse: inverse22,
|
|
5108
|
+
names: names24
|
|
5109
|
+
};
|
|
5613
5110
|
|
|
5614
5111
|
// ../../node_modules/proj4/lib/projections/eqdc.js
|
|
5615
5112
|
function init24() {
|
|
@@ -5688,28 +5185,13 @@
|
|
|
5688
5185
|
return p;
|
|
5689
5186
|
}
|
|
5690
5187
|
}
|
|
5691
|
-
var names25,
|
|
5692
|
-
var
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
init_msfnz();
|
|
5699
|
-
init_mlfn();
|
|
5700
|
-
init_adjust_lon();
|
|
5701
|
-
init_adjust_lat();
|
|
5702
|
-
init_imlfn();
|
|
5703
|
-
init_values();
|
|
5704
|
-
names25 = ["Equidistant_Conic", "eqdc"];
|
|
5705
|
-
eqdc_default = {
|
|
5706
|
-
init: init24,
|
|
5707
|
-
forward: forward23,
|
|
5708
|
-
inverse: inverse23,
|
|
5709
|
-
names: names25
|
|
5710
|
-
};
|
|
5711
|
-
}
|
|
5712
|
-
});
|
|
5188
|
+
var names25 = ["Equidistant_Conic", "eqdc"];
|
|
5189
|
+
var eqdc_default = {
|
|
5190
|
+
init: init24,
|
|
5191
|
+
forward: forward23,
|
|
5192
|
+
inverse: inverse23,
|
|
5193
|
+
names: names25
|
|
5194
|
+
};
|
|
5713
5195
|
|
|
5714
5196
|
// ../../node_modules/proj4/lib/projections/vandg.js
|
|
5715
5197
|
function init25() {
|
|
@@ -5800,21 +5282,13 @@
|
|
|
5800
5282
|
p.y = lat;
|
|
5801
5283
|
return p;
|
|
5802
5284
|
}
|
|
5803
|
-
var names26,
|
|
5804
|
-
var
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
vandg_default = {
|
|
5811
|
-
init: init25,
|
|
5812
|
-
forward: forward24,
|
|
5813
|
-
inverse: inverse24,
|
|
5814
|
-
names: names26
|
|
5815
|
-
};
|
|
5816
|
-
}
|
|
5817
|
-
});
|
|
5285
|
+
var names26 = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"];
|
|
5286
|
+
var vandg_default = {
|
|
5287
|
+
init: init25,
|
|
5288
|
+
forward: forward24,
|
|
5289
|
+
inverse: inverse24,
|
|
5290
|
+
names: names26
|
|
5291
|
+
};
|
|
5818
5292
|
|
|
5819
5293
|
// ../../node_modules/proj4/lib/projections/aeqd.js
|
|
5820
5294
|
function init26() {
|
|
@@ -5965,28 +5439,13 @@
|
|
|
5965
5439
|
}
|
|
5966
5440
|
}
|
|
5967
5441
|
}
|
|
5968
|
-
var names27,
|
|
5969
|
-
var
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
init_e1fn();
|
|
5976
|
-
init_e2fn();
|
|
5977
|
-
init_e3fn();
|
|
5978
|
-
init_gN();
|
|
5979
|
-
init_asinz();
|
|
5980
|
-
init_imlfn();
|
|
5981
|
-
names27 = ["Azimuthal_Equidistant", "aeqd"];
|
|
5982
|
-
aeqd_default = {
|
|
5983
|
-
init: init26,
|
|
5984
|
-
forward: forward25,
|
|
5985
|
-
inverse: inverse25,
|
|
5986
|
-
names: names27
|
|
5987
|
-
};
|
|
5988
|
-
}
|
|
5989
|
-
});
|
|
5442
|
+
var names27 = ["Azimuthal_Equidistant", "aeqd"];
|
|
5443
|
+
var aeqd_default = {
|
|
5444
|
+
init: init26,
|
|
5445
|
+
forward: forward25,
|
|
5446
|
+
inverse: inverse25,
|
|
5447
|
+
names: names27
|
|
5448
|
+
};
|
|
5990
5449
|
|
|
5991
5450
|
// ../../node_modules/proj4/lib/projections/ortho.js
|
|
5992
5451
|
function init27() {
|
|
@@ -6051,23 +5510,29 @@
|
|
|
6051
5510
|
p.y = lat;
|
|
6052
5511
|
return p;
|
|
6053
5512
|
}
|
|
6054
|
-
var names28
|
|
6055
|
-
var
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
ortho_default = {
|
|
6062
|
-
init: init27,
|
|
6063
|
-
forward: forward26,
|
|
6064
|
-
inverse: inverse26,
|
|
6065
|
-
names: names28
|
|
6066
|
-
};
|
|
6067
|
-
}
|
|
6068
|
-
});
|
|
5513
|
+
var names28 = ["ortho"];
|
|
5514
|
+
var ortho_default = {
|
|
5515
|
+
init: init27,
|
|
5516
|
+
forward: forward26,
|
|
5517
|
+
inverse: inverse26,
|
|
5518
|
+
names: names28
|
|
5519
|
+
};
|
|
6069
5520
|
|
|
6070
5521
|
// ../../node_modules/proj4/lib/projections/qsc.js
|
|
5522
|
+
var FACE_ENUM = {
|
|
5523
|
+
FRONT: 1,
|
|
5524
|
+
RIGHT: 2,
|
|
5525
|
+
BACK: 3,
|
|
5526
|
+
LEFT: 4,
|
|
5527
|
+
TOP: 5,
|
|
5528
|
+
BOTTOM: 6
|
|
5529
|
+
};
|
|
5530
|
+
var AREA_ENUM = {
|
|
5531
|
+
AREA_0: 1,
|
|
5532
|
+
AREA_1: 2,
|
|
5533
|
+
AREA_2: 3,
|
|
5534
|
+
AREA_3: 4
|
|
5535
|
+
};
|
|
6071
5536
|
function init28() {
|
|
6072
5537
|
this.x0 = this.x0 || 0;
|
|
6073
5538
|
this.y0 = this.y0 || 0;
|
|
@@ -6339,35 +5804,68 @@
|
|
|
6339
5804
|
}
|
|
6340
5805
|
return slon;
|
|
6341
5806
|
}
|
|
6342
|
-
var
|
|
6343
|
-
var
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
BACK: 3,
|
|
6350
|
-
LEFT: 4,
|
|
6351
|
-
TOP: 5,
|
|
6352
|
-
BOTTOM: 6
|
|
6353
|
-
};
|
|
6354
|
-
AREA_ENUM = {
|
|
6355
|
-
AREA_0: 1,
|
|
6356
|
-
AREA_1: 2,
|
|
6357
|
-
AREA_2: 3,
|
|
6358
|
-
AREA_3: 4
|
|
6359
|
-
};
|
|
6360
|
-
names29 = ["Quadrilateralized Spherical Cube", "Quadrilateralized_Spherical_Cube", "qsc"];
|
|
6361
|
-
qsc_default = {
|
|
6362
|
-
init: init28,
|
|
6363
|
-
forward: forward27,
|
|
6364
|
-
inverse: inverse27,
|
|
6365
|
-
names: names29
|
|
6366
|
-
};
|
|
6367
|
-
}
|
|
6368
|
-
});
|
|
5807
|
+
var names29 = ["Quadrilateralized Spherical Cube", "Quadrilateralized_Spherical_Cube", "qsc"];
|
|
5808
|
+
var qsc_default = {
|
|
5809
|
+
init: init28,
|
|
5810
|
+
forward: forward27,
|
|
5811
|
+
inverse: inverse27,
|
|
5812
|
+
names: names29
|
|
5813
|
+
};
|
|
6369
5814
|
|
|
6370
5815
|
// ../../node_modules/proj4/lib/projections/robin.js
|
|
5816
|
+
var COEFS_X = [
|
|
5817
|
+
[1, 22199e-21, -715515e-10, 31103e-10],
|
|
5818
|
+
[0.9986, -482243e-9, -24897e-9, -13309e-10],
|
|
5819
|
+
[0.9954, -83103e-8, -448605e-10, -986701e-12],
|
|
5820
|
+
[0.99, -135364e-8, -59661e-9, 36777e-10],
|
|
5821
|
+
[0.9822, -167442e-8, -449547e-11, -572411e-11],
|
|
5822
|
+
[0.973, -214868e-8, -903571e-10, 18736e-12],
|
|
5823
|
+
[0.96, -305085e-8, -900761e-10, 164917e-11],
|
|
5824
|
+
[0.9427, -382792e-8, -653386e-10, -26154e-10],
|
|
5825
|
+
[0.9216, -467746e-8, -10457e-8, 481243e-11],
|
|
5826
|
+
[0.8962, -536223e-8, -323831e-10, -543432e-11],
|
|
5827
|
+
[0.8679, -609363e-8, -113898e-9, 332484e-11],
|
|
5828
|
+
[0.835, -698325e-8, -640253e-10, 934959e-12],
|
|
5829
|
+
[0.7986, -755338e-8, -500009e-10, 935324e-12],
|
|
5830
|
+
[0.7597, -798324e-8, -35971e-9, -227626e-11],
|
|
5831
|
+
[0.7186, -851367e-8, -701149e-10, -86303e-10],
|
|
5832
|
+
[0.6732, -986209e-8, -199569e-9, 191974e-10],
|
|
5833
|
+
[0.6213, -0.010418, 883923e-10, 624051e-11],
|
|
5834
|
+
[0.5722, -906601e-8, 182e-6, 624051e-11],
|
|
5835
|
+
[0.5322, -677797e-8, 275608e-9, 624051e-11]
|
|
5836
|
+
];
|
|
5837
|
+
var COEFS_Y = [
|
|
5838
|
+
[-520417e-23, 0.0124, 121431e-23, -845284e-16],
|
|
5839
|
+
[0.062, 0.0124, -126793e-14, 422642e-15],
|
|
5840
|
+
[0.124, 0.0124, 507171e-14, -160604e-14],
|
|
5841
|
+
[0.186, 0.0123999, -190189e-13, 600152e-14],
|
|
5842
|
+
[0.248, 0.0124002, 710039e-13, -224e-10],
|
|
5843
|
+
[0.31, 0.0123992, -264997e-12, 835986e-13],
|
|
5844
|
+
[0.372, 0.0124029, 988983e-12, -311994e-12],
|
|
5845
|
+
[0.434, 0.0123893, -369093e-11, -435621e-12],
|
|
5846
|
+
[0.4958, 0.0123198, -102252e-10, -345523e-12],
|
|
5847
|
+
[0.5571, 0.0121916, -154081e-10, -582288e-12],
|
|
5848
|
+
[0.6176, 0.0119938, -241424e-10, -525327e-12],
|
|
5849
|
+
[0.6769, 0.011713, -320223e-10, -516405e-12],
|
|
5850
|
+
[0.7346, 0.0113541, -397684e-10, -609052e-12],
|
|
5851
|
+
[0.7903, 0.0109107, -489042e-10, -104739e-11],
|
|
5852
|
+
[0.8435, 0.0103431, -64615e-9, -140374e-14],
|
|
5853
|
+
[0.8936, 969686e-8, -64636e-9, -8547e-9],
|
|
5854
|
+
[0.9394, 840947e-8, -192841e-9, -42106e-10],
|
|
5855
|
+
[0.9761, 616527e-8, -256e-6, -42106e-10],
|
|
5856
|
+
[1, 328947e-8, -319159e-9, -42106e-10]
|
|
5857
|
+
];
|
|
5858
|
+
var FXC = 0.8487;
|
|
5859
|
+
var FYC = 1.3523;
|
|
5860
|
+
var C1 = R2D / 5;
|
|
5861
|
+
var RC1 = 1 / C1;
|
|
5862
|
+
var NODES = 18;
|
|
5863
|
+
var poly3_val = function(coefs, x) {
|
|
5864
|
+
return coefs[0] + x * (coefs[1] + x * (coefs[2] + x * coefs[3]));
|
|
5865
|
+
};
|
|
5866
|
+
var poly3_der = function(coefs, x) {
|
|
5867
|
+
return coefs[1] + x * (2 * coefs[2] + x * 3 * coefs[3]);
|
|
5868
|
+
};
|
|
6371
5869
|
function newton_rapshon(f_df, start2, max_err, iters) {
|
|
6372
5870
|
var x = start2;
|
|
6373
5871
|
for (; iters; --iters) {
|
|
@@ -6445,73 +5943,13 @@
|
|
|
6445
5943
|
ll.x = adjust_lon_default(ll.x + this.long0);
|
|
6446
5944
|
return ll;
|
|
6447
5945
|
}
|
|
6448
|
-
var
|
|
6449
|
-
var
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
[0.9986, -482243e-9, -24897e-9, -13309e-10],
|
|
6456
|
-
[0.9954, -83103e-8, -448605e-10, -986701e-12],
|
|
6457
|
-
[0.99, -135364e-8, -59661e-9, 36777e-10],
|
|
6458
|
-
[0.9822, -167442e-8, -449547e-11, -572411e-11],
|
|
6459
|
-
[0.973, -214868e-8, -903571e-10, 18736e-12],
|
|
6460
|
-
[0.96, -305085e-8, -900761e-10, 164917e-11],
|
|
6461
|
-
[0.9427, -382792e-8, -653386e-10, -26154e-10],
|
|
6462
|
-
[0.9216, -467746e-8, -10457e-8, 481243e-11],
|
|
6463
|
-
[0.8962, -536223e-8, -323831e-10, -543432e-11],
|
|
6464
|
-
[0.8679, -609363e-8, -113898e-9, 332484e-11],
|
|
6465
|
-
[0.835, -698325e-8, -640253e-10, 934959e-12],
|
|
6466
|
-
[0.7986, -755338e-8, -500009e-10, 935324e-12],
|
|
6467
|
-
[0.7597, -798324e-8, -35971e-9, -227626e-11],
|
|
6468
|
-
[0.7186, -851367e-8, -701149e-10, -86303e-10],
|
|
6469
|
-
[0.6732, -986209e-8, -199569e-9, 191974e-10],
|
|
6470
|
-
[0.6213, -0.010418, 883923e-10, 624051e-11],
|
|
6471
|
-
[0.5722, -906601e-8, 182e-6, 624051e-11],
|
|
6472
|
-
[0.5322, -677797e-8, 275608e-9, 624051e-11]
|
|
6473
|
-
];
|
|
6474
|
-
COEFS_Y = [
|
|
6475
|
-
[-520417e-23, 0.0124, 121431e-23, -845284e-16],
|
|
6476
|
-
[0.062, 0.0124, -126793e-14, 422642e-15],
|
|
6477
|
-
[0.124, 0.0124, 507171e-14, -160604e-14],
|
|
6478
|
-
[0.186, 0.0123999, -190189e-13, 600152e-14],
|
|
6479
|
-
[0.248, 0.0124002, 710039e-13, -224e-10],
|
|
6480
|
-
[0.31, 0.0123992, -264997e-12, 835986e-13],
|
|
6481
|
-
[0.372, 0.0124029, 988983e-12, -311994e-12],
|
|
6482
|
-
[0.434, 0.0123893, -369093e-11, -435621e-12],
|
|
6483
|
-
[0.4958, 0.0123198, -102252e-10, -345523e-12],
|
|
6484
|
-
[0.5571, 0.0121916, -154081e-10, -582288e-12],
|
|
6485
|
-
[0.6176, 0.0119938, -241424e-10, -525327e-12],
|
|
6486
|
-
[0.6769, 0.011713, -320223e-10, -516405e-12],
|
|
6487
|
-
[0.7346, 0.0113541, -397684e-10, -609052e-12],
|
|
6488
|
-
[0.7903, 0.0109107, -489042e-10, -104739e-11],
|
|
6489
|
-
[0.8435, 0.0103431, -64615e-9, -140374e-14],
|
|
6490
|
-
[0.8936, 969686e-8, -64636e-9, -8547e-9],
|
|
6491
|
-
[0.9394, 840947e-8, -192841e-9, -42106e-10],
|
|
6492
|
-
[0.9761, 616527e-8, -256e-6, -42106e-10],
|
|
6493
|
-
[1, 328947e-8, -319159e-9, -42106e-10]
|
|
6494
|
-
];
|
|
6495
|
-
FXC = 0.8487;
|
|
6496
|
-
FYC = 1.3523;
|
|
6497
|
-
C1 = R2D / 5;
|
|
6498
|
-
RC1 = 1 / C1;
|
|
6499
|
-
NODES = 18;
|
|
6500
|
-
poly3_val = function(coefs, x) {
|
|
6501
|
-
return coefs[0] + x * (coefs[1] + x * (coefs[2] + x * coefs[3]));
|
|
6502
|
-
};
|
|
6503
|
-
poly3_der = function(coefs, x) {
|
|
6504
|
-
return coefs[1] + x * (2 * coefs[2] + x * 3 * coefs[3]);
|
|
6505
|
-
};
|
|
6506
|
-
names30 = ["Robinson", "robin"];
|
|
6507
|
-
robin_default = {
|
|
6508
|
-
init: init29,
|
|
6509
|
-
forward: forward28,
|
|
6510
|
-
inverse: inverse28,
|
|
6511
|
-
names: names30
|
|
6512
|
-
};
|
|
6513
|
-
}
|
|
6514
|
-
});
|
|
5946
|
+
var names30 = ["Robinson", "robin"];
|
|
5947
|
+
var robin_default = {
|
|
5948
|
+
init: init29,
|
|
5949
|
+
forward: forward28,
|
|
5950
|
+
inverse: inverse28,
|
|
5951
|
+
names: names30
|
|
5952
|
+
};
|
|
6515
5953
|
|
|
6516
5954
|
// ../../node_modules/proj4/lib/projections/geocent.js
|
|
6517
5955
|
function init30() {
|
|
@@ -6525,19 +5963,13 @@
|
|
|
6525
5963
|
var point = geocentricToGeodetic(p, this.es, this.a, this.b);
|
|
6526
5964
|
return point;
|
|
6527
5965
|
}
|
|
6528
|
-
var names31,
|
|
6529
|
-
var
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
forward: forward29,
|
|
6536
|
-
inverse: inverse29,
|
|
6537
|
-
names: names31
|
|
6538
|
-
};
|
|
6539
|
-
}
|
|
6540
|
-
});
|
|
5966
|
+
var names31 = ["Geocentric", "geocentric", "geocent", "Geocent"];
|
|
5967
|
+
var geocent_default = {
|
|
5968
|
+
init: init30,
|
|
5969
|
+
forward: forward29,
|
|
5970
|
+
inverse: inverse29,
|
|
5971
|
+
names: names31
|
|
5972
|
+
};
|
|
6541
5973
|
|
|
6542
5974
|
// ../../node_modules/proj4/projs.js
|
|
6543
5975
|
function projs_default(proj42) {
|
|
@@ -6569,108 +6001,52 @@
|
|
|
6569
6001
|
proj42.Proj.projections.add(robin_default);
|
|
6570
6002
|
proj42.Proj.projections.add(geocent_default);
|
|
6571
6003
|
}
|
|
6572
|
-
var init_projs = __esm({
|
|
6573
|
-
"../../node_modules/proj4/projs.js"() {
|
|
6574
|
-
init_tmerc();
|
|
6575
|
-
init_etmerc();
|
|
6576
|
-
init_utm();
|
|
6577
|
-
init_sterea();
|
|
6578
|
-
init_stere();
|
|
6579
|
-
init_somerc();
|
|
6580
|
-
init_omerc();
|
|
6581
|
-
init_lcc();
|
|
6582
|
-
init_krovak();
|
|
6583
|
-
init_cass();
|
|
6584
|
-
init_laea();
|
|
6585
|
-
init_aea();
|
|
6586
|
-
init_gnom();
|
|
6587
|
-
init_cea();
|
|
6588
|
-
init_eqc();
|
|
6589
|
-
init_poly();
|
|
6590
|
-
init_nzmg();
|
|
6591
|
-
init_mill();
|
|
6592
|
-
init_sinu();
|
|
6593
|
-
init_moll();
|
|
6594
|
-
init_eqdc();
|
|
6595
|
-
init_vandg();
|
|
6596
|
-
init_aeqd();
|
|
6597
|
-
init_ortho();
|
|
6598
|
-
init_qsc();
|
|
6599
|
-
init_robin();
|
|
6600
|
-
init_geocent();
|
|
6601
|
-
}
|
|
6602
|
-
});
|
|
6603
6004
|
|
|
6604
6005
|
// ../../node_modules/proj4/lib/index.js
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
core_default.defaultDatum = "WGS84";
|
|
6617
|
-
core_default.Proj = Proj_default;
|
|
6618
|
-
core_default.WGS84 = new core_default.Proj("WGS84");
|
|
6619
|
-
core_default.Point = Point_default;
|
|
6620
|
-
core_default.toPoint = toPoint_default;
|
|
6621
|
-
core_default.defs = defs_default;
|
|
6622
|
-
core_default.transform = transform;
|
|
6623
|
-
core_default.mgrs = mgrs_default;
|
|
6624
|
-
core_default.version = "__VERSION__";
|
|
6625
|
-
projs_default(core_default);
|
|
6626
|
-
lib_default = core_default;
|
|
6627
|
-
}
|
|
6628
|
-
});
|
|
6006
|
+
core_default.defaultDatum = "WGS84";
|
|
6007
|
+
core_default.Proj = Proj_default;
|
|
6008
|
+
core_default.WGS84 = new core_default.Proj("WGS84");
|
|
6009
|
+
core_default.Point = Point_default;
|
|
6010
|
+
core_default.toPoint = toPoint_default;
|
|
6011
|
+
core_default.defs = defs_default;
|
|
6012
|
+
core_default.transform = transform;
|
|
6013
|
+
core_default.mgrs = mgrs_default;
|
|
6014
|
+
core_default.version = "__VERSION__";
|
|
6015
|
+
projs_default(core_default);
|
|
6016
|
+
var lib_default = core_default;
|
|
6629
6017
|
|
|
6630
|
-
// ../../node_modules/@math.gl/proj4/dist/
|
|
6631
|
-
var Proj4Projection
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
const aliasArray = [];
|
|
6639
|
-
for (const alias in aliases) {
|
|
6640
|
-
aliasArray.push([alias, aliases[alias]]);
|
|
6641
|
-
}
|
|
6642
|
-
lib_default.defs(aliasArray);
|
|
6643
|
-
}
|
|
6644
|
-
constructor({
|
|
6645
|
-
from = "WGS84",
|
|
6646
|
-
to = "WGS84"
|
|
6647
|
-
}) {
|
|
6648
|
-
_defineProperty(this, "_projection", void 0);
|
|
6649
|
-
this._projection = lib_default(from, to);
|
|
6650
|
-
if (!this._projection) {
|
|
6651
|
-
throw new Error("Invalid projection");
|
|
6652
|
-
}
|
|
6653
|
-
this.project = this.project.bind(this);
|
|
6654
|
-
this.unproject = this.unproject.bind(this);
|
|
6655
|
-
}
|
|
6656
|
-
project(coord) {
|
|
6657
|
-
return this._projection.forward(coord);
|
|
6658
|
-
}
|
|
6659
|
-
unproject(coord) {
|
|
6660
|
-
return this._projection.inverse(coord);
|
|
6661
|
-
}
|
|
6662
|
-
};
|
|
6018
|
+
// ../../node_modules/@math.gl/proj4/dist/lib/proj4-projection.js
|
|
6019
|
+
var Proj4Projection = class {
|
|
6020
|
+
static defineProjectionAliases(aliases) {
|
|
6021
|
+
const aliasArray = [];
|
|
6022
|
+
for (const alias in aliases) {
|
|
6023
|
+
aliasArray.push([alias, aliases[alias]]);
|
|
6024
|
+
}
|
|
6025
|
+
lib_default.defs(aliasArray);
|
|
6663
6026
|
}
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6027
|
+
constructor({
|
|
6028
|
+
from = "WGS84",
|
|
6029
|
+
to = "WGS84"
|
|
6030
|
+
}) {
|
|
6031
|
+
_defineProperty(this, "_projection", void 0);
|
|
6032
|
+
this._projection = lib_default(from, to);
|
|
6033
|
+
if (!this._projection) {
|
|
6034
|
+
throw new Error("Invalid projection");
|
|
6035
|
+
}
|
|
6036
|
+
this.project = this.project.bind(this);
|
|
6037
|
+
this.unproject = this.unproject.bind(this);
|
|
6670
6038
|
}
|
|
6671
|
-
|
|
6039
|
+
project(coord) {
|
|
6040
|
+
return this._projection.forward(coord);
|
|
6041
|
+
}
|
|
6042
|
+
unproject(coord) {
|
|
6043
|
+
return this._projection.inverse(coord);
|
|
6044
|
+
}
|
|
6045
|
+
};
|
|
6672
6046
|
|
|
6673
6047
|
// src/lib/parsers/parse-shx.ts
|
|
6048
|
+
var SHX_HEADER_SIZE = 100;
|
|
6049
|
+
var BIG_ENDIAN3 = false;
|
|
6674
6050
|
function parseShx(arrayBuffer) {
|
|
6675
6051
|
const headerView = new DataView(arrayBuffer, 0, SHX_HEADER_SIZE);
|
|
6676
6052
|
const header = parseSHPHeader(headerView);
|
|
@@ -6687,14 +6063,6 @@
|
|
|
6687
6063
|
lengths
|
|
6688
6064
|
};
|
|
6689
6065
|
}
|
|
6690
|
-
var SHX_HEADER_SIZE, BIG_ENDIAN3;
|
|
6691
|
-
var init_parse_shx = __esm({
|
|
6692
|
-
"src/lib/parsers/parse-shx.ts"() {
|
|
6693
|
-
init_parse_shp_header();
|
|
6694
|
-
SHX_HEADER_SIZE = 100;
|
|
6695
|
-
BIG_ENDIAN3 = false;
|
|
6696
|
-
}
|
|
6697
|
-
});
|
|
6698
6066
|
|
|
6699
6067
|
// src/lib/streaming/zip-batch-iterators.ts
|
|
6700
6068
|
async function* zipBatchIterators(iterator1, iterator2, shape) {
|
|
@@ -6704,7 +6072,10 @@
|
|
|
6704
6072
|
let iterator2Done = false;
|
|
6705
6073
|
while (!iterator1Done && !iterator2Done) {
|
|
6706
6074
|
if (batch1Data.length === 0 && !iterator1Done) {
|
|
6707
|
-
const {
|
|
6075
|
+
const {
|
|
6076
|
+
value,
|
|
6077
|
+
done
|
|
6078
|
+
} = await iterator1.next();
|
|
6708
6079
|
if (done) {
|
|
6709
6080
|
iterator1Done = true;
|
|
6710
6081
|
} else {
|
|
@@ -6712,7 +6083,10 @@
|
|
|
6712
6083
|
}
|
|
6713
6084
|
}
|
|
6714
6085
|
if (batch2Data.length === 0 && !iterator2Done) {
|
|
6715
|
-
const {
|
|
6086
|
+
const {
|
|
6087
|
+
value,
|
|
6088
|
+
done
|
|
6089
|
+
} = await iterator2.next();
|
|
6716
6090
|
if (done) {
|
|
6717
6091
|
iterator2Done = true;
|
|
6718
6092
|
} else {
|
|
@@ -6740,18 +6114,53 @@
|
|
|
6740
6114
|
batch2.splice(0, batchLength);
|
|
6741
6115
|
return batch;
|
|
6742
6116
|
}
|
|
6743
|
-
var init_zip_batch_iterators = __esm({
|
|
6744
|
-
"src/lib/streaming/zip-batch-iterators.ts"() {
|
|
6745
|
-
}
|
|
6746
|
-
});
|
|
6747
6117
|
|
|
6748
6118
|
// src/lib/parsers/parse-dbf.ts
|
|
6119
|
+
var LITTLE_ENDIAN4 = true;
|
|
6120
|
+
var DBF_HEADER_SIZE = 32;
|
|
6121
|
+
var STATE2 = function(STATE3) {
|
|
6122
|
+
STATE3[STATE3["START"] = 0] = "START";
|
|
6123
|
+
STATE3[STATE3["FIELD_DESCRIPTORS"] = 1] = "FIELD_DESCRIPTORS";
|
|
6124
|
+
STATE3[STATE3["FIELD_PROPERTIES"] = 2] = "FIELD_PROPERTIES";
|
|
6125
|
+
STATE3[STATE3["END"] = 3] = "END";
|
|
6126
|
+
STATE3[STATE3["ERROR"] = 4] = "ERROR";
|
|
6127
|
+
return STATE3;
|
|
6128
|
+
}(STATE2 || {});
|
|
6129
|
+
var DBFParser = class {
|
|
6130
|
+
binaryReader = new BinaryChunkReader();
|
|
6131
|
+
state = STATE2.START;
|
|
6132
|
+
result = {
|
|
6133
|
+
data: []
|
|
6134
|
+
};
|
|
6135
|
+
constructor(options) {
|
|
6136
|
+
this.textDecoder = new TextDecoder(options.encoding);
|
|
6137
|
+
}
|
|
6138
|
+
write(arrayBuffer) {
|
|
6139
|
+
this.binaryReader.write(arrayBuffer);
|
|
6140
|
+
this.state = parseState2(this.state, this.result, this.binaryReader, this.textDecoder);
|
|
6141
|
+
}
|
|
6142
|
+
end() {
|
|
6143
|
+
this.binaryReader.end();
|
|
6144
|
+
this.state = parseState2(this.state, this.result, this.binaryReader, this.textDecoder);
|
|
6145
|
+
if (this.state !== STATE2.END) {
|
|
6146
|
+
this.state = STATE2.ERROR;
|
|
6147
|
+
this.result.error = "DBF incomplete file";
|
|
6148
|
+
}
|
|
6149
|
+
}
|
|
6150
|
+
};
|
|
6749
6151
|
function parseDBF(arrayBuffer, options = {}) {
|
|
6750
|
-
const {
|
|
6751
|
-
|
|
6152
|
+
const {
|
|
6153
|
+
encoding = "latin1"
|
|
6154
|
+
} = options.dbf || {};
|
|
6155
|
+
const dbfParser = new DBFParser({
|
|
6156
|
+
encoding
|
|
6157
|
+
});
|
|
6752
6158
|
dbfParser.write(arrayBuffer);
|
|
6753
6159
|
dbfParser.end();
|
|
6754
|
-
const {
|
|
6160
|
+
const {
|
|
6161
|
+
data,
|
|
6162
|
+
schema
|
|
6163
|
+
} = dbfParser.result;
|
|
6755
6164
|
const shape = options?.tables?.format || options?.dbf?.shape;
|
|
6756
6165
|
switch (shape) {
|
|
6757
6166
|
case "object-row-table": {
|
|
@@ -6763,15 +6172,22 @@
|
|
|
6763
6172
|
return table;
|
|
6764
6173
|
}
|
|
6765
6174
|
case "table":
|
|
6766
|
-
return {
|
|
6175
|
+
return {
|
|
6176
|
+
schema,
|
|
6177
|
+
rows: data
|
|
6178
|
+
};
|
|
6767
6179
|
case "rows":
|
|
6768
6180
|
default:
|
|
6769
6181
|
return data;
|
|
6770
6182
|
}
|
|
6771
6183
|
}
|
|
6772
6184
|
async function* parseDBFInBatches(asyncIterator, options = {}) {
|
|
6773
|
-
const {
|
|
6774
|
-
|
|
6185
|
+
const {
|
|
6186
|
+
encoding = "latin1"
|
|
6187
|
+
} = options.dbf || {};
|
|
6188
|
+
const parser = new DBFParser({
|
|
6189
|
+
encoding
|
|
6190
|
+
});
|
|
6775
6191
|
let headerReturned = false;
|
|
6776
6192
|
for await (const arrayBuffer of asyncIterator) {
|
|
6777
6193
|
parser.write(arrayBuffer);
|
|
@@ -6793,10 +6209,10 @@
|
|
|
6793
6209
|
while (true) {
|
|
6794
6210
|
try {
|
|
6795
6211
|
switch (state) {
|
|
6796
|
-
case
|
|
6797
|
-
case
|
|
6212
|
+
case STATE2.ERROR:
|
|
6213
|
+
case STATE2.END:
|
|
6798
6214
|
return state;
|
|
6799
|
-
case
|
|
6215
|
+
case STATE2.START:
|
|
6800
6216
|
const dataView = binaryReader.getDataView(DBF_HEADER_SIZE);
|
|
6801
6217
|
if (!dataView) {
|
|
6802
6218
|
return state;
|
|
@@ -6807,9 +6223,9 @@
|
|
|
6807
6223
|
rowsTotal: result.dbfHeader.nRecords,
|
|
6808
6224
|
rows: 0
|
|
6809
6225
|
};
|
|
6810
|
-
state =
|
|
6226
|
+
state = STATE2.FIELD_DESCRIPTORS;
|
|
6811
6227
|
break;
|
|
6812
|
-
case
|
|
6228
|
+
case STATE2.FIELD_DESCRIPTORS:
|
|
6813
6229
|
const fieldDescriptorView = binaryReader.getDataView(result.dbfHeader.headerLength - DBF_HEADER_SIZE);
|
|
6814
6230
|
if (!fieldDescriptorView) {
|
|
6815
6231
|
return state;
|
|
@@ -6819,11 +6235,14 @@
|
|
|
6819
6235
|
fields: result.dbfFields.map((dbfField) => makeField(dbfField)),
|
|
6820
6236
|
metadata: {}
|
|
6821
6237
|
};
|
|
6822
|
-
state =
|
|
6238
|
+
state = STATE2.FIELD_PROPERTIES;
|
|
6823
6239
|
binaryReader.skip(1);
|
|
6824
6240
|
break;
|
|
6825
|
-
case
|
|
6826
|
-
const {
|
|
6241
|
+
case STATE2.FIELD_PROPERTIES:
|
|
6242
|
+
const {
|
|
6243
|
+
recordLength = 0,
|
|
6244
|
+
nRecords = 0
|
|
6245
|
+
} = result?.dbfHeader || {};
|
|
6827
6246
|
while (result.data.length < nRecords) {
|
|
6828
6247
|
const recordView = binaryReader.getDataView(recordLength - 1);
|
|
6829
6248
|
if (!recordView) {
|
|
@@ -6834,15 +6253,15 @@
|
|
|
6834
6253
|
result.data.push(row);
|
|
6835
6254
|
result.progress.rows = result.data.length;
|
|
6836
6255
|
}
|
|
6837
|
-
state =
|
|
6256
|
+
state = STATE2.END;
|
|
6838
6257
|
break;
|
|
6839
6258
|
default:
|
|
6840
|
-
state =
|
|
6259
|
+
state = STATE2.ERROR;
|
|
6841
6260
|
result.error = `illegal parser state ${state}`;
|
|
6842
6261
|
return state;
|
|
6843
6262
|
}
|
|
6844
6263
|
} catch (error) {
|
|
6845
|
-
state =
|
|
6264
|
+
state = STATE2.ERROR;
|
|
6846
6265
|
result.error = `DBF parsing failed: ${error.message}`;
|
|
6847
6266
|
return state;
|
|
6848
6267
|
}
|
|
@@ -6918,100 +6337,104 @@
|
|
|
6918
6337
|
function parseCharacter(text) {
|
|
6919
6338
|
return text.trim() || null;
|
|
6920
6339
|
}
|
|
6921
|
-
function makeField({
|
|
6340
|
+
function makeField({
|
|
6341
|
+
name,
|
|
6342
|
+
dataType,
|
|
6343
|
+
fieldLength,
|
|
6344
|
+
decimal
|
|
6345
|
+
}) {
|
|
6922
6346
|
switch (dataType) {
|
|
6923
6347
|
case "B":
|
|
6924
|
-
return {
|
|
6348
|
+
return {
|
|
6349
|
+
name,
|
|
6350
|
+
type: "float64",
|
|
6351
|
+
nullable: true,
|
|
6352
|
+
metadata: {}
|
|
6353
|
+
};
|
|
6925
6354
|
case "C":
|
|
6926
|
-
return {
|
|
6355
|
+
return {
|
|
6356
|
+
name,
|
|
6357
|
+
type: "utf8",
|
|
6358
|
+
nullable: true,
|
|
6359
|
+
metadata: {}
|
|
6360
|
+
};
|
|
6927
6361
|
case "F":
|
|
6928
|
-
return {
|
|
6362
|
+
return {
|
|
6363
|
+
name,
|
|
6364
|
+
type: "float64",
|
|
6365
|
+
nullable: true,
|
|
6366
|
+
metadata: {}
|
|
6367
|
+
};
|
|
6929
6368
|
case "N":
|
|
6930
|
-
return {
|
|
6369
|
+
return {
|
|
6370
|
+
name,
|
|
6371
|
+
type: "float64",
|
|
6372
|
+
nullable: true,
|
|
6373
|
+
metadata: {}
|
|
6374
|
+
};
|
|
6931
6375
|
case "O":
|
|
6932
|
-
return {
|
|
6376
|
+
return {
|
|
6377
|
+
name,
|
|
6378
|
+
type: "float64",
|
|
6379
|
+
nullable: true,
|
|
6380
|
+
metadata: {}
|
|
6381
|
+
};
|
|
6933
6382
|
case "D":
|
|
6934
|
-
return {
|
|
6383
|
+
return {
|
|
6384
|
+
name,
|
|
6385
|
+
type: "timestamp-millisecond",
|
|
6386
|
+
nullable: true,
|
|
6387
|
+
metadata: {}
|
|
6388
|
+
};
|
|
6935
6389
|
case "L":
|
|
6936
|
-
return {
|
|
6390
|
+
return {
|
|
6391
|
+
name,
|
|
6392
|
+
type: "bool",
|
|
6393
|
+
nullable: true,
|
|
6394
|
+
metadata: {}
|
|
6395
|
+
};
|
|
6937
6396
|
default:
|
|
6938
6397
|
throw new Error("Unsupported data type");
|
|
6939
6398
|
}
|
|
6940
6399
|
}
|
|
6941
|
-
var LITTLE_ENDIAN4, DBF_HEADER_SIZE, STATE2, DBFParser;
|
|
6942
|
-
var init_parse_dbf = __esm({
|
|
6943
|
-
"src/lib/parsers/parse-dbf.ts"() {
|
|
6944
|
-
init_binary_chunk_reader();
|
|
6945
|
-
LITTLE_ENDIAN4 = true;
|
|
6946
|
-
DBF_HEADER_SIZE = 32;
|
|
6947
|
-
(function(STATE3) {
|
|
6948
|
-
STATE3[STATE3["START"] = 0] = "START";
|
|
6949
|
-
STATE3[STATE3["FIELD_DESCRIPTORS"] = 1] = "FIELD_DESCRIPTORS";
|
|
6950
|
-
STATE3[STATE3["FIELD_PROPERTIES"] = 2] = "FIELD_PROPERTIES";
|
|
6951
|
-
STATE3[STATE3["END"] = 3] = "END";
|
|
6952
|
-
STATE3[STATE3["ERROR"] = 4] = "ERROR";
|
|
6953
|
-
})(STATE2 || (STATE2 = {}));
|
|
6954
|
-
DBFParser = class {
|
|
6955
|
-
constructor(options) {
|
|
6956
|
-
this.binaryReader = new BinaryChunkReader();
|
|
6957
|
-
this.state = 0;
|
|
6958
|
-
this.result = {
|
|
6959
|
-
data: []
|
|
6960
|
-
};
|
|
6961
|
-
this.textDecoder = new TextDecoder(options.encoding);
|
|
6962
|
-
}
|
|
6963
|
-
write(arrayBuffer) {
|
|
6964
|
-
this.binaryReader.write(arrayBuffer);
|
|
6965
|
-
this.state = parseState2(this.state, this.result, this.binaryReader, this.textDecoder);
|
|
6966
|
-
}
|
|
6967
|
-
end() {
|
|
6968
|
-
this.binaryReader.end();
|
|
6969
|
-
this.state = parseState2(this.state, this.result, this.binaryReader, this.textDecoder);
|
|
6970
|
-
if (this.state !== 3) {
|
|
6971
|
-
this.state = 4;
|
|
6972
|
-
this.result.error = "DBF incomplete file";
|
|
6973
|
-
}
|
|
6974
|
-
}
|
|
6975
|
-
};
|
|
6976
|
-
}
|
|
6977
|
-
});
|
|
6978
6400
|
|
|
6979
6401
|
// src/dbf-loader.ts
|
|
6980
|
-
var VERSION2
|
|
6981
|
-
var
|
|
6982
|
-
"
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
options: {
|
|
6995
|
-
dbf: {
|
|
6996
|
-
encoding: "latin1"
|
|
6997
|
-
}
|
|
6998
|
-
}
|
|
6999
|
-
};
|
|
7000
|
-
DBFLoader = {
|
|
7001
|
-
...DBFWorkerLoader,
|
|
7002
|
-
parse: async (arrayBuffer, options) => parseDBF(arrayBuffer, options),
|
|
7003
|
-
parseSync: parseDBF,
|
|
7004
|
-
parseInBatches(arrayBufferIterator, options) {
|
|
7005
|
-
return parseDBFInBatches(arrayBufferIterator, options);
|
|
7006
|
-
}
|
|
7007
|
-
};
|
|
6402
|
+
var VERSION2 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
6403
|
+
var DBFWorkerLoader = {
|
|
6404
|
+
name: "DBF",
|
|
6405
|
+
id: "dbf",
|
|
6406
|
+
module: "shapefile",
|
|
6407
|
+
version: VERSION2,
|
|
6408
|
+
worker: true,
|
|
6409
|
+
category: "table",
|
|
6410
|
+
extensions: ["dbf"],
|
|
6411
|
+
mimeTypes: ["application/x-dbf"],
|
|
6412
|
+
options: {
|
|
6413
|
+
dbf: {
|
|
6414
|
+
encoding: "latin1"
|
|
6415
|
+
}
|
|
7008
6416
|
}
|
|
7009
|
-
}
|
|
6417
|
+
};
|
|
6418
|
+
var DBFLoader = {
|
|
6419
|
+
...DBFWorkerLoader,
|
|
6420
|
+
parse: async (arrayBuffer, options) => parseDBF(arrayBuffer, options),
|
|
6421
|
+
parseSync: parseDBF,
|
|
6422
|
+
parseInBatches(arrayBufferIterator, options) {
|
|
6423
|
+
return parseDBFInBatches(arrayBufferIterator, options);
|
|
6424
|
+
}
|
|
6425
|
+
};
|
|
7010
6426
|
|
|
7011
6427
|
// src/lib/parsers/parse-shapefile.ts
|
|
7012
6428
|
async function* parseShapefileInBatches(asyncIterator, options, context) {
|
|
7013
|
-
const {
|
|
7014
|
-
|
|
6429
|
+
const {
|
|
6430
|
+
reproject = false,
|
|
6431
|
+
_targetCrs = "WGS84"
|
|
6432
|
+
} = options?.gis || {};
|
|
6433
|
+
const {
|
|
6434
|
+
shx,
|
|
6435
|
+
cpg,
|
|
6436
|
+
prj
|
|
6437
|
+
} = await loadShapefileSidecarFiles(options, context);
|
|
7015
6438
|
const shapeIterable = await parseInBatchesFromContext(asyncIterator, SHPLoader, options, context);
|
|
7016
6439
|
const shapeIterator = shapeIterable[Symbol.asyncIterator]?.() || shapeIterable[Symbol.iterator]?.();
|
|
7017
6440
|
let propertyIterator = null;
|
|
@@ -7019,7 +6442,9 @@
|
|
|
7019
6442
|
if (dbfResponse?.ok) {
|
|
7020
6443
|
const propertyIterable = await parseInBatchesFromContext(dbfResponse, DBFLoader, {
|
|
7021
6444
|
...options,
|
|
7022
|
-
dbf: {
|
|
6445
|
+
dbf: {
|
|
6446
|
+
encoding: cpg || "latin1"
|
|
6447
|
+
}
|
|
7023
6448
|
}, context);
|
|
7024
6449
|
propertyIterator = propertyIterable[Symbol.asyncIterator]?.() || propertyIterable[Symbol.iterator]();
|
|
7025
6450
|
}
|
|
@@ -7063,14 +6488,28 @@
|
|
|
7063
6488
|
}
|
|
7064
6489
|
}
|
|
7065
6490
|
async function parseShapefile(arrayBuffer, options, context) {
|
|
7066
|
-
const {
|
|
7067
|
-
|
|
7068
|
-
|
|
6491
|
+
const {
|
|
6492
|
+
reproject = false,
|
|
6493
|
+
_targetCrs = "WGS84"
|
|
6494
|
+
} = options?.gis || {};
|
|
6495
|
+
const {
|
|
6496
|
+
shx,
|
|
6497
|
+
cpg,
|
|
6498
|
+
prj
|
|
6499
|
+
} = await loadShapefileSidecarFiles(options, context);
|
|
6500
|
+
const {
|
|
6501
|
+
header,
|
|
6502
|
+
geometries
|
|
6503
|
+
} = await parseFromContext(arrayBuffer, SHPLoader, options, context);
|
|
7069
6504
|
const geojsonGeometries = parseGeometries(geometries);
|
|
7070
6505
|
let properties = [];
|
|
7071
6506
|
const dbfResponse = await context?.fetch(replaceExtension(context?.url, "dbf"));
|
|
7072
6507
|
if (dbfResponse?.ok) {
|
|
7073
|
-
properties = await parseFromContext(dbfResponse, DBFLoader, {
|
|
6508
|
+
properties = await parseFromContext(dbfResponse, DBFLoader, {
|
|
6509
|
+
dbf: {
|
|
6510
|
+
encoding: cpg || "latin1"
|
|
6511
|
+
}
|
|
6512
|
+
}, context);
|
|
7074
6513
|
}
|
|
7075
6514
|
let features = joinProperties(geojsonGeometries, properties);
|
|
7076
6515
|
if (reproject) {
|
|
@@ -7108,11 +6547,17 @@
|
|
|
7108
6547
|
if (!sourceCrs && !targetCrs) {
|
|
7109
6548
|
return features;
|
|
7110
6549
|
}
|
|
7111
|
-
const projection = new Proj4Projection({
|
|
6550
|
+
const projection = new Proj4Projection({
|
|
6551
|
+
from: sourceCrs || "WGS84",
|
|
6552
|
+
to: targetCrs || "WGS84"
|
|
6553
|
+
});
|
|
7112
6554
|
return transformGeoJsonCoords(features, (coord) => projection.project(coord));
|
|
7113
6555
|
}
|
|
7114
6556
|
async function loadShapefileSidecarFiles(options, context) {
|
|
7115
|
-
const {
|
|
6557
|
+
const {
|
|
6558
|
+
url,
|
|
6559
|
+
fetch
|
|
6560
|
+
} = context;
|
|
7116
6561
|
const shxPromise = fetch(replaceExtension(url, "shx"));
|
|
7117
6562
|
const cpgPromise = fetch(replaceExtension(url, "cpg"));
|
|
7118
6563
|
const prjPromise = fetch(replaceExtension(url, "prj"));
|
|
@@ -7162,106 +6607,53 @@
|
|
|
7162
6607
|
}
|
|
7163
6608
|
return extIndex;
|
|
7164
6609
|
}
|
|
7165
|
-
var init_parse_shapefile = __esm({
|
|
7166
|
-
"src/lib/parsers/parse-shapefile.ts"() {
|
|
7167
|
-
init_src();
|
|
7168
|
-
init_src2();
|
|
7169
|
-
init_esm();
|
|
7170
|
-
init_parse_shx();
|
|
7171
|
-
init_zip_batch_iterators();
|
|
7172
|
-
init_shp_loader();
|
|
7173
|
-
init_dbf_loader();
|
|
7174
|
-
}
|
|
7175
|
-
});
|
|
7176
6610
|
|
|
7177
6611
|
// src/shapefile-loader.ts
|
|
7178
|
-
var VERSION3
|
|
7179
|
-
var
|
|
7180
|
-
"
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
}
|
|
7198
|
-
},
|
|
7199
|
-
parse: parseShapefile,
|
|
7200
|
-
parseInBatches: parseShapefileInBatches
|
|
7201
|
-
};
|
|
7202
|
-
}
|
|
7203
|
-
});
|
|
6612
|
+
var VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
6613
|
+
var ShapefileLoader = {
|
|
6614
|
+
name: "Shapefile",
|
|
6615
|
+
id: "shapefile",
|
|
6616
|
+
module: "shapefile",
|
|
6617
|
+
version: VERSION3,
|
|
6618
|
+
category: "geometry",
|
|
6619
|
+
extensions: ["shp"],
|
|
6620
|
+
mimeTypes: ["application/octet-stream"],
|
|
6621
|
+
tests: [new Uint8Array(SHP_MAGIC_NUMBER2).buffer],
|
|
6622
|
+
options: {
|
|
6623
|
+
shapefile: {},
|
|
6624
|
+
shp: {
|
|
6625
|
+
_maxDimensions: 4
|
|
6626
|
+
}
|
|
6627
|
+
},
|
|
6628
|
+
parse: parseShapefile,
|
|
6629
|
+
parseInBatches: parseShapefileInBatches
|
|
6630
|
+
};
|
|
7204
6631
|
|
|
7205
6632
|
// src/lib/streaming/binary-reader.ts
|
|
7206
|
-
var BinaryReader
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
constructor(arrayBuffer) {
|
|
7211
|
-
this.offset = 0;
|
|
7212
|
-
this.arrayBuffer = arrayBuffer;
|
|
7213
|
-
}
|
|
7214
|
-
hasAvailableBytes(bytes) {
|
|
7215
|
-
return this.arrayBuffer.byteLength - this.offset >= bytes;
|
|
7216
|
-
}
|
|
7217
|
-
getDataView(bytes) {
|
|
7218
|
-
if (bytes && !this.hasAvailableBytes(bytes)) {
|
|
7219
|
-
throw new Error("binary data exhausted");
|
|
7220
|
-
}
|
|
7221
|
-
const dataView = bytes ? new DataView(this.arrayBuffer, this.offset, bytes) : new DataView(this.arrayBuffer, this.offset);
|
|
7222
|
-
this.offset += bytes;
|
|
7223
|
-
return dataView;
|
|
7224
|
-
}
|
|
7225
|
-
skip(bytes) {
|
|
7226
|
-
this.offset += bytes;
|
|
7227
|
-
}
|
|
7228
|
-
rewind(bytes) {
|
|
7229
|
-
this.offset -= bytes;
|
|
7230
|
-
}
|
|
7231
|
-
};
|
|
6633
|
+
var BinaryReader = class {
|
|
6634
|
+
constructor(arrayBuffer) {
|
|
6635
|
+
this.offset = 0;
|
|
6636
|
+
this.arrayBuffer = arrayBuffer;
|
|
7232
6637
|
}
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
// src/index.ts
|
|
7236
|
-
var src_exports = {};
|
|
7237
|
-
__export(src_exports, {
|
|
7238
|
-
DBFLoader: () => DBFLoader,
|
|
7239
|
-
DBFWorkerLoader: () => DBFWorkerLoader,
|
|
7240
|
-
SHPLoader: () => SHPLoader,
|
|
7241
|
-
SHPWorkerLoader: () => SHPWorkerLoader,
|
|
7242
|
-
ShapefileLoader: () => ShapefileLoader,
|
|
7243
|
-
_BinaryChunkReader: () => BinaryChunkReader,
|
|
7244
|
-
_BinaryReader: () => BinaryReader,
|
|
7245
|
-
_zipBatchIterators: () => zipBatchIterators
|
|
7246
|
-
});
|
|
7247
|
-
var init_src3 = __esm({
|
|
7248
|
-
"src/index.ts"() {
|
|
7249
|
-
init_shapefile_loader();
|
|
7250
|
-
init_dbf_loader();
|
|
7251
|
-
init_shp_loader();
|
|
7252
|
-
init_binary_reader();
|
|
7253
|
-
init_binary_chunk_reader();
|
|
7254
|
-
init_zip_batch_iterators();
|
|
6638
|
+
hasAvailableBytes(bytes) {
|
|
6639
|
+
return this.arrayBuffer.byteLength - this.offset >= bytes;
|
|
7255
6640
|
}
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
module.exports = Object.assign(globalThis.loaders, moduleExports);
|
|
6641
|
+
getDataView(bytes) {
|
|
6642
|
+
if (bytes && !this.hasAvailableBytes(bytes)) {
|
|
6643
|
+
throw new Error("binary data exhausted");
|
|
6644
|
+
}
|
|
6645
|
+
const dataView = bytes ? new DataView(this.arrayBuffer, this.offset, bytes) : new DataView(this.arrayBuffer, this.offset);
|
|
6646
|
+
this.offset += bytes;
|
|
6647
|
+
return dataView;
|
|
7264
6648
|
}
|
|
7265
|
-
|
|
7266
|
-
|
|
6649
|
+
skip(bytes) {
|
|
6650
|
+
this.offset += bytes;
|
|
6651
|
+
}
|
|
6652
|
+
rewind(bytes) {
|
|
6653
|
+
this.offset -= bytes;
|
|
6654
|
+
}
|
|
6655
|
+
};
|
|
6656
|
+
return __toCommonJS(src_exports);
|
|
7267
6657
|
})();
|
|
6658
|
+
return __exports__;
|
|
6659
|
+
});
|